Commit d6bfa3d4 by Shengjiu Wang

MLK-10214-1: ASoC: fsl_asrc: sound is wrong after suspend/resume

The register ASRCFG is volatile, but some bits need to be recovered after suspend/resume. Signed-off-by: 's avatarShengjiu Wang <shengjiu.wang@freescale.com>
parent f403628e
/*
* Freescale ASRC ALSA SoC Digital Audio Interface (DAI) driver
*
* Copyright (C) 2014 Freescale Semiconductor, Inc.
* Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
*
* Author: Nicolin Chen <nicoleotsuka@gmail.com>
*
......@@ -1076,6 +1076,9 @@ static int fsl_asrc_suspend(struct device *dev)
fsl_asrc_m2m_suspend(asrc_priv);
regmap_read(asrc_priv->regmap, REG_ASRCFG,
&asrc_priv->regcache_cfg);
regcache_cache_only(asrc_priv->regmap, true);
regcache_mark_dirty(asrc_priv->regmap);
......@@ -1096,6 +1099,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);
/* Restart enabled pairs */
regmap_update_bits(asrc_priv->regmap, REG_ASRCTR,
ASRCTR_ASRCEi_ALL_MASK, asrctr);
......
/*
* fsl_asrc.h - Freescale ASRC ALSA SoC header file
*
* Copyright (C) 2014 Freescale Semiconductor, Inc.
* Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
*
* Author: Nicolin Chen <nicoleotsuka@gmail.com>
*
......@@ -363,6 +363,8 @@ struct fsl_asrc {
int asrc_rate;
int asrc_width;
u32 regcache_cfg;
char name[32];
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment