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: Wed, 22 Jun 2011 10:05:16 +0300 [thread overview]
Message-ID: <20110622100516.92cc3e95.jhnikula@gmail.com> (raw)
In-Reply-To: <0520A3FE5EDCF24F88B3F1451CFC64AE042818D531@EDPREX01.logicpd.com>
On Wed, 22 Jun 2011 00:04:43 -0500
Philip Chu <Philip.Chu@logicpd.com> wrote:
> HI,
>
> I got a problem with my audio capture using McBSP 3 port on OMAP 3530. Linux kernel 2.6.32.
> For the very first audio data capture, when I expect to receive only one exact period of data through McBSP, PCM DMA ISR never comes. When I check the DMA pointer by using snd_pcm_update_hw_ptr_pos(), I found it was just trash value. If I ask the data sender to send 4 samples more than the period defined, DMA ISR gets fired, the it points to the exact period position, and I assume the extra 4 bytes just get lost?
>
> My McBSP is configured as a slave which needs the sender to provide Frame Sync, clocks etc, and those signals are designed to just kick in at the same time. Do the clock signal need to be present earlier than the Frame Sync?
>
> Anybody knows what the issue could be?
>
Sounds like the last sample(s) may stay in McBSP receive shift register
and they get copied to receive buffer and forward only until the
receiver is running again.
I'm thinking is this missing interrupt due missing first sample. Do you
receive it and does the received data look correct?
It could be that the McBSP expects a stable bit-clock before frame-sync
until it starts to receive data into shift register. I'm not sure about
this.
Another reason could be that the DAI format is not correct. I.e. if
the transmitter has 0-bit data delay after frame-sync but McBSP is
configured for 1-bit so 1 bit is missing from shift register when the
transmission ends. But then just a single bit-clock cycle, not the full
word should kick the data forward and DMA ISR should occur.
--
Jarkko
next prev parent reply other threads:[~2011-06-22 7:05 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 [this message]
2011-06-22 15:26 ` Philip Chu
2011-06-23 6:50 ` Jarkko Nikula
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=20110622100516.92cc3e95.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