]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: soundwire: add rt766 device
authorShuming Fan <shumingf@realtek.com>
Wed, 14 Oct 2026 07:22:38 +0000 (15:22 +0800)
committerJaroslav Kysela <perex@perex.cz>
Mon, 16 Nov 2026 10:11:10 +0000 (11:11 +0100)
Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/885
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/codecs/rt766/init.conf [new file with mode: 0644]
ucm2/sof-soundwire/rt766.conf [new file with mode: 0644]
ucm2/sof-soundwire/sof-soundwire.conf

diff --git a/ucm2/codecs/rt766/init.conf b/ucm2/codecs/rt766/init.conf
new file mode 100644 (file)
index 0000000..2154975
--- /dev/null
@@ -0,0 +1,16 @@
+# RT766 specific volume control settings
+
+BootSequence [
+       cset "name='rt766 FU41 Playback Volume' 127"
+       cset "name='rt766 FU21 Playback Volume' 87"
+       cset "name='rt766 FU36 Capture Volume' 57"
+       cset "name='rt766 FU36 Capture Switch' 1"
+       cset "name='rt766 FU113 Capture Switch' 1"
+       cset "name='rt766 FU113 Capture Volume' 63"
+]
+
+Macro [
+       { SetLED { LED="mic" Action="attach" CtlId="rt766 FU113 Capture Switch" } }
+       { SetLED { LED="speaker" Action="attach" CtlId="rt766 FU21 Playback Switch" } }
+]
+
diff --git a/ucm2/sof-soundwire/rt766.conf b/ucm2/sof-soundwire/rt766.conf
new file mode 100644 (file)
index 0000000..cd51651
--- /dev/null
@@ -0,0 +1,112 @@
+# Use case Configuration for sof-soundwire card
+
+If.codecspk {
+       Condition {
+               Type RegexMatch
+               Regex "rt766"
+               String "${var:SpeakerCodec1}"
+       }
+       True {
+               SectionDevice."Speaker" {
+                       Comment "Speaker"
+
+                       EnableSequence [
+                               cset "name='Speaker Switch' on"
+                       ]
+
+                       DisableSequence [
+                               cset "name='Speaker Switch' off"
+                       ]
+
+                       Value {
+                               PlaybackPriority 100
+                               PlaybackPCM "hw:${CardId},2"
+                               PlaybackMixerElem "rt766 FU21"
+                               PlaybackSwitch "rt766 FU21 Playback Switch"
+                       }
+               }
+       }
+}
+
+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='rt766 FU36 Capture Switch' 1"
+       ]
+
+       DisableSequence [
+               cset "name='rt766 FU36 Capture Switch' 0"
+       ]
+
+       If.hsmicsw {
+               Condition {
+                       Type ControlExists
+                       Control "name='Headset Mic Switch'"
+               }
+               True {
+                       EnableSequence [
+                               cset "name='Headset Mic Switch' on"
+                       ]
+                       DisableSequence [
+                               cset "name='Headset Mic Switch' off"
+                       ]
+               }
+       }
+
+       Value {
+               CapturePriority 300
+               CapturePCM "hw:${CardId},1"
+               CaptureSwitch "rt766 FU36 Capture Switch"
+               CaptureVolume "rt766 FU36 Capture Volume"
+               CaptureMixerElem "rt766 FU36"
+               JackControl "Headset Mic Jack"
+       }
+}
+
+If.codecmic {
+       Condition {
+               Type RegexMatch
+               Regex "rt766"
+               String "${var:MicCodec1}"
+       }
+       True {
+               SectionDevice."Mic" {
+                       Comment "SoundWire Microphones"
+
+                       EnableSequence [
+                               cset "name='rt766 FU113 Capture Switch' 1"
+                       ]
+
+                       DisableSequence [
+                               cset "name='rt766 FU113 Capture Switch' 0"
+                       ]
+
+                       Value {
+                               CapturePriority 100
+                               CapturePCM "hw:${CardId},4"
+                               CaptureSwitch "rt766 FU113 Capture Switch"
+                               CaptureVolume "rt766 FU113 Capture Volume"
+                               CaptureMixerElem "rt766 FU113"
+                       }
+               }
+       }
+}
index f12cd419c5001f9a1a597dcfcebc5fd5cb8939cb..6b862a70f33fe8206a905d462b22c3b56a2a6269 100644 (file)
@@ -19,7 +19,7 @@ Define {
        Mics1 "0"
        Iec61937Pcms1 ""
        MultiCodec1 ""
-       MultiCodecRegex "rt712|rt713|rt721|rt722|rt1320|es9356|tac5572"
+       MultiCodecRegex "rt712|rt713|rt721|rt722|rt766|rt1320|es9356|tac5572"
 }
 
 DefineRegex {
@@ -136,6 +136,7 @@ If.multi_init {
                Macro.rt713.MultiCodecInit "CodecId=rt713"
                Macro.rt721.MultiCodecInit "CodecId=rt721"
                Macro.rt722.MultiCodecInit "CodecId=rt722"
+               Macro.rt766.MultiCodecInit "CodecId=rt766"
                Macro.rt1320.MultiCodecInit "CodecId=rt1320"
                Macro.es9356.MultiCodecInit "CodecId=es9356"
                Macro.tac5572.MultiCodecInit "CodecId=tac5572"