From patchwork Tue Nov 17 13:02:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 325209 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp4169831ils; Tue, 17 Nov 2020 05:31:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwImf5xEl+18LP3C8Zi1RyNlKLDUbbmcwWes1J/CoaCddor9kQYrTGvKjwcEci7vXC/Y1YF X-Received: by 2002:aa7:d6c2:: with SMTP id x2mr20008937edr.206.1605619917877; Tue, 17 Nov 2020 05:31:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619917; cv=none; d=google.com; s=arc-20160816; b=0AWBSfnfW5BV0Fn04ZEnl5y6wGpWwdCTQXiLVwMSBUKfPcqcydyPKStg+GMAAWp1Q/ /P2ETUqxkSHg4y01SL9GZPlohNbg+ilrCdBfji5DaK8D3wml8xoZ8/J4GV38sDjPlmpk zYref4oPCkZV2Rpvkh857tWd+fjngYyFrn6JPyuAQlPuX8HqqpA9p34J9n7l0epWIU4S A//N50rcF5hJ1KDaT2AeTngYwjWMG8m7Bc4UiUwwKKd+K+hixrgu913zMNVDzhUIxKbt UVpE7FurSvtf7nHZRwmjHIJY3VeKwJcoJ5oXQdXzYQPvCxTUhCJJMERVdI+S5BP6lnIT NdOw== 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=MHv1yf2FPgf3W9RGzbBbTnujMhbhWSV2BgKM9akeiL4=; b=DhU3IdUAI4gjETW6ArQ+3W3c1qJG+ET5VoElC+YzEWf9fxF90YNJr3aZBIZntNHrhY /NnDRlTCpzpvFHgm5efLHrLPeWkk8SEoS5sFMxXF2WjDS/igCv/CujjmPdC+kFDz392q TfntV4e3bqwcn8s+OvaaBHCNw0wpQy0RAR5zsSO1uSDupQM8rU+TyKqJnHFv8Na8aI2A EQ1dc2j5etpp38t17/qn1YgGSM5nOyYr5Y93d5F9TQS5seRbdlXFOipH+giSFvKO62WE +kO7thwoNek/SraDrNoOCfRhtBMR9W4l3mx6PrK8qBuWDBiZL/lAjt4MrW1GFrBzgYHx +UxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QAWpQ3V4; 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.57; Tue, 17 Nov 2020 05:31:57 -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=QAWpQ3V4; 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 S1731910AbgKQNac (ORCPT + 14 others); Tue, 17 Nov 2020 08:30:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:39542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731907AbgKQNa3 (ORCPT ); Tue, 17 Nov 2020 08:30:29 -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 68C9621534; Tue, 17 Nov 2020 13:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619828; bh=JkKHH3T7F7wPKsUnBxJhjsNXKIhHvhpdq6u4oezFD4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QAWpQ3V4UwInCa7m5f2oy5fnBlGewlsnVbPZz8WK3gflxmq4SSqIGfTrPxNiUYw0D M5wxJoGz0g8DpQ/RDY1Eb3HRu/eebp2ZQEfQa2CBUKiGKMbY8Wx8ibVFPu+GGYJ9gP GyA5YwyJNyyylCSQllHj4gxgUZqeNFE2bP4D4Y4s= 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 018/255] ASoC: codecs: wcd934x: Set digital gain range correctly Date: Tue, 17 Nov 2020 14:02:38 +0100 Message-Id: <20201117122139.829842712@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 fc0522bbe02fa4beb95c0514ace66b585616f111 ] 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: 1cde8b822332 ("ASoC: wcd934x: add basic controls") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201028154340.17090-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.27.0 diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index 35697b072367a..40f682f5dab8b 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -551,7 +551,7 @@ struct wcd_iir_filter_ctl { struct soc_bytes_ext bytes_ext; }; -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);