alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: "ext ylin@mail.com" <ylin@mail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Channel swapping issue on TI OMAP3/TWL4030
Date: Tue, 15 Feb 2011 09:15:44 +0200	[thread overview]
Message-ID: <4D5A2820.7060404@nokia.com> (raw)
In-Reply-To: <8CD9AB6C4E69A1D-1448-84EE@web-mmc-d04.sysops.aol.com>

Hi,

On 02/15/11 01:33, ext ylin@mail.com wrote:
> Some update:
> We peeked into the substream->dma_buffer.area, and found out the 
> channels are already switched in DMA buffer.  We are looking into 
> McBSP2 and DMA to find some clues, but not familiar in these areas.  
> Any suggestion how to further narrow down the problem?

Few more things:
I suppose the twl4030 is the master on the bus (McBSP slave)
Since you are using stereo capture, I assume the digital interface is in
I2S mode.

I could think of three source for channel switch:
1. The switch happens within the twl4030 codec itself
2. Switch happens because of underflow situation in McBSP
3. Switch happens because of overflow situation in McBSP


To narrow down the problem:
1. You need tracepoints on you board for McBSP2 pins, and a scope
You need to monitor the DX, and FS lines (bitclock might be useful as well).
Keep the right channel disabled, and run your application, observe the
DX/FS on the scope. When you notice the channel swap, check back on the
scope, if the data moved from left to right channel.

2/3. This is a bit more trickier, but I have done this several times:
You need to use the PRCM compliant interrupt configuration.
Do not request the TX/RX (62, 63 for McBSP2) interrupts in
omap_mcbsp_request, but request only the common IRQ (17 for McBSP2).
Enable the ROVFLEN, RUNDFEN, and RSYNCERREN bits in IRQENABLE_REG.
In the ir handler check for these enabled events (in IRQSTATUS_REG), and
print out the reason for the event (Do not forget to write back the
register content to IRQSTATUS_REG to ack the event).

I hope this helps narrowing down the problem.

-- 
Péter

  reply	other threads:[~2011-02-15  7:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-12 16:16 Channel swapping issue on TI OMAP3/TWL4030 ylin
2011-02-13  9:25 ` Jarkko Nikula
2011-02-13  9:48   ` peter.ujfalusi
2011-02-13 10:20     ` Jarkko Nikula
2011-02-13  9:51 ` peter.ujfalusi
2011-02-14 17:58   ` ylin
2011-02-14 23:33     ` ylin
2011-02-15  7:15       ` Peter Ujfalusi [this message]
2011-02-15  6:59     ` Peter Ujfalusi
2011-02-15 16:23       ` ylin
2011-02-16  7:20         ` Peter Ujfalusi
2011-02-17  3:40           ` ylin
2011-02-17 11:44             ` Peter Ujfalusi
2011-02-19 16:08               ` ylin
2011-02-20  4:01                 ` ylin
2011-02-22  7:27                   ` Peter Ujfalusi
2011-02-23 15:26                     ` ylin
2011-02-25 15:32                       ` ylin
2011-03-08 13:36                         ` Peter Ujfalusi
2011-02-19 16:17           ` ylin
2011-02-15  8:28     ` Jarkko Nikula
2011-02-15 16:28       ` ylin
2011-02-17  3:53         ` ylin
2011-02-17  8:17           ` Jarkko Nikula
2011-02-17 11:48             ` Peter Ujfalusi

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=4D5A2820.7060404@nokia.com \
    --to=peter.ujfalusi@nokia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ylin@mail.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;
as well as URLs for NNTP newsgroup(s).