devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: linux-rockchip@lists.infradead.org, Levin <djw@t-chip.com.cn>
Cc: "Wayne Chou" <zxf@t-chip.com.cn>,
	"Kongxin Deng" <dkx@t-chip.com.cn>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Jensen Huang" <jensenhuang@friendlyarm.com>,
	"Johan Jonker" <jbx6244@gmail.com>,
	"Liang Chen" <cl@rock-chips.com>,
	"Marty Jones" <mj8263788@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Uwe Kleine-König" <uwe@kleine-koenig.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v0 2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS
Date: Tue, 29 Jun 2021 11:32:40 +0200	[thread overview]
Message-ID: <4501122.2vfOZ694Ok@diego> (raw)
In-Reply-To: <3771996.aKNjEaI27c@diego>

Am Dienstag, 29. Juni 2021, 11:30:10 CEST schrieb Heiko Stübner:
> Hi Levin,
> 
> Am Dienstag, 29. Juni 2021, 11:15:59 CEST schrieb Levin:
> > Hi all, is it possible to turn on some codec mixer switch in the device 
> > tree?
> 
> I don't think that is appropriate and/or/ possible in the devicetree.
> 
> Instead I think you want an Alsa UCM profile for it, see:
> https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/Rockchip
> 
> 
> Heiko
> 
> > 
> > 
> > Currently, to hear to sound, we need to run the following commands from 
> > the user space:
> > 
> >    # turn on mixer switch
> > 
> >    amixer -c 1 sset 'Left Mixer' on
> >    amixer -c 1 sset 'Right Mixer' on
> > 
> >    # raise volume
> > 
> >    amixer -c 1 sset 'Output 2' 36
> > 
> > 
> > If these settings can be embedded into device tree, and set by kernel as 
> > initial ALSA path settings,
> > 
> > user can hear the sound with zero ALSA config. That'll be great.
> > 
> > 
> > On 2021-06-28 11:54 AM, djw@t-chip.com.cn wrote:
> > > +
> > > +	es8388-sound {
> > > +		compatible = "simple-audio-card";
> > > +		pinctrl-names = "default";
> > > +		pinctrl-0 = <&hp_det_pin>;
> > > +		simple-audio-card,name = "rockchip,es8388-codec";

and I guess you'd want a more specific name as that config likely is board-specific
not for all boards using the es8388-codec?


Heiko


> > > +		simple-audio-card,format = "i2s";
> > > +		simple-audio-card,mclk-fs = <256>;
> > > +
> > > +		simple-audio-card,widgets =
> > > +			"Microphone", "Mic Jack",
> > > +			"Headphone", "Headphones";
> > > +		simple-audio-card,routing =
> > > +			"LINPUT1", "Mic Jack",
> > > +			"Headphone Amp INL", "LOUT2",
> > > +			"Headphone Amp INR", "ROUT2",
> > > +			"Headphones", "Headphone Amp OUTL",
> > > +			"Headphones", "Headphone Amp OUTR";
> > > +
> > > +		simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
> > > +		simple-audio-card,aux-devs = <&headphones_amp>;
> > > +		simple-audio-card,pin-switches = "Headphones";
> > > +
> > > +		simple-audio-card,cpu {
> > > +			sound-dai = <&i2s1>;
> > > +		};
> > > +
> > > +		simple-audio-card,codec {
> > > +			sound-dai = <&es8388>;
> > > +		};
> > > +	};
> > > +
> > >
> > 
> 
> 





  reply	other threads:[~2021-06-29  9:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28  3:54 [PATCH v0 0/2] Add support for Firefly ROC-RK3399-PC-PLUS djw
2021-06-28  3:54 ` [PATCH v0 1/2] dt-bindings: add doc " djw
2021-07-14 20:52   ` Rob Herring
2021-06-28  3:54 ` [PATCH v0 2/2] arm64: dts: rockchip: add support " djw
2021-06-29  9:15   ` Levin
2021-06-29  9:30     ` Heiko Stübner
2021-06-29  9:32       ` Heiko Stübner [this message]
2021-06-30  6:49         ` Levin
2021-07-15 22:42 ` [PATCH v0 0/2] Add " Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4501122.2vfOZ694Ok@diego \
    --to=heiko@sntech.de \
    --cc=cl@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=djw@t-chip.com.cn \
    --cc=dkx@t-chip.com.cn \
    --cc=jagan@amarulasolutions.com \
    --cc=jbx6244@gmail.com \
    --cc=jensenhuang@friendlyarm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mj8263788@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=uwe@kleine-koenig.org \
    --cc=wens@csie.org \
    --cc=zxf@t-chip.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).