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 X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A9B9C433EA for ; Thu, 25 Mar 2021 11:31:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECC7D61962 for ; Thu, 25 Mar 2021 11:31:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbhCYLba (ORCPT ); Thu, 25 Mar 2021 07:31:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:35208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231653AbhCYL3Z (ORCPT ); Thu, 25 Mar 2021 07:29:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 026C561A51; Thu, 25 Mar 2021 11:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616671652; bh=H8VK9c4QfGqrxZeHrXB88VlBEU6W2MuiAA/+LW4Iomg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jCFdTgmiDyPvcHhmrXpnVTFC3D/lYcyagH/2RfEZzelak7Pbqa+a6GMlUAEi0DHwd eFu5uoH3iwzRBpD1xzy4+7TAnxe5oBhWEtOcxyhRNL+jAnPzcModvY506pfx/ciPI/ K40n+ymOzoZNoB6Rv9vWifwjKvebbrLkYA13kfVG8kX6AXAbAXLgwxoHp6wwzePh0r MR3ghTEHb1/cQoqHfXPS7XDIaXklSnh5cYVLy805fwVj2ekBugzGjiDXMLj/B7Ou/F Wsyg84jIo1SR08h3JSZFysr+RsSTfJR1jLmXcFRb8Wk8pWSvZzLoIv9r3V4P0E9XFc YM9cXnfiP0BpQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , Mark Brown , Sasha Levin , alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 4.19 06/20] ASoC: es8316: Simplify adc_pga_gain_tlv table Date: Thu, 25 Mar 2021 07:27:10 -0400 Message-Id: <20210325112724.1928174-6-sashal@kernel.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210325112724.1928174-1-sashal@kernel.org> References: <20210325112724.1928174-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: Hans de Goede [ Upstream commit bb18c678754ce1514100fb4c0bf6113b5af36c48 ] Most steps in this table are steps of 3dB (300 centi-dB), so we can simplify the table. This not only reduces the amount of space it takes inside the kernel, this also makes alsa-lib's mixer code actually accept the table, where as before this change alsa-lib saw the "ADC PGA Gain" control as a control without a dB scale. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210228160441.241110-1-hdegoede@redhat.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/es8316.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c index 9ebe77c3784a..57130edaf3ab 100644 --- a/sound/soc/codecs/es8316.c +++ b/sound/soc/codecs/es8316.c @@ -56,13 +56,8 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(adc_pga_gain_tlv, 1, 1, TLV_DB_SCALE_ITEM(0, 0, 0), 2, 2, TLV_DB_SCALE_ITEM(250, 0, 0), 3, 3, TLV_DB_SCALE_ITEM(450, 0, 0), - 4, 4, TLV_DB_SCALE_ITEM(700, 0, 0), - 5, 5, TLV_DB_SCALE_ITEM(1000, 0, 0), - 6, 6, TLV_DB_SCALE_ITEM(1300, 0, 0), - 7, 7, TLV_DB_SCALE_ITEM(1600, 0, 0), - 8, 8, TLV_DB_SCALE_ITEM(1800, 0, 0), - 9, 9, TLV_DB_SCALE_ITEM(2100, 0, 0), - 10, 10, TLV_DB_SCALE_ITEM(2400, 0, 0), + 4, 7, TLV_DB_SCALE_ITEM(700, 300, 0), + 8, 10, TLV_DB_SCALE_ITEM(1800, 300, 0), ); static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(hpout_vol_tlv, -- 2.30.1