]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: soundwire: cs42l45: Add support for CS42L45 codec
authorMaciej Strozek <mstrozek@opensource.cirrus.com>
Wed, 8 Oct 2025 13:19:33 +0000 (14:19 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 30 Oct 2025 09:40:11 +0000 (10:40 +0100)
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 <mstrozek@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/codecs/cs42l45-dmic/init.conf [new file with mode: 0644]
ucm2/sof-soundwire/cs42l45-dmic.conf [new file with mode: 0644]
ucm2/sof-soundwire/cs42l45.conf [new file with mode: 0644]
ucm2/sof-soundwire/sof-soundwire.conf

diff --git a/ucm2/codecs/cs42l45-dmic/init.conf b/ucm2/codecs/cs42l45-dmic/init.conf
new file mode 100644 (file)
index 0000000..88b19c8
--- /dev/null
@@ -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 (file)
index 0000000..9477cba
--- /dev/null
@@ -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 (file)
index 0000000..8e6a8da
--- /dev/null
@@ -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"
+       }
+}
index 173749cf4745b56522f1bf5b7dafac7c6b4eb779..769a152cfea8991a327b24be80ab6860a131db53 100644 (file)
@@ -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"