diff options
author | Matteo Frigo <athena@fftw.org> | 2012-09-12 10:12:06 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-12 10:17:41 -0400 |
commit | 3737e2be505d872bf2b3c1cd4151b2d2b413d7b5 (patch) | |
tree | cee190022e1af2b321c16fda6e67efb9ba1417ed /sound | |
parent | c302d6133c094bda7a7ce94eac5b50c018a7ca7b (diff) |
ALSA: ice1724: Use linear scale for AK4396 volume control.
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@fftw.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ice1712/prodigy_hifi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c index 764cc93dbca4..075d5aa1fee0 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 | |||
297 | } | 297 | } |
298 | 298 | ||
299 | static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); | 299 | static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); |
300 | static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0); | ||
300 | 301 | ||
301 | static struct snd_kcontrol_new prodigy_hd2_controls[] __devinitdata = { | 302 | static struct snd_kcontrol_new prodigy_hd2_controls[] __devinitdata = { |
302 | { | 303 | { |
@@ -307,7 +308,7 @@ static struct snd_kcontrol_new prodigy_hd2_controls[] __devinitdata = { | |||
307 | .info = ak4396_dac_vol_info, | 308 | .info = ak4396_dac_vol_info, |
308 | .get = ak4396_dac_vol_get, | 309 | .get = ak4396_dac_vol_get, |
309 | .put = ak4396_dac_vol_put, | 310 | .put = ak4396_dac_vol_put, |
310 | .tlv = { .p = db_scale_wm_dac }, | 311 | .tlv = { .p = ak4396_db_scale }, |
311 | }, | 312 | }, |
312 | }; | 313 | }; |
313 | 314 | ||