* [PATCH] ASoC: omap-pcm: Fix the no period wakeup implementation
@ 2011-10-04 8:09 Peter Ujfalusi
2011-10-04 8:34 ` Jarkko Nikula
2011-10-04 11:04 ` Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2011-10-04 8:09 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, Jarkko Nikula
After omap_request_dma the BLOCK_IRQ is enabled as default
configuration for the channel.
If we are requested for no period wakeup, we need to disable
the BLOCK_IRQ in order to not receive any interrupts.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
sound/soc/omap/omap-pcm.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 9b5c88a..5e37ec9 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -198,6 +198,14 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream)
OMAP_DMA_LAST_IRQ | OMAP_DMA_BLOCK_IRQ);
else if (!substream->runtime->no_period_wakeup)
omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ);
+ else {
+ /*
+ * No period wakeup:
+ * we need to disable BLOCK_IRQ, which is enabled by the omap
+ * dma core at request dma time.
+ */
+ omap_disable_dma_irq(prtd->dma_ch, OMAP_DMA_BLOCK_IRQ);
+ }
if (!(cpu_class_is_omap1())) {
omap_set_dma_src_burst_mode(prtd->dma_ch,
--
1.7.7
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: omap-pcm: Fix the no period wakeup implementation
2011-10-04 8:09 [PATCH] ASoC: omap-pcm: Fix the no period wakeup implementation Peter Ujfalusi
@ 2011-10-04 8:34 ` Jarkko Nikula
2011-10-04 9:02 ` Péter Ujfalusi
2011-10-04 11:04 ` Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Jarkko Nikula @ 2011-10-04 8:34 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, Mark Brown, Liam Girdwood
On 10/04/2011 11:09 AM, Peter Ujfalusi wrote:
> After omap_request_dma the BLOCK_IRQ is enabled as default
> configuration for the channel.
> If we are requested for no period wakeup, we need to disable
> the BLOCK_IRQ in order to not receive any interrupts.
>
> Signed-off-by: Peter Ujfalusi<peter.ujfalusi@ti.com>
> ---
> sound/soc/omap/omap-pcm.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
> index 9b5c88a..5e37ec9 100644
> --- a/sound/soc/omap/omap-pcm.c
> +++ b/sound/soc/omap/omap-pcm.c
> @@ -198,6 +198,14 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream)
> OMAP_DMA_LAST_IRQ | OMAP_DMA_BLOCK_IRQ);
> else if (!substream->runtime->no_period_wakeup)
> omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ);
> + else {
> + /*
> + * No period wakeup:
> + * we need to disable BLOCK_IRQ, which is enabled by the omap
> + * dma core at request dma time.
> + */
> + omap_disable_dma_irq(prtd->dma_ch, OMAP_DMA_BLOCK_IRQ);
> + }
>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
while it would be more clear to fix this in omap dma core.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ASoC: omap-pcm: Fix the no period wakeup implementation
2011-10-04 8:34 ` Jarkko Nikula
@ 2011-10-04 9:02 ` Péter Ujfalusi
0 siblings, 0 replies; 4+ messages in thread
From: Péter Ujfalusi @ 2011-10-04 9:02 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Mark Brown, Liam Girdwood
On Tuesday 04 October 2011 11:34:28 Jarkko Nikula wrote:
>
> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
>
> while it would be more clear to fix this in omap dma core.
I have thought about that.. however, the only configuration, where we do not
need the BLOCK_IRQ is in audio, and only when we are running in 'no period
wakeup' mode.
In all other cases we need to have the BLOCK_IRQ enabled.
I have looked at the other OMAP drivers, which uses the DMA and all assumes,
that the BLOCK_IRQ is enabled out of box.
We can modify all OMAP drivers, and the dma core, or we can just disable the
BLOCK_IRQ at the only case, when it is not needed.
--
Péter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: omap-pcm: Fix the no period wakeup implementation
2011-10-04 8:09 [PATCH] ASoC: omap-pcm: Fix the no period wakeup implementation Peter Ujfalusi
2011-10-04 8:34 ` Jarkko Nikula
@ 2011-10-04 11:04 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-10-04 11:04 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, Liam Girdwood, Jarkko Nikula
On Tue, Oct 04, 2011 at 11:09:52AM +0300, Peter Ujfalusi wrote:
> After omap_request_dma the BLOCK_IRQ is enabled as default
> configuration for the channel.
> If we are requested for no period wakeup, we need to disable
> the BLOCK_IRQ in order to not receive any interrupts.
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-04 11:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-04 8:09 [PATCH] ASoC: omap-pcm: Fix the no period wakeup implementation Peter Ujfalusi
2011-10-04 8:34 ` Jarkko Nikula
2011-10-04 9:02 ` Péter Ujfalusi
2011-10-04 11:04 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.