ucm2: sof-soundwire: support rt713vb codec

The rt713 is the multi-function codec, so check it by MultiCodec variable.
This patch also supports the rt713VB, which integrates with DMIC function into one interface.

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/628
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Shuming Fan 2025-10-30 19:30:16 +08:00 committed by Jaroslav Kysela
commit 76c14b89db
4 changed files with 56 additions and 12 deletions

View file

@ -1,8 +0,0 @@
# RT713-sdca specific volume control settings
BootSequence [
cset "name='rt713 FU05 Playback Volume' 87"
cset "name='rt713 ADC 23 Mux' 'MIC2'"
cset "name='rt713 FU0F Capture Volume' 57"
cset "name='rt713 FU0F Capture Switch' 1"
]

View file

@ -0,0 +1,23 @@
# RT713 specific volume control settings
BootSequence [
cset "name='rt713 FU05 Playback Volume' 87"
cset "name='rt713 ADC 23 Mux' 'MIC2'"
cset "name='rt713 FU0F Capture Volume' 57"
cset "name='rt713 FU0F Capture Switch' 1"
]
If.rt713vb_init {
Condition {
Type String
String1 "rt713"
String2 "${var:MultiMicShadow}"
}
True.BootSequence [
# RT713-VB integrated with DMIC
cset "name='rt713 FU1E Capture Switch' 1"
cset "name='rt713 FU1E Capture Volume' 47"
cset "name='rt713 ADC 0A Mux' 'DMIC1'"
cset "name='rt713 ADC 0B Mux' 'DMIC2'"
]
}

View file

@ -38,3 +38,32 @@ SectionDevice."Headset" {
CaptureMixerElem "rt713 FU0F"
}
}
If.codecmic {
Condition {
Type String
String1 "rt713"
String2 "${var:MultiMicShadow}"
}
True {
SectionDevice."Mic" {
Comment "SoundWire Microphones"
EnableSequence [
cset "name='rt713 FU1E Capture Switch' 1"
]
DisableSequence [
cset "name='rt713 FU1E Capture Switch' 0"
]
Value {
CapturePriority 100
CapturePCM "hw:${CardId},4"
CaptureSwitch "rt713 FU1E Capture Switch"
CaptureVolume "rt713 FU1E Capture Volume"
CaptureMixerElem "rt713 FU1E"
}
}
}
}

View file

@ -50,7 +50,7 @@ DefineRegex {
String "${CardComponents}"
}
MultiCodec {
Regex "(rt712|rt721|rt722(-sdca)?)"
Regex "(rt712|rt713|rt721|rt722(-sdca)?)"
String "${var:SpeakerCodec1} ${var:HeadsetCodec1} ${var:MicCodec1}"
}
}
@ -93,9 +93,9 @@ If.multi_mic {
If.multi_headset {
Condition {
Type RegexMatch
Regex "${var:HeadsetCodec1}"
String "${var:MultiCodec1}"
Type String
Haystack "${var:HeadsetCodec1}"
Needle "${var:MultiCodec1}"
}
True {
Define.HeadsetCodec1 ""