From nobody Tue Apr 28 09:07:31 2026 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 BCBD3C43334 for ; Thu, 2 Jun 2022 16:21:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236957AbiFBQVf (ORCPT ); Thu, 2 Jun 2022 12:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234815AbiFBQV2 (ORCPT ); Thu, 2 Jun 2022 12:21:28 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53AB968997 for ; Thu, 2 Jun 2022 09:21:27 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 252BrAOm027248; Thu, 2 Jun 2022 11:21:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=eXPtVBtb4bXkb6iXJoHU0bVquJu4DWKoCcD3Cb1LYzE=; b=j6NXW34qGPcrQW3GXvZzzutn8XKsvhldKm9KIoLyvFmYc4Dyk5gikMKaWwMwwOveSnZo rEKvdh1CyFpDcjIdlO8YKMkcxX/+fYnZeH+/TMFaqvQVY+5dY6wv7r0L1q+Suow8993G wcEyhpbtngDS69HLSZ7hSpfvscf10BsXKpGq0kJEyO4QZwyuxjEL7hrckZBPSON7TL1/ jSBDiW+oisV0z8YTEFzsNdRz0ck7wj3iDL8EkpHTU6/LibvaYImEDtdzTPVD61S3BgKo dzSPDgHO/lEU+pIVVu4ptRuLhYxIZaV3dgQOf95hu4IPIU575M9eb/mbaOB39S+6sjTS og== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3gbg5nnqyj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 02 Jun 2022 11:21:20 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 2 Jun 2022 17:21:19 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 2 Jun 2022 17:21:19 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 1EF8311D1; Thu, 2 Jun 2022 16:21:19 +0000 (UTC) From: Charles Keepax To: CC: , , , , , Subject: [PATCH 1/6] ASoC: cs42l52: Fix TLV scales for mixer controls Date: Thu, 2 Jun 2022 17:21:14 +0100 Message-ID: <20220602162119.3393857-2-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> References: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: tlzIjbmDbtaxUJbkiWypFLDf1yTPOX0I X-Proofpoint-GUID: tlzIjbmDbtaxUJbkiWypFLDf1yTPOX0I X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- 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 9b182b585be4c..02c25399cf8a2 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -137,7 +137,7 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0); =20 static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); =20 -static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0); +static DECLARE_TLV_DB_SCALE(mix_tlv, -5150, 50, 0); =20 static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0); =20 @@ -364,7 +364,7 @@ static const struct snd_kcontrol_new cs42l52_snd_contro= ls[] =3D { 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), =20 SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0), =20 --=20 2.30.2 From nobody Tue Apr 28 09:07:31 2026 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 065C5C433EF for ; Thu, 2 Jun 2022 16:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236946AbiFBQVa (ORCPT ); Thu, 2 Jun 2022 12:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236179AbiFBQV2 (ORCPT ); Thu, 2 Jun 2022 12:21:28 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53B7A2AD989 for ; Thu, 2 Jun 2022 09:21:27 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 252BrAOn027248; Thu, 2 Jun 2022 11:21:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=LLkRrjsu8/hYo9odlMpO0R406tjaPOUvBzHXbM0tbgM=; b=qQwQrL8x5R9LbcILhBgTnqXRyTkGnUPYDhJ1V27HcDJWOuJN1QAUu75PP/uY1bWGqXWv UoTaLQr0p7PTGKKEkEy3XwrmGTn3gzq9tN+5BOxRvGKG7LtTLI2vRScFc9GBU8B3c78Y qjiqGVhRfb3XTBh4Qsg293eVnSFUv7ZhPHodU+uIVWUGLu9+PF96yqKJianos5Yek6Zl 3zzXbDwFXBk3/cNcq1hdA1kDLojty9PajIfX7oSMMANlsOj7Rjz3D7tn8ESEFFRzuHIR WeD6nfi+NucKxRykfrYuF365PcRvZLldKg98Tkvb8RgEd7XO2vanPHcLY8Ww6G8Kuxtt 9A== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3gbg5nnqyj-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 02 Jun 2022 11:21:21 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 2 Jun 2022 17:21:19 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 2 Jun 2022 17:21:19 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 2D1C62A1; Thu, 2 Jun 2022 16:21:19 +0000 (UTC) From: Charles Keepax To: CC: , , , , , Subject: [PATCH 2/6] ASoC: cs35l36: Update digital volume TLV Date: Thu, 2 Jun 2022 17:21:15 +0100 Message-ID: <20220602162119.3393857-3-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> References: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: 0OPw23O0cNPlvGHZ86tdDgnaLidcIRfq X-Proofpoint-GUID: 0OPw23O0cNPlvGHZ86tdDgnaLidcIRfq X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The digital volume TLV specifies the step as 0.25dB but the actual step of the control is 0.125dB. Update the TLV to correct this. Signed-off-by: Charles Keepax --- sound/soc/codecs/cs35l36.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c index 920190daa4d1b..dfe85dc2cd20f 100644 --- a/sound/soc/codecs/cs35l36.c +++ b/sound/soc/codecs/cs35l36.c @@ -444,7 +444,8 @@ static bool cs35l36_volatile_reg(struct device *dev, un= signed int reg) } } =20 -static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10200, 25, 0); +static const DECLARE_TLV_DB_RANGE(dig_vol_tlv, 0, 912, + TLV_DB_MINMAX_ITEM(-10200, 1200)); static DECLARE_TLV_DB_SCALE(amp_gain_tlv, 0, 1, 1); =20 static const char * const cs35l36_pcm_sftramp_text[] =3D { --=20 2.30.2 From nobody Tue Apr 28 09:07:31 2026 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 339CFC43334 for ; Thu, 2 Jun 2022 16:21:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235788AbiFBQVv (ORCPT ); Thu, 2 Jun 2022 12:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236890AbiFBQV3 (ORCPT ); Thu, 2 Jun 2022 12:21:29 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE1968997 for ; Thu, 2 Jun 2022 09:21:28 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 252Ao5gD026091; Thu, 2 Jun 2022 11:21:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=0IeA4yIE6WcG+qW9hTFM5cHREHoUthyn64w2bgHrobo=; b=ewDv9Vs0LvLo1B4jhhvAkazO6kvDYjz4kzUQ6Msu8Z8YzHMCDF+LVXTGi1BbRZ68Y6jZ x7s+bkjWpUDtFlw8lfY6lG4wMsY4pg7dF+fR8NOsCmjo2EswIxKgprg2zRZjtkD7OTgm LhvbqeoVX3CCdyPgq+mah5huqM2h96iZaec7qZ/CS7W0DGgYtjaNMBQolp9q5+6L515o lCC5PimI/+QCILn+ApYFRTpUIErFQ9LEhr6M+HC3TBXdosppOr0UNlf+XuPPxyZz+Q6F gGWupm9ml0NX36Ghaq5HuyC43TCYhUICQWPR8HjoSSisZieuDi7aQ4lOzvs2cFXDm4cm bg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3gbh51nq0d-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 02 Jun 2022 11:21:22 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 2 Jun 2022 17:21:19 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 2 Jun 2022 17:21:19 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 3C72D11D3; Thu, 2 Jun 2022 16:21:19 +0000 (UTC) From: Charles Keepax To: CC: , , , , , Subject: [PATCH 3/6] ASoC: cs53l30: Correct number of volume levels on SX controls Date: Thu, 2 Jun 2022 17:21:16 +0100 Message-ID: <20220602162119.3393857-4-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> References: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 0eGjFAiCPLPWlT9YKPozGF5ZOyEEII_w X-Proofpoint-ORIG-GUID: 0eGjFAiCPLPWlT9YKPozGF5ZOyEEII_w X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This driver specified the maximum value rather than the number of volume levels on the SX controls, this is incorrect, so correct them. Reported-by: David Rhodes Signed-off-by: Charles Keepax --- sound/soc/codecs/cs53l30.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c index 703545273900f..360ca2ffd5069 100644 --- a/sound/soc/codecs/cs53l30.c +++ b/sound/soc/codecs/cs53l30.c @@ -348,22 +348,22 @@ static const struct snd_kcontrol_new cs53l30_snd_cont= rols[] =3D { SOC_ENUM("ADC2 NG Delay", adc2_ng_delay_enum), =20 SOC_SINGLE_SX_TLV("ADC1A PGA Volume", - CS53L30_ADC1A_AFE_CTL, 0, 0x34, 0x18, pga_tlv), + CS53L30_ADC1A_AFE_CTL, 0, 0x34, 0x24, pga_tlv), SOC_SINGLE_SX_TLV("ADC1B PGA Volume", - CS53L30_ADC1B_AFE_CTL, 0, 0x34, 0x18, pga_tlv), + CS53L30_ADC1B_AFE_CTL, 0, 0x34, 0x24, pga_tlv), SOC_SINGLE_SX_TLV("ADC2A PGA Volume", - CS53L30_ADC2A_AFE_CTL, 0, 0x34, 0x18, pga_tlv), + CS53L30_ADC2A_AFE_CTL, 0, 0x34, 0x24, pga_tlv), SOC_SINGLE_SX_TLV("ADC2B PGA Volume", - CS53L30_ADC2B_AFE_CTL, 0, 0x34, 0x18, pga_tlv), + CS53L30_ADC2B_AFE_CTL, 0, 0x34, 0x24, pga_tlv), =20 SOC_SINGLE_SX_TLV("ADC1A Digital Volume", - CS53L30_ADC1A_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv), + CS53L30_ADC1A_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv), SOC_SINGLE_SX_TLV("ADC1B Digital Volume", - CS53L30_ADC1B_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv), + CS53L30_ADC1B_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv), SOC_SINGLE_SX_TLV("ADC2A Digital Volume", - CS53L30_ADC2A_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv), + CS53L30_ADC2A_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv), SOC_SINGLE_SX_TLV("ADC2B Digital Volume", - CS53L30_ADC2B_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv), + CS53L30_ADC2B_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv), }; =20 static const struct snd_soc_dapm_widget cs53l30_dapm_widgets[] =3D { --=20 2.30.2 From nobody Tue Apr 28 09:07:31 2026 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 8215BC433EF for ; Thu, 2 Jun 2022 16:21:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236980AbiFBQVl (ORCPT ); Thu, 2 Jun 2022 12:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236843AbiFBQV3 (ORCPT ); Thu, 2 Jun 2022 12:21:29 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C48E2ADF62 for ; Thu, 2 Jun 2022 09:21:28 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 252BrAOo027248; Thu, 2 Jun 2022 11:21:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=xppXRKpPoQYmy1saWXUVFmsK1LSyZf5H5sACCvbLVy8=; b=lEjRHuxs7mHfHzJ7wVetbgpiqnT7H29LBv0Jt6Mvdy2b0VqX8dC4Xok50oeK2Bs/+QHd +5wQMeBWwGNzzKU2doxUyp75KXUl/rFdByNZvIECqgQuyBU6bPXcHv/XZDxiXRGK6sXn BKGbOsUMVZcAIXDEwx48cKM8z3ZoaXqhuS42pVHQkpyIHoDN/CsyUCnu8UW8r2RGfbmD GLBUJ0QrqiXOq9lvUo42bsIG5orm+Uk3M/GTaqYzEKD3c27tZIbtnEIlW4ZHFMByqQpe o24KTHSJdypTtYT05SM8koH96jkm1AD4cyDzN16wZb5/LDnfwgHU0hlOG0LbxwmwBIY9 7w== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3gbg5nnqyj-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 02 Jun 2022 11:21:21 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 2 Jun 2022 17:21:19 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 2 Jun 2022 17:21:19 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 4BD1B459; Thu, 2 Jun 2022 16:21:19 +0000 (UTC) From: Charles Keepax To: CC: , , , , , Subject: [PATCH 4/6] ASoC: cs42l52: Correct TLV for Bypass Volume Date: Thu, 2 Jun 2022 17:21:17 +0100 Message-ID: <20220602162119.3393857-5-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> References: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: YAcTCwFmCohKk31UeMu-sq8dDcCmtFbR X-Proofpoint-GUID: YAcTCwFmCohKk31UeMu-sq8dDcCmtFbR X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The Bypass Volume is accidentally using a -6dB minimum TLV rather than the correct -60dB minimum. Add a new TLV to correct this. Signed-off-by: Charles Keepax --- sound/soc/codecs/cs42l52.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 02c25399cf8a2..10e696406a71b 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -137,6 +137,8 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0); =20 static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); =20 +static DECLARE_TLV_DB_SCALE(pass_tlv, -6000, 50, 0); + static DECLARE_TLV_DB_SCALE(mix_tlv, -5150, 50, 0); =20 static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0); @@ -351,7 +353,7 @@ static const struct snd_kcontrol_new cs42l52_snd_contro= ls[] =3D { CS42L52_SPKB_VOL, 0, 0x40, 0xC0, hl_tlv), =20 SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, - CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pga_tlv), + CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pass_tlv), =20 SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0), =20 --=20 2.30.2 From nobody Tue Apr 28 09:07:31 2026 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 0F005C43334 for ; Thu, 2 Jun 2022 16:21:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236210AbiFBQVr (ORCPT ); Thu, 2 Jun 2022 12:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236685AbiFBQV3 (ORCPT ); Thu, 2 Jun 2022 12:21:29 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68BD12AE9DD for ; Thu, 2 Jun 2022 09:21:28 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 252BrAOp027248; Thu, 2 Jun 2022 11:21:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=GTox809FkL5oqgk9E/cTyACSAt7RROz4hfZcEH4v+qQ=; b=AdejbTQJENJbb0m4gv8J/IsOW0IhGLvuRfEFjdNUrpuPv2cISrdAhZy3nwz6uJmUlAnT WvYQYz0alzAto9rdMbCwE7x4sb7bYbnI4YNCxMOVo+JjwVENAMJYepfGJcC6SFpOdzU4 4wtx/lPhKdQUIxZzTRkMjUyXUk6zY7EHkKgwHvbkLbDTYWP/8wA7V3TqXHSKTHy+emnO oA3jsN2Lnna530xffpAe3QddlrVdf98irvi3bq7EBf4cD4lIpTrk2tvfSCtpjoy1j/Er mVKxpA8X7Qjj9LzvgPe7bcLzO2DAoG4xAup+iBYUrv/mDDm7oCNgGOc0l8vwYKP7dEPF PQ== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3gbg5nnqyj-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 02 Jun 2022 11:21:22 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 2 Jun 2022 17:21:19 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 2 Jun 2022 17:21:19 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 59F9011D4; Thu, 2 Jun 2022 16:21:19 +0000 (UTC) From: Charles Keepax To: CC: , , , , , Subject: [PATCH 5/6] ASoC: cs42l56: Correct typo in minimum level for SX volume controls Date: Thu, 2 Jun 2022 17:21:18 +0100 Message-ID: <20220602162119.3393857-6-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> References: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: SNtC8FACdjYDAJnjodhYQ1u-6S9crcXj X-Proofpoint-GUID: SNtC8FACdjYDAJnjodhYQ1u-6S9crcXj X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" A couple of the SX volume controls specify 0x84 as the lowest volume value, however the correct value from the datasheet is 0x44. The datasheet don't include spaces in the value it displays as binary so this was almost certainly just a typo reading 1000100. Signed-off-by: Charles Keepax --- sound/soc/codecs/cs42l56.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index dc23007336c58..510c94265b1f0 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c @@ -391,9 +391,9 @@ static const struct snd_kcontrol_new cs42l56_snd_contro= ls[] =3D { SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1), =20 SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME, - CS42L56_HPB_VOLUME, 0, 0x84, 0x48, hl_tlv), + CS42L56_HPB_VOLUME, 0, 0x44, 0x48, hl_tlv), SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME, - CS42L56_LOB_VOLUME, 0, 0x84, 0x48, hl_tlv), + CS42L56_LOB_VOLUME, 0, 0x44, 0x48, hl_tlv), =20 SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL, 0, 0x00, 1, tone_tlv), --=20 2.30.2 From nobody Tue Apr 28 09:07:31 2026 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 19151C43334 for ; Thu, 2 Jun 2022 16:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236983AbiFBQV4 (ORCPT ); Thu, 2 Jun 2022 12:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236945AbiFBQVa (ORCPT ); Thu, 2 Jun 2022 12:21:30 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93E092AD989 for ; Thu, 2 Jun 2022 09:21:29 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 252Ao5gE026091; Thu, 2 Jun 2022 11:21:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=BOGFGJu5wzq9lAKUjsSDYjYbucMgtUxVYgWRIpxRVys=; b=MBvlgfKQclbHZiUJDC25dAMnBTaUokpcWolklk0I2PbFQQLGsisVDeKa8E5NP5cYlvtS NCKyzw41sBkvLT7qaFeezJDJBSAufIHa94B6XTt+h+B8fK9Ix/ElAXz/Cu6cSKBVMht4 vxPMkSA7KYcMXg3Zz3g5r+GyowcJVop4WitaLUj+jIbgVDo5wCnFGaSQTEFKiHEHdGLx OOJn9iMUUien0QgqwHcmVe26s5k82B++pcWZ2gKUxyX534y0RLwsYaaQD+TK1J0w1p/f bSjG1ll14u1lbibF31kOxRhJONWlBTDTkWIg4jJ3ADgjpCC97206YEgEPefsCSUTBeMG nw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3gbh51nq0d-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 02 Jun 2022 11:21:23 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 2 Jun 2022 17:21:19 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 2 Jun 2022 17:21:19 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 66C2E11D1; Thu, 2 Jun 2022 16:21:19 +0000 (UTC) From: Charles Keepax To: CC: , , , , , Subject: [PATCH 6/6] ASoC: cs42l51: Correct minimum value for SX volume control Date: Thu, 2 Jun 2022 17:21:19 +0100 Message-ID: <20220602162119.3393857-7-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> References: <20220602162119.3393857-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 4y5yNcRhOdjaoQmqu9XYkfoP1b5r9OpT X-Proofpoint-ORIG-GUID: 4y5yNcRhOdjaoQmqu9XYkfoP1b5r9OpT X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The minimum value for the PGA Volume is given as 0x1A, however the values from there to 0x19 are all the same volume and this is not represented in the TLV structure. The number of volumes given is correct so this leads to all the volumes being shifted. Move the minimum value up to 0x19 to fix this. Signed-off-by: Charles Keepax --- sound/soc/codecs/cs42l51.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index aff618513c753..0e933181b5dbb 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -143,7 +143,7 @@ static const struct snd_kcontrol_new cs42l51_snd_contro= ls[] =3D { 0, 0xA0, 96, adc_att_tlv), SOC_DOUBLE_R_SX_TLV("PGA Volume", CS42L51_ALC_PGA_CTL, CS42L51_ALC_PGB_CTL, - 0, 0x1A, 30, pga_tlv), + 0, 0x19, 30, pga_tlv), SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0), SOC_SINGLE("Auto-Mute Switch", CS42L51_DAC_CTL, 2, 1, 0), SOC_SINGLE("Soft Ramp Switch", CS42L51_DAC_CTL, 1, 1, 0), --=20 2.30.2