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

Commit b63a4ec3 authored by Satya Krishna Pindiproli's avatar Satya Krishna Pindiproli Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: qdsp6v2: fix crash during flac superset clip playback



During playback of a particular superset flac clip in repeat mode,
the target crashes when random seek operations are done after a
gapless switch. This is because DSP acks EOS earlier than
expected due to which gapless_transition flag is always set during
playback of the second stream. As a result, flush commands are not
issued to DSP causing the decoder to go into a bad state that leads
to a crash.

Set gapless_transition flag only if EOS has not been acknowledged yet.

CRs-Fixed: 1045100
Change-Id: I71af0e13b77ecf53a1b337e3fb2f7a82a2ce25af
Signed-off-by: default avatarSatya Krishna Pindiproli <satyak@codeaurora.org>
parent 6beb213a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1735,6 +1735,11 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd)
			prtd->app_pointer  = 0;
			prtd->first_buffer = 1;
			prtd->last_buffer = 0;
			/*
			 * Set gapless transition flag only if EOS hasn't been
			 * acknowledged already.
			 */
			if (atomic_read(&prtd->eos))
				prtd->gapless_state.gapless_transition = 1;
			prtd->marker_timestamp = 0;