From: Maciej Strozek Date: Wed, 8 Oct 2025 13:19:33 +0000 (+0100) Subject: ucm2: soundwire: cs42l45: Add support for CS42L45 codec X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=f47b9418c81a19869b290a1eb040a2dc2fdc97b1;p=alsa-ucm-conf.git ucm2: soundwire: cs42l45: Add support for CS42L45 codec cs42l45 SDCA codec includes headphone playback with headset and DMIC input. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/629 Signed-off-by: Maciej Strozek Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/codecs/cs42l45-dmic/init.conf b/ucm2/codecs/cs42l45-dmic/init.conf new file mode 100644 index 0000000..88b19c8 --- /dev/null +++ b/ucm2/codecs/cs42l45-dmic/init.conf @@ -0,0 +1,9 @@ +# cs42l45 specific control settings + +BootSequence [ + cset "name='cs42l45 FU 113 Mute Switch' 0" +] + +Macro [ + { SetLED { LED="mic" Action="attach" CtlId="cs42l45 FU 113 Mute Switch" } } +] diff --git a/ucm2/sof-soundwire/cs42l45-dmic.conf b/ucm2/sof-soundwire/cs42l45-dmic.conf new file mode 100644 index 0000000..9477cba --- /dev/null +++ b/ucm2/sof-soundwire/cs42l45-dmic.conf @@ -0,0 +1,24 @@ +# Use case Configuration for sof-soundwire card + +SectionDevice."Mic" { + Comment "Microphones" + + ConflictingDevice [ + "Headset" + ] + + EnableSequence [ + cset "name='cs42l45 FU 113 Mute Switch' 0" + ] + + DisableSequence [ + cset "name='cs42l45 FU 113 Mute Switch' 1" + ] + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId},4" + CaptureMixer "default:${CardId}" + CaptureVolume "cs42l45 FU 113 Channel Volume" + } +} diff --git a/ucm2/sof-soundwire/cs42l45.conf b/ucm2/sof-soundwire/cs42l45.conf new file mode 100644 index 0000000..8e6a8da --- /dev/null +++ b/ucm2/sof-soundwire/cs42l45.conf @@ -0,0 +1,41 @@ +# Use case Configuration for sof-soundwire card + +SectionDevice."Headphones" { + Comment "Headphones" + + EnableSequence [ + cset "name='cs42l45 FU 41 Mute Switch' 0" + ] + + DisableSequence [ + cset "name='cs42l45 FU 41 Mute Switch' 1" + ] + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId},0" + PlaybackMixer "default:${CardId}" + PlaybackVolume "cs42l45 FU 41 Channel Volume" + JackControl "Headphone Jack" + } +} + +SectionDevice."Headset" { + Comment "Headset Microphone" + + EnableSequence [ + cset "name='cs42l45 FU 36 Mute Switch' 0" + ] + + DisableSequence [ + cset "name='cs42l45 FU 36 Mute Switch' 1" + ] + + Value { + CapturePriority 200 + CapturePCM "hw:${CardId},1" + CaptureMixer "default:${CardId}" + CaptureVolume "cs42l45 FU 36 Channel Volume" + JackControl "Headset Mic Jack" + } +} diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index 173749c..769a152 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -123,7 +123,7 @@ If.hs_init { If.mic_init { Condition { Type RegexMatch - Regex "(cs42l43-dmic|rt712-dmic|rt713-dmic|rt715(-sdca)?)" + Regex "(cs42l43-dmic|cs42l45-dmic|rt712-dmic|rt713-dmic|rt715(-sdca)?)" String "${var:MicCodec1}" } True.Include.mic_init.File "/codecs/${var:MicCodec1}/init.conf"