]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: sof-soundwire: add rt721 ucm support
authorJack Yu <jack.yu@realtek.com>
Fri, 8 Aug 2025 06:21:55 +0000 (14:21 +0800)
committerJaroslav Kysela <perex@perex.cz>
Tue, 23 Sep 2025 10:29:07 +0000 (12:29 +0200)
Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/600
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/codecs/rt721/init.conf [new file with mode: 0644]
ucm2/sof-soundwire/rt721.conf [new file with mode: 0644]
ucm2/sof-soundwire/sof-soundwire.conf

diff --git a/ucm2/codecs/rt721/init.conf b/ucm2/codecs/rt721/init.conf
new file mode 100644 (file)
index 0000000..b6ac2fe
--- /dev/null
@@ -0,0 +1,14 @@
+# RT721-sdca specific volume control settings
+
+BootSequence [
+       cset "name='rt721 ADC 07 R Mux' 'DMIC1 FE'"
+       cset "name='rt721 ADC 07 L Mux' 'DMIC1 RE'"
+       cset "name='rt721 ADC 10 R Mux' 'DMIC2 FE'"
+       cset "name='rt721 ADC 10 L Mux' 'DMIC2 RE'"
+       cset "name='rt721 ADC 09 Mux' 'MIC2'"
+       cset "name='rt721 FU1E Capture Volume' 63"
+       cset "name='rt721 FU06 Playback Volume' 87"
+       cset "name='rt721 FU05 Playback Volume' 87"
+       cset "name='rt721 FU0F Capture Volume' 63"
+       cset "name='rt721 FU33 Boost Volume' 1"
+]
diff --git a/ucm2/sof-soundwire/rt721.conf b/ucm2/sof-soundwire/rt721.conf
new file mode 100644 (file)
index 0000000..a26c8d0
--- /dev/null
@@ -0,0 +1,95 @@
+# Use case Configuration for sof-soundwire card
+
+If.codecmic {
+       Condition {
+               Type RegexMatch
+               Regex "(rt721(-sdca)?)"
+               String "${var:MultiMicShadow}"
+       }
+       True {
+               SectionDevice."Mic" {
+                       Comment "SoundWire microphones"
+
+                       EnableSequence [
+                               cset "name='rt721 FU1E Capture Switch' 1"
+                       ]
+
+                       DisableSequence [
+                               cset "name='rt721 FU1E Capture Switch' 0"
+                       ]
+
+                       Value {
+                               CapturePriority 100
+                               CapturePCM "hw:${CardId},4"
+                               CaptureSwitch "rt721 FU1E Capture Switch"
+                               CaptureVolume "rt721 FU1E Capture Volume"
+                               CaptureMixerElem "rt721 FU1E"
+                       }
+               }
+       }
+}
+
+If.codecspk {
+       Condition {
+               Type RegexMatch
+               Regex "(rt721(-sdca)?)"
+               String "${var:MultiSpeakerShadow}"
+       }
+       True {
+               SectionDevice."Speaker" {
+                       Comment "Speaker"
+
+                       EnableSequence [
+                               cset "name='Speaker Switch' on"
+                       ]
+
+                       DisableSequence [
+                               cset "name='Speaker Switch' off"
+                       ]
+
+                       Value {
+                               PlaybackPriority 100
+                               PlaybackPCM "hw:${CardId},2"
+                       }
+               }
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       EnableSequence [
+               cset "name='Headphone Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Headphone Switch' off"
+       ]
+
+       Value {
+             PlaybackPriority 200
+             PlaybackPCM "hw:${CardId}"
+             JackControl "Headphone Jack"
+       }
+}
+
+SectionDevice."Headset" {
+       Comment "Headset Microphone"
+
+       EnableSequence [
+               cset "name='rt721 FU0F Capture Switch' 1"
+       ]
+
+       DisableSequence [
+               cset "name='rt721 FU0F Capture Switch' 0"
+       ]
+
+       Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},1"
+               JackControl "Headset Mic Jack"
+               CaptureSwitch "rt721 FU0F Capture Switch"
+               CaptureVolume "rt721 FU0F Capture Volume"
+               CaptureMixerElem "rt721 FU0F"
+       }
+}
index 2b1323bd9f7040d6a0cedbb24ffffc737b96b62a..173749cf4745b56522f1bf5b7dafac7c6b4eb779 100644 (file)
@@ -50,7 +50,7 @@ DefineRegex {
                String "${CardComponents}"
        }
        MultiCodec {
-               Regex "(rt712|rt722(-sdca)?)"
+               Regex "(rt712|rt721|rt722(-sdca)?)"
                String "${var:SpeakerCodec1} ${var:HeadsetCodec1} ${var:MicCodec1}"
        }
 }