From 6b18f79399f25a0f8e2b915b2dcb8bf5c7aa470d Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Tue, 12 Jun 2012 16:16:17 +0530 Subject: ALSA: compress_core: don't wake up on pause during pause the core should maintain the status-quo on the device and pointers and not wake up. If app needs it should call DROP explcitly. Signed-off-by: Namarta Kohli Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai --- sound/core/compress_offload.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sound/core/compress_offload.c') diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index a68aed7fce02..375f7a0d66ef 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -502,10 +502,8 @@ static int snd_compr_pause(struct snd_compr_stream *stream) if (stream->runtime->state != SNDRV_PCM_STATE_RUNNING) return -EPERM; retval = stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_PAUSE_PUSH); - if (!retval) { + if (!retval) stream->runtime->state = SNDRV_PCM_STATE_PAUSED; - wake_up(&stream->runtime->sleep); - } return retval; } -- cgit v1.2.3 From 8b21460ac6c0c88a0fec1cc70906c8e25c5aaa54 Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Tue, 12 Jun 2012 16:16:18 +0530 Subject: ALSA: compress_core: cleanup pointers on stop as the start can be called after stop again, we need to reset state Signed-off-by: Namarta Kohli Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai --- sound/core/compress_offload.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound/core/compress_offload.c') diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 375f7a0d66ef..ec2118d0e27a 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -542,6 +542,10 @@ static int snd_compr_stop(struct snd_compr_stream *stream) if (!retval) { stream->runtime->state = SNDRV_PCM_STATE_SETUP; wake_up(&stream->runtime->sleep); + stream->runtime->hw_pointer = 0; + stream->runtime->app_pointer = 0; + stream->runtime->total_bytes_available = 0; + stream->runtime->total_bytes_transferred = 0; } return retval; } -- cgit v1.2.3