]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: sof-soundwire: cs42l43: Separate init handling of speaker and headset
authorMaciej Strozek <mstrozek@opensource.cirrus.com>
Wed, 15 Apr 2026 12:26:17 +0000 (13:26 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 4 May 2026 09:26:02 +0000 (11:26 +0200)
Since cs42l43 can be used without UAJ, make sure the speakers can be
initialised separately. Complements [1] and add a possible speaker mute
LED bind.

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/748
Link: https://github.com/alsa-project/alsa-ucm-conf/pull/738
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/codecs/cs42l43-spk/init.conf [new file with mode: 0644]
ucm2/codecs/cs42l43/init.conf
ucm2/sof-soundwire/sof-soundwire.conf

diff --git a/ucm2/codecs/cs42l43-spk/init.conf b/ucm2/codecs/cs42l43-spk/init.conf
new file mode 100644 (file)
index 0000000..1c0e31c
--- /dev/null
@@ -0,0 +1,14 @@
+# cs42l43-spk specific control settings
+
+LibraryConfig.remap.Config {
+       ctl.default.map {
+               "name='cs42l43 Speaker Playback Switch'" {
+                       "name='cs42l43 Speaker Digital Switch'".vindex.0 0
+                       "name='cs42l43 Speaker Digital Switch'".vindex.1 1
+               }
+       }
+}
+
+Macro [
+       { SetLED { LED="speaker" Action="attach" CtlId="cs42l43 Speaker Digital Switch" } }
+]
\ No newline at end of file
index 7fa9cf1c28857fcde55a63389dec3a3453d51fdb..730da6a54a44c8d70559de72c76224af75b017b3 100644 (file)
@@ -1,4 +1,4 @@
-# cs42l43 specific control settings
+# cs42l43-hs specific control settings
 
 LibraryConfig.remap.Config {
        ctl.default.map {
@@ -8,10 +8,6 @@ LibraryConfig.remap.Config {
                "name='cs42l43 Headset Microphone Capture Volume'" {
                        "name='cs42l43 Decimator 1 Volume'".vindex.0 0
                }
-               "name='cs42l43 Speaker Playback Switch'" {
-                       "name='cs42l43 Speaker Digital Switch'".vindex.0 0
-                       "name='cs42l43 Speaker Digital Switch'".vindex.1 1
-               }
        }
 }
 
index a32ba43543a97ea4024ba80027fa52f174ddacb7..0a2c15d604c46a70228d83d5828249673b0375e3 100644 (file)
@@ -108,7 +108,7 @@ If.multi_headset {
 If.spk_init {
        Condition {
                Type RegexMatch
-               Regex "(rt1318(-1)?|cs35l56(-bridge)?)"
+               Regex "(rt1318(-1)?|cs42l43-spk|cs35l56(-bridge)?)"
                String "${var:SpeakerCodec1}"
        }
        True.Include.spk_init.File "/codecs/${var:SpeakerCodec1}/init.conf"