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>
--- /dev/null
+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"
+ }
+}
--- /dev/null
+SectionDevice."Speaker" {
+ Comment "Built-in Speaker"
+
+ Value {
+ PlaybackPriority 100
+ PlaybackPCM "hw:${CardId}"
+ JackControl "Speaker - Output Jack"
+ PlaybackMixerElem "Speaker"
+ }
+}
--- /dev/null
+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"
+}
--- /dev/null
+SectionDevice."Line" {
+ Comment "Line Out"
+
+ Value {
+ PlaybackPriority 100
+ PlaybackPCM "hw:${CardId}"
+ JackControl "Line - Output Jack"
+ PlaybackMixerElem "PCM"
+ }
+}
--- /dev/null
+Syntax 2
+Comment "USB-audio on the rear of Dell Desktop"
+SectionUseCase."Line" {
+ Comment "Line Out"
+ File "Dell-Desktop-Rear-Line.conf"
+}
--- /dev/null
+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"
+}