]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: Add UCM support for Dell Desktop
authorShuming Fan <shumingf@realtek.com>
Mon, 15 Nov 2021 03:43:12 +0000 (11:43 +0800)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Nov 2021 16:38:08 +0000 (17:38 +0100)
The Dell Desktop uses two USB audio codecs as front and rear panel.
The front UAC has two outputs of speaker/headphone and one input of headset mic.
The rear UAC has one output of line-out.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/120
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Dell-Desktop-Front-Headset.conf [new file with mode: 0644]
ucm2/USB-Audio/Dell-Desktop-Front-Speaker.conf [new file with mode: 0644]
ucm2/USB-Audio/Dell-Desktop-Front.conf [new file with mode: 0644]
ucm2/USB-Audio/Dell-Desktop-Rear-Line.conf [new file with mode: 0644]
ucm2/USB-Audio/Dell-Desktop-Rear.conf [new file with mode: 0644]
ucm2/USB-Audio/USB-Audio.conf [new file with mode: 0644]

diff --git a/ucm2/USB-Audio/Dell-Desktop-Front-Headset.conf b/ucm2/USB-Audio/Dell-Desktop-Front-Headset.conf
new file mode 100644 (file)
index 0000000..ae77396
--- /dev/null
@@ -0,0 +1,21 @@
+SectionDevice."Headphones" {
+       Comment "Headset/Headphones"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},1"
+               JackControl "Headphone - Output Jack"
+               PlaybackMixerElem "Headphone"
+       }
+}
+
+SectionDevice."Microphone" {
+       Comment "Microphone"
+
+       Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               JackControl "Mic - Input Jack"
+               CaptureMixerElem "Mic"
+       }
+}
diff --git a/ucm2/USB-Audio/Dell-Desktop-Front-Speaker.conf b/ucm2/USB-Audio/Dell-Desktop-Front-Speaker.conf
new file mode 100644 (file)
index 0000000..89faf39
--- /dev/null
@@ -0,0 +1,10 @@
+SectionDevice."Speaker" {
+       Comment "Built-in Speaker"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               JackControl "Speaker - Output Jack"
+               PlaybackMixerElem "Speaker"
+       }
+}
diff --git a/ucm2/USB-Audio/Dell-Desktop-Front.conf b/ucm2/USB-Audio/Dell-Desktop-Front.conf
new file mode 100644 (file)
index 0000000..4c6f9f9
--- /dev/null
@@ -0,0 +1,11 @@
+Syntax 2
+Comment "USB-audio on the front of Dell Desktop"
+SectionUseCase."Speaker" {
+       Comment "Internal Speaker"
+       File "Dell-Desktop-Front-Speaker.conf"
+}
+
+SectionUseCase."Headset" {
+       Comment "Front Headset"
+       File "Dell-Desktop-Front-Headset.conf"
+}
diff --git a/ucm2/USB-Audio/Dell-Desktop-Rear-Line.conf b/ucm2/USB-Audio/Dell-Desktop-Rear-Line.conf
new file mode 100644 (file)
index 0000000..f3edfd9
--- /dev/null
@@ -0,0 +1,10 @@
+SectionDevice."Line" {
+       Comment "Line Out"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               JackControl "Line - Output Jack"
+               PlaybackMixerElem "PCM"
+       }
+}
diff --git a/ucm2/USB-Audio/Dell-Desktop-Rear.conf b/ucm2/USB-Audio/Dell-Desktop-Rear.conf
new file mode 100644 (file)
index 0000000..3c1f87b
--- /dev/null
@@ -0,0 +1,6 @@
+Syntax 2
+Comment "USB-audio on the rear of Dell Desktop"
+SectionUseCase."Line" {
+       Comment "Line Out"
+       File "Dell-Desktop-Rear-Line.conf"
+}
diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf
new file mode 100644 (file)
index 0000000..a3b1cf3
--- /dev/null
@@ -0,0 +1,30 @@
+Syntax 3
+
+Define.ProfileName ""
+
+If.dell-desktop-front {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "USB0bda:4c54"
+       }
+       True.Define.ProfileName "Dell-Desktop-Front"
+}
+
+If.dell-desktop-rear {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "USB0bda:4c55"
+       }
+       True.Define.ProfileName "Dell-Desktop-Rear"
+}
+
+If.inc {
+       Condition {
+               Type String
+               Empty "${var:ProfileName}"
+       }
+       True.Error "UCM is not supported for this USB device (${CardLongName} @ ${CardComponents})"
+       False.Include.prof.File "${var:ProfileName}.conf"
+}