We use cookies to provide our visitors with an optimal site experience. View our privacy notice and cookie notice to learn more about how we use cookies and how to manage your settings. By proceeding on our website you consent to the use of cookies.
I’m a somewhat experienced Linux user, C++ programmer but I have never dealt with the kernel nor device tree myself. In order to learn a bit about it, I’ve decided to build my own cape and plug it onto the Pocket Beagle that I had lying around. The cape is a ripoff designed based on the popular Bela Mini, an audio plugin for Beagles. It contains a standard part TLV320AIC codec that are supported in the BeagleBone device tree. By that I mean, there are existing device tree overlays that should “somehow” be invoked and the CPU will recognise the codec it’s being connected to. This should make my add-on PCB a standard ALSA sound card. I don’t know much about the DTOs, but hopefully, this will be a nice learning process.
So I got my Belamini board and I plugged it onto my PocketBeagle. Nothing burned. Now, I needed to figure out how to make my AM3358 CPU talk to the audio codec on the Bela. I learned that I need to load the Device Tree Overlay, BB-BONE-AUDI-02-00A0.dtbo. I followed the instructions from the BB Kernel maintainer and set my /boot/uEnv.txt file to containt following lines:
and rebooted the device.
Upon the reboot, the kernel messaged that DTO has been loaded, but aplay -l didnt list any sound cards. So, it means that CPU still cant talk to the codec. Under the assumption that HW is all fine, what to do to fix this and make the sound out?
Hello, thanks for the response. They have their own very fancy Xenomai kernel to interface the codec. However, this is what they wrote me when I asked about building the custom board some months ago:
You need a Xenomai kernel for Bela to work. By the way, if you don’t care about Bela’s low latency and toolchain and you prefer to work closer to BB’s mainline image, you could just load the BB-AUDI-02 overlay (which we tested and works, but we do not support, so if anything has stopped working you are on you own).
So, I assume BB-AUDI-02 should do the job. And, also, both my cape, and the Bela are based on the same old Audio Cape device, with the same chip and interface. Do you think it might not work now, for some reason?
ok, so you’re suspicious that my cape might work with my kernel? If it doesnt, what would be the best course of action? Downgrade to 3.8.x and use the discontinued capemanager?
Not sure if there is any standard testing procedure, but I started this thread after my test failed. The test being: modifying the /boot/uEnv.txt and rebooting the board. If there is something more needed, being a newcomer, I’m not aware of it.
Hello again, I’m back home and back on track. I did the kernel update as per your advice, but cant see any differences in the script outputs. The kernel is now 4.19.94-ti-r68, but the bug
could not request pin 100 (PIN100) from group pinmux_bone_audio_cape_audio_pins on device pinctrl-single
still persists.
debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
eeprom:[A335PBGL00A21749GPB42108]
model:[TI_AM335x_PocketBeagle]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[microSD]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-pocketbeagle.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[BB-ADC-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[BB-BONE-AUDI-02-00A0.bb.org-overlays]
kernel:[4.19.94-ti-r68]
nodejs:[v10.15.2]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/PB-BONE-AUDI-02-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20210821.0-0~buster+20210821]
pkg:[bb-wl18xx-firmware]:[1.20200322.0-0rcnee0~buster+20200322]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.4-git20190227.1-0rcnee0~buster+20190327]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[ 48.897257] remoteproc remoteproc0: wkup_m3 is available
[ 49.062160] remoteproc remoteproc0: powering up wkup_m3
[ 49.062192] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[ 49.062460] remoteproc remoteproc0: remote processor wkup_m3 is now up
[ 50.439313] remoteproc remoteproc1: 4a334000.pru is available
[ 50.451596] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[ 50.439313] remoteproc remoteproc1: 4a334000.pru is available
[ 50.439467] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[ 50.451596] remoteproc remoteproc2: 4a338000.pru is available
[ 50.451770] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
dmesg | grep pinctrl-single
[ 0.921287] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[ 1.143118] pinctrl-single 44e10800.pinmux: pin PIN101 already requested by ocp:P1_33_pinmux; cannot claim for 48038000.mcasp
[ 1.154766] pinctrl-single 44e10800.pinmux: pin-101 (48038000.mcasp) status -22
[ 1.162199] pinctrl-single 44e10800.pinmux: could not request pin 101 (PIN101) from group pinmux_bone_audio_cape_audio_pins on device pinctrl-single
dmesg | grep gpio-of-helper
[ 0.930296] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 002 Device 002: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END
Oh, and by the way this is the output after I set my uEnv.txt to /lib/firmware/PB-BONE-AUDI-02-00A0.dtbo . WIthout /lib/firmware/ it didnt show the pin mux, nor the UBOOT: Loaded Overlay:[BB-BONE-AUDI-02-00A0.bb.org-overlays]
line.