[alsa-devel] [PATCH] ASoC: core: Mark regmap CODEC register maps as dirty when suspending

Liam Girdwood lrg at ti.com
Wed Sep 12 18:36:41 CEST 2012


On Wed, 2012-09-12 at 12:23 +0800, Mark Brown wrote:
> The core has for a long time had support for marking the register maps of
> devices dirty when suspending so that they are resynced on resume. Also
> implement this feature for CODECs using regmap.
> 
> Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> ---
>  sound/soc/soc-core.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 0c7e477..b94ce32 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -635,6 +635,8 @@ int snd_soc_suspend(struct device *dev)
>  				codec->driver->suspend(codec);
>  				codec->suspended = 1;
>  				codec->cache_sync = 1;
> +				if (codec->using_regmap)
> +					regcache_mark_dirty(codec->control_data);
>  				break;
>  			default:
>  				dev_dbg(codec->dev, "CODEC is on over suspend\n");

Acked-by: Liam Girdwood <lrg at ti.com>



More information about the Alsa-devel mailing list