diff options
author | Christoph Huber <c.huber@bct-electronic.com> | 2016-08-15 12:59:25 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-08-16 07:29:10 -0400 |
commit | 3e103a65514c2947e53f3171b21255fbde8b60c6 (patch) | |
tree | 0afef7cc4699984b3da806c147a35c299f1a3e8b /sound | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (diff) |
ASoC: atmel_ssc_dai: Don't unconditionally reset SSC on stream startup
commit cbaadf0f90d6 ("ASoC: atmel_ssc_dai: refactor the startup and
shutdown") refactored code such that the SSC is reset on every
startup; this breaks duplex audio (e.g. first start audio playback,
then start record, causing the playback to stop/hang)
Fixes: cbaadf0f90d6 (ASoC: atmel_ssc_dai: refactor the startup and shutdown)
Signed-off-by: Christoph Huber <c.huber@bct-electronic.com>
Signed-off-by: Peter Meerwald-Stadler <p.meerwald@bct-electronic.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/atmel/atmel_ssc_dai.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 54c09acd3fed..16e459aedffe 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
@@ -299,8 +299,9 @@ static int atmel_ssc_startup(struct snd_pcm_substream *substream, | |||
299 | clk_enable(ssc_p->ssc->clk); | 299 | clk_enable(ssc_p->ssc->clk); |
300 | ssc_p->mck_rate = clk_get_rate(ssc_p->ssc->clk); | 300 | ssc_p->mck_rate = clk_get_rate(ssc_p->ssc->clk); |
301 | 301 | ||
302 | /* Reset the SSC to keep it at a clean status */ | 302 | /* Reset the SSC unless initialized to keep it in a clean state */ |
303 | ssc_writel(ssc_p->ssc->regs, CR, SSC_BIT(CR_SWRST)); | 303 | if (!ssc_p->initialized) |
304 | ssc_writel(ssc_p->ssc->regs, CR, SSC_BIT(CR_SWRST)); | ||
304 | 305 | ||
305 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 306 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
306 | dir = 0; | 307 | dir = 0; |