[alsa-devel] [PATCH - snd_ice1724 1/1] Use linear scale for AK4396 volume control.

Takashi Iwai tiwai at suse.de
Wed Sep 12 16:18:44 CEST 2012


At Wed, 12 Sep 2012 10:12:06 -0400,
athena at fftw.org wrote:
> 
> From: Matteo Frigo <athena at fftw.org>
> 
> The AK4396 DAC has a linear-scale attentuator, but
> sound/pci/ice1712/prodigy_hifi.c used a log scale instead, which is
> not quite right.  This patch restores the correct scale, borrowing
> from the ak4396 code in sound/pci/oxygen/oxygen.c.
> 
> Signed-off-by: Matteo Frigo <athena at fftw.org>

Applied now.  Thanks.


Takashi

> 
> diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c
> index 7f2b63f..7bf093c 100644
> --- a/sound/pci/ice1712/prodigy_hifi.c
> +++ b/sound/pci/ice1712/prodigy_hifi.c
> @@ -297,6 +297,7 @@ static int ak4396_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem
>  }
>  
>  static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1);
> +static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
>  
>  static struct snd_kcontrol_new prodigy_hd2_controls[] __devinitdata = {
>      {
> @@ -307,7 +308,7 @@ static struct snd_kcontrol_new prodigy_hd2_controls[] __devinitdata = {
>  	.info = ak4396_dac_vol_info,
>  	.get = ak4396_dac_vol_get,
>  	.put = ak4396_dac_vol_put,
> -	.tlv = { .p = db_scale_wm_dac },
> +	.tlv = { .p = ak4396_db_scale },
>      },
>  };
>  
> -- 
> 1.7.10.4
> 


More information about the Alsa-devel mailing list