public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jhnikula@gmail.com>
To: Philip Chu <Philip.Chu@logicpd.com>
Cc: "Alsa-devel@alsa-project.org" <Alsa-devel@alsa-project.org>
Subject: Re: PCM DMA only can fire ISR when it receives 4 samples more than the period, from McBSP port?
Date: Thu, 23 Jun 2011 09:50:13 +0300	[thread overview]
Message-ID: <20110623095013.6210474d.jhnikula@gmail.com> (raw)
In-Reply-To: <0520A3FE5EDCF24F88B3F1451CFC64AE042818D93C@EDPREX01.logicpd.com>

On Wed, 22 Jun 2011 10:26:28 -0500
Philip Chu <Philip.Chu@logicpd.com> wrote:

> Thanks for your help.
> 
> How big is the chance that McBSP will have samples remaining in its shift registers, not to its FIFO until next time it receives new data samples?

I suppose none if McBSP framesize (wlen * channels) number of bitclock 
cycles (+ possible 1-bit data delay) are received after framesync.

> My PCM DMA is running in element mode so it sets up FIFO threshold as 1 (0 in the register). That means FIFO should pass the data as long as it sees them coming.
> 
> Before the very first DMA ISR (completed a period of data transfer by DMA), the DMA pointer is a void number, I think it means DMA has not ever completed one entire period transfer yet. My suspection is, does DMA need some time to be ready for receiving data from McBSP's DMA event? If it does need some time, then the very first a couple of sample(s) from McBSP could be missed.
> 
Indeed, this is actually strange that DMA pointer is not updated. How
big is your period size? Is it smaller than DMA burst size which is set
to 64 bytes in sound/soc/omap/omap-pcm.c? I'm not sure does the DMA use
burst transfer in element mode but non-updating pointer is kind of
indicating that there is neither DMA transfer going on until enough
data is received.


-- 
Jarkko

  reply	other threads:[~2011-06-23  6:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  5:04 PCM DMA only can fire ISR when it receives 4 samples more than the period, from McBSP port? Philip Chu
2011-06-22  7:05 ` Jarkko Nikula
2011-06-22 15:26   ` Philip Chu
2011-06-23  6:50     ` Jarkko Nikula [this message]
2011-06-23 13:16       ` Péter Ujfalusi
2011-07-01 15:39         ` Philip Chu

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=20110623095013.6210474d.jhnikula@gmail.com \
    --to=jhnikula@gmail.com \
    --cc=Alsa-devel@alsa-project.org \
    --cc=Philip.Chu@logicpd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox