Message ID | 20241212004727.2903846-13-alexey.klimov@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | qrb4210-rb2: add wsa audio playback and capture support | expand |
On 12.12.2024 1:47 AM, Alexey Klimov wrote: > Add support for audio playback via WCD937X/WSA881X. From DSP > and rxmacro the sound stream goes into AUX port of wcd codec. > wcd codec decodes digital audio into analog and outputs it to > single wsa amplifier hence only the mono configuration. > > The audio playback is verified using the following commands: > > amixer -c0 cset iface=MIXER,name='AUX_RDAC Switch' 1 > amixer -c0 cset iface=MIXER,name='RX_RX2 Digital Volume' 80 > amixer -c0 cset iface=MIXER,name='RX INT2_1 MIX1 INP0' 'RX2' > amixer -c0 cset iface=MIXER,name='RX_CODEC_DMA_RX_1 Audio Mixer MultiMedia1' 1 > amixer -c0 cset iface=MIXER,name='RX_MACRO RX2 MUX' 'AIF2_PB' > amixer -c0 cset iface=MIXER,name='SpkrMono WSA_RDAC' 1 > amixer -c0 cset iface=MIXER,name='LO Switch' 1 > amixer -c0 cset iface=MIXER,name='RX HPH Mode' 4 > > aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav > > Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> > --- > arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > index 827ce5f7adfb..34ba563d0d07 100644 > --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts > @@ -111,7 +111,9 @@ sound { > pinctrl-0 = <&lpi_i2s2_active>; > pinctrl-names = "default"; > model = "Qualcomm-RB2-WSA8815-Speakers-DMIC0"; > - audio-routing = "MM_DL1", "MultiMedia1 Playback", > + audio-routing = "IN3_AUX", "AUX_OUT", > + "SpkrMono WSA_IN", "AUX", > + "MM_DL1", "MultiMedia1 Playback", > "MM_DL2", "MultiMedia2 Playback"; > > mm1-dai-link { > @@ -145,6 +147,22 @@ codec { > sound-dai = <<9611_codec 0>; > }; > }; > + > + wsa-dai-link { > + link-name = "WSA Playback"; > + > + cpu { > + sound-dai = <&q6afedai RX_CODEC_DMA_RX_1>; > + }; > + > + platform { > + sound-dai = <&q6routing>; > + }; > + > + codec { > + sound-dai = <&wsa881x>, <&wcd937x 0>, <&swr1 3>, <&rxmacro 1>; > + }; Please sort these subnodes alphabetically - and yes I realize we managed to overlook that for 10 years lgtm otherwise Konrad
diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index 827ce5f7adfb..34ba563d0d07 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -111,7 +111,9 @@ sound { pinctrl-0 = <&lpi_i2s2_active>; pinctrl-names = "default"; model = "Qualcomm-RB2-WSA8815-Speakers-DMIC0"; - audio-routing = "MM_DL1", "MultiMedia1 Playback", + audio-routing = "IN3_AUX", "AUX_OUT", + "SpkrMono WSA_IN", "AUX", + "MM_DL1", "MultiMedia1 Playback", "MM_DL2", "MultiMedia2 Playback"; mm1-dai-link { @@ -145,6 +147,22 @@ codec { sound-dai = <<9611_codec 0>; }; }; + + wsa-dai-link { + link-name = "WSA Playback"; + + cpu { + sound-dai = <&q6afedai RX_CODEC_DMA_RX_1>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wsa881x>, <&wcd937x 0>, <&swr1 3>, <&rxmacro 1>; + }; + }; }; wcd937x: codec {
Add support for audio playback via WCD937X/WSA881X. From DSP and rxmacro the sound stream goes into AUX port of wcd codec. wcd codec decodes digital audio into analog and outputs it to single wsa amplifier hence only the mono configuration. The audio playback is verified using the following commands: amixer -c0 cset iface=MIXER,name='AUX_RDAC Switch' 1 amixer -c0 cset iface=MIXER,name='RX_RX2 Digital Volume' 80 amixer -c0 cset iface=MIXER,name='RX INT2_1 MIX1 INP0' 'RX2' amixer -c0 cset iface=MIXER,name='RX_CODEC_DMA_RX_1 Audio Mixer MultiMedia1' 1 amixer -c0 cset iface=MIXER,name='RX_MACRO RX2 MUX' 'AIF2_PB' amixer -c0 cset iface=MIXER,name='SpkrMono WSA_RDAC' 1 amixer -c0 cset iface=MIXER,name='LO Switch' 1 amixer -c0 cset iface=MIXER,name='RX HPH Mode' 4 aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> --- arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)