Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp841319rdb; Thu, 18 Jan 2024 23:49:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGS1E4t7R6r9bdAs4i/h++eV17xcUO3jlRom7unK0I6RxjQ65HsORJE5ZxHTwg+uYGtzFmh X-Received: by 2002:a05:6358:7019:b0:176:227b:8a83 with SMTP id 25-20020a056358701900b00176227b8a83mr1494778rwo.40.1705650580272; Thu, 18 Jan 2024 23:49:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705650580; cv=pass; d=google.com; s=arc-20160816; b=nK+50gMn6cX7fuEtgx/2uvLyYajMxqu4dqFGtaatXhchpdA1vmuJqwYljJpGngTBFf EHjIck0w89A8aKHwvEk2UiBQ6IojzWQ3XPSiPkmBqG8Y+ErOY12/oW7aJWAcjgKEv0oE mBqrGFLUqZZ5DLxftYYvJoByIl4muVWHnTxRvgsn27TTgmWRMZvIv0C/Ssk6Oq+ylre4 zIE0ea7s4nMIXhUGKzC/BLVZnv7r/bHbyOwxTuH5QERLxCu1V/cpO2A6wqL1PtCrpH9g D1DFpOo21gMdkTkVNi+WvXIcAZqkh8LFLgiXmvcgNfanFwOBlMiCnKYT5WwEgCp4NXhG S8BQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=CU1bMRxchSmRgivc/iAZKp78DVFdSvb1675ltw30IVs=; fh=wV/HKdoXqD/QUSQtD4Gu0auKi9hIjQBQw4bLjr2hJc4=; b=unvHIlkr3YjkFRP54G1k+xktOpyPQRvoPKDzl0tBrWSd+bq6q6kqBZihzTZ1nM0Ult eDklSLo0xDFS9mYfk+9Vgsj6+khdZgbz7Q+7R46WdhhZY8M7JoOjHv5q5kcmfo6hzl5D z5Go1YlTR1kWnlKtltvYM3j4r+v3ayDjNtVrl0KMhxGWANVwINph68bwYLBtMSBK6AAy YD20OGLnr5JfPgMIBcWsqh/Y0U+EtSVL+Meg9pNu5ZNMA1crYoxs4ULI/dG8TaVS0iG5 SQX8iJu7QJxCyfL6WAYouYXU0kaaci9Jt7bKU+f5cHqJGwZ+AS2bw/4o2DrFIC6TZYGh Q6iQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bL60ujW0; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-30863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 21-20020a631555000000b005cec1f8ccfcsi2873778pgv.698.2024.01.18.23.49.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 23:49:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bL60ujW0; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-30863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 624DBB24036 for ; Fri, 19 Jan 2024 07:47:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB0CE208A6; Fri, 19 Jan 2024 07:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bL60ujW0" Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A9E51DA44 for ; Fri, 19 Jan 2024 07:47:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705650421; cv=none; b=nXbg0GOQ1ftRq9Pl6zT984oojJAcuN0xkjmjtXfJIvQ1ec0Cf7rw2QgJeMlpdhUCDKTpYaqjSKgD3SeNe+pEd8I34H4b2ngxnD32QJg6frzGIp3XyJ7nYU30Tpga/AT1afqdIILoTbCIYIMvRinWrCyZ1J+4am2T8KnURTfBdQA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705650421; c=relaxed/simple; bh=8b0OH0xUnUIRqm4g1vnAVHY4vBjzdLIxY+MjcPSp0jc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AxvHQPUyCLUdX0faRM0jtS1eeDMBDb+9BypAvJv5UA8oYs9HhGObQfFAJaPlygc0CEw7edBHuYiCO1VIykDGloqE7lIT9qcglD3gmgEWNQ18+lgquIo9Y/t2hdU1BI9SoEYfjGNr/W/wAKWGmh6yAUYEROP1SDIdA4AeqQNMR1w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bL60ujW0; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-337be1326e3so405374f8f.2 for ; Thu, 18 Jan 2024 23:47:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705650418; x=1706255218; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CU1bMRxchSmRgivc/iAZKp78DVFdSvb1675ltw30IVs=; b=bL60ujW0DcTmiq77GU+RAoxvktoUtmKWTHwA/hygTgxEBuCTaIsgLctA/zrwx1DtYh ZrWIw31Sgu7eae0iVSiPMX1/H6BOaRixPUBn+8jkHlitzJSXhsYledrjU5h1QZRXv6qU xmr0bJ/v6398ByRYCf8MSzw7rQL9ekbBbcaA8qGbaJi3Qb+BjROHQQB8vXZD+wCKstph ae83zIJ0W8LjsaRcXyuvvfnrxIFMB02W2bBJjuNIxaQczHWudBBn3jYvJ1DJ8CcRr7dU gILzi6C8pF7qxdZ2O/f1H7ghmzc3Q3CwNL09Axwva2YIoKg/ByGUxbWR/dCQB+/MGabR 03rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705650418; x=1706255218; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CU1bMRxchSmRgivc/iAZKp78DVFdSvb1675ltw30IVs=; b=b3o8oEQBbbD7j01wLkgPgbmFhZnvsrtFGN/JC+z3OJ/PlyH+yJDGOA3GbPf/EJtjbP YGcOHS3fJx7dtE+7jIJSqNYAZbBEZNhD/YQx5nI1j/8N43qh0xMx9IelVE3QOon9ZgQB fTUu1FGwOXg+3jFsbZbkLt7ryGJrciH2ca3AVXcbCtYvwQZSU+7rOgNVe3PHAfHiN98Q jq0jICi8htbZKooaFlYcrFJ6Y07lsJH35HH+w9ACpiZAb1ND4tEvZ+8Lr8v6RJu0vyfa Od0/qd0HHqg0c1kdoPMN8ajp7+YEcGKBy9KdYYStLNrt4YIzRNIVluCPCNLpDZ0c/j09 qOpw== X-Gm-Message-State: AOJu0Ywifh5rjaUigzc2oBEVwiz1s85c+WQu6si8a8/vF0dFddvZH+kG WpGO0+Z5bA5fD5pIC0kTN2yge1+7C5tQaFjzjFyiCLE7HrfAm+EHiQC7K2/5JSc= X-Received: by 2002:adf:b319:0:b0:336:6d62:7647 with SMTP id j25-20020adfb319000000b003366d627647mr1345275wrd.5.1705650418658; Thu, 18 Jan 2024 23:46:58 -0800 (PST) Received: from [192.168.1.195] ([5.133.47.210]) by smtp.googlemail.com with ESMTPSA id i6-20020adfb646000000b00337bc2176f6sm5800237wre.81.2024.01.18.23.46.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jan 2024 23:46:58 -0800 (PST) Message-ID: <456eaa3a-7f0c-4b28-aeca-2af60475011a@linaro.org> Date: Fri, 19 Jan 2024 07:46:57 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 5/5] ASoC: codecs: wcd9335: drop unused gain hack remnant Content-Language: en-US To: Johan Hovold , Mark Brown Cc: Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240118165811.13672-1-johan+linaro@kernel.org> <20240118165811.13672-6-johan+linaro@kernel.org> From: Srinivas Kandagatla In-Reply-To: <20240118165811.13672-6-johan+linaro@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 18/01/2024 16:58, Johan Hovold wrote: > The vendor driver appears to be modifying the gain settings behind the > back of user space but these hacks never made it upstream except for > some essentially dead code that adds a constant zero to the current gain > setting on DAPM events. > > Note that the volume registers still need to be written after enabling > clocks in order for any prior updates to take effect. > > Signed-off-by: Johan Hovold > --- lgtm, Reviewed-by: Srinivas Kandagatla --srini > sound/soc/codecs/wcd9335.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c > index 43c648efd0d9..deb15b95992d 100644 > --- a/sound/soc/codecs/wcd9335.c > +++ b/sound/soc/codecs/wcd9335.c > @@ -3033,7 +3033,6 @@ static int wcd9335_codec_enable_mix_path(struct snd_soc_dapm_widget *w, > { > struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); > u16 gain_reg; > - int offset_val = 0; > int val = 0; > > switch (w->reg) { > @@ -3073,7 +3072,6 @@ static int wcd9335_codec_enable_mix_path(struct snd_soc_dapm_widget *w, > switch (event) { > case SND_SOC_DAPM_POST_PMU: > val = snd_soc_component_read(comp, gain_reg); > - val += offset_val; > snd_soc_component_write(comp, gain_reg, val); > break; > case SND_SOC_DAPM_POST_PMD: > @@ -3294,7 +3292,6 @@ static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w, > u16 gain_reg; > u16 reg; > int val; > - int offset_val = 0; > > if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT0 INTERP"))) { > reg = WCD9335_CDC_RX0_RX_PATH_CTL; > @@ -3337,7 +3334,6 @@ static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w, > case SND_SOC_DAPM_POST_PMU: > wcd9335_config_compander(comp, w->shift, event); > val = snd_soc_component_read(comp, gain_reg); > - val += offset_val; > snd_soc_component_write(comp, gain_reg, val); > break; > case SND_SOC_DAPM_POST_PMD: