From: Sangbeom Kim <sbkim73@samsung.com>
To: 'Liam Girdwood' <lrg@ti.com>,
'Mark Brown' <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, jassisinghbrar@gmail.com,
lrg@slimlogic.co.uk
Subject: Re: [PATCH v4 4/4] ASoC: SAMSUNG: Add I2S0 internal dma driver
Date: Tue, 05 Jul 2011 11:43:12 +0900 [thread overview]
Message-ID: <036701cc3abd$48665e00$d9331a00$@com> (raw)
In-Reply-To: <4E118B91.70702@ti.com>
Hi,
On Monday, July 04, 2011 6:45 PM, Liam Girdwood :
> On 01/07/11 17:12, Mark Brown wrote:
> > On Fri, Jul 01, 2011 at 03:50:35PM +0100, Liam Girdwood wrote:
> >> On 01/07/11 02:48, Sangbeom Kim wrote:
> >
> >>> + if (res >= snd_pcm_lib_buffer_bytes(substream))
> >>> + res = 0;
> >
> >> Is it likely that your DMA pointer will go beyond the buffer size ?
> >> If this happens then I suspect you have something wrong in your DMA
> config ?
> >
> > This is actually quite common - the normal case where it happens is that
> > the DMA controller reports one location beyond the last location it read
> > so when it hits the end of the buffer you see it report just beyond the
> > end of the buffer (which is hit quite often since this tends to also
> > generate an interrupt which causes a pointer() query). Replacing the
> > check with an == should be enough for that, though.
>
> I agree, but I think he should really also have a comment here stating
> this condition if it exists.
You are right. DMA pointer can not be beyond buffer size.
But This condition is just added for handling end of buffer.
As mark said, an == condition seems more preferable.
Thanks
SB Kim
next prev parent reply other threads:[~2011-07-05 2:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 1:48 [PATCH v4 3/4] ASoC: SAMSUNG: Modify I2S driver to support idma Sangbeom Kim
2011-07-01 1:48 ` [PATCH v4 4/4] ASoC: SAMSUNG: Add I2S0 internal dma driver Sangbeom Kim
2011-07-01 14:50 ` Liam Girdwood
2011-07-01 16:12 ` Mark Brown
2011-07-04 9:44 ` Liam Girdwood
2011-07-05 2:43 ` Sangbeom Kim [this message]
2011-07-12 8:06 ` Jassi Brar
2011-07-01 14:18 ` [PATCH v4 3/4] ASoC: SAMSUNG: Modify I2S driver to support idma Liam Girdwood
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='036701cc3abd$48665e00$d9331a00$@com' \
--to=sbkim73@samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jassisinghbrar@gmail.com \
--cc=lrg@slimlogic.co.uk \
--cc=lrg@ti.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.