Skip to content

Commit

Permalink
ALSA: compress_core: cleanup pointers on stop
Browse files Browse the repository at this point in the history
as the start can be called after stop again, we need to reset state

Signed-off-by: Namarta Kohli <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Vinod Koul authored and tiwai committed Jun 12, 2012
1 parent 6b18f79 commit 8b21460
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/core/compress_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8b21460

Please sign in to comment.