summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@linux.intel.com>2012-06-12 16:16:18 +0530
committerTakashi Iwai <tiwai@suse.de>2012-06-12 17:55:02 +0200
commit8b21460ac6c0c88a0fec1cc70906c8e25c5aaa54 (patch)
treefec1daa406b1fe7d69340509a86c572a2a96c568 /sound/core
parent6b18f79399f25a0f8e2b915b2dcb8bf5c7aa470d (diff)
downloadlinux-stable-8b21460ac6c0c88a0fec1cc70906c8e25c5aaa54.tar.gz
linux-stable-8b21460ac6c0c88a0fec1cc70906c8e25c5aaa54.tar.bz2
linux-stable-8b21460ac6c0c88a0fec1cc70906c8e25c5aaa54.zip
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 <namartax.kohli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/compress_offload.c4
1 files changed, 4 insertions, 0 deletions
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;
}