Discussion:
Audio Capturing on BeagleBone (McASP) - Channels are wapping randomly
ChrisSchuku
12 years ago
Permalink
Hi,

I'm capturing an 8-channel TDM stream (32 bit slots) on the BeagleBone
running Ubuntu. My problem is, that when CPU is under heavy load, channels
are swapping like crazy (ie. signal from channel one is suddenly on channel
8, then on 5, ...).
Analyzing the recorded stream I found that the reason for this is that
sometimes one time-slot within a frame is missing (is skipped). Since this
behaviour correlates with the CPU load, I'm pretty sure that it's not the
codec that messes up the TDM stream. Rather I suspect the problem to be on
the McASP or EDMA side of the ALSA driver.
Unfortunately I really have no idea how to track down this problem further
- I only know that somewhere along the way from the McASP input pins to the
ALSA API some timeslots (1 slot is 4 Byte long) get lost.

Has anyone ever experienced similar behaviour or can anyone suggest a way
to debug this problem (I can't seem to get any hints from kernel messages
on this)?

Btw: It seems to me, that currently ping/pong buffering is not being used
as davinci_pcm_enqueue_dma (sound/soc/davinci/davinci-pcm.c) is called on
every DMA interrupt. Is that something to look into?

Any suggestion are very much appreciated!

best,
Chris
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Yiling Cao
12 years ago
Permalink
Hi, I do wanna make a similar experiment like you, with 4 audio codecs. Are
you able to provide some your wiring diagram, so I can create the same
hardware to test for you too?
...
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
ChrisSchuku
12 years ago
Permalink
The wiring is pretty simple in my case: the codec is bitclock and
frameclock master and is connected to the respective bitclock, frameclock
and data input pins of McASP0 (serializer 0). I'm daisy-chaining two
4-channel ADCs (AD1974) such that the 8-channel TDM stream is output by the
second ADC and fed to a single serializer on the BeagleBone. If you want to
use four ADCs in parallel you'll need 4 McASP serializers.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Tom King
12 years ago
Permalink
What kernel are you using?

Thanks

Tom
...
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
ChrisSchuku
12 years ago
Permalink
Hi Tom,

I'm using Robert Nelsons kernel but with a modified version of
davinci-mcasp.c - and that's exactly where the problem was (yes, I think I
have found it): when the capture stream is startet the WFIFO register was
flushed instead of RFIFO (typo). I'm not entirely sure why not flushing the
RFIFO register only produces strange behaviour when CPU load is high, but
now it seems to work properly.

Thanks,
Chris
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
a***@public.gmane.org
12 years ago
Permalink
Hi Chris,


I'm currently working on a beaglebone rev A6 in order to stream audio from
a FM tuner card. I want to use i2s to transfer the audio from the tuner
card to the beaglebone (I'm using i2s so I can use digital audio directly).
I'm facing the following problem : I installed ALSA on my beaglebone (i'm
using an Archlinux distrib). How can I do to make mcasp recognized as an
alsa soundcard?

Thanks in advance.

Alexandre.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
eze_rg
11 years ago
Permalink
Hi, could you share the code of your project? I'm trying to connect only
one ADC to the beaglebone (pcm1803) and i cant get it registered by alsa. I
wrote a custom codec driver, and modified davinci.evm.c.
Any help would be appreciated.
Thanks!
Regards
...
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
fritz
10 years ago
Permalink
Hey, did you manage to get your pcm1803 working? Can you give me some
advice to get mine working? Thanks Fritz
...
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...