beagle audio cape (Rev B1)

The beagle audio cape seems to not have a cape eeprom. How then is it detected as being there with the present kernel? since it has no cape eeprom does this mean that it does not count as to being one of the 4 cape addresses thus giving a free pass with the ability to have this cape and 4 others. I’m really looking forward to playing with this board.

Eric

ok, setup directions are here… http://elinux.org/CircuitCo:Audio_Cape_RevB#Audio_Cape_Revision_B1 but I’m still trying to understand how all this works. are the cape eeproms and the info within them just not used? how is the cape Identified and setup automatically… or must I edit one or more files to do this manually each and every time I add or remove the audio cape from the stack.

Eric

ok, setup directions are here… http://elinux.org/CircuitCo:Audio_Cape_RevB#Audio_Cape_Revision_B1 but I’m still trying to understand how all this works. are the cape eeproms and the info within them just not used? how is the cape Identified and setup automatically… or must I edit one or more files to do this manually each and every time I add or remove the audio cape from the stack.

Well, again it depends on your kernel version. If you are using V3.8, you add the audio cape in your uEnv.txt file and you enable the TLV320AIC3x driver in your kernel config. When your kernel boots, it runs the audio codec init which will eventually call the probe function and that will read in the audio cape device tree overlay and configure the audio codec. If you are using a kernel version later than V3.8, you have to manually add the audio cape device tree to your board device tree.

Regards,
John

So on the capes that have an EEPROM, why do they need it and how is the eeprom used? Also, lets say I add the cape to the cape stack and add it to uEnv.txt. do I then need to remove the edits to uEnv.txt if/when I remove the audio cape from the stack? what are the effects of doing or not doing so.

Eric

So on the capes that have an EEPROM, why do they need it and how is the eeprom used? Also, lets say I add the cape to the cape stack and add it to uEnv.txt. do I then need to remove the edits to uEnv.txt if/when I remove the audio cape from the stack? what are the effects of doing or not doing so.

Instead of defining the Device Tree Overlay manually in uEnv.txt, capes with EEPROM enables the kernel to identify the cape and load the DTO automatically.

Regards,
John

so what can I expect to happen if I define a cape as being present in uEnv.txt then remove the cape without (un)defining it?

Eric

so what can I expect to happen if I define a cape as being present in uEnv.txt then remove the cape without (un)defining it?

Nothing. All you have done is assign the pins for this cape and set the modes for these pins. If the codec driver is configured in the kernel, it will display an error in the boot console.

Regards,
John

From: Eric Fort <eric.fort@gmail.com>
Reply-To: <beagleboard@googlegroups.com>
Date: Saturday, May 17, 2014 at 10:57 AM
To: beagleboard <beagleboard@googlegroups.com>
Subject: [beagleboard] Re: beagle audio cape (Rev B1)

ok, setup directions are here....
http://elinux.org/CircuitCo:Audio_Cape_RevB#Audio_Cape_Revision_B1 but
I'm still trying to understand how all this works. are the cape eeproms
and the info within them just not used? how is the cape Identified and
setup automatically..... or must I edit one or more files to do this
manually each and every time I add or remove the audio cape from the stack.

Well, again it depends on your kernel version. If you are using V3.8, you
add the audio cape in your uEnv.txt file and you enable the TLV320AIC3x
driver in your kernel config. When your kernel boots, it runs the audio
codec init which will eventually call the probe function and that will read
in the audio cape device tree overlay and configure the audio codec. If you
are using a kernel version later than V3.8, you have to manually add the
audio cape device tree to your board device tree.

Regards,
John

so since this is working manually how do I " add the audio cape in your
uEnv.txt file and you enable the TLV320AIC3x driver in your kernel config."
such that, " When your kernel boots, it runs the audio codec init which
will eventually call the probe function and that will read in the audio
cape device tree overlay and configure the audio codec." The instructions
are great for doing it manually but shouldn't end there. I'd like this to
happen on boot.

Thanks,

Eric

Again, assuming Linux Kernel V3.8, add the following in uEnv.txt:

add

capemgr.enable_partno=BB-BONE-AUDI-02

to optargs

So my optargs looks like this:

optargs=capemgr.disable_partno=BB-BONELT-HDMI capemgr.enable_partno=BB-BONE-AUDI-02

Regards,
John

I modified my uEnv.txt optargs line

from:
optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G

to:
optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G capemgr.enable_partno=BB-BONE-AUDI-02

then rebooted and did the following:

root@beaglebone:~# aplay cats_in_cradle_harry_chapin.wav
ALSA lib confmisc.c:768:(parse_card) cannot find card ‘0’
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver return ed error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned er ror: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned err or: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directo ry
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:682: audio open error: No such file or directory

root@beaglebone:~# cat audioup
!# /bin/bash

export SLOTS=/sys/devices/bone_capemgr.*/slots
echo BB-BONE-AUDI-02 > $SLOTS

root@beaglebone:~# cat /sys/devices/bone_capemgr.8/slots
0: 54:PF—
1: 55:PF—
2: 56:PF—
3: 57:PF—
root@beaglebone:~# ./audioup
./audioup: line 1: !#: command not found
root@beaglebone:~# cat /sys/devices/bone_capemgr.8/slots
0: 54:PF—
1: 55:PF—
2: 56:PF—
3: 57:PF—
5: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02
root@beaglebone:~# aplay cats_in_cradle_harry_chapin.wav
Playing WAVE ‘cats_in_cradle_harry_chapin.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux
root@beaglebone:~#

I modified my uEnv.txt optargs line

from:
optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G

to:
optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G capemgr.enable_partno=BB-BONE-AUDI-02

then rebooted and did the following:

root@beaglebone:~# aplay cats_in_cradle_harry_chapin.wav
ALSA lib confmisc.c:768:(parse_card) cannot find card ‘0’
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver return ed error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned er ror: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned err or: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directo ry
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:682: audio open error: No such file or directory

root@beaglebone:~# cat audioup
!# /bin/bash

export SLOTS=/sys/devices/bone_capemgr.*/slots
echo BB-BONE-AUDI-02 > $SLOTS

root@beaglebone:~# cat /sys/devices/bone_capemgr.8/slots
0: 54:PF—
1: 55:PF—
2: 56:PF—
3: 57:PF—
root@beaglebone:~# ./audioup
./audioup: line 1: !#: command not found
root@beaglebone:~# cat /sys/devices/bone_capemgr.8/slots
0: 54:PF—
1: 55:PF—
2: 56:PF—
3: 57:PF—
5: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02
root@beaglebone:~# aplay cats_in_cradle_harry_chapin.wav
Playing WAVE ‘cats_in_cradle_harry_chapin.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU/Linux
root@beaglebone:~#

Strange because this works for me. You may want to update your kernel to 3.8.13-bone51 as Robert Nelson addressed a similar issue back on May 14 at 7:04AM PST.

https://github.com/RobertCNelson/linux-dev/commit/d15af8d70b402f6415dbaaf1319819e91fac1951

Regards,
John