[PATCH v2] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile

Fei Shao fshao at chromium.org
Tue Aug 6 04:59:57 PDT 2024


Hi YR,

On Thu, Aug 1, 2024 at 4:43 PM yr.yang <yr.yang at mediatek.com> wrote:
>
> From: YR Yang <yr.yang at 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 at mediatek.com>

For this patch for MT8188:
Reviewed-by: Fei Shao <fshao at 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
>
>



More information about the Linux-mediatek mailing list