* [PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile
@ 2024-08-01 8:43 yr.yang
2024-08-06 11:59 ` Fei Shao
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: yr.yang @ 2024-08-01 8:43 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek,
Project_Global_Chrome_Upstream_Group, YR Yang
From: YR Yang <yr.yang@mediatek.com>
Add AFE Control Register 0 to the volatile_register.
AFE_DAC_CON0 can be modified by both the SOF and ALSA drivers.
If this register is read and written in cache mode, the cached value
might not reflect the actual value when the register is modified by
another driver. It can cause playback or capture failures. Therefore,
it is necessary to add AFE_DAC_CON0 to the list of volatile registers.
Signed-off-by: YR Yang <yr.yang@mediatek.com>
---
Changes in v2:
- Modify commit message.
- Link to v1: https://patchwork.kernel.org/project/linux-mediatek/patch/20240801031030.31114-1-yr.yang@mediatek.com/
---
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
index ccb6c1f3adc7..73e5c63aeec8 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
@@ -2748,6 +2748,7 @@ static bool mt8188_is_volatile_reg(struct device *dev, unsigned int reg)
case AFE_ASRC12_NEW_CON9:
case AFE_LRCK_CNT:
case AFE_DAC_MON0:
+ case AFE_DAC_CON0:
case AFE_DL2_CUR:
case AFE_DL3_CUR:
case AFE_DL6_CUR:
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile
2024-08-01 8:43 [PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile yr.yang
@ 2024-08-06 11:59 ` Fei Shao
2024-08-07 4:21 ` Trevor Wu (吳文良)
2024-08-15 13:52 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Fei Shao @ 2024-08-06 11:59 UTC (permalink / raw)
To: yr.yang
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Matthias Brugger, AngeloGioacchino Del Regno, linux-sound,
linux-kernel, linux-arm-kernel, linux-mediatek,
Project_Global_Chrome_Upstream_Group
Hi YR,
On Thu, Aug 1, 2024 at 4:43 PM yr.yang <yr.yang@mediatek.com> wrote:
>
> From: YR Yang <yr.yang@mediatek.com>
>
> Add AFE Control Register 0 to the volatile_register.
> AFE_DAC_CON0 can be modified by both the SOF and ALSA drivers.
> If this register is read and written in cache mode, the cached value
> might not reflect the actual value when the register is modified by
> another driver. It can cause playback or capture failures. Therefore,
> it is necessary to add AFE_DAC_CON0 to the list of volatile registers.
>
> Signed-off-by: YR Yang <yr.yang@mediatek.com>
For this patch for MT8188:
Reviewed-by: Fei Shao <fshao@chromium.org>
And a side question: is the same also required in mt8195-afe-pcm.c?
Their volatile register sets look almost identical (except MT8195 has
some extra lines).
Regards,
Fei
> ---
> Changes in v2:
> - Modify commit message.
> - Link to v1: https://patchwork.kernel.org/project/linux-mediatek/patch/20240801031030.31114-1-yr.yang@mediatek.com/
> ---
> sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
> index ccb6c1f3adc7..73e5c63aeec8 100644
> --- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
> +++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
> @@ -2748,6 +2748,7 @@ static bool mt8188_is_volatile_reg(struct device *dev, unsigned int reg)
> case AFE_ASRC12_NEW_CON9:
> case AFE_LRCK_CNT:
> case AFE_DAC_MON0:
> + case AFE_DAC_CON0:
> case AFE_DL2_CUR:
> case AFE_DL3_CUR:
> case AFE_DL6_CUR:
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile
2024-08-01 8:43 [PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile yr.yang
2024-08-06 11:59 ` Fei Shao
@ 2024-08-07 4:21 ` Trevor Wu (吳文良)
2024-08-15 13:52 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Trevor Wu (吳文良) @ 2024-08-07 4:21 UTC (permalink / raw)
To: lgirdwood, YR Yang (杨蓉),
matthias.bgg, broonie, tiwai, perex, angelogioacchino.delregno
Cc: linux-arm-kernel, linux-kernel, linux-mediatek, linux-sound,
Project_Global_Chrome_Upstream_Group
On Thu, 2024-08-01 at 16:43 +0800, yr.yang wrote:
> From: YR Yang <yr.yang@mediatek.com>
>
> Add AFE Control Register 0 to the volatile_register.
> AFE_DAC_CON0 can be modified by both the SOF and ALSA drivers.
> If this register is read and written in cache mode, the cached value
> might not reflect the actual value when the register is modified by
> another driver. It can cause playback or capture failures. Therefore,
> it is necessary to add AFE_DAC_CON0 to the list of volatile
> registers.
>
> Signed-off-by: YR Yang <yr.yang@mediatek.com>
> ---
>
Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
Thanks,
Trevor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile
2024-08-01 8:43 [PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile yr.yang
2024-08-06 11:59 ` Fei Shao
2024-08-07 4:21 ` Trevor Wu (吳文良)
@ 2024-08-15 13:52 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-08-15 13:52 UTC (permalink / raw)
To: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Matthias Brugger,
AngeloGioacchino Del Regno, yr.yang
Cc: linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek,
Project_Global_Chrome_Upstream_Group
On Thu, 01 Aug 2024 16:43:26 +0800, yr.yang wrote:
> Add AFE Control Register 0 to the volatile_register.
> AFE_DAC_CON0 can be modified by both the SOF and ALSA drivers.
> If this register is read and written in cache mode, the cached value
> might not reflect the actual value when the register is modified by
> another driver. It can cause playback or capture failures. Therefore,
> it is necessary to add AFE_DAC_CON0 to the list of volatile registers.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile
commit: ff9f065318e17a1a97981d9e535fcfc6ce5d5614
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-15 13:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-01 8:43 [PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile yr.yang
2024-08-06 11:59 ` Fei Shao
2024-08-07 4:21 ` Trevor Wu (吳文良)
2024-08-15 13:52 ` Mark Brown
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®