From f0cc6a27a805d22c2140f4d262e2c18d7f6b9bfc Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Mon, 4 Dec 2023 12:31:21 +0100 Subject: [PATCH] Qualcomm: Add SM8650 QRD HiFi config Add UCM2 configs for the Qualcomm SM8650-QRD Board: - on-board Speakers - on-board Bottom and Back microphones - Headphones Speakers and Microphone Linux devicetree changes: https://lore.kernel.org/all/20240125-topic-sm8650-upstream-audio-dt-v1-1-c24d23ae5763@linaro.org/ Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/390 Signed-off-by: Neil Armstrong Signed-off-by: Jaroslav Kysela --- ucm2/Qualcomm/sm8650/QRD/HiFi.conf | 99 ++++++++++++++++++++++++ ucm2/Qualcomm/sm8650/QRD/SM8650-QRD.conf | 13 ++++ ucm2/conf.d/sm8650/SM8650-QRD.conf | 1 + 3 files changed, 113 insertions(+) create mode 100644 ucm2/Qualcomm/sm8650/QRD/HiFi.conf create mode 100644 ucm2/Qualcomm/sm8650/QRD/SM8650-QRD.conf create mode 120000 ucm2/conf.d/sm8650/SM8650-QRD.conf diff --git a/ucm2/Qualcomm/sm8650/QRD/HiFi.conf b/ucm2/Qualcomm/sm8650/QRD/HiFi.conf new file mode 100644 index 0000000..50c1601 --- /dev/null +++ b/ucm2/Qualcomm/sm8650/QRD/HiFi.conf @@ -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.wcde.File "/codecs/wcd939x/DefaultEnableSeq.conf" + 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" + + Include.wcdhpe.File "/codecs/wcd939x/HeadphoneEnableSeq.conf" + Include.wcdhpd.File "/codecs/wcd939x/HeadphoneDisableSeq.conf" + Include.rxmhpe.File "/codecs/qcom-lpass/rx-macro/HeadphoneEnableSeq.conf" + Include.rxmhpd.File "/codecs/qcom-lpass/rx-macro/HeadphoneDisableSeq.conf" + + Value { + PlaybackChannels 2 + PlaybackPriority 200 + PlaybackPCM "hw:${CardId},0" + PlaybackMixer "default:${CardId}" + PlaybackMixerElem "HP Digital" + JackControl "Headphone Jack" + JackHWMute "Speaker" + } +} + +SectionDevice."Bottom" { + Comment "Bottom Microphone" + + Include.wcdmice.File "/codecs/wcd939x/AnalogMic1EnableSeq.conf" + Include.wcdmicd.File "/codecs/wcd939x/AnalogMicDisableSeq.conf" + 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."Headset" { + Comment "Headset Microphone" + + Include.wcdmice.File "/codecs/wcd939x/HeadphoneMicEnableSeq.conf" + Include.wcdmicd.File "/codecs/wcd939x/HeadphoneMicDisableSeq.conf" + Include.txmhpe.File "/codecs/qcom-lpass/tx-macro/SoundwireMic1EnableSeq.conf" + Include.txmhpd.File "/codecs/qcom-lpass/tx-macro/SoundwireMicDisableSeq.conf" + + Value { + CaptureChannels 1 + CapturePriority 300 + CapturePCM "hw:${CardId},2" + CaptureMixerElem "ADC2" + JackControl "Mic Jack" + JackHWMute "Bottom" + JackHWMute "Back" + } +} + +SectionDevice."Back" { + Comment "Back Microphone" + + Include.wcdmice.File "/codecs/wcd939x/AnalogMic4EnableSeq.conf" + Include.wcdmicd.File "/codecs/wcd939x/AnalogMicDisableSeq.conf" + Include.txmhpe.File "/codecs/qcom-lpass/tx-macro/SoundwireMic0EnableSeq.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/sm8650/QRD/SM8650-QRD.conf b/ucm2/Qualcomm/sm8650/QRD/SM8650-QRD.conf new file mode 100644 index 0000000..a1991d5 --- /dev/null +++ b/ucm2/Qualcomm/sm8650/QRD/SM8650-QRD.conf @@ -0,0 +1,13 @@ +Syntax 4 + +SectionUseCase."HiFi" { + File "/Qualcomm/sm8650/QRD/HiFi.conf" + Comment "HiFi quality Music." +} + +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/wcd939x/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/sm8650/SM8650-QRD.conf b/ucm2/conf.d/sm8650/SM8650-QRD.conf new file mode 120000 index 0000000..3d71c72 --- /dev/null +++ b/ucm2/conf.d/sm8650/SM8650-QRD.conf @@ -0,0 +1 @@ +../../Qualcomm/sm8650/QRD/SM8650-QRD.conf \ No newline at end of file -- 2.47.1