diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2020-12-26 22:29:06 +0200 |
---|---|---|
committer | Arun Raghavan <arun@asymptotic.io> | 2021-01-07 19:18:35 -0500 |
commit | 72b6d24adb4fcf47850c66250aca4de904146122 (patch) | |
tree | 8d26ed84d481b03e68636dd1499557325efd060c | |
parent | 1804c9de1d6696dc8e0387fcddcf51b0a59cf07a (diff) | |
download | pulseaudio-72b6d24adb4fcf47850c66250aca4de904146122.tar.gz |
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>
6 files changed, 30 insertions, 0 deletions
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf index f88f8a0b0..178999088 100644 --- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf +++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf @@ -54,6 +54,13 @@ volume = off switch = mute 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] switch = mute volume = zero diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf index 74f541073..88907f081 100644 --- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf +++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf @@ -93,6 +93,13 @@ volume = merge override-map.1 = all 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] required-any = any switch = mute diff --git a/src/modules/alsa/mixer/paths/analog-output-lineout.conf b/src/modules/alsa/mixer/paths/analog-output-lineout.conf index 9a6af3ad8..2dde15923 100644 --- a/src/modules/alsa/mixer/paths/analog-output-lineout.conf +++ b/src/modules/alsa/mixer/paths/analog-output-lineout.conf @@ -127,6 +127,10 @@ required-any = any switch = off volume = off +[Element Headphone,1] +switch = off +volume = off + [Element Headphone2] switch = off volume = off diff --git a/src/modules/alsa/mixer/paths/analog-output-mono.conf b/src/modules/alsa/mixer/paths/analog-output-mono.conf index 989654334..5e4940598 100644 --- a/src/modules/alsa/mixer/paths/analog-output-mono.conf +++ b/src/modules/alsa/mixer/paths/analog-output-mono.conf @@ -44,6 +44,10 @@ override-map.2 = all-left,all-right switch = mute volume = zero +[Element Headphone,1] +switch = mute +volume = zero + [Element Headphone+LO] switch = mute volume = zero diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf index 71f356dce..4ee72f504 100644 --- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf +++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf @@ -76,6 +76,10 @@ volume = off switch = mute volume = zero +[Element Headphone,1] +switch = mute +volume = zero + [Element Headphone2] switch = mute volume = zero diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf index 27a3983d5..fcf2f5c2f 100644 --- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf +++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf @@ -94,6 +94,10 @@ volume = off switch = off volume = off +[Element Headphone,1] +switch = off +volume = off + [Element Headphone2] switch = off volume = off |