From patchwork Thu Jun 4 12:22:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 6546411 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 30EAA9F326 for ; Thu, 4 Jun 2015 12:33:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58DF42078D for ; Thu, 4 Jun 2015 12:33:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 17FA62034E for ; Thu, 4 Jun 2015 12:33:33 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id DB4B8266715; Thu, 4 Jun 2015 14:33:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 2CC652665EB; Thu, 4 Jun 2015 14:26:13 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1CD7F2664E5; Thu, 4 Jun 2015 14:26:11 +0200 (CEST) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by alsa0.perex.cz (Postfix) with ESMTP id 38F4C26644E for ; Thu, 4 Jun 2015 14:23:31 +0200 (CEST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t54CNTgp012086; Thu, 4 Jun 2015 07:23:29 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t54CNTGT001462; Thu, 4 Jun 2015 07:23:29 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Thu, 4 Jun 2015 07:23:29 -0500 Received: from dlep32.itg.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t54CMqXg028164; Thu, 4 Jun 2015 07:23:27 -0500 From: Peter Ujfalusi To: Mark Brown , Liam Girdwood , Date: Thu, 4 Jun 2015 15:22:39 +0300 Message-ID: <1433420571-5421-16-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.4.2 In-Reply-To: <1433420571-5421-1-git-send-email-peter.ujfalusi@ti.com> References: <1433420571-5421-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 15/22] ASoC: tas2552: Correct the Speaker Driver Playback Volume (PGA_GAIN) X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.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 X-Virus-Scanned: ClamAV using ClamSMTP The last parameter for DECLARE_TLV_DB_SCALE() is to tell if the gain will be muted or not when it is set to raw 0. IN this case it is not muted. The PGA_GAIN is in 0-4 bits in the register. Fix the offset in the SOC_SINGLE_TLV() for this. Signed-off-by: Peter Ujfalusi --- sound/soc/codecs/tas2552.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index 264df631b130..fe2e4d384a00 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -406,11 +406,11 @@ static struct snd_soc_dai_driver tas2552_dai[] = { /* * DAC digital volumes. From -7 to 24 dB in 1 dB steps */ -static DECLARE_TLV_DB_SCALE(dac_tlv, -7, 100, 24); +static DECLARE_TLV_DB_SCALE(dac_tlv, -7, 100, 0); static const struct snd_kcontrol_new tas2552_snd_controls[] = { SOC_SINGLE_TLV("Speaker Driver Playback Volume", - TAS2552_PGA_GAIN, 0, 0x1f, 1, dac_tlv), + TAS2552_PGA_GAIN, 0, 0x1f, 0, dac_tlv), }; static const struct reg_default tas2552_init_regs[] = {