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

Commit dc6cb12f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: msm: Fix offload may be no sound when user resumes music"

parents e29b18ea 73e3423a
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -487,6 +487,7 @@ static void compr_event_handler(uint32_t opcode,
		if (!atomic_read(&prtd->start)) {
			/* Writes must be restarted from _copy() */
			pr_debug("write_done received while not started, treat as xrun");
			if (prtd->dsp_fragments_sent == 0)
				atomic_set(&prtd->xrun, 1);
			spin_unlock_irqrestore(&prtd->lock, flags);
			break;
@@ -637,8 +638,8 @@ static void compr_event_handler(uint32_t opcode,
			 * WRITE_DONE(X)
			 * RESUME
			 */
			if ((prtd->copied_total == prtd->bytes_sent) &&
			    atomic_read(&prtd->drain)) {
			if (prtd->copied_total == prtd->bytes_sent) {
				if (atomic_read(&prtd->drain)) {
					pr_debug("RUN ack, wake up & continue pending drain\n");

					if (prtd->last_buffer)
@@ -647,6 +648,10 @@ static void compr_event_handler(uint32_t opcode,
					prtd->drain_ready = 1;
					wake_up(&prtd->drain_wait);
					atomic_set(&prtd->drain, 0);
				} else if (prtd->dsp_fragments_sent) {
					pr_info("RUN ack, resume for pending frames\n");
					msm_compr_send_buffer(prtd);
				}
			}

			spin_unlock_irqrestore(&prtd->lock, flags);