ASoC: msm: Send a write done for the last buffer

The write done event corresponding to the last compressed buffer
is not notified to the userspace. This event is required to handle
EOS for compressed audio playback. Send a write done for the last
buffer.

Change-Id: I337024cf97537fff5997f89e222a6d19a1e58e55
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
This commit is contained in:
Krishnankutty Kolathappilly
2012-04-19 23:40:05 -07:00
parent bd0861c34d
commit f02f9ef6a8

View File

@@ -29,6 +29,7 @@
#include <asm/dma.h>
#include <linux/dma-mapping.h>
#include <linux/android_pmem.h>
#include <sound/timer.h>
#include "msm-compr-q6.h"
#include "msm-pcm-routing.h"
@@ -92,6 +93,9 @@ static void compr_event_handler(uint32_t opcode,
prtd->pcm_irq_pos += prtd->pcm_count;
if (atomic_read(&prtd->start))
snd_pcm_period_elapsed(substream);
else
if (substream->timer_running)
snd_timer_interrupt(substream->timer, 1);
atomic_inc(&prtd->out_count);
wake_up(&the_locks.write_wait);
if (!atomic_read(&prtd->start)) {