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>
diff --git a/sound/soc/msm/msm-compr-q6.c b/sound/soc/msm/msm-compr-q6.c
index b3fb7c1..cb760fa 100644
--- a/sound/soc/msm/msm-compr-q6.c
+++ b/sound/soc/msm/msm-compr-q6.c
@@ -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 @@
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)) {