From: Vinod Koul Date: Tue, 12 Jun 2012 10:46:18 +0000 (+0530) Subject: ALSA: compress_core: cleanup pointers on stop X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8b21460ac6c0c88a0fec1cc70906c8e25c5aaa54;p=linux.git 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 --- diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 375f7a0d66ef0..ec2118d0e27ac 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; }