diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-07-04 10:05:45 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-04 15:29:27 -0400 |
commit | d3d4e5247b013008a39e4d5f69ce4c60ed57f997 (patch) | |
tree | dcd42fb094b966a253d67a1de8079e3012bd5981 /sound/soc/samsung/i2s.c | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
ASoC: samsung: Correct I2S DAI suspend/resume ops
We should save/restore relevant I2S registers regardless of
the dai->active flag, otherwise some settings are being lost
after system suspend/resume cycle. E.g. I2S slave mode set only
during dai initialization is not preserved and the device ends
up in master mode after system resume.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'sound/soc/samsung/i2s.c')
-rw-r--r-- | sound/soc/samsung/i2s.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 2ac76fa3e742..5f9b255a8b38 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -920,11 +920,9 @@ static int i2s_suspend(struct snd_soc_dai *dai) | |||
920 | { | 920 | { |
921 | struct i2s_dai *i2s = to_info(dai); | 921 | struct i2s_dai *i2s = to_info(dai); |
922 | 922 | ||
923 | if (dai->active) { | 923 | i2s->suspend_i2smod = readl(i2s->addr + I2SMOD); |
924 | i2s->suspend_i2smod = readl(i2s->addr + I2SMOD); | 924 | i2s->suspend_i2scon = readl(i2s->addr + I2SCON); |
925 | i2s->suspend_i2scon = readl(i2s->addr + I2SCON); | 925 | i2s->suspend_i2spsr = readl(i2s->addr + I2SPSR); |
926 | i2s->suspend_i2spsr = readl(i2s->addr + I2SPSR); | ||
927 | } | ||
928 | 926 | ||
929 | return 0; | 927 | return 0; |
930 | } | 928 | } |
@@ -933,11 +931,9 @@ static int i2s_resume(struct snd_soc_dai *dai) | |||
933 | { | 931 | { |
934 | struct i2s_dai *i2s = to_info(dai); | 932 | struct i2s_dai *i2s = to_info(dai); |
935 | 933 | ||
936 | if (dai->active) { | 934 | writel(i2s->suspend_i2scon, i2s->addr + I2SCON); |
937 | writel(i2s->suspend_i2scon, i2s->addr + I2SCON); | 935 | writel(i2s->suspend_i2smod, i2s->addr + I2SMOD); |
938 | writel(i2s->suspend_i2smod, i2s->addr + I2SMOD); | 936 | writel(i2s->suspend_i2spsr, i2s->addr + I2SPSR); |
939 | writel(i2s->suspend_i2spsr, i2s->addr + I2SPSR); | ||
940 | } | ||
941 | 937 | ||
942 | return 0; | 938 | return 0; |
943 | } | 939 | } |