Re: *SPAM* Re: Please help in adding ams-delta support to ASoC

2009-06-03 Thread Janusz Krzysztofik
Wednesday 03 June 2009 07:28:06 Peter Ujfalusi napisał(a):
> Looking at the code at commit: d8376cc482b241701f7606c81ad578b90853e175 on
> l-o the comment about the need for the call the omap_stop_dma puzzled me.

Peter,

It was omap_stop_alsa_sound_dma(), not just omap_stop_dma(), the was needed.
In my opinion, the reason for that was not because it was calling 
omap_stop_dma(), but because it was clearing the audio_stream.started flag. 
That way, subsequent audio_start_dma_chain() would not jump over 
omap_start_dma(). From my experience with the original driver, it worked much 
better when calling omap_start_dma() unconditionally from 
audio_start_dma_chain() instead of doing this with that 
omap_stop_alsa_sound_dma() trick.

> 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;

Never hurts. Unfortunatelly, it did not help, no single DMA interrupt again.

Thanks,
Janusz
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: *SPAM* Re: Please help in adding ams-delta support to ASoC

2009-06-02 Thread Peter Ujfalusi
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 linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: *SPAM* Re: Please help in adding ams-delta support to ASoC

2009-06-02 Thread Janusz Krzysztofik

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.

Cheers,
Janusz

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html