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 <mstrozek@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Maciej Strozek 2025-10-08 14:19:33 +01:00 committed by Jaroslav Kysela
commit f47b9418c8
4 changed files with 75 additions and 1 deletions

View file

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

View file

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

View file

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

View 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"