From: Shuming Fan Date: Thu, 30 Oct 2025 11:30:16 +0000 (+0800) Subject: ucm2: sof-soundwire: support rt713vb codec X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=76c14b89db6a45f479e4661585c889b0f54817c5;p=alsa-ucm-conf.git 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 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/codecs/rt713-sdca/init.conf b/ucm2/codecs/rt713-sdca/init.conf deleted file mode 100644 index df6a7aa..0000000 --- a/ucm2/codecs/rt713-sdca/init.conf +++ /dev/null @@ -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" -] diff --git a/ucm2/codecs/rt713/init.conf b/ucm2/codecs/rt713/init.conf new file mode 100644 index 0000000..a31ef90 --- /dev/null +++ b/ucm2/codecs/rt713/init.conf @@ -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'" + ] +} diff --git a/ucm2/sof-soundwire/rt713-sdca.conf b/ucm2/sof-soundwire/rt713.conf similarity index 58% rename from ucm2/sof-soundwire/rt713-sdca.conf rename to ucm2/sof-soundwire/rt713.conf index f1cee7c..a8e0643 100644 --- a/ucm2/sof-soundwire/rt713-sdca.conf +++ b/ucm2/sof-soundwire/rt713.conf @@ -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" + } + } + } +} diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index 769a152..851b1f1 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -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 ""