• Disclaimer: This Vendor's Forum is a paid-for commercial area. Unlike the rest of diyAudio, the Vendor has complete control of what may or may not be posted in this forum. If you wish to discuss technical matters outside the bounds of what is permitted by the Vendor, please use the non-commercial areas of diyAudio to do so.

Support for Botic Linux driver

@bern: Please make sure you have the following line in the /boot/uEnv.txt file:


Code:
dtb_overlay=/lib/firmware/BOTIC-00A0.dtbo

Thanks. I added this line, see my uEnv.txt:
Code:
#Docs: [url=http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0]Beagleboard:U-boot partitioning layout 2.0 - eLinux.org[/url]

uname_r=4.19.94+
dtb=BOTIC-00A0.dtbo
optargs=snd_soc_botic.ext_masterclk=3 snd_soc_botic.serconfig=MMMM snd_soc_botic.dai_format=16386 snd_soc_botic.clk_44k1=45158400 snd_soc_botic.clk_48k=49152000  snd_soc_botic.blr_ratio=64
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: [url=http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays]Beagleboard:BeagleBoneBlack Debian - eLinux.org[/url]
###Master Enable
#enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
dtb_overlay=/lib/firmware/BOTIC-00A0.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
#enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
but boot process takes few minutes and edns the same: 'unable to find [dtb=BOTIC-00A0.dtbo] ..'

Code:
U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... Card did not respond to voltage select!
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
Card did not respond to voltage select!
Card did not respond to voltage select!
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2253 bytes read in 32 ms (68.4 KiB/s)
Loaded environment from /boot/uEnv.txt
debug: [dtb=BOTIC-00A0.dtbo] ...
Using: dtb=BOTIC-00A0.dtbo ...
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.19.94+ ...
10297856 bytes read in 697 ms (14.1 MiB/s)
debug: [enable_uboot_overlays=] ...

unable to find [dtb=BOTIC-00A0.dtbo] did you name it correctly? ...

FAILSAFE: U-Boot UMS (USB Mass Storage) enabled, media now available over the usb slave port ...
Unknown command 'ums' - try 'help'
uboot_overlays: add [enable_uboot_overlays=1] to /boot/uEnv.txt to enable...
loading /boot/initrd.img-4.19.94+ ...
7035526 bytes read in 513 ms (13.1 MiB/s)
debug: [console=ttyO0,115200n8 snd_soc_botic.ext_masterclk=3 snd_soc_botic.serconfig=MMMM snd_soc_botic.dai_format=16386 snd_soc_botic.clk_44k1=45158400 snd_soc_botic.clk_48k=49152000 snd_soc_botic.blr_ratio=64 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:6b5a86 0x88000000] ...
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
** Invalid partition 2 **
** Invalid partition 3 **
** Invalid partition 4 **
** Invalid partition 5 **
** Invalid partition 6 **
** Invalid partition 7 **
starting USB...
USB0:   Port not available.
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-54-4a-16-bf-a9-7c
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/C0A80102
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/C0A8010
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/C0A801
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/C0A80
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/C0A8
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/C0A
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/C0
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/C
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/default-arm-am33xx
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/default-arm
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Retrieving file: pxelinux.cfg/default
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.Config file not found
starting USB...
USB0:   Port not available.
cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC 54:4a:16:bf:a9:7c
HOST MAC de:ad:be:af:00:00
RNDIS ready
The remote end did not respond in time.=>
 
Please also delete this line:
Code:
dtb=BOTIC-00A0.dtbo


This should not have required another message here, though...

Thanks,
I've just check that kernel has been loaded.
Code:
beaglebone:~$ uname -a
Linux beaglebone 4.19.94+ #1 SMP PREEMPT RT Wed Apr 15 19:19:46 CEST 2020 armv7l GNU/Linux
I have to go now.
I'll check the sound (quality) in the evening.
 
