From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2016FC433EF for ; Tue, 14 Jun 2022 02:21:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354037AbiFNCVj (ORCPT ); Mon, 13 Jun 2022 22:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354961AbiFNCTg (ORCPT ); Mon, 13 Jun 2022 22:19:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47C923F334; Mon, 13 Jun 2022 19:10:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8F9B060F1C; Tue, 14 Jun 2022 02:09:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB1E2C3411E; Tue, 14 Jun 2022 02:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655172596; bh=c3ud9S4vhjy1BsuMLPZWl1hEAv4mc5Zqf23XgggN7A0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mENqxUggdMY7kvtByQycsmNqSpJeoZpvRPfpxe/sNPSue4sdbClf4b5Erye+8N8Gg 9Ih0JBoEX6Qz7LOQvE5gkUxC/j86h3uLCD0QFq6POqRRlu4Rma0AsTnzycHn+jmF30 r7HowlGHVHHkj0kGeLmb+cOllFIMhM9YeanA/raL1huIyF/2PzoF1D9lm8fTQG/Tqc Qllj5svjRifBH65A7AWVIRQgE2qI+aui8TMywFAweKquZR4VIqrpP4wesU5gJE2UKA byRMlBdkSiHCKqxrhrMV6hyHxjv6jg3Hc7euFxv2oqWqX4KwnxoD2uYhxXX6csFHMM 3kGDqagUWMQeA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Charles Keepax , Mark Brown , Sasha Levin , brian.austin@cirrus.com, Paul.Handrigan@cirrus.com, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 4.19 02/18] ASoC: cs42l52: Fix TLV scales for mixer controls Date: Mon, 13 Jun 2022 22:09:25 -0400 Message-Id: <20220614020941.1100702-2-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220614020941.1100702-1-sashal@kernel.org> References: <20220614020941.1100702-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Charles Keepax [ Upstream commit 8bf5aabf524eec61013e506f764a0b2652dc5665 ] The datasheet specifies the range of the mixer volumes as between -51.5dB and 12dB with a 0.5dB step. Update the TLVs for this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220602162119.3393857-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cs42l52.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 3d83c1be1292..9a3180e71bd8 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -141,7 +141,7 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0); static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); -static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0); +static DECLARE_TLV_DB_SCALE(mix_tlv, -5150, 50, 0); static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0); @@ -368,7 +368,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = { CS42L52_ADCB_VOL, 0, 0xA0, 0x78, ipd_tlv), SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL, - 0, 0x19, 0x7F, ipd_tlv), + 0, 0x19, 0x7F, mix_tlv), SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0), -- 2.35.1