From: Srinivas Kandagatla Date: Tue, 4 Oct 2022 14:39:18 +0000 (+0100) Subject: ucm2: Qualcomm: sc8280xp: add LENOVO Thinkpad X13s support X-Git-Tag: v1.2.9~13 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=44d8a48f088dcf84ca6ab2b73a1548f33062c0aa;p=alsa-ucm-conf.git ucm2: Qualcomm: sc8280xp: add LENOVO Thinkpad X13s support Add support to LENOVO Thinkpad x13s which has 2xwsa883x smart speakers and a headset connector. Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/284 Signed-off-by: Srinivas Kandagatla Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/Qualcomm/sc8280xp/HiFi.conf b/ucm2/Qualcomm/sc8280xp/HiFi.conf new file mode 100644 index 0000000..9edd636 --- /dev/null +++ b/ucm2/Qualcomm/sc8280xp/HiFi.conf @@ -0,0 +1,84 @@ +# Use case configuration for LenovoX13s. +# Author: Srinivas Kandagatla + +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='MultiMedia4 Mixer VA_CODEC_DMA_TX_0' 1" + cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1" + ] + + Include.wcde.File "/codecs/wcd938x/DefaultEnableSeq.conf" + Include.wsae.File "/codecs/wsa883x/DefaultEnableSeq.conf" + Include.wcdd.File "/codecs/wcd938x/DefaultDisableSeq.conf" + + Value { + TQ "HiFi" + } +} + +SectionDevice."Speaker" { + Comment "Speaker playback" + + Include.wcdspke.File "/codecs/qcom-lpass/wsa-macro/SpeakerEnableSeq.conf" + Include.wcdspkd.File "/codecs/qcom-lpass/wsa-macro/SpeakerDisableSeq.conf" + Include.wsaspke.File "/codecs/wsa883x/SpeakerEnableSeq.conf" + Include.wsaspkd.File "/codecs/wsa883x/SpeakerDisableSeq.conf" + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId},5" + 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},4" + PlaybackMixer "default:${CardId}" + PlaybackMixerElem "HP Digital" + JackControl "Headphone Jack" + JackHWMute "Speaker" + } +} + +SectionDevice."Mic" { + Comment "Mic" + + Include.wcdmice.File "/codecs/wcd938x/HeadphoneMicEnableSeq.conf" + Include.wcdmicd.File "/codecs/wcd938x/HeadphoneMicDisableSeq.conf" + Include.txmhpe.File "/codecs/qcom-lpass/tx-macro/HeadphoneMicEnableSeq.conf" + Include.txmhpd.File "/codecs/qcom-lpass/tx-macro/HeadphoneMicDisableSeq.conf" + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId},6" + CaptureMixerElem "ADC2" + JackControl "Mic Jack" + JackHWMute "DMic01" + } +} + +SectionDevice."DMic01" { + Comment "DMic01" + + Include.vadm0e.File "/codecs/qcom-lpass/va-macro/DMIC0EnableSeq.conf" + Include.vadm0d.File "/codecs/qcom-lpass/va-macro/DMIC0DisableSeq.conf" + Include.vadm1e.File "/codecs/qcom-lpass/va-macro/DMIC1EnableSeq.conf" + Include.vadm1d.File "/codecs/qcom-lpass/va-macro/DMIC1DisableSeq.conf" + + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId},7" + } +} diff --git a/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf new file mode 100644 index 0000000..6df65f9 --- /dev/null +++ b/ucm2/Qualcomm/sc8280xp/LENOVO-X13s.conf @@ -0,0 +1,10 @@ +Syntax 4 + +SectionUseCase."HiFi" { + File "/Qualcomm/sc8280xp/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/wcd938x/init.conf" diff --git a/ucm2/Qualcomm/sc8280xp/sc8280xp.conf b/ucm2/Qualcomm/sc8280xp/sc8280xp.conf new file mode 100644 index 0000000..cb37c58 --- /dev/null +++ b/ucm2/Qualcomm/sc8280xp/sc8280xp.conf @@ -0,0 +1,11 @@ +Syntax 4 + +If.LENOVOX13s { + Condition { + Type RegexMatch + String "${sys:devices/virtual/dmi/id/board_vendor}-${sys:devices/virtual/dmi/id/product_family}" + Regex "LENOVO.*ThinkPad X13s.*" + } + True.Include.x13s.File "/Qualcomm/sc8280xp/LENOVO-X13s.conf" + False.Error "SC8280XP - ${sys:devices/virtual/dmi/id/board_vendor}-${sys:devices/virtual/dmi/id/product_family} model not supported" +} diff --git a/ucm2/conf.d/sc8280xp/sc8280xp.conf b/ucm2/conf.d/sc8280xp/sc8280xp.conf new file mode 120000 index 0000000..aab068d --- /dev/null +++ b/ucm2/conf.d/sc8280xp/sc8280xp.conf @@ -0,0 +1 @@ +../../Qualcomm/sc8280xp/sc8280xp.conf \ No newline at end of file