[PATCH v2 3/8] ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Tue Feb 25 06:41:53 PST 2025


Il 25/02/25 15:33, Nícolas F. R. A. Prado ha scritto:
> 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 at collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>





More information about the linux-arm-kernel mailing list