ucm2: sof-soundwire: cs42l43: Separate init handling of speaker and headset

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 [1]
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Maciej Strozek 2026-04-15 13:26:17 +01:00 committed by Jaroslav Kysela
commit dd191521cb
3 changed files with 16 additions and 6 deletions

View file

@ -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" } }
]

View file

@ -1,4 +1,4 @@
# cs42l43 specific control settings # cs42l43-hs specific control settings
LibraryConfig.remap.Config { LibraryConfig.remap.Config {
ctl.default.map { ctl.default.map {
@ -8,10 +8,6 @@ LibraryConfig.remap.Config {
"name='cs42l43 Headset Microphone Capture Volume'" { "name='cs42l43 Headset Microphone Capture Volume'" {
"name='cs42l43 Decimator 1 Volume'".vindex.0 0 "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
}
} }
} }

View file

@ -108,7 +108,7 @@ If.multi_headset {
If.spk_init { If.spk_init {
Condition { Condition {
Type RegexMatch Type RegexMatch
Regex "(rt1318(-1)?|cs35l56(-bridge)?)" Regex "(rt1318(-1)?|cs42l43-spk|cs35l56(-bridge)?)"
String "${var:SpeakerCodec1}" String "${var:SpeakerCodec1}"
} }
True.Include.spk_init.File "/codecs/${var:SpeakerCodec1}/init.conf" True.Include.spk_init.File "/codecs/${var:SpeakerCodec1}/init.conf"