diff options
-rw-r--r-- | sound/soc/rockchip/rockchip_spdif.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index 4ca265737eda..fa8101d1e16f 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c | |||
@@ -65,6 +65,7 @@ static int __maybe_unused rk_spdif_runtime_suspend(struct device *dev) | |||
65 | { | 65 | { |
66 | struct rk_spdif_dev *spdif = dev_get_drvdata(dev); | 66 | struct rk_spdif_dev *spdif = dev_get_drvdata(dev); |
67 | 67 | ||
68 | regcache_cache_only(spdif->regmap, true); | ||
68 | clk_disable_unprepare(spdif->mclk); | 69 | clk_disable_unprepare(spdif->mclk); |
69 | clk_disable_unprepare(spdif->hclk); | 70 | clk_disable_unprepare(spdif->hclk); |
70 | 71 | ||
@@ -88,7 +89,16 @@ static int __maybe_unused rk_spdif_runtime_resume(struct device *dev) | |||
88 | return ret; | 89 | return ret; |
89 | } | 90 | } |
90 | 91 | ||
91 | return 0; | 92 | regcache_cache_only(spdif->regmap, false); |
93 | regcache_mark_dirty(spdif->regmap); | ||
94 | |||
95 | ret = regcache_sync(spdif->regmap); | ||
96 | if (ret) { | ||
97 | clk_disable_unprepare(spdif->mclk); | ||
98 | clk_disable_unprepare(spdif->hclk); | ||
99 | } | ||
100 | |||
101 | return ret; | ||
92 | } | 102 | } |
93 | 103 | ||
94 | static int rk_spdif_hw_params(struct snd_pcm_substream *substream, | 104 | static int rk_spdif_hw_params(struct snd_pcm_substream *substream, |