From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Trevor Wu <trevor.wu@mediatek.com>
Cc: kernel@collabora.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
"Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Subject: [PATCH v2 3/8] ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile
Date: Tue, 25 Feb 2025 11:33:49 -0300 [thread overview]
Message-ID: <20250225-genio700-dmic-v2-3-3076f5b50ef7@collabora.com> (raw)
In-Reply-To: <20250225-genio700-dmic-v2-0-3076f5b50ef7@collabora.com>
The DMIC_GAINx_CUR registers contain the current (as in present) gain of
each DMIC. During capture, this gain will ramp up until a target value
is reached, and therefore the register is volatile since it is updated
automatically by hardware.
However, after capture the register's value returns to the value that
was written to it. So reading these registers returns the current gain,
and writing configures the initial gain for every capture.
From an audio configuration perspective, reading the instantaneous gain
is not really useful. Instead, reading back the initial gain that was
configured is the desired behavior. For that reason, consider the
DMIC_GAINx_CUR registers as non-volatile, so the regmap's cache can be
used to retrieve the values, rather than requiring pm runtime resuming
the device.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
index 73e5c63aeec8783905d656af225c42cd95069049..d36520c6272dd8c8302bc3f59da33f82f273f366 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
@@ -2855,10 +2855,6 @@ static bool mt8188_is_volatile_reg(struct device *dev, unsigned int reg)
case AFE_DMIC3_SRC_DEBUG_MON0:
case AFE_DMIC3_UL_SRC_MON0:
case AFE_DMIC3_UL_SRC_MON1:
- case DMIC_GAIN1_CUR:
- case DMIC_GAIN2_CUR:
- case DMIC_GAIN3_CUR:
- case DMIC_GAIN4_CUR:
case ETDM_IN1_MONITOR:
case ETDM_IN2_MONITOR:
case ETDM_OUT1_MONITOR:
--
2.48.1
next prev parent reply other threads:[~2025-02-25 14:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 14:33 [PATCH v2 0/8] Enable DMIC for Genio 700/510 EVK Nícolas F. R. A. Prado
2025-02-25 14:33 ` [PATCH v2 1/8] ASoC: mediatek: mt8188: Add audsys hires clocks Nícolas F. R. A. Prado
2025-02-25 14:42 ` AngeloGioacchino Del Regno
2025-02-25 14:33 ` [PATCH v2 2/8] ASoC: mediatek: mt8188: Add reference for dmic clocks Nícolas F. R. A. Prado
2025-02-25 14:41 ` AngeloGioacchino Del Regno
2025-02-25 14:33 ` Nícolas F. R. A. Prado [this message]
2025-02-25 14:41 ` [PATCH v2 3/8] ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile AngeloGioacchino Del Regno
2025-02-25 14:33 ` [PATCH v2 4/8] ASoC: mediatek: mt8188: Add support for DMIC Nícolas F. R. A. Prado
2025-02-25 14:41 ` AngeloGioacchino Del Regno
2025-02-25 14:33 ` [PATCH v2 5/8] ASoC: mediatek: mt8188-mt6359: Add DMIC support Nícolas F. R. A. Prado
2025-02-25 14:33 ` [PATCH v2 6/8] arm64: dts: mediatek: mt8390-genio-common: Add routes for DMIC Nícolas F. R. A. Prado
2025-02-25 14:33 ` [PATCH v2 7/8] ASoC: dt-bindings: mediatek,mt8188-mt6359: Add DMIC backend to dai-link Nícolas F. R. A. Prado
2025-02-25 14:41 ` AngeloGioacchino Del Regno
2025-02-26 8:22 ` Krzysztof Kozlowski
2025-02-26 13:30 ` Nícolas F. R. A. Prado
2025-02-26 15:00 ` Krzysztof Kozlowski
2025-02-25 14:33 ` [PATCH v2 8/8] arm64: dts: mediatek: mt8390-genio-common: Add delay codec for DMIC Nícolas F. R. A. Prado
2025-02-25 14:41 ` AngeloGioacchino Del Regno
2025-02-25 19:32 ` (subset) [PATCH v2 0/8] Enable DMIC for Genio 700/510 EVK Mark Brown
2025-02-26 9:24 ` AngeloGioacchino Del Regno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250225-genio700-dmic-v2-3-3076f5b50ef7@collabora.com \
--to=nfraprado@collabora.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
--cc=trevor.wu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®