ASoC: msm: handle write done events in pause state

If a write done event is received when the compress driver
is in paused state, treat it as an underrun.

Change-Id: I56ca867983b9139c04d135276da7344ac912065e
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: 6b9c3272087127fda41ed65ee7f8536ad9748383
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
This commit is contained in:
Eric Laurent 2013-09-19 15:58:45 -07:00 committed by David Keitel
parent b6125c4081
commit fea50d9677

View file

@ -205,6 +205,9 @@ static void compr_event_handler(uint32_t opcode,
snd_compr_fragment_elapsed(cstream);
if (!atomic_read(&prtd->start)) {
/* Writes must be restarted from _copy() */
pr_debug("write_done received while not started, treat as xrun");
atomic_set(&prtd->xrun, 1);
spin_unlock_irq(&prtd->lock);
break;
}