BeagleBone Audio Cape

3,030 views
Skip to first unread message

eze_rg

unread,
Nov 11, 2012, 4:01:18 PM11/11/12
to beagl...@googlegroups.com
Someone tried this cape Audio Cape?? 
I was reading the Wiki and it says that works with i2c interface: i was wondering if  this is a quality limitation (for audio recording for example) because the i2c port on the BB can go as fast as 400kbps??
Am i thinking wrong?

Thanks!

Eric Fort

unread,
Nov 11, 2012, 6:02:19 PM11/11/12
to beagl...@googlegroups.com
Not sure where you got the i2c part.  The description is quite clear:

The BeagleBone Audio Cape provides stereo audio input and output for the BeagleBone by using the TLV320AIC3106 codec. Audio data is sampled at up to 96 kHz during recording or playback. The codec interfaces with the Multichannel Audio Serial Port of the AM335x via audio serial bus. The BeagleBone Audio Cape also features two standard 3.5mm audio jacks as audio input and output connectors.

The cape uses i2c for the eeprom to identify itself but sound uses the audio serial bus which I believe is i2s https://en.wikipedia.org/wiki/I%C2%B2S

see section 5.3.3 of the audio cape srm https://github.com/CircuitCo/BeagleBone-Audio/blob/master/BeagleBone-Audio-RevA1-srm.pdf?raw=true

as well as http://beagleboardtoys.com/wiki/index.php?title=BeagleBone_Audio



--
 
 

Joel A Fernandes

unread,
Nov 11, 2012, 6:38:18 PM11/11/12
to beagl...@googlegroups.com
On Sun, Nov 11, 2012 at 3:01 PM, eze_rg <rg.ez...@gmail.com> wrote:
> Someone tried this cape Audio Cape??
> I was reading the Wiki and it says that works with i2c interface: i was
> wondering if this is a quality limitation (for audio recording for example)
> because the i2c port on the BB can go as fast as 400kbps??

i2c is used for configuring the codec. The actual audio is transmitted
over dedicated data and clock lines.

Joel

Juanjo

unread,
Nov 11, 2012, 6:44:47 PM11/11/12
to beagl...@googlegroups.com
I have it and the audio is transmitted though McASP0 in PCM burst mode. The i2c is for codec config as already stated.

BTW the audio quality is good, much better than a lot of those cheap MP3 players. Havent studied the PCB but it has little digital noise on the analog side :) on the schematics I just see a choke between the digital and analog ground but surely it may have different ground planes connected by the choke on a single point.

eze_rg

unread,
Nov 11, 2012, 6:51:13 PM11/11/12
to beagl...@googlegroups.com
Thanks for your answer, now i understand it better. 
@Juanjo: did you tried to record something?

Yiling Cao

unread,
Nov 12, 2012, 5:35:02 AM11/12/12
to beagl...@googlegroups.com
I have made a beagle audio cape myself, You do need both i2c and i2s (says spi on beaglebone pins) to be able to work with TLV320AIC3106

On Mon, Nov 12, 2012 at 7:51 AM, eze_rg <rg.ez...@gmail.com> wrote:
Thanks for your answer, now i understand it better. 
@Juanjo: did you tried to record something?

--
 
 

Juanjo

unread,
Nov 12, 2012, 8:29:39 PM11/12/12
to beagl...@googlegroups.com
Haven´t tried the capture side of it. Actually haven´t checked the input or output impedance either. My tests its based on a Senheinser and those hyped Beats Headphones and my cheap Panasonics :)

eze_rg

unread,
Nov 15, 2012, 2:56:43 PM11/15/12
to beagl...@googlegroups.com
Thanks everyone for your answers. I decided to order this board PCM1803A, according what i was reading in ALSA website it should be "easy" to read data from this ADC using the "arecord" command. But here is my doubt: do i need an especial driver for I2S so ALSA can recognize the ADC? or the current drivers in Angstrom can do the trick??
Thanks again.

eze_rg

unread,
Nov 15, 2012, 4:47:52 PM11/15/12
to beagl...@googlegroups.com


El jueves, 15 de noviembre de 2012 16:56:43 UTC-3, eze_rg escribió:
Thanks everyone for your answers. I decided to order this board PCM1803A, according what i was reading in ALSA website it should be "easy" to read data from this ADC using the "arecord" command. But here is my doubt: do i need an especial driver for I2S so ALSA can recognize the ADC? or the current drivers in Angstrom can do the trick??
Thanks again.

Sorry for the double post the correct link to the board is  https://www.sparkfun.com/products/9365

Juanjo

