[PATCH] alsa-mixer: Prefer moving "Capture" before moving boosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2013-08-02 at 15:19 +0200, David Henningsson wrote:
> Some HD-audio codecs (at least ALC269VB and ALC283) become quite noisy on
> high Mic Boost levels. So e g, if there is a "Mic Boost" and a "Capture"
> control, both ranging from 0 dB to +30 dB, you get better quality if
> "Mic Boost" is 0 dB and "Capture" is +30 dB, than the other way around.
> 
> By changing the order in the configuration files, this patch makes us prefer
> leaving "Mic Boost" low and "Capture" high if the user selects a medium gain.
> 
> (This is based on limited experience, and there is no guarantee that there are
> no sound cards that work the other way around, and therefore this patch could
> potentially regress quality on those machines. Hopefully those are fewer, so
> this is what we should default to.)
[...]
> diff --git a/src/modules/alsa/mixer/paths/analog-input-headphone-mic.conf b/src/modules/alsa/mixer/paths/analog-input-headphone-mic.conf
> index 688b8ac..3a19e01 100644
> --- a/src/modules/alsa/mixer/paths/analog-input-headphone-mic.conf
> +++ b/src/modules/alsa/mixer/paths/analog-input-headphone-mic.conf
> @@ -27,21 +27,21 @@ description-key = analog-input-microphone
>  required-any = any
>  state.plugged = unknown
>  
> -[Element Headphone Mic Boost]
> -required-any = any
> -switch = select
> +[Element Capture]
> +switch = mute
>  volume = merge
>  override-map.1 = all
>  override-map.2 = all-left,all-right
>  
> -[Element Headphone Mic]
> +[Element Headphone Mic Boost]

If we're doing this, might as well prefer Headphone Mic over Headphone
Mic Boost?

>  required-any = any
> -switch = mute
> +switch = select
>  volume = merge
>  override-map.1 = all
>  override-map.2 = all-left,all-right
>  
> -[Element Capture]
> +[Element Headphone Mic]
> +required-any = any
>  switch = mute
>  volume = merge
>  override-map.1 = all
[...]
> diff --git a/src/modules/alsa/mixer/paths/analog-input-internal-mic-always.conf b/src/modules/alsa/mixer/paths/analog-input-internal-mic-always.conf
> index cd08531..e9c288e 100644
> --- a/src/modules/alsa/mixer/paths/analog-input-internal-mic-always.conf
> +++ b/src/modules/alsa/mixer/paths/analog-input-internal-mic-always.conf
> @@ -39,6 +39,12 @@ state.unplugged = unknown
>  state.plugged = no
>  state.unplugged = unknown
>  
> +[Element Capture]
> +switch = mute
> +volume = merge
> +override-map.1 = all
> +override-map.2 = all-left,all-right
> +
>  [Element Internal Mic Boost]
>  switch = select
>  volume = merge
> @@ -63,7 +69,6 @@ name = input-boost-on
>  [Option Int Mic Boost:off]
>  name = input-boost-off

Again, maybe Boost should be after both Internal Mic?

> -
>  [Element Internal Mic]
>  switch = mute
>  volume = merge
> @@ -76,12 +81,6 @@ volume = merge
>  override-map.1 = all
>  override-map.2 = all-left,all-right
>  
> -[Element Capture]
> -switch = mute
> -volume = merge
> -override-map.1 = all
> -override-map.2 = all-left,all-right
> -
>  [Element Input Source]
>  enumeration = select
>  
> diff --git a/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf b/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf
> index ae3e9a8..5424a1b 100644
> --- a/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf
> +++ b/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf
> @@ -44,6 +44,12 @@ state.plugged = unknown
>  state.unplugged = unknown
>  required-any = any
>  
> +[Element Capture]
> +switch = mute
> +volume = merge
> +override-map.1 = all
> +override-map.2 = all-left,all-right
> +
>  [Element Internal Mic Boost]
>  required-any = any
>  switch = select
> @@ -70,7 +76,6 @@ name = input-boost-on
>  [Option Int Mic Boost:off]
>  name = input-boost-off

Same comment here.
 
Rest looks good to me.

Cheers,
Arun



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux