]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: sof-soundwire: Simplify cs42l45 configs
authorMaciej Strozek <mstrozek@opensource.cirrus.com>
Fri, 28 Nov 2025 16:08:23 +0000 (16:08 +0000)
committerJaroslav Kysela <perex@perex.cz>
Tue, 9 Dec 2025 13:53:53 +0000 (14:53 +0100)
Simplify cs42l45 configs following machine driver changes [1]
which bring normal switches instead of mute switches.

[1] https://lore.kernel.org/all/20251127163426.2500633-2-ckeepax@opensource.cirrus.com/

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

index 6dd19bbf0ee809362bdfbb26c7cc7deed53d8746..deefb3d19cdc422d8eeb7d57b8748e77d6305697 100644 (file)
@@ -1,9 +1,22 @@
 # cs42l45 specific control settings
 
+LibraryConfig.remap.Config {
+       ctl.default.map {
+               "name='cs42l45 Microphone Capture Switch'" {
+                       "name='cs42l45 FU 113 Channel Switch'".vindex.0 0
+                       "name='cs42l45 FU 113 Channel Switch'".vindex.1 1
+               }
+               "name='cs42l45 Microphone Capture Volume'" {
+                       "name='cs42l45 FU 113 Channel Volume'".vindex.0 0
+                       "name='cs42l45 FU 113 Channel Volume'".vindex.1 1
+               }
+       }
+}
+
 BootSequence [
-       cset "name='cs42l45 FU 113 Mute Switch' 0"
+       cset "name='cs42l45 FU 113 Channel Switch' 0"
 ]
 
 Macro [
-       { SetLED { LED="mic" Action="attach" CtlId="cs42l45 FU 113 Mute Switch" Mode="follow-route"} }
+       { SetLED { LED="mic" Action="attach" CtlId="cs42l45 FU 113 Channel Switch"} }
 ]
diff --git a/ucm2/codecs/cs42l45/init.conf b/ucm2/codecs/cs42l45/init.conf
new file mode 100644 (file)
index 0000000..f4aee4a
--- /dev/null
@@ -0,0 +1,24 @@
+# cs42l45 specific control settings
+
+LibraryConfig.remap.Config {
+       ctl.default.map {
+               "name='cs42l45 Jack Microphone Capture Switch'" {
+                       "name='cs42l45 FU 36 Channel Switch'".vindex.0 0
+                       "name='cs42l45 FU 36 Channel Switch'".vindex.1 1
+               }
+               "name='cs42l45 Jack Microphone Capture Volume'" {
+                       "name='cs42l45 FU 36 Channel Volume'".vindex.0 0
+                       "name='cs42l45 FU 36 Channel Volume'".vindex.1 1
+               }
+       }
+       ctl.default.map {
+               "name='cs42l45 Headphone Playback Switch'" {
+                       "name='cs42l45 FU 41 Channel Switch'".vindex.0 0
+                       "name='cs42l45 FU 41 Channel Switch'".vindex.1 1
+               }
+               "name='cs42l45 Headphone Playback Volume'" {
+                       "name='cs42l45 FU 41 Channel Volume'".vindex.0 0
+                       "name='cs42l45 FU 41 Channel Volume'".vindex.1 1
+               }
+       }
+}
\ No newline at end of file
index 9477cbac76743ce378156156d1c3fdd1796b89fb..d46808e3187e30cf9af2d61143a059d5bef2384d 100644 (file)
@@ -7,18 +7,14 @@ SectionDevice."Mic" {
                "Headset"
        ]
 
-       EnableSequence [
-               cset "name='cs42l45 FU 113 Mute Switch' 0"
-       ]
-
        DisableSequence [
-               cset "name='cs42l45 FU 113 Mute Switch' 1"
+               cset "name='cs42l45 FU 113 Channel Switch' 0"
        ]
 
        Value {
                CapturePriority 100
                CapturePCM "hw:${CardId},4"
                CaptureMixer "default:${CardId}"
-               CaptureVolume "cs42l45 FU 113 Channel Volume"
+               CaptureMixerElem "cs42l45 Microphone"
        }
 }
index ba610480eaad7df7d7c9ab06f525157e89389556..c88562a03581d9493827b9f9e131a044b24e0baa 100644 (file)
@@ -3,19 +3,11 @@
 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"
+               PlaybackMixerElem "cs42l45 Headphone"
                JackControl "cs42l45 OT 43 Headphone Jack"
        }
 }
@@ -23,19 +15,15 @@ SectionDevice."Headphones" {
 SectionDevice."Headset" {
        Comment "Jack Microphone"
 
-       EnableSequence [
-               cset "name='cs42l45 FU 36 Mute Switch' 0"
-       ]
-
        DisableSequence [
-               cset "name='cs42l45 FU 36 Mute Switch' 1"
+               cset "name='cs42l45 FU 36 Channel Switch' 0"
        ]
 
        Value {
                CapturePriority 200
                CapturePCM "hw:${CardId},1"
                CaptureMixer "default:${CardId}"
-               CaptureVolume "cs42l45 FU 36 Channel Volume"
+               CaptureMixerElem "cs42l45 Jack Microphone"
                JackControl "cs42l45 IT 31 Microphone Jack"
        }
 }
index 895f479933f4341cbce9e5522b97ab024e44c0bf..7a00209e940ad1f915a65a630ab214401d05235f 100644 (file)
@@ -117,7 +117,7 @@ If.spk_init {
 If.hs_init {
        Condition {
                Type RegexMatch
-               Regex "(cs42l43|rt5682|rt700|rt711|rt713(-sdca)?)"
+               Regex "(cs42l43|cs42l45|rt5682|rt700|rt711|rt713(-sdca)?)"
                String "${var:HeadsetCodec1}"
        }
        True.Include.hs_init.File "/codecs/${var:HeadsetCodec1}/init.conf"