From: Jarkko Nikula <jhnikula@gmail.com>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
ext Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
Tony Lindgren <tony@atomide.com>,
broonie@opensource.wolfsonmicro.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] [RFC] ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
Date: Mon, 29 Jun 2009 10:15:12 +0300 [thread overview]
Message-ID: <20090629101512.38ebaaee.jhnikula@gmail.com> (raw)
In-Reply-To: <200906290937.58786.peter.ujfalusi@nokia.com>
On Mon, 29 Jun 2009 09:37:58 +0300
Peter Ujfalusi <peter.ujfalusi@nokia.com> wrote:
> Hmmm, I had taken a look at the 2.4.21 kernel sources, which I have
> laying around in my disk from an old project which used OMAP1510. The
> OSS audio code does use the CPC register for determining the DMA
> progress both for playback and recording. I know that the audio was
> working OK on that board, since we had doom running there.
> The difference that I can see is that the OSS code also configured
> the CCR:SYNC(4:0) bits as well.
> Looking at the DMA_CPC register description in the OMAP1510 TRM: it
> list two cases on how it behaves and both require the DMA_CCR:SYNC !=
> 0...
>
> The current DMA code for OMAP1510 just plain ignores the DMA_CCR:SYNC
> for some reason.
> Can you try the following patch:
>
> iff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index 7fc8c04..38874e4 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -266,6 +266,8 @@ void omap_set_dma_transfer_params(int lch, int
> data_type, int elem_count,
> ccr &= ~(1 << 5);
> if (sync_mode == OMAP_DMA_SYNC_FRAME)
> ccr |= 1 << 5;
> + if (dma_trigger)
> + ccr |= dma_trigger & 0x1f;
> dma_write(ccr, CCR(lch));
>
> ccr = dma_read(CCR2(lch));
>
> Than can you print out in case of playback both the destination and
> source addresses supplied to the DMA, than in the pointer callback
> also print out the value returned by the omap_get_dma_src_pos
> function to see if this actually helps?
>
Thanks for info Peter. So, Mark, put the workaround patch and my
acked-by on hold until this is also tried.
--
Jarkko
WARNING: multiple messages have this Message-ID (diff)
From: Jarkko Nikula <jhnikula@gmail.com>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: ext Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
Tony Lindgren <tony@atomide.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
broonie@opensource.wolfsonmicro.com
Subject: Re: [PATCH] [RFC] ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
Date: Mon, 29 Jun 2009 10:15:12 +0300 [thread overview]
Message-ID: <20090629101512.38ebaaee.jhnikula@gmail.com> (raw)
In-Reply-To: <200906290937.58786.peter.ujfalusi@nokia.com>
On Mon, 29 Jun 2009 09:37:58 +0300
Peter Ujfalusi <peter.ujfalusi@nokia.com> wrote:
> Hmmm, I had taken a look at the 2.4.21 kernel sources, which I have
> laying around in my disk from an old project which used OMAP1510. The
> OSS audio code does use the CPC register for determining the DMA
> progress both for playback and recording. I know that the audio was
> working OK on that board, since we had doom running there.
> The difference that I can see is that the OSS code also configured
> the CCR:SYNC(4:0) bits as well.
> Looking at the DMA_CPC register description in the OMAP1510 TRM: it
> list two cases on how it behaves and both require the DMA_CCR:SYNC !=
> 0...
>
> The current DMA code for OMAP1510 just plain ignores the DMA_CCR:SYNC
> for some reason.
> Can you try the following patch:
>
> iff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index 7fc8c04..38874e4 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -266,6 +266,8 @@ void omap_set_dma_transfer_params(int lch, int
> data_type, int elem_count,
> ccr &= ~(1 << 5);
> if (sync_mode == OMAP_DMA_SYNC_FRAME)
> ccr |= 1 << 5;
> + if (dma_trigger)
> + ccr |= dma_trigger & 0x1f;
> dma_write(ccr, CCR(lch));
>
> ccr = dma_read(CCR2(lch));
>
> Than can you print out in case of playback both the destination and
> source addresses supplied to the DMA, than in the pointer callback
> also print out the value returned by the omap_get_dma_src_pos
> function to see if this actually helps?
>
Thanks for info Peter. So, Mark, put the workaround patch and my
acked-by on hold until this is also tried.
--
Jarkko
next prev parent reply other threads:[~2009-06-29 7:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-27 22:21 [PATCH] [RFC] ASoC: OMAP: fix OMAP1510 broken PCM pointer callback Janusz Krzysztofik
2009-06-28 19:37 ` Jarkko Nikula
2009-06-28 19:37 ` Jarkko Nikula
2009-06-28 22:08 ` Janusz Krzysztofik
2009-06-29 6:04 ` Jarkko Nikula
2009-06-29 6:37 ` Peter Ujfalusi
2009-06-29 6:37 ` Peter Ujfalusi
2009-06-29 7:15 ` Jarkko Nikula [this message]
2009-06-29 7:15 ` Jarkko Nikula
2009-06-29 13:51 ` Janusz Krzysztofik
2009-06-29 13:51 ` Janusz Krzysztofik
2009-06-30 5:20 ` Peter Ujfalusi
2009-06-30 5:20 ` [alsa-devel] " Peter Ujfalusi
2009-06-30 9:39 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090629101512.38ebaaee.jhnikula@gmail.com \
--to=jhnikula@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jkrzyszt@tis.icnet.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@nokia.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.