Skip to content

Commit

Permalink
ALSA: ice1724: Use linear scale for AK4396 volume control.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matteo Frigo authored and Takashi Iwai committed Sep 12, 2012
1 parent c302d61 commit 3737e2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/ice1712/prodigy_hifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
{
Expand All @@ -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 },
},
};

Expand Down

0 comments on commit 3737e2b

Please sign in to comment.