diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2015-02-09 18:22:04 +0800 |
---|---|---|
committer | Shengjiu Wang <shengjiu.wang@freescale.com> | 2015-02-10 11:09:24 +0800 |
commit | d6bfa3d48f8e3f32394a3cea1bd9e613260a0a56 (patch) | |
tree | 17f7fe7d70749792d52b41120ddbe4cba97a1592 | |
parent | f403628ef48e56c77bdf4d5df23e8b37fea0fc34 (diff) |
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: Shengjiu Wang <shengjiu.wang@freescale.com>
-rw-r--r-- | sound/soc/fsl/fsl_asrc.c | 8 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_asrc.h | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 23a7119c1f13..d551ae90c4d9 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -1,7 +1,7 @@ /* * 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); diff --git a/sound/soc/fsl/fsl_asrc.h b/sound/soc/fsl/fsl_asrc.h index 4c9ca0fea88e..ceec8e542c37 100644 --- a/sound/soc/fsl/fsl_asrc.h +++ b/sound/soc/fsl/fsl_asrc.h @@ -1,7 +1,7 @@ /* * 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]; }; |