Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp9324875ioo; Sun, 5 Jun 2022 11:03:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwXXhR3QeHM/WBEWulBF2zLSm9uDcDS204Tjeb83wGKeChPMe9XDleMS5sBp0Db57XbKEV X-Received: by 2002:a17:907:2d13:b0:711:b149:5272 with SMTP id gs19-20020a1709072d1300b00711b1495272mr4550230ejc.326.1654452234294; Sun, 05 Jun 2022 11:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654452234; cv=none; d=google.com; s=arc-20160816; b=Sz7tjY6uO65k8scGYGkt7UfBHlRz+AfG9TI4vrAutJ7gOM79noQ6lpfcfScCkBgpHV NsftnCbPayhQWqPrilNOok2nc0Za5hDvxed8hDl+Q9R1xTZWLol9NF+RPALQw6zPA60N ohjHu5ynFxbuisjJymcM/2Gh5bGt8KzCJO6yq+/3ZJsOqzQtbbPHJmSn8UlMiw45o4ji vJnQcMlQoUNYRqIS0iMd63mnjG1aBjwJvNkD/exWm2IOcZrsFVCryyOIOwIrejJ5w7GI mE79jc09i0nKhy5l4RsNkxEZ847JGyWEN/lM5fr4FSSDO/raRzjOH54vhGUpvePI547h hqdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eXPtVBtb4bXkb6iXJoHU0bVquJu4DWKoCcD3Cb1LYzE=; b=IvqyHEh3x6IJm0+FdhLKCKbKO/qpiSQl97fiB+cRLM4ujb7HRU7oxRQApLqOlEKflq UTdw2xk9Sza+o2+U8pe9BQosPSpfZWfN9EGBPgF3IA1BNefW8JuwwOZBUMuzDQMTEHv5 N5mymF5wrS+WOsjZSur+V2qxjIFIkN/mkKfzxtugY3OlQAvtLA0MtY6YBF3JZxIRkPRl //p4GpQZ2LN5puDa3KOX4qCjre71K1zcnIVtb/jW1wx3R0L9iCHWkZIhtqfLYkMJWdtE kwW19dMlr5GZh7YIP9WhjomX2KdP6qqNBEDbDgRellYDJJ34u15oKgWpvfUke3qEXMYQ R9rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=j6NXW34q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ss20-20020a170907c01400b0070dff46708esi7829392ejc.137.2022.06.05.11.03.27; Sun, 05 Jun 2022 11:03:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=j6NXW34q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236955AbiFBQVd (ORCPT + 99 others); Thu, 2 Jun 2022 12:21:33 -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: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: tlzIjbmDbtaxUJbkiWypFLDf1yTPOX0I X-Proofpoint-GUID: tlzIjbmDbtaxUJbkiWypFLDf1yTPOX0I X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); 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); @@ -364,7 +364,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.30.2