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>
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"
+ }
+ }
}
}
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"
+ }
+ }
}
}
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"
+ }
+ }
}
}