From patchwork Tue Nov 17 13:04:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 324959 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp4163592ils; Tue, 17 Nov 2020 05:23:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/l1oEt+9Ml6jaV4yy8IiVn8uJUHk3atjnOn1L/6YWcW65gFGc95ZGOaSiH/DZLuwlb9j6 X-Received: by 2002:a17:906:d8a8:: with SMTP id qc8mr19138521ejb.149.1605619380759; Tue, 17 Nov 2020 05:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619380; cv=none; d=google.com; s=arc-20160816; b=n2vOJer4p+Qtxp/KqTC5sUqQOVbNge/Gz0X5JTK12TcSgFfaKNtA5BmCt95Gibu3t8 TSBelb6/bbyGZilApSbE+zBz5GrTMNVDn0Ir6ZArmpJslabGiJBodpmx2132b+fu9Hng mdoV5lWGfAA/oZene9YNcTggdioP16NbOPqO0N3uZLG9E4GcZ4r3rPziRVC+NtWkRhHx pLFaaMTRmf5zysWPfHa+zeJD639Z5INCdsldBud7v1/3r/mp8llqwfiil4GjxQuplbid ZvvQbXDqQMFo1Z7nY+hW6mALh5ddHli1qgIsv3cak/LipOZwRu1CuVZtsYbLYDt+uhsG P4lg== 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=4lsB2zlxpobFefb+SV2hR+FNkPIkbZQ3fCkBzIV3pBg=; b=rHPkR7hzbTQlnj/Bu1aC+W8q2okZMwANyUNeslZWnV+1/t+30OMmr9b1KWUBuzl4qK O85kDowK64x8wqV7eQnN4tfpPWzM3f9oT7JPYdAFhwVjN8m1MXa+BwCySehq06kbnF37 uNzMko7TIAv84pcp8JW07rc2OF2xpyg3WxUNdXzuJDWJu7h0FtDFhsAbh0Owv5h+Mt7a JQsBdsA77kcFY8A4KWwm5t3WL3mLkdf/bZ+BmExM4mB9DnrPe6FhUKa6bsd9229z9wji PIp+AvL3oA30dvTsRWb0j++i8fB9AdsTRQPWkYnAePk1JX9BH3/j7nv+9WITvywm89Vf 9MNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="G/TzIgDs"; 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 ca2si13919291edb.502.2020.11.17.05.23.00; Tue, 17 Nov 2020 05:23:00 -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="G/TzIgDs"; 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 S1731202AbgKQNWt (ORCPT + 14 others); Tue, 17 Nov 2020 08:22:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:57118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731193AbgKQNWq (ORCPT ); Tue, 17 Nov 2020 08:22:46 -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 1B21624686; Tue, 17 Nov 2020 13:22:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619366; bh=bl0rta8rZ4nHmfk1/GDLmXaqXmKmzYohkIs5buIPXJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G/TzIgDs/MVyF2yocZgj7Yx62fFQlt7O4aSm6s8ow3sDpMMC7CBBxy4gWBVlBeAmZ i573ZS3RJBQo99+GZoDbAoIJ1IRih4QJiYeC2cmZrWCvOINjsJAYsow6jZchnve6sK HKXwlDlxsBHpQTSQGO/60lTRgBkfN6n12//DsFOQ= 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.4 015/151] ASoC: codecs: wcd9335: Set digital gain range correctly Date: Tue, 17 Nov 2020 14:04:05 +0100 Message-Id: <20201117122122.144631784@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122121.381905960@linuxfoundation.org> References: <20201117122121.381905960@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 f318403133e96..81906c25e4a87 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);