aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Wang <hui.wang@canonical.com>2020-08-17 12:37:44 +0800
committerJaroslav Kysela <perex@perex.cz>2020-08-18 17:34:31 +0200
commit15a3ab694c703530e0d9317116be5d28129986e0 (patch)
tree18c71983d27aeabf1d691e9c1d6be8f02a561be1
parent368f10bdc3dbfd4f83ab348b54b8455f08fd1a9e (diff)
USB-Audio: Dell-WD15-Dock: make input and output volume adjustable
Recently we found the input volume is too low for some specific headset-mic, even we adjust the input volume to max from PA, we still can't record the sound from that headset-mic. That is because we change the input or output volume from PA, but the mixer's volume is not changed, only PA's soft-volume is changed. Checking the amixer controls for the sound card in the WD19, it supports MixerElem, Volume and Switch, and checking the sound card in the WD15, it doesn't have Volume and Switch for Headphone and Line, So adding the volume and switch control in the ucm conditionally. Signed-off-by: Hui Wang <hui.wang@canonical.com> BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/47 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf36
1 files changed, 36 insertions, 0 deletions
diff --git a/ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf b/ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf
index 2f625e4..04355a7 100644
--- a/ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf
+++ b/ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf
@@ -4,6 +4,18 @@ SectionDevice."Headphones" {
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId}"
+
+ If.Headphone_ctl {
+ Condition {
+ Type ControlExists
+ Control "name='Headphone Playback Switch'"
+ }
+ True {
+ PlaybackMixerElem "Headphone"
+ PlaybackVolume "Headphone Playback Volume"
+ PlaybackSwitch "Headphone Playback Switch"
+ }
+ }
}
}
@@ -13,6 +25,18 @@ SectionDevice."Line" {
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1"
+
+ If.Line_ctl {
+ Condition {
+ Type ControlExists
+ Control "name='Line Playback Switch'"
+ }
+ True {
+ PlaybackMixerElem "Line"
+ PlaybackVolume "Line Playback Volume"
+ PlaybackSwitch "Line Playback Switch"
+ }
+ }
}
}
@@ -22,5 +46,17 @@ SectionDevice."Mic" {
Value {
CapturePriority 100
CapturePCM "hw:${CardId}"
+
+ If.Mic_ctl {
+ Condition {
+ Type ControlExists
+ Control "name='Mic Capture Switch'"
+ }
+ True {
+ CaptureMixerElem "Mic"
+ CaptureVolume "Mic Capture Volume"
+ CaptureSwitch "Mic Capture Switch"
+ }
+ }
}
}