[alsa-devel] [PATCH] ASoC: fsl_asrc: sound is wrong after suspend/resume
Nicolin Chen
nicoleotsuka at gmail.com
Sat Dec 12 06:30:27 CET 2015
On Thu, Dec 10, 2015 at 07:02:48PM +0800, Zidan Wang wrote:
> diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
> index 3e404ba..942e74bc 100644
> --- a/sound/soc/fsl/fsl_asrc.c
> +++ b/sound/soc/fsl/fsl_asrc.c
> @@ -990,6 +990,9 @@ static int fsl_asrc_suspend(struct device *dev)
> {
> struct fsl_asrc *asrc_priv = dev_get_drvdata(dev);
>
> + regmap_read(asrc_priv->regmap, REG_ASRCFG,
> + &asrc_priv->regcache_cfg);
Indentation.
> +
> regcache_cache_only(asrc_priv->regmap, true);
> regcache_mark_dirty(asrc_priv->regmap);
>
> @@ -1010,6 +1013,9 @@ static int fsl_asrc_resume(struct device *dev)
> regcache_cache_only(asrc_priv->regmap, false);
> regcache_sync(asrc_priv->regmap);
>
> + regmap_update_bits(asrc_priv->regmap, REG_ASRCFG,
> + 0x1FFFC0, asrc_priv->regcache_cfg);
Either add a macro or a comment for the magic number.
> +
> /* Restart enabled pairs */
> regmap_update_bits(asrc_priv->regmap, REG_ASRCTR,
> ASRCTR_ASRCEi_ALL_MASK, asrctr);
> diff --git a/sound/soc/fsl/fsl_asrc.h b/sound/soc/fsl/fsl_asrc.h
> index 68802cd..3695ca9 100644
> --- a/sound/soc/fsl/fsl_asrc.h
> +++ b/sound/soc/fsl/fsl_asrc.h
> @@ -453,6 +453,8 @@ struct fsl_asrc {
>
> int asrc_rate;
> int asrc_width;
> +
> + u32 regcache_cfg;
> };
>
> extern struct snd_soc_platform_driver fsl_asrc_platform;
> --
> 1.9.1
>
More information about the Alsa-devel
mailing list