It seems the botic kernel patches don't work for 4.19-rt. I can't see botic sound card output
Code:
debian@beaglebone:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Black [TI BeagleBone Black], device 0: davinci-mcasp.0-i2s-hifi i2s-hifi-0 [davinci-mcasp.0-i2s-hifi i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
debian@beaglebone:~$
 
You need to make sure the overlay is loaded. Please uncomment the
enable_uboot_overlays=1
line in uEnv.txt...


music plays:) Thank you.
Few days ago I flashed the fresh buster image (6th Apr build). Then I installed the last 'official' botic kernel (about 3years old - Linux beaglebone 4.8.13-botic7-rc3 #1 PREEMPT) and the newest MPD and squeezelite players.
Now I have Botic with 4.19.94+ #1 SMP PREEMPT RT kernel.
I've already listened to a few songs. I hear significant progress in terms of 3D imaging and a filling of space:) Also details seems clearer.

But let it not be so good I noticed one little drawback in case of squeezelite player: small playback disruption/interruption at 10 seconds before the end of each song. The last song from playlist is played without this. Also the MPD playback is ok (there is no such disadvantage).
 
Happy to hear things worked out in the end for you, although I am always skeptical about the imaging, details and space filling talk... For me working on this is mainly making sure that you can really use latest software versions and have up to date kernels at hand. It does not necessarily mean that the sound quality is better or worse (should be basically always the same).


Squeezelite dropouts tend to hint at an issue with squeezelite if mpd is not affected. I would however also try the non-RT kernel (RT should not make any difference to music playback anyways).
 
Happy to hear things worked out in the end for you, although I am always skeptical about the imaging, details and space filling talk... For me working on this is mainly making sure that you can really use latest software versions and have up to date kernels at hand. It does not necessarily mean that the sound quality is better or worse (should be basically always the same).


Squeezelite dropouts tend to hint at an issue with squeezelite if mpd is not affected. I would however also try the non-RT kernel (RT should not make any difference to music playback anyways).


I respect your opinion about RT/non-RT kernels. Until recently, I thought similarly.
However, a few days ago (before botic upgrade) I did a small experiment.
In my home network I have several music players based on raspberry pi machines and raspbian OS. I've build RT kernel for some of them and switched from non-RT to RT. The difference was clearly audible. In my home network with the current hardware configurations the RT systems (rassbian) sounded better. Similarly with bbb and RT/non-RT buster ; RT version sounds better to my ears. And the difference is clear.
 
Member
Joined 2007
Paid Member
In my home network I have several music players based on raspberry pi machines and raspbian OS. I've build RT kernel for some of them and switched from non-RT to RT. The difference was clearly audible.

I also have biases relative to RT vs. non-RT kernels. When you have a moment, Bern, could you describe the signal path for the RPi's in which RT kernels improved the sound? Especially curious about where the I2S and clocks come into the mix, which parts are galvanically isolated, and whether the RPi's have linear or switching power.

Frank
 
Of course Frank.
At the beginning I would like to point out that my RPI setup is not audiophile at all.
For serious listening I still use BBB/hermes/cronus/Dac based on PCM1704.
I use plenty of RPI music players mainly RPI2 and RPI Zero W (due to small power consumption) in different rooms of my house.
All Rpi players are connected via WiFi to home server (router/firewall/wifi ap/NAS/music server etc) where disks with music are attached. So the players works as clients in the client-server architecture.
I describe an example of RPI setup I use in my bedroom.
As you know, the bedroom has little space for audio equipment so I desired to build small DIY audio system. In the small aluminium enclose I put amplifier (based on tripath2022 chip) and RPI Zero W as a player with PCM5102a DAC. Both amplifier and player are powered by good audio toroid 200VA transformer. So the Rpi has linear PSU with CRC filter and Ultra Low noise power regulator ADM7150 fixed at Vout =+5V DC.
When it comes to software, I started from PiCorePlayer (wich is roughly speaking squeezelite player + GUI). In the PiCorePlayer you may switch: non-RT and RT kernel. System with RT kernel sounded better to my ears. Encouraged by this, I decided to install Rassbian and build RT kernel to listening to MPD player in the satellite mode/setup (which sounds slighty better in my opinion than squeezelite). And I was not wrong: RT kernel played better again.It is interesting that despite such non-sophisticated equipment you can hear the difference. So I decided to try RT kernel in BBB and and despite a few small drawbacks I am happy.
Look at photos from my 'receiver' build ;)
P1140675.png


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.
 
Member
Joined 2007
Paid Member
So I decided to try RT kernel in BBB and and despite a few small drawbacks I am happy.

Interesting, Bern...

I also tried a (older) real-time kernel with the BBB and it didn't seem to improve things. Although, I have always increased the priority of Squeezelite so it is 'nearly' real-time. In my BBB system it seems that effective galvanic isolation of the I2S makes it immune to many of the pitfalls of other processing occurring in the system. On the BBB I have tried various kinds of signal processing in ALSA, BruteFIR, Sox, etc., and I've never heard a "quality" difference when that is on or off. But I value your experiences with the RPi, which will guide me in similar pursuits.

Cheers,

Frank
 
Hi All, it's been a while since I was here! I wonder if someone can help me bring my BBB>Hermes>Chronus>DDDAC based dac setup up to date?

I have a custom made dac based on the DDDAC with dual PCM1794 in mono mode. It's being fed via a BBB running Miero's Botic driver and Squeezelite (4.0.0-botic5 specifically) I have the Botic driver setup to output 2 channels of right-justified data. Then it's going via a Twisted Pear Hermes and Chronus for isolation and reclocking, then direct to the PCM1794 chips. The right justified data is the native language of the PCM1794 which means I don't need any of the I2S to right justified conversion part of the DDDAC mainboard, so it's much simpler. It works great and has sounded beautiful for a while now :)
I have been sending it music using Roon and treating it as a Squeezebox end point. I used REW to make a room correction DSP profile in Roon and it works wonders, but I am looking for a more versatile way to do this and want to move the room correction function onto the BBB if possible.

