]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
Qualcomm: Add SM8550 HDK HiFi config
authorNeil Armstrong <neil.armstrong@linaro.org>
Tue, 30 Jan 2024 16:27:58 +0000 (17:27 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 2 Aug 2024 13:51:59 +0000 (15:51 +0200)
Add UCM2 configs for the Qualcomm SM8550-HDK Board to handle:
- on-board Speakers
- Headphones speakers
- Headphones Microphones
- Top and Bottom on-board Microphones

Tested with PulseAudio 16.1

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/393
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Qualcomm/sm8550/HDK/HiFi.conf [new file with mode: 0644]
ucm2/Qualcomm/sm8550/HDK/SM8550-HDK.conf [new file with mode: 0644]
ucm2/conf.d/sm8550/SM8550-HDK.conf [new symlink]

diff --git a/ucm2/Qualcomm/sm8550/HDK/HiFi.conf b/ucm2/Qualcomm/sm8550/HDK/HiFi.conf
new file mode 100644 (file)
index 0000000..ffa84df
--- /dev/null
@@ -0,0 +1,99 @@
+SectionVerb {
+       EnableSequence [
+               cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia1' 1"
+               cset "name='WSA_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
+               cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1"
+       ]
+
+       Include.wsae.File "/codecs/wsa884x/two-speakers/DefaultEnableSeq.conf"
+
+       Value {
+               TQ "HiFi"
+       }
+}
+
+SectionDevice."Speaker" {
+       Comment "Speaker playback"
+
+       Include.wcdspk1e.File "/codecs/qcom-lpass/wsa-macro/SpeakerEnableSeq.conf"
+       Include.wcdspk1d.File "/codecs/qcom-lpass/wsa-macro/SpeakerDisableSeq.conf"
+       Include.wsaspkd.File "/codecs/wsa884x/two-speakers/SpeakerSeq.conf"
+
+       Value {
+               PlaybackChannels 2
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},1"
+               PlaybackMixer "default:${CardId}"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones Playback"
+
+       Include.wcdhpe.File "/codecs/wcd938x/HeadphoneEnableSeq.conf"
+       Include.wcdhpd.File "/codecs/wcd938x/HeadphoneDisableSeq.conf"
+       Include.rxmhpe.File "/codecs/qcom-lpass/rx-macro/HeadphoneEnableSeq.conf"
+       Include.rxmhpd.File "/codecs/qcom-lpass/rx-macro/HeadphoneDisableSeq.conf"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},0"
+               PlaybackMixer "default:${CardId}"
+               PlaybackMixerElem "HP Digital"
+               JackControl "Headphone Jack"
+               JackHWMute "Speaker"
+       }
+}
+
+SectionDevice."Mic1" {
+       Comment "Top Microphone"
+
+       Include.wcdmice.File "/codecs/wcd938x/AnalogMic1EnableSeq.conf"
+       Include.wcdmicd.File "/codecs/wcd938x/AnalogMic1DisableSeq.conf"
+       # WCD938x ADC1 is routed to TX SWR_INPUT0
+       Include.txmhpe.File "/codecs/qcom-lpass/tx-macro/SoundwireMic0EnableSeq.conf"
+       Include.txmhpd.File "/codecs/qcom-lpass/tx-macro/SoundwireMicDisableSeq.conf"
+
+       Value {
+               CaptureChannels 1
+               CapturePriority 200
+               CapturePCM "hw:${CardId},2"
+               CaptureMixerElem "ADC1"
+       }
+}
+
+SectionDevice."Mic2" {
+       Comment "Headphone Microphone"
+
+       Include.wcdmice.File "/codecs/wcd938x/HeadphoneMicEnableSeq.conf"
+       Include.wcdmicd.File "/codecs/wcd938x/HeadphoneMicDisableSeq.conf"
+       # WCD938x ADC2 is routed to TX SWR_INPUT1
+       Include.txmhpe.File "/codecs/qcom-lpass/tx-macro/SoundwireMic1EnableSeq.conf"
+       Include.txmhpd.File "/codecs/qcom-lpass/tx-macro/HeadphoneMicDisableSeq.conf"
+
+       Value {
+               CapturePriority 150
+               CapturePCM "hw:${CardId},2"
+               CaptureMixerElem "ADC2"
+               JackControl "Mic Jack"
+               JackHWMute "Top"
+               JackHWMute "Bottom"
+       }
+}
+
+SectionDevice."Mic3" {
+       Comment "Bottom Microphone"
+
+       Include.wcdmice.File "/codecs/wcd938x/AnalogMic5EnableSeq.conf"
+       Include.wcdmicd.File "/codecs/wcd938x/AnalogMic5DisableSeq.conf"
+       # WCD938x ADC4 is routed to TX SWR_INPUT1
+       Include.txmhpe.File "/codecs/qcom-lpass/tx-macro/SoundwireMic1EnableSeq.conf"
+       Include.txmhpd.File "/codecs/qcom-lpass/tx-macro/SoundwireMicDisableSeq.conf"
+
+       Value {
+               CaptureChannels 1
+               CapturePriority 100
+               CapturePCM "hw:${CardId},2"
+               CaptureMixerElem "ADC1"
+       }
+}
diff --git a/ucm2/Qualcomm/sm8550/HDK/SM8550-HDK.conf b/ucm2/Qualcomm/sm8550/HDK/SM8550-HDK.conf
new file mode 100644 (file)
index 0000000..f694c9e
--- /dev/null
@@ -0,0 +1,23 @@
+Syntax 4
+
+SectionUseCase."HiFi" {
+       File "/Qualcomm/sm8550/HDK/HiFi.conf"
+       Comment "HiFi quality Music."
+}
+
+BootSequence [
+       cset "name='SpkrLeft PA Volume' 12"
+       cset "name='SpkrRight PA Volume' 12"
+       cset "name='HPHL Volume' 20"
+       cset "name='HPHR Volume' 20"
+       cset "name='ADC1 Volume' 10"
+       cset "name='ADC2 Volume' 10"
+       cset "name='ADC4 Volume' 10"
+]
+
+Include.card-init.File "/lib/card-init.conf"
+Include.ctl-remap.File "/lib/ctl-remap.conf"
+Include.codec-init.File "/codecs/wsa884x/two-speakers/init.conf"
+Include.codec-init.File "/codecs/wcd938x/init.conf"
+Include.codec-init.File "/codecs/qcom-lpass/wsa-macro/init.conf"
+Include.codec-init.File "/codecs/qcom-lpass/rx-macro/init.conf"
diff --git a/ucm2/conf.d/sm8550/SM8550-HDK.conf b/ucm2/conf.d/sm8550/SM8550-HDK.conf
new file mode 120000 (symlink)
index 0000000..428c3c4
--- /dev/null
@@ -0,0 +1 @@
+../../Qualcomm/sm8550/HDK/SM8550-HDK.conf
\ No newline at end of file