Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b21460a authored by Vinod Koul's avatar Vinod Koul Committed by Takashi Iwai
Browse files

ALSA: compress_core: cleanup pointers on stop



as the start can be called after stop again, we need to reset state

Signed-off-by: default avatarNamarta Kohli <namartax.kohli@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6b18f793
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
}