Skip to contentSkip to conversation

ASoC: mediatek: mt8188: add register to volatile_register

PATCH In review yr.yang 2 participants 2 messages Aug 1, 2024

Subsystems (3)
lore
Share & tools
lore

yr.yang

author
#0 lore raw

PATCH 1/1 ASoC: mediatek: mt8188: add register to volatile_register

From: YR Yang <[email protected]>

Add AFE Control Register 0 to volatile_register. AFE_DAC_CON0 can be modified by both SOF and ALSA driver. If this register read & write by cache mode,
the cached value may be not the real value
when the register modified by other side.
It will cause playback or capture fail.
Need add AFE_DAC_CON0 to volatile register.

---
 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c +1 -0
index ccb6c1f3adc7..73e5c63aeec8 100644
@@ -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:
Signature · 1 line
2.34.1
#1 lore raw

Hi,

Quoted 10 lines · yr.yang

From: YR Yang <[email protected]>

Add AFE Control Register 0 to volatile_register. AFE_DAC_CON0 can be modified by both SOF and ALSA driver. If this register read & write by cache mode,
the cached value may be not the real value
when the register modified by other side.
It will cause playback or capture fail.
Need add AFE_DAC_CON0 to volatile register.

You should mention this specific register in the patch subject. Something like:

ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile

ChenYu

Quoted 22 lines
---
 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c +1 -1
index ccb6c1f3adc7..73e5c63aeec8 100644
@@ -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