]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: sof-soundwire: support rt713vb codec
authorShuming Fan <shumingf@realtek.com>
Thu, 30 Oct 2025 11:30:16 +0000 (19:30 +0800)
committerJaroslav Kysela <perex@perex.cz>
Mon, 3 Nov 2025 11:07:16 +0000 (12:07 +0100)
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>
ucm2/codecs/rt713-sdca/init.conf [deleted file]
ucm2/codecs/rt713/init.conf [new file with mode: 0644]
ucm2/sof-soundwire/rt713.conf [moved from ucm2/sof-soundwire/rt713-sdca.conf with 58% similarity]
ucm2/sof-soundwire/sof-soundwire.conf

diff --git a/ucm2/codecs/rt713-sdca/init.conf b/ucm2/codecs/rt713-sdca/init.conf
deleted file mode 100644 (file)
index df6a7aa..0000000
+++ /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 (file)
index 0000000..a31ef90
--- /dev/null
@@ -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'"
+       ]
+}
similarity index 58%
rename from ucm2/sof-soundwire/rt713-sdca.conf
rename to ucm2/sof-soundwire/rt713.conf
index f1cee7c7c58f78638e26c80bcdfaa656c838bd41..a8e06437e44e4ce0e9934332bc68b33e9f9a933a 100644 (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"
+                       }
+               }
+       }
+}
index 769a152cfea8991a327b24be80ab6860a131db53..851b1f128289d79fd4c261865268ed5eb2ebdbd8 100644 (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 ""