unread,
Nov 16, 2012, 5:08:06 PM11/16/12
to beagl...@googlegroups.com
First, check if that Sparkfun module uses 3.3V levels on I2S at least. Or you´ll need a level translator like a TXB0104 or TXS0104 (if under 20Mbps I think).

The I2S on ASoC (ALSA SoC) is McASP:

snd_soc_davinci_mcasp     6941  0 
snd_soc_davinci         5878  0 
snd_soc_evm             2609  0 
snd_soc_tlv320aic3x    32650  0

Those are the modules used on BB Audio Cape and basically the last one is the CODEC one, so you´ll need to make a driver for your CODEC (PCM1803) or maybe is already done on ALSA.

The first driver is the I2S part, I´m just starting to dig on that code to see if it actually generic to attach another CODEC to it or it needs some tweaking. As I told you at least when working with the Audio Cape the signal between McASP and the TLV320 is actually PCM not real I2S (there are some differences) with the McASP working as a master, but the McASP do support PCM mode and also slave mode but I'm not sure if the snd_soc_davinci_mcasp code has those features enabled or is just a PCM/Master implementation.

eze_rg

unread,
Nov 17, 2012, 9:53:09 AM11/17/12
to beagl...@googlegroups.com
Thanks a lot for your comments, i'll start testing when the board arrives.

eze_rg

unread,
Nov 18, 2012, 9:53:21 AM11/18/12
to beagl...@googlegroups.com
Well, i can´t wait having the board to start testing, i would like to set up the beaglebone properly with the drivers/codec defined.
According to what i being reading i put these command:

# cat /sys/kernel/debug/asoc/platforms
  i get:
davinci-pcm-audio
snd-soc-dummy

# cat /sys/kernel/debug/asoc/dais

tlv320aic3x-hifi

# cat /sys/kernel/debug/asoc/codecs

tlv320aic3x-codec.3-001b

I dont know for sure but the davinci-pcm-audio platform i think it's already configured to read Mcasp0 from the bb.
Still i can't get ALSA register this platform.

I'm not sure if this is correct.

Thanks for reading :-)


eze_rg

unread,
Dec 2, 2012, 7:58:15 AM12/2/12
to beagl...@googlegroups.com
Some updates:
I finally bought de Audio Cape, I tested it in Angstron and it works really good.
But, I cant make it work under Ubuntu!
In Angstrom works right out the box.. 
Is there any way to access the Cape's EEPROM???

Thanks!! 

eze_rg

unread,
Dec 2, 2012, 2:11:45 PM12/2/12
to beagl...@googlegroups.com
I solved the problem by using the latest Ubuntu image (Quantal 12.10)
Now Ubuntu detects correctly the audio cape.

eze_rg

unread,
Dec 17, 2012, 3:44:04 PM12/17/12
to beagl...@googlegroups.com
Try this:
# sudo apt-get update
# sudo apt-get install alsa

then try to run "alsamixer", it should detect it.

El domingo, 16 de diciembre de 2012 06:33:08 UTC-3, kevind escribió:
Did you need to do anything special to get Ubuntu to detect the audio cape?  I put the Quantal 12-10 Ubuntu image on a BeagleBone with an audio cape, but ALSA still doesn't detect it..

Thanks,
Kevin

kevind

unread,
Dec 18, 2012, 2:25:48 AM12/18/12
to beagl...@googlegroups.com
I have alsa installed, but alsamixer doesn't do anything on Ubuntu  (on Angstrom, it works).

ubuntu@arm:~$ sudo alsamixer
cannot open mixer: No such file or directory

Same result on both Precise and Quantal images.

eze_rg

unread,
Dec 18, 2012, 7:32:16 AM12/18/12
to beagl...@googlegroups.com
Try loading these modules:

#modprobe snd_soc_davinci_mcasp   
#modprobe snd_soc_davinci        
#modprobe snd_soc_evm            
#modprobe snd_soc_tlv320aic3x   

I also suggest to update ALSA (if you haven't).
Hope it helps.

kevind

unread,
Dec 20, 2012, 1:51:24 AM12/20/12
to beagl...@googlegroups.com
Thanks, that helped a lot, it's working now.

I used:
sudo nano /etc/modules

at the end, added the lines:
snd_soc_tlv320aic3x
snd_soc_davinci
snd_soc_davinci_mcasp
snd_soc_evm

and after a reboot, alsa sound now works for both record & playback for the audio cape with Ubuntu Quantal 12-10 image.

Thanks
Kevin

Andrew Frazer

unread,
Dec 20, 2012, 9:28:14 PM12/20/12
to beagl...@googlegroups.com

FYI,   I'd just started workign on this same issue, i'm however using debian..  

I installed alsa via apt-get,   then added these modules.. and i'm also all good to go.
Reply all
Reply to author
Forward
0 new messages