Skip to content

Commit 9b22225

Browse files
nfrapradojfvogel
authored andcommitted
ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile
[ Upstream commit 7d87bde21c73731ddaf15e572020f80999c38ee3 ] 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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 4a21b57d83c553bd96577be4b9fb5eeaf1f3ec5c) Signed-off-by: Jack Vogel <[email protected]>
1 parent 63e8813 commit 9b22225

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

sound/soc/mediatek/mt8188/mt8188-afe-pcm.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,10 +2855,6 @@ static bool mt8188_is_volatile_reg(struct device *dev, unsigned int reg)
28552855
case AFE_DMIC3_SRC_DEBUG_MON0:
28562856
case AFE_DMIC3_UL_SRC_MON0:
28572857
case AFE_DMIC3_UL_SRC_MON1:
2858-
case DMIC_GAIN1_CUR:
2859-
case DMIC_GAIN2_CUR:
2860-
case DMIC_GAIN3_CUR:
2861-
case DMIC_GAIN4_CUR:
28622858
case ETDM_IN1_MONITOR:
28632859
case ETDM_IN2_MONITOR:
28642860
case ETDM_OUT1_MONITOR:

0 commit comments

Comments
 (0)