Browse Source

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>
isee-imx_3.14.28.y
Shengjiu Wang 6 years ago
parent
commit
d6bfa3d48f
2 changed files with 10 additions and 2 deletions
  1. +7
    -1
      sound/soc/fsl/fsl_asrc.c
  2. +3
    -1
      sound/soc/fsl/fsl_asrc.h

+ 7
- 1
sound/soc/fsl/fsl_asrc.c View File

@ -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);


+ 3
- 1
sound/soc/fsl/fsl_asrc.h View File

@ -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];
};


Loading…
Cancel
Save