From: Takashi Iwai Subject: Re: [PATCH - snd_ice1724 1/1] Use linear scale for AK4396 volume control. Date: Wed, 12 Sep 2012 16:18:44 +0200 Message-ID: References: <1347459126-14256-1-git-send-email-athena@fftw.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 1E3F82616C8 for ; Wed, 12 Sep 2012 16:18:45 +0200 (CEST) In-Reply-To: <1347459126-14256-1-git-send-email-athena@fftw.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: athena@fftw.org Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 12 Sep 2012 10:12:06 -0400, athena@fftw.org wrote: > > From: Matteo Frigo > > 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 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 >