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

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

Merge "ASoC: msm: qdsp6v2: Unblock drain on reset event callback"

parents e4a18f40 fe44efb1
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -523,6 +523,7 @@ static void compr_event_handler(uint32_t opcode,
		snd_compr_fragment_elapsed(cstream);
		prtd->copied_total = prtd->bytes_received;
		atomic_set(&prtd->error, 1);
		wake_up(&prtd->drain_wait);
		spin_unlock_irqrestore(&prtd->lock, flags);
		break;
	default:
@@ -1239,7 +1240,8 @@ static int msm_compr_drain_buffer(struct msm_compr_audio *prtd,
	rc = wait_event_interruptible(prtd->drain_wait,
					prtd->drain_ready ||
					prtd->cmd_interrupt ||
					atomic_read(&prtd->xrun));
					atomic_read(&prtd->xrun) ||
					atomic_read(&prtd->error));
	pr_debug("%s: out of buffer drain wait with ret %d\n", __func__, rc);
	spin_lock_irqsave(&prtd->lock, *flags);
	if (prtd->cmd_interrupt) {
@@ -1247,6 +1249,10 @@ static int msm_compr_drain_buffer(struct msm_compr_audio *prtd,
		rc = -EINTR;
		prtd->cmd_interrupt = 0;
	}
	if (atomic_read(&prtd->error)) {
		pr_err("%s: Got RESET EVENTS notification, return\n", __func__);
		rc = -ENETRESET;
	}
	return rc;
}