Things I'm looking to achieve:
I would like to make the room correction profile apply to any music source I send. Does this mean I need to use BruteFIR? I see that's available as a plugin for Volumio.
I want to be able to cast music from my mobile phone over the LAN like I do to my Chromecast Audio.
I'd like to use my phone or a web browser on my PC to control what's playing.
I would like it to show up as a spotify connect endpoint.
I want an easy way of playing WAV files of the music I make over the LAN.
I don't want to use Roon anymore as it means paying to run the server software and needing a separate PC running.
Tidal support would be great.

So I think that what I need is something like maybe Volumio, but can I run that on the BBB as well as the Botic driver? or on some other small computer board like a Pi4 or something? I've been away from this tech for a while and I'm not sure of the options and projects currently available.
Could someone point me in the right direction please?
thanks
 
Member
Joined 2007
Paid Member
I'm taking a quick break from soldering and noticed your questions. There are some newer OS options but let me just comment on a couple things:
I would like to make the room correction profile apply to any music source I send. Does this mean I need to use BruteFIR? I see that's available as a plugin for Volumio.

The BBB CPU limits the precision available for FIR filters. The processing limit is about 2048 taps at 48kHz, which runs the CPU up to about 90%. More importantly, the programs that run the filters will lock the sample rate. The rate won't adapt to match whatever is native to the source file. Thus, I've only used FIR filters for tweaking input that never varies from 48kHz. BruteFIR is efficient but there is a learning curve to correctly configuring it. You need to configure ALSA with an input loop in which the filter program runs. It's easier to get started piping data into SoX, which will also run FIR filters.
I'd like to use my phone or a web browser on my PC to control what's playing.
Try iPeng - there are iOS and Android versions.
So I think that what I need is something like maybe Volumio, but can I run that on the BBB as well as the Botic driver? or on some other small computer board like a Pi4 or something?

An RPi4 makes a great little music server. Now with USB3, it can easily manage the bandwidth demands. I've only used them with LMS/Squeezelite and have no useful experience regarding volumio, which has been problematic for others to enable on the BBB over the Botic kernel.

Cheers,

Frank
 
Thanks Frank. It looks like rpi4 with Volumio fits almost all of my requirements, with DRC, multiple sources and a decent phone app, it's just how to get the BBB to be an output for it. It'd be super convenient if I could plug the BBB usb into the usb of the rpi4 and it show up as a USB DAC, but I suspect the BBB doesn't present itself that way?
 
I use a USB port on the BBB for SPDIF input and it is all built into ALSA. So, there’s a chance it would work but I can’t test for you at this time...
Thanks, I found an old rpi3 and put Volumio on it and found a USB A to A lead in my collection, but plugging the rpi to BBB directly doesn't show anything additional when I run
Code:
aplay -l
on either. I guess it was never going to be that easy :)
So I guess my question becomes 'Is it possible to somehow configure a BBB with Botic to act as though it were a USB dac that I can plug into another front-end player?'
 
Doing a little more research across the web and of course I find myself back here, or very close anyhow :)
So to make a device like a BBB or rPi act like a usb device rather than a host, it seems you can use something called Gadget Mode, and specifically g_audio.
More info here: How to use the audio gadget driver - RidgeRun Developer Connection
I found an example of Miero discussing exactly this PC -> USB -> BBB -> I2S -> DAC functionality on the forum a while back - https://www.diyaudio.com/forums/twi...embedded-audio-applicance-86.html#post3993715
miero from 2014 said:
- the BBB has miniUSB connector
- connect the BBB to PC via that connector
- on BBB load g_audio module with correct arguments
- the PC detects USB Audio soundcard
- play sound in PC
- it travels to "BBB USB DAC"
- BBB receives data on virtual USB DAC audio gadget and sends them to audio output
Also found another useful relevant forum post regarding how to achieve this on an rpi
using a Raspberry Pi 4 as a USB DSP-DAC
So it looks hopeful, but I am far from a Linux guy, let alone a linux audio guy and kind of out of my depth here... Any pointers very gratefully received :)
thanks,
James
 
Keep digging and good luck!
thanks Frank, I can't tell whether this would just need some existing software modules and a few lines of code in the right place, or whether there's some fundamental reason it won't work like I want.
at the moment I'm feeling like swapping out the BBB and bbb Hermes for an Amanero board and isolator would be a much more straightforward route. Changing the output to be right justified is a quick config change on the Amanero from what I can tell and that should give me everything I need to make this happen.