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:
@@ -29,6 +29,7 @@
|
|||||||
#include <asm/dma.h>
|
#include <asm/dma.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/android_pmem.h>
|
#include <linux/android_pmem.h>
|
||||||
|
#include <sound/timer.h>
|
||||||
|
|
||||||
#include "msm-compr-q6.h"
|
#include "msm-compr-q6.h"
|
||||||
#include "msm-pcm-routing.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;
|
prtd->pcm_irq_pos += prtd->pcm_count;
|
||||||
if (atomic_read(&prtd->start))
|
if (atomic_read(&prtd->start))
|
||||||
snd_pcm_period_elapsed(substream);
|
snd_pcm_period_elapsed(substream);
|
||||||
|
else
|
||||||
|
if (substream->timer_running)
|
||||||
|
snd_timer_interrupt(substream->timer, 1);
|
||||||
atomic_inc(&prtd->out_count);
|
atomic_inc(&prtd->out_count);
|
||||||
wake_up(&the_locks.write_wait);
|
wake_up(&the_locks.write_wait);
|
||||||
if (!atomic_read(&prtd->start)) {
|
if (!atomic_read(&prtd->start)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user