From patchwork Tue Nov 17 13:02:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 325212 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp4169850ils; Tue, 17 Nov 2020 05:31:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNBlddTm251YpqKe7IzqYKGzxkjXWzQ77yHpr9PiLg6MjpHgoWMwsmJ/hBIKqrzlcvdUd9 X-Received: by 2002:a17:906:d1c7:: with SMTP id bs7mr20343652ejb.434.1605619918639; Tue, 17 Nov 2020 05:31:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619918; cv=none; d=google.com; s=arc-20160816; b=p1Z/snsKmCzMYaOQ/Bwbxp6qmhuONyv3I12IkPtASdZsj1rKuknUUf4ZfzM8jzcTJK k5nGH63ERp5K2Y5r2Lr30I0Wi7J2Ci6zUiv+fStDpl3NHTkDveiXh4YywRdYAWp9DhGf 7eFMTGvOCLWoyQt1r/5b1t1ht9AhkiIK1EOPLoF3xyDrUapRRapK149PHqZU91jFr9x1 q0wi8659B6KsthLRv/4meikzdci/d3ic3lhFvaaecTQvYiSODFG8KW1ey5dyQxF+QsL6 xpUDY4C1YYWFa+nnV/S2fxKTc8Qox6ZZDs3ckyRK1DOEoGgDu2uucOcKZXad/LodxPT0 Ir2w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G00oN5T+GGByIeQyOnuY9HQxXjsbhoUxGh3r3L1cR9M=; b=et7iNBV1AAXKNszw4OcyfyLXVsge3eSqQ37N8cP4nB73Sc3VX++K7lzhT6Hgp4VKVQ /fGgWKc8FrZYI5lE4NQnVR0VHOBtizNSM5Q+Y4i+Pli3zQnjXyBjFC1ZMkobEBnRL7l3 Z78buylTXe4njR9n2G30F2eaqId8IoAsAE6Zj01oPHOc/QygUAtvWf6ftSjf4ZdsYd5A q/gOoqT8hinVd1CsLZK4Zos1+GA2sxDwKoYSMv5mjqfvaIcxEE0o+TooQNk5hTRbY65e 8wceQK+7enEh+FfPGELQE4JvSYTUaWew9tWGzEKUA5aU07cGbBy71nkwh+b3oTleL9mT UITA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rHyCddgI; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lj2si10176425ejb.246.2020.11.17.05.31.58; Tue, 17 Nov 2020 05:31:58 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rHyCddgI; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731914AbgKQNae (ORCPT + 14 others); Tue, 17 Nov 2020 08:30:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:39588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731865AbgKQNac (ORCPT ); Tue, 17 Nov 2020 08:30:32 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7FA6220781; Tue, 17 Nov 2020 13:30:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619832; bh=U7GY2mvMYuIm6HVZTt3lHtjgeh9qjqk97RyhMGf8nII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rHyCddgIWFhmDuJ4vy6gYeCUpBvjZEBdyvKP07QUwhVfc2bxoGlyapSzbPokkxjJG SujB7tMh29cBGyH6rYxFO3qRe880cKCrIka8pR059O02NFw8qtfMhAtwkcLHVnbJIr TAAPR1oJm8HtFStiQVKmwgKufjMT7qyM6uY8NpMY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Mark Brown , Sasha Levin Subject: [PATCH 5.9 019/255] ASoC: codecs: wcd9335: Set digital gain range correctly Date: Tue, 17 Nov 2020 14:02:39 +0100 Message-Id: <20201117122139.876885902@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 6d6bc54ab4f2404d46078abc04bf4dee4db01def ] digital gain range is -84dB min to 40dB max, however this was not correctly specified in the range. Fix this by with correct range! Fixes: 8c4f021d806a ("ASoC: wcd9335: add basic controls") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201028154340.17090-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wcd9335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.27.0 diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index f2d9d52ee171b..4d2b1ec7c03bb 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -618,7 +618,7 @@ static const char * const sb_tx8_mux_text[] = { "ZERO", "RX_MIX_TX8", "DEC8", "DEC8_192" }; -static const DECLARE_TLV_DB_SCALE(digital_gain, 0, 1, 0); +static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400); static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1); static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1); static const DECLARE_TLV_DB_SCALE(ear_pa_gain, 0, 150, 0);