[pulseaudio-discuss] [PATCH] alsa-mixer: Adding Jack of Front Headphone Front and Surround
Tanu Kaskinen
tanuk at iki.fi
Mon Dec 31 13:46:29 UTC 2018
On Fri, 2018-12-21 at 11:05 +0800, Hui Wang wrote:
> We have 2 HP desktop models which have one front headphone Jack and
> one front headset Jack, in the Linux kernel, these two jacks are
> named "Front Headphone Front Jack" and "Front Headphone Surround
> Jack", now adding them into the pathes conf file.
How do the kcontrols map to physical connectors? Is there only one
physical connector or two? How do different kinds of devices
(headphones, headsets, stand-alone mics) change the state of the two
kcontrols?
I think at least the headset-mic path configuration in your patch is
incorrect, but I don't know how it should be configured before knowing
how the two kcontrols behave.
(A sidenote: it would be awesome to have some documentation that
explains what combinations of headphone/headset/mic jacks exist in the
wild and how those combinations map to physical connectors. The details
of the headphone/headset/mic jack detection mess are impossible to
remember.)
> Without this change, if users plug a headset or headphone, the
> path of headphone will not be activated, and users can't see
> headphones from UI like gnome-control-center.
>
> Signed-off-by: Hui Wang <hui.wang at canonical.com>
> ---
> For alsa-info.txt of one of machines, please access:
> https://pastebin.ubuntu.com/p/CjCGySMpM5/
>
> .../alsa/mixer/paths/analog-input-headset-mic.conf | 6 ++++++
> .../alsa/mixer/paths/analog-output-headphones.conf | 6 ++++++
> .../alsa/mixer/paths/analog-output-speaker-always.conf | 8 ++++++++
> src/modules/alsa/mixer/paths/analog-output-speaker.conf | 8 ++++++++
> 4 files changed, 28 insertions(+)
>
> diff --git a/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf b/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf
> index 579db6bb7..bc687b6e4 100644
> --- a/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf
> +++ b/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf
> @@ -35,6 +35,12 @@ state.plugged = unknown
> [Jack Front Headphone]
> state.plugged = unknown
>
> +[Jack Front Headphone Front]
> +state.plugged = unknown
> +
> +[Jack Front Headphone Surround]
> +state.plugged = unknown
> +
> [Jack Headphone Mic]
> state.plugged = unknown
>
> diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> index d2147c50f..2d751607c 100644
> --- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> +++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> @@ -40,6 +40,12 @@ required-any = any
> state.plugged = unknown
> state.unplugged = unknown
>
> +[Jack Front Headphone Front]
> +required-any = any
> +
> +[Jack Front Headphone Surround]
> +required-any = any
> +
> [Jack Headphone]
> required-any = any
>
> 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..c9374e471 100644
> --- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
> +++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
> @@ -33,6 +33,14 @@ state.unplugged = unknown
> state.plugged = no
> state.unplugged = unknown
>
> +[Jack Front Headphone Front]
> +state.plugged = no
> +state.unplugged = unknown
> +
> +[Jack Front Headphone Surround]
> +state.plugged = no
> +state.unplugged = unknown
> +
> [Jack Line Out]
> state.plugged = no
> state.unplugged = unknown
> diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
> index 9f4dac414..536630d0a 100644
> --- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
> +++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
> @@ -36,6 +36,14 @@ state.unplugged = unknown
> state.plugged = no
> state.unplugged = unknown
>
> +[Jack Front Headphone Front]
> +state.plugged = no
> +state.unplugged = unknown
> +
> +[Jack Front Headphone Surround]
> +state.plugged = no
> +state.unplugged = unknown
> +
> [Jack Line Out]
> state.plugged = no
> state.unplugged = unknown
--
Tanu
https://www.patreon.com/tanuk
https://liberapay.com/tanuk
More information about the pulseaudio-discuss
mailing list