[alsa-devel] *SPAM* Re: Please help in adding ams-delta support to ASoC
Peter Ujfalusi
peter.ujfalusi at nokia.com
Wed Jun 3 07:28:06 CEST 2009
Hello Janusz,
On Tuesday 02 June 2009 13:50:50 ext Janusz Krzysztofik wrote:
> Hi Jarkko,
>
> Jarkko Nikula wrote:
> > Is the older implementation working at commit
> > d8376cc482b241701f7606c81ad578b90853e175 in linux-omap, i.e. last
> > commit before their removal?
>
> I have managed to check with that revision this morning and yes, the
> driver is working.
>
> I'll try you other suggestions as soon as I get back home.
Looking at the code at commit: d8376cc482b241701f7606c81ad578b90853e175 on l-o
the comment about the need for the call the omap_stop_dma puzzled me.
Can you try something like this:
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 6454e15..2df1792 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -67,6 +67,7 @@ static void omap_pcm_dma_irq(int ch, u16 stat, void *data)
spin_lock_irqsave(&prtd->lock, flags);
if (prtd->period_index >= 0) {
if (++prtd->period_index == runtime->periods) {
+ omap_stop_dma(prtd->dma_ch);
prtd->period_index = 0;
omap_start_dma(prtd->dma_ch);
}
@@ -191,6 +192,7 @@ static int omap_pcm_trigger(struct snd_pcm_substream
*substream, int cmd)
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ omap_stop_dma(prtd->dma_ch);
prtd->period_index = 0;
omap_start_dma(prtd->dma_ch);
break;
This is on top of sound-2.6:topic/asoc, but l-o should not be that different.
Call the omap_stop_dma before actually starting the dma, and call stop also
before restarting it.
--
Péter
--
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the Alsa-devel
mailing list