alsa-mixer: Add support for the Headphone,1 element

This is seen at least on HP EliteDesk 800 DM and HP EliteDesk 800 SFF.

This is used by the analog-output-headphones-2 path, but all other paths
on the same sink need to handle the element too. The existing
configuration is inconsistent between files regarding whether headphone
outputs should be muted or not when not using them. I chose to be
consistent within files, which means that Headphone,1 handling is
inconsistent between files in the same way that the existing Headphone
and Headphone2 handling is. (My opinion is that unused paths should be
always muted, but I didn't want to do that policy change in this patch.)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>
This commit is contained in:
Tanu Kaskinen 2020-12-26 22:29:06 +02:00 committed by PulseAudio Marge Bot
parent 0c14f89b84
commit 21a531041a
6 changed files with 30 additions and 0 deletions

View file

@ -54,6 +54,13 @@ volume = off
switch = mute switch = mute
volume = zero volume = zero
[Element Headphone,1]
required-any = any
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Headphone+LO] [Element Headphone+LO]
switch = mute switch = mute
volume = zero volume = zero

View file

@ -93,6 +93,13 @@ volume = merge
override-map.1 = all override-map.1 = all
override-map.2 = all-left,all-right override-map.2 = all-left,all-right
; This path is intended to control the first headphones, not
; the second headphones. But it should not hurt if we leave the second
; headphone jack enabled nonetheless.
[Element Headphone,1]
switch = mute
volume = zero
[Element Headset] [Element Headset]
required-any = any required-any = any
switch = mute switch = mute

View file

@ -127,6 +127,10 @@ required-any = any
switch = off switch = off
volume = off volume = off
[Element Headphone,1]
switch = off
volume = off
[Element Headphone2] [Element Headphone2]
switch = off switch = off
volume = off volume = off

View file

@ -44,6 +44,10 @@ override-map.2 = all-left,all-right
switch = mute switch = mute
volume = zero volume = zero
[Element Headphone,1]
switch = mute
volume = zero
[Element Headphone+LO] [Element Headphone+LO]
switch = mute switch = mute
volume = zero volume = zero

View file

@ -76,6 +76,10 @@ volume = off
switch = mute switch = mute
volume = zero volume = zero
[Element Headphone,1]
switch = mute
volume = zero
[Element Headphone2] [Element Headphone2]
switch = mute switch = mute
volume = zero volume = zero

View file

@ -101,6 +101,10 @@ name = analog-output-speaker
switch = off switch = off
volume = off volume = off
[Element Headphone,1]
switch = off
volume = off
[Element Headphone2] [Element Headphone2]
switch = off switch = off
volume = off volume = off