[PATCH 02/10] ASoC: Samsung: I2S: Flush FIFO after stop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jassi Brar <jassi.brar@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 sound/soc/samsung/i2s.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 26b4bdf..d00ac3a 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;
 	}
-- 
1.6.2.5

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux