Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2532079pxb; Tue, 21 Sep 2021 01:51:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXZPDuSXTa++z12ALH8Yci8d5wccqZ3JdQxLM6YESKdN8MkrdSUmQnlkkfVBucRR8J/Z9b X-Received: by 2002:a17:906:1c99:: with SMTP id g25mr32943410ejh.521.1632214275255; Tue, 21 Sep 2021 01:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632214275; cv=none; d=google.com; s=arc-20160816; b=D8KW8RotzkQ0fF33l7gBofywgsDI/jXPz2QLMS+SdURz/9vJr5N/Fz6GWeF8jtd8Ix /w+qGRBck9TRqUCyL2OmDa/aTwi0G3B0540rnXMAOwuV/KQQCrahOt8ohbIZ/AlM69eM nJNlH4qgRa7BzditLZX+N/M8yIPJ7Us/BMcbBHBlAYsuCJAej+v1gA2MyidBzs6h4ywg K0Lu2Exvcylp/2CDzu4dRyACJFWoOJlTBgv2bFK9P55QLK5MdAUKA9n6g31qeoAB1ULF xNO3fBQoFv7+GzvsLHVf2pe4HJ8glBQ2hLx5pddUqNOqsSlsSXV7G0StakaEWn+ep8iK jyug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=pUh98EEgZG2+uO+vlZkUsJ82k9SQPEJS3egqtCoQfL4=; b=JPapKrBFTw5H5e4BFwwvR06kSJ5nrh2FWN+U+XSzHPQkdb5oBVvcucdhi639SsqrjD AgKL+uJ4DN396EpjkMv3gLolpPK1ULKdauZh4eb0SlUFYAVT6XdJYM+dtAYrs+RDEG2X LjPonLngj6XaAnYy4OGvINUEwjH5dwfPG2BxSDZfC99GCW87GcxzAu63LcPpd+/5FD6u d4yWJek1L9fK4nUSbw3HKfRfCHgseDp2wTw04NCJ9LowoULCHAVpUiOIaIkrMBis6Xp/ pmQ6zz+UAFw8CEyXU9km7flwOdFONJJ1aBb2FibBsPDQo5qje7iomWHF1XWcjs5LCILQ zURg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JidHcdbT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si23697392eje.21.2021.09.21.01.50.51; Tue, 21 Sep 2021 01:51:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linaro.org header.s=google header.b=JidHcdbT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231224AbhIUIuH (ORCPT + 99 others); Tue, 21 Sep 2021 04:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231322AbhIUIuE (ORCPT ); Tue, 21 Sep 2021 04:50:04 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4E27C061756 for ; Tue, 21 Sep 2021 01:48:36 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id eg28so48887557edb.1 for ; Tue, 21 Sep 2021 01:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pUh98EEgZG2+uO+vlZkUsJ82k9SQPEJS3egqtCoQfL4=; b=JidHcdbTA56g9QDi5/rHubK3yUC4vaq0Q1uH2W1sMozCl7XKea40FpA5+GO7W1pE27 uo/UXYDxhtRzZrcBFQN6HIjpA9kdWR6CeUE+KBvO5ut2PCb1R8bbqlY89qitsK1OLzeG w2bFos4aXABG4zXHt6QDag0bPaCuZyUoRczIViiHIt/oqVWE9HM8q2YmdoRg7z2FyPLQ qpjdvgNnQnLlc19nqORxpUDlRBDuE2S8L9DmrZbn5FkZOdaaSNPx/TMMmIG+Baph5OsF h6k5gftIt1TCjCu66WfbKVtnd+BLzsBTunxdU5zsRKa/FSj1+nzkBqiA/oIKe0YZFAVs n+Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pUh98EEgZG2+uO+vlZkUsJ82k9SQPEJS3egqtCoQfL4=; b=OsosS+eEnI5vZ55yn7LBJt4ed9PjiAp4XVUP0hTSbfzNS5lIOncUJigLzLWkyQ67Xc uhHX4mLyTqgeUhVbdGNAxe5loNgl6/td02YXu27KnqNX0yFcZdGZcDLJ9UTymgT5bgSj VoPcbel0Uletrvpdvb3cIaWVYykPR58XTvyvx2tIjUa6iTsl1e+3uP26X3J3aSPt2lpq VR28m2H20PqIbMBFrqfPMLl1t8GrlRTwRhEquZTGuTDDnbewbQwLiB2H0Y7qJRsxecf3 CBeVoDMpApSpBCPxNhJr5kKEZ0P+OZz45cE5MUXBl3UNGtxF6/8GEPXnStPlvzrRlti4 5xNg== X-Gm-Message-State: AOAM532C72u6bvq34Jq8GQf8E7H8VgANR+Tv+OHp6JEn8AYBfEfR689z tnpBD616EzevD8l5/V5ZKzPo6w== X-Received: by 2002:a17:906:1945:: with SMTP id b5mr32587263eje.347.1632214115300; Tue, 21 Sep 2021 01:48:35 -0700 (PDT) Received: from [192.168.86.34] (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.googlemail.com with ESMTPSA id o23sm8153195eds.75.2021.09.21.01.48.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Sep 2021 01:48:34 -0700 (PDT) Subject: Re: [PATCH 3/7] ASoC: codecs: tx-macro: Change mic control registers to volatile To: Srinivasa Rao Mandadapu , agross@kernel.org, bjorn.andersson@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, plai@codeaurora.org, bgoswami@codeaurora.org, perex@perex.cz, tiwai@suse.com, rohitkr@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, swboyd@chromium.org, judyhsiao@chromium.org Cc: Venkata Prasad Potturu References: <1632123331-2425-1-git-send-email-srivasam@codeaurora.org> <1632123331-2425-4-git-send-email-srivasam@codeaurora.org> From: Srinivas Kandagatla Message-ID: Date: Tue, 21 Sep 2021 09:48:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/09/2021 08:30, Srinivasa Rao Mandadapu wrote: > > On 9/20/2021 6:54 PM, Srinivas Kandagatla wrote: > Thanks for your time Srini!! >> >> On 20/09/2021 08:35, Srinivasa Rao Mandadapu wrote: >>> Update amic and dmic related tx macro control registers to volatile >>> >>> Fixes: c39667ddcfc5 (ASoC: codecs: lpass-tx-macro: add support for >>> lpass tx macro) >>> >>> Signed-off-by: Venkata Prasad Potturu >>> Signed-off-by: Srinivasa Rao Mandadapu >>> --- >>>   sound/soc/codecs/lpass-tx-macro.c | 13 +++++++++++++ >>>   1 file changed, 13 insertions(+) >>> >>> diff --git a/sound/soc/codecs/lpass-tx-macro.c >>> b/sound/soc/codecs/lpass-tx-macro.c >>> index 9273724..e65b592 100644 >>> --- a/sound/soc/codecs/lpass-tx-macro.c >>> +++ b/sound/soc/codecs/lpass-tx-macro.c >>> @@ -423,6 +423,13 @@ static bool tx_is_volatile_register(struct >>> device *dev, unsigned int reg) >>>       case CDC_TX_TOP_CSR_SWR_DMIC1_CTL: >>>       case CDC_TX_TOP_CSR_SWR_DMIC2_CTL: >>>       case CDC_TX_TOP_CSR_SWR_DMIC3_CTL: >>> +    case CDC_TX_TOP_CSR_SWR_AMIC0_CTL: >>> +    case CDC_TX_TOP_CSR_SWR_AMIC1_CTL: >>> +    case CDC_TX_CLK_RST_CTRL_MCLK_CONTROL: >>> +    case CDC_TX_CLK_RST_CTRL_FS_CNT_CONTROL: >>> +    case CDC_TX_CLK_RST_CTRL_SWR_CONTROL: >>> +    case CDC_TX_TOP_CSR_SWR_CTRL: >>> +    case CDC_TX0_TX_PATH_SEC7: >> >> Why are these marked as Volatile? >> Can you provide some details on the issue that you are seeing? >> >> --srini > > Without volatile these registers are not reflecting in Hardware and > playback and capture is not working. > > Will do recheck and keep only required registers as volatile. This sounds like a total hack to me, this might be happening in your case: The default values for this register are different to actual defaults. Ex: CDC_TX_TOP_CSR_SWR_AMIC0_CTL default is 0x00 so writing 0x0 to this register will be no-op as there is no change in the register value as compared to default value as per regmap. In you case make sure the hardware default values are correctly reflected in tx_defaults array. Then setting the desired value should work. --srini > >> >> >>>           return true; >>>       } >>>       return false; >>> @@ -1674,6 +1681,12 @@ static int tx_macro_component_probe(struct >>> snd_soc_component *comp) >>>         snd_soc_component_update_bits(comp, CDC_TX0_TX_PATH_SEC7, 0x3F, >>>                         0x0A); >>> +    snd_soc_component_update_bits(comp, >>> CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0xFF, 0x00); >>> +    snd_soc_component_update_bits(comp, >>> CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0xFF, 0x00); >>> +    snd_soc_component_update_bits(comp, >>> CDC_TX_TOP_CSR_SWR_DMIC0_CTL, 0xFF, 0x00); >>> +    snd_soc_component_update_bits(comp, >>> CDC_TX_TOP_CSR_SWR_DMIC1_CTL, 0xFF, 0x00); >>> +    snd_soc_component_update_bits(comp, >>> CDC_TX_TOP_CSR_SWR_DMIC2_CTL, 0xFF, 0x00); >>> +    snd_soc_component_update_bits(comp, >>> CDC_TX_TOP_CSR_SWR_DMIC3_CTL, 0xFF, 0x00); >>>         return 0; >>>   } >>>