Skip to content

Commit

Permalink
ASoC: Samsung: I2S: Flush FIFO after stop
Browse files Browse the repository at this point in the history
Flush the FIFO while stopping the channel rather than starting.
This saves time during stream start and keeps the FIFOs clean
when the channel is idling.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Jassi Brar authored and Mark Brown committed Dec 20, 2010
1 parent 6ce534a commit 775bc97
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sound/soc/samsung/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,11 +843,6 @@ static int i2s_trigger(struct snd_pcm_substream *substream,
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
local_irq_save(flags);

if (capture)
i2s_fifo(i2s, FIC_RXFLUSH);
else
i2s_fifo(i2s, FIC_TXFLUSH);

if (config_setup(i2s)) {
local_irq_restore(flags);
return -EINVAL;
Expand All @@ -870,6 +865,11 @@ static int i2s_trigger(struct snd_pcm_substream *substream,
else
i2s_txctrl(i2s, 0);

if (capture)
i2s_fifo(i2s, FIC_RXFLUSH);
else
i2s_fifo(i2s, FIC_TXFLUSH);

local_irq_restore(flags);
break;
}
Expand Down

0 comments on commit 775bc97

Please sign in to comment.