]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: soundwire: add rt713 SDCA device
authorShuming Fan <shumingf@realtek.com>
Thu, 12 Oct 2023 02:07:36 +0000 (10:07 +0800)
committerJaroslav Kysela <perex@perex.cz>
Mon, 30 Oct 2023 10:26:04 +0000 (11:26 +0100)
Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/363
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/codecs/rt713-dmic/init.conf [new file with mode: 0644]
ucm2/codecs/rt713-sdca/init.conf [new file with mode: 0644]
ucm2/sof-soundwire/rt713-dmic.conf [new file with mode: 0644]
ucm2/sof-soundwire/rt713-sdca.conf [new file with mode: 0644]
ucm2/sof-soundwire/sof-soundwire.conf

diff --git a/ucm2/codecs/rt713-dmic/init.conf b/ucm2/codecs/rt713-dmic/init.conf
new file mode 100644 (file)
index 0000000..6547a36
--- /dev/null
@@ -0,0 +1,6 @@
+# RT713-dmic specific volume control settings
+
+BootSequence [
+       cset "name='rt713-dmic ADC 25 Mux' 'DMIC1'"
+       cset "name='rt713-dmic FU1E Capture Switch' 1"
+]
diff --git a/ucm2/codecs/rt713-sdca/init.conf b/ucm2/codecs/rt713-sdca/init.conf
new file mode 100644 (file)
index 0000000..df6a7aa
--- /dev/null
@@ -0,0 +1,8 @@
+# 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/sof-soundwire/rt713-dmic.conf b/ucm2/sof-soundwire/rt713-dmic.conf
new file mode 100644 (file)
index 0000000..dc5fe0e
--- /dev/null
@@ -0,0 +1,21 @@
+# Use case Configuration for sof-soundwire card
+
+SectionDevice."Mic" {
+       Comment "SoundWire microphones"
+
+       EnableSequence [
+               cset "name='rt713-dmic FU1E Capture Switch' 1"
+       ]
+
+       DisableSequence [
+               cset "name='rt713-dmic FU1E Capture Switch' 0"
+       ]
+
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},4"
+               CaptureSwitch "rt713-dmic FU1E Capture Switch"
+               CaptureVolume "rt713-dmic FU1E Capture Volume"
+               CaptureMixerElem "rt713-dmic FU1E"
+       }
+}
diff --git a/ucm2/sof-soundwire/rt713-sdca.conf b/ucm2/sof-soundwire/rt713-sdca.conf
new file mode 100644 (file)
index 0000000..f1cee7c
--- /dev/null
@@ -0,0 +1,40 @@
+# Use case Configuration for sof-soundwire card
+
+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='rt713 FU0F Capture Switch' 1"
+       ]
+
+       DisableSequence [
+               cset "name='rt713 FU0F Capture Switch' 0"
+       ]
+
+       Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},1"
+               JackControl "Headset Mic Jack"
+               CaptureSwitch "rt713 FU0F Capture Switch"
+               CaptureVolume "rt713 FU0F Capture Volume"
+               CaptureMixerElem "rt713 FU0F"
+       }
+}
index 3368d656ef430a69ae9cdc49be225d021eb155cf..18b1bf8b3a0fcfe29fe188266c1f026c9914203d 100644 (file)
@@ -35,7 +35,7 @@ DefineRegex {
                String "${CardComponents}"
        }
        MicCodec {
-               Regex " mic:([a-z0-9]+(-sdca)?)"
+               Regex " mic:([a-z0-9]+(-dmic)?+(-sdca)?)"
                String "${CardComponents}"
        }
        Mics {
@@ -47,7 +47,7 @@ DefineRegex {
 If.hs_init {
        Condition {
                Type RegexMatch
-               Regex "(rt5682|rt700|rt711(-sdca)?)"
+               Regex "(rt5682|rt700|rt711|rt713(-sdca)?)"
                String "${var:HeadsetCodec1}"
        }
        True.Include.hs_init.File "/codecs/${var:HeadsetCodec1}/init.conf"
@@ -56,7 +56,7 @@ If.hs_init {
 If.mic_init {
        Condition {
                Type RegexMatch
-               Regex "(rt715(-sdca)?)"
+               Regex "(rt713-dmic|rt715(-sdca)?)"
                String "${var:MicCodec1}"
        }
        True.Include.mic_init.File "/codecs/${var:MicCodec1}/init.conf"