From: Jassi Brar Date: Mon, 20 Dec 2010 02:05:47 +0000 (+0900) Subject: ASoC: Samsung: I2S: Flush FIFO after stop X-Git-Tag: firefly_0821_release~3680^2~2691^2~1226^2~142 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=775bc97131c3dcf62d29cdb33e00db8f827eac35;p=firefly-linux-kernel-4.4.55.git ASoC: Samsung: I2S: Flush FIFO after stop 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 26b4bdf42c5b..d00ac3a7102c 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -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; @@ -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; }