[pulseaudio-discuss] [PATCH] alsa-mixer: Add support for "Headphone+LO" and "Speaker+LO"

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Tue Oct 28 01:56:53 PDT 2014


On Mon, 2014-10-20 at 13:34 +0200, David Henningsson wrote:
> These two control names are currently being added to the HDA driver,
> so let's support them in PulseAudio as well.
> 
> Signed-off-by: David Henningsson <david.henningsson at canonical.com>
> ---
>  src/modules/alsa/mixer/paths/analog-output-headphones.conf   | 10 ++++++++++
>  src/modules/alsa/mixer/paths/analog-output-lineout.conf      | 12 ++++++++++++
>  .../alsa/mixer/paths/analog-output-speaker-always.conf       | 10 ++++++++++
>  src/modules/alsa/mixer/paths/analog-output-speaker.conf      | 10 ++++++++++

I believe the new elements should be added to analog-output-headphones-2
and analog-output-mono too.

>  4 files changed, 42 insertions(+)
> 
> diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> index a41d41f..1645f14 100644
> --- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> +++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> @@ -69,6 +69,16 @@ override-map.2 = all-left,all-right
>  switch = off
>  volume = off
>  
> +[Element Speaker+LO]
> +switch = off
> +volume = off
> +
> +[Element Headphone+LO]
> +switch = mute
> +volume = merge
> +override-map.1 = all
> +override-map.2 = all-left,all-right

I think "required-any = any" should be added.

> +
>  [Element Headphone]
>  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 40af699..9160563 100644
> --- a/src/modules/alsa/mixer/paths/analog-output-lineout.conf
> +++ b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
> @@ -76,6 +76,18 @@ volume = merge
>  override-map.1 = all
>  override-map.2 = all-left,all-right
>  
> +[Element Speaker+LO]
> +switch = mute
> +volume = merge
> +override-map.1 = all
> +override-map.2 = all-left,all-right

required-any = any

> +
> +[Element Headphone+LO]
> +switch = mute
> +volume = merge
> +override-map.1 = all
> +override-map.2 = all-left,all-right

required-any = any

> +
>  [Element Master Mono]
>  switch = off
>  volume = off
> 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 c511813..e5bfbf5 100644
> --- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
> +++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
> @@ -61,6 +61,16 @@ volume = zero
>  switch = mute
>  volume = zero
>  
> +[Element Headphone+LO]
> +switch = off
> +volume = off
> +
> +[Element Speaker+LO]
> +switch = mute
> +volume = merge
> +override-map.1 = all
> +override-map.2 = all-left,all-right

required-any = any

> +
>  [Element Speaker]
>  switch = mute
>  volume = merge
> diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
> index f708e61..18dd923 100644
> --- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
> +++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
> @@ -73,6 +73,16 @@ volume = off
>  switch = off
>  volume = off
>  
> +[Element Headphone+LO]
> +switch = off
> +volume = off
> +
> +[Element Speaker+LO]
> +switch = mute
> +volume = merge
> +override-map.1 = all
> +override-map.2 = all-left,all-right

required-any = any

-- 
Tanu



More information about the pulseaudio-discuss mailing list