]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ALSA: compress_core: cleanup pointers on stop
authorVinod Koul <vinod.koul@linux.intel.com>
Tue, 12 Jun 2012 10:46:18 +0000 (16:16 +0530)
committerTakashi Iwai <tiwai@suse.de>
Tue, 12 Jun 2012 15:55:02 +0000 (17:55 +0200)
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>
sound/core/compress_offload.c

index 375f7a0d66ef0a84ce2bba97db6ab14ad5e79858..ec2118d0e27aca3f5fef6c2ddd72f8b166ce98ca 100644 (file)
@@ -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;
 }