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@xxxxxxxxxxxxx wrote: > > + > > + es8388-sound { > > + compatible = "simple-audio-card"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&hp_det_pin>; > > + simple-audio-card,name = "rockchip,es8388-codec"; > > + 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>; > > + }; > > + }; > > + > > >