* [PATCH] ASoC: samsung: Correct I2S DAI suspend/resume ops
@ 2014-07-04 14:05 ` Sylwester Nawrocki
0 siblings, 0 replies; 4+ messages in thread
From: Sylwester Nawrocki @ 2014-07-04 14:05 UTC (permalink / raw)
To: broonie
Cc: alsa-devel, linux-arm-kernel, linux-samsung-soc, Sylwester Nawrocki
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>
---
sound/soc/samsung/i2s.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 2ac76fa..5f9b255 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)
{
struct i2s_dai *i2s = to_info(dai);
- if (dai->active) {
- i2s->suspend_i2smod = readl(i2s->addr + I2SMOD);
- i2s->suspend_i2scon = readl(i2s->addr + I2SCON);
- i2s->suspend_i2spsr = readl(i2s->addr + I2SPSR);
- }
+ i2s->suspend_i2smod = readl(i2s->addr + I2SMOD);
+ i2s->suspend_i2scon = readl(i2s->addr + I2SCON);
+ i2s->suspend_i2spsr = readl(i2s->addr + I2SPSR);
return 0;
}
@@ -933,11 +931,9 @@ static int i2s_resume(struct snd_soc_dai *dai)
{
struct i2s_dai *i2s = to_info(dai);
- if (dai->active) {
- writel(i2s->suspend_i2scon, i2s->addr + I2SCON);
- writel(i2s->suspend_i2smod, i2s->addr + I2SMOD);
- writel(i2s->suspend_i2spsr, i2s->addr + I2SPSR);
- }
+ writel(i2s->suspend_i2scon, i2s->addr + I2SCON);
+ writel(i2s->suspend_i2smod, i2s->addr + I2SMOD);
+ writel(i2s->suspend_i2spsr, i2s->addr + I2SPSR);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ASoC: samsung: Correct I2S DAI suspend/resume ops
@ 2014-07-04 14:05 ` Sylwester Nawrocki
0 siblings, 0 replies; 4+ messages in thread
From: Sylwester Nawrocki @ 2014-07-04 14:05 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
sound/soc/samsung/i2s.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 2ac76fa..5f9b255 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)
{
struct i2s_dai *i2s = to_info(dai);
- if (dai->active) {
- i2s->suspend_i2smod = readl(i2s->addr + I2SMOD);
- i2s->suspend_i2scon = readl(i2s->addr + I2SCON);
- i2s->suspend_i2spsr = readl(i2s->addr + I2SPSR);
- }
+ i2s->suspend_i2smod = readl(i2s->addr + I2SMOD);
+ i2s->suspend_i2scon = readl(i2s->addr + I2SCON);
+ i2s->suspend_i2spsr = readl(i2s->addr + I2SPSR);
return 0;
}
@@ -933,11 +931,9 @@ static int i2s_resume(struct snd_soc_dai *dai)
{
struct i2s_dai *i2s = to_info(dai);
- if (dai->active) {
- writel(i2s->suspend_i2scon, i2s->addr + I2SCON);
- writel(i2s->suspend_i2smod, i2s->addr + I2SMOD);
- writel(i2s->suspend_i2spsr, i2s->addr + I2SPSR);
- }
+ writel(i2s->suspend_i2scon, i2s->addr + I2SCON);
+ writel(i2s->suspend_i2smod, i2s->addr + I2SMOD);
+ writel(i2s->suspend_i2spsr, i2s->addr + I2SPSR);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: samsung: Correct I2S DAI suspend/resume ops
2014-07-04 14:05 ` Sylwester Nawrocki
@ 2014-07-04 19:29 ` Mark Brown
-1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-07-04 19:29 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: alsa-devel, linux-arm-kernel, linux-samsung-soc
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
On Fri, Jul 04, 2014 at 04:05:45PM +0200, Sylwester Nawrocki wrote:
> 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.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ASoC: samsung: Correct I2S DAI suspend/resume ops
@ 2014-07-04 19:29 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-07-04 19:29 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jul 04, 2014 at 04:05:45PM +0200, Sylwester Nawrocki wrote:
> 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.
Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140704/8a3d9d20/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-04 19:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-04 14:05 [PATCH] ASoC: samsung: Correct I2S DAI suspend/resume ops Sylwester Nawrocki
2014-07-04 14:05 ` Sylwester Nawrocki
2014-07-04 19:29 ` Mark Brown
2014-07-04 19:29 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.