ASoc: msm: Fix for pcm_read getting struck in alsa core.

Advance hardware pointer by period size even if the packet
coming from qdsp6 is of less size. QDSP6 sometimes
(for rapid device switches) gives packets worth less
than period size and this results in hw_ptr appl_ptr mismatch.

CRs-Fixed: 486276
CRs-Fixed: 488449
Change-Id: I893f9a52e4cd507fd72e4a7aba3c5fa76527d1bf
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
This commit is contained in:
Sidipotu Ashok 2013-05-17 15:13:30 +05:30 committed by Artem Borisov
parent 7d142e34bd
commit 4b7d2993d8

View file

@ -168,7 +168,7 @@ static void event_handler(uint32_t opcode,
/* assume data size = 0 during flushing */
if (in_frame_info[token][0]) {
prtd->pcm_irq_pos += in_frame_info[token][0];
prtd->pcm_irq_pos += prtd->pcm_count;
pr_debug("pcm_irq_pos=%d\n", prtd->pcm_irq_pos);
if (atomic_read(&prtd->start))
snd_pcm_period_elapsed(substream);