From: Shuming Fan Date: Mon, 15 Nov 2021 03:43:12 +0000 (+0800) Subject: ucm2: Add UCM support for Dell Desktop X-Git-Tag: v1.2.6~38 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=65aae1a79e0cf26987f48daa188508fc75cc7bef;p=alsa-ucm-conf.git ucm2: Add UCM support for Dell Desktop 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 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/USB-Audio/Dell-Desktop-Front-Headset.conf b/ucm2/USB-Audio/Dell-Desktop-Front-Headset.conf new file mode 100644 index 0000000..ae77396 --- /dev/null +++ b/ucm2/USB-Audio/Dell-Desktop-Front-Headset.conf @@ -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 index 0000000..89faf39 --- /dev/null +++ b/ucm2/USB-Audio/Dell-Desktop-Front-Speaker.conf @@ -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 index 0000000..4c6f9f9 --- /dev/null +++ b/ucm2/USB-Audio/Dell-Desktop-Front.conf @@ -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 index 0000000..f3edfd9 --- /dev/null +++ b/ucm2/USB-Audio/Dell-Desktop-Rear-Line.conf @@ -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 index 0000000..3c1f87b --- /dev/null +++ b/ucm2/USB-Audio/Dell-Desktop-Rear.conf @@ -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 index 0000000..a3b1cf3 --- /dev/null +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -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" +}