diff options
author | Viorel Suman <viorel.suman@nxp.com> | 2019-11-27 10:33:06 +0200 |
---|---|---|
committer | Viorel Suman <viorel.suman@nxp.com> | 2019-12-09 10:48:42 +0200 |
commit | 5a257681ebaf36c4dfa83ae84ccb80699b62db01 (patch) | |
tree | 6af651284c923f5cf56a018bcfa3f2c8dab2155b /sound | |
parent | 4f88881c9f6dd96dbd40522f281bf515eef5c5c7 (diff) |
MLK-22384-2: ASoC: fsl_sai: fix element read error
The registers must be readable in order to manage the related
amixer controls while device is suspended - thus remove them
from volatile list. In the same time reading counter registers
shall bypass regmap cache at runtime, otherwise cached value
will be read.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit ab028ee2ce39e1ba53bb3dfc127b6fed4758cc38)
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/fsl_sai.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 855adeb331f9..00537c96bbd1 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1017,10 +1017,18 @@ int fsl_sai_get_reg(struct snd_kcontrol *kcontrol, struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct soc_mreg_control *mc = (struct soc_mreg_control *)kcontrol->private_value; + bool pm_active = pm_runtime_active(component->dev); unsigned int regval; int ret; + if (pm_active) + regcache_cache_bypass(component->regmap, true); + ret = snd_soc_component_read(component, mc->regbase, ®val); + + if (pm_active) + regcache_cache_bypass(component->regmap, false); + if (ret < 0) return ret; @@ -1277,14 +1285,6 @@ static bool fsl_sai_volatile_reg(struct device *dev, unsigned int reg) case FSL_SAI_RDR5: case FSL_SAI_RDR6: case FSL_SAI_RDR7: - case FSL_SAI_TTCTL: - case FSL_SAI_RTCTL: - case FSL_SAI_TTCTN: - case FSL_SAI_RTCTN: - case FSL_SAI_TBCTN: - case FSL_SAI_RBCTN: - case FSL_SAI_TTCAP: - case FSL_SAI_RTCAP: return true; default: return false; |