• 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

I think the botic driver does not load ...

I have Debian Jessie and MPD 0.18 installed on eMMC and had MPD running fine with ncmpc client and MPad app.
After that I installed the Botic 5 driver by these commands:

$ wget http://repo.ieero.com/pool/main/l/li...ross_armhf.deb
$ ar x linux-image-4.0.0-botic5_1cross_armhf.deb
$ tar xvzf data.tar.gz

I use only ext clock for 44.1 (16934400) and use I2S only to an ES9023 dac up to 24/192.

My /boot/uboot/uEnv.txt file is as follows:

#BBB pin mapping
#
P9_25 - A14/0 - mcasp0_ahclkx (oscillator) - GPIO3_21
P9_31 - A13/0 - mcaps0_aclkx (bit clock) - SPI1_SCLK
P9_29 - B13/0 - mcasp0_fsx (lr clock) - SPI1_D0
P9_30 - D12/0 - mcasp0_axr0 (data0) - SPI1_D1
#P9_41 - D13/0 - mcasp0_axr1 (data1) - GPIO3_20 shared pin with D14
#P9_?? - ?12/2 - mcasp0_axr2 (data2) - configurable, see bellow
#P9_27 - C13/2 - mcasp0_axr3 (data3) - GPIO3_19
P9_24 - D15/7 - uart1_txd (external masterclock switch) - GPIO0_15
#P9_26 - D16/7 - uart1_rxd (I2S/DSD format switch)- GPIO0_14
#P9_14 - U14/7 - gpmc_a2 (cape power switch) - EHRPWM1A
#
#Default mode (kernel param snd_soc_botic.pinconfig=default or not set)
#P9_42 - B12/2 - mcasp0_axr2 (data2) - GPIO3_18
#
#Compat mode (kernel param snd_soc_botic.pinconfig=compat)
#P9_28 - C12/2 - mcasp0_axr2 (data2) - SPI1_CS0 shared with HDMI audio output
#
#GND is available on any of these pins P9_{01,02,43,44,45,46}
#--------------------------------------------------------------
#
#Clocks configuration
snd_soc_botic.ext_masterclk=1
#
#DSD format switch configuration
snd_soc_botic.dsd_format_switch=0
#
#Channels configuration
snd_soc_botic.serconfig=I---
#
#DAI format
snd_soc_botic.dai_format=16385
#
#External masterclock frequencies
snd_soc_botic.clk_44k1=16394400
#snd_soc_botic.clk_48k=24576000
#
#Force BCLK/LRCLK ratio
snd_soc_botic.blr_ratio=64

/sys/module/snd_soc_botic/parameters is not present so I guess it is up to uEnv.txt to handle the setting ?

The command "cat /proc/asound/card0/pcm0p/sub0/hw_params" gives result "closed"

uname -r gives 4.1.12-ti-r29 which does not appear to be the botic driver.

What am I missing ?
 
Last edited:
P.S. (again)

I also have a /boot/uEnv.txt file which contains this kind of info: (this is only the first few lines of much more of similar tekst - here we also see the uname_r=4.1.12-ti-r29 ...)

#Docs: Beagleboard:U-boot partitioning layout 2.0 - eLinux.org

uname_r=4.1.12-ti-r29
##uuid=
#dtb=

##BeagleBone Black/Green dtb's for v4.1.x (BeagleBone White just works..)

##BeagleBone Black: HDMI (Audio/Video) disabled:
#dtb=am335x-boneblack-emmc-overlay.dtb

##BeagleBone Black: eMMC disabled:
#dtb=am335x-boneblack-hdmi-overlay.dtb
 
Member
Joined 2007
Paid Member
#External masterclock frequencies
snd_soc_botic.clk_44k1=16394400
#snd_soc_botic.clk_48k=24576000


What am I missing ?

For starters, review http://bbb.ieero.com

In particular, note:
--------------------------------
External masterclock frequencies
--------------------------------

External masterclock frequency for 44k1 is configurable via:
- kernel option snd_soc_botic.clk_44k1
- file /sys/module/snd_soc_botic/parameters/clk_44k1

Default value: 22579200


External masterclock frequency for 48k is configurable via:
- kernel option snd_soc_botic.clk_48k
- file /sys/module/snd_soc_botic/parameters/clk_48k

Default value: 24576000


Configured values should be multiple of these frequencies.

Playback is disabled if the value is set to 0.
 
You are missung the point.

Even if I would have made a mistake at the 44.1 frequency still 48k files shoud play fine.

The cause is deeper as the botic driver is not loaded and the command "cat /proc/asound/card0/pcm0p/sub0/hw_params" returns with the answer "closed" it is not the external clock setting.
 
Member
Joined 2007
Paid Member
In my system...

Music playing -
Code:
root@botic:/# cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 8
rate: 44100 (44100/1)
period_size: 256
buffer_size: 4096

Music paused -
Code:
root@botic:/# cat /proc/asound/card0/pcm0p/sub0/hw_params
closed

The Botic kernel is loaded and operating in both situations.
 
Member
Joined 2004
Paid Member
In my system...

Music playing -
Code:
root@botic:/# cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 8
rate: 44100 (44100/1)
period_size: 256
buffer_size: 4096
Music paused -
Code:
root@botic:/# cat /proc/asound/card0/pcm0p/sub0/hw_params
closed
The Botic kernel is loaded and operating in both situations.

In my system the output for CHANNELS: is 2
PERIOD_SIZE: is 110
BUFFER_SIZE: is 1760

My question is should I change my settings to yours?
Is there a reason you have those settings?
I'd guess the "CHANNELS: 8" is that you are doing multi-channel amps?

What does the increased PERIOD & BUFFER do for you?

Thanks:)
 
Member
Joined 2007
Paid Member
Hi @ichiban! If I were you I would not bother changing a working configuration! You are correct, I use 8 channels in ALSA to run a stereo 3-way crossover on the BBB and then the 6 output channels go to individual amp channels and drivers. If you compare the buffer and period per channel, yours is more generous than mine.

I have played with varying buffer and period sizes in MPD and squeezelite, in order to make the player run smoothly at all sample rates. In doing so, one thing I have noticed - and this is just an impression based on sound - is that large and small buffers seem to sound the same. That was not the case back when my player/crossover computer was a typical PC. Back then, the system sounded 'cleanest' when the buffers were as tight as possible. I speculate that the nice isolation of the BBB from the DACs (Hermes) is responsible for this advantage. The sound remains clean even with large buffers and with the BBB CPU running up to ~90% capacity. Pretty nice! ;)
 
Member
Joined 2004
Paid Member
Hi @ichiban! If I were you I would not bother changing a working configuration!

If you compare the buffer and period per channel, yours is more generous than mine.

The sound remains clean even with large buffers and with the BBB CPU running up to ~90% capacity. Pretty nice! ;)

OK, I will leave well enough alone. Thank you for the reply. :)

One other question. Have you played around with distancing the BBB from the enclosure housing the DACs & IVs. Transporters? Just wondering if it would make a sonic difference at all.
 
Member
Joined 2007
Paid Member
OK, I will leave well enough alone. Thank you for the reply. :)

One other question. Have you played around with distancing the BBB from the enclosure housing the DACs & IVs. Transporters? Just wondering if it would make a sonic difference at all.

Yes, my BBB & DACs are in separate enclosures that are linked by teleporters. I soldered the teleporter connections directly to Cronus and, on the other end, to the B3se. Each connection is 2 cm or less in length... Soldered input to the B3s is the one point that I believe avoids some noise from entering the system. (I even used solid-core silver wire - admittedly overkill!). I heard that wifi dongles are noisy and should be isolated from the rest of the system. For anything else, there are much more knowledgable people to comment on questions re layout!
 
Just a quick note for anyone looking to add Squeezelite to Botic v4

ChrisMmm's cheat sheet guide here:
http://www.diyaudio.com/forums/twisted-pear/258254-support-botic-linux-driver-40.html#post4182051
works real well for getting up and running very quickly, but the name of the Botic card has changed in V4, so in the startup line

squeezelite -o hw:CARD=BOTICAudio -n Botic96 -a 16384:1024:: -u mIX -r 96000
This needs changing to be
squeezelite -o hw:CARD=Botic -n Botic96 -a 16384:1024:: -u mIX -r 96000
for Botic V4

then it all works nicely :)
cheers,
J
 
Continuing on my quest (see my posts 1510 / 1511) to get it working a few pages back I started all over again.

I first installed only the Botic driver on a standard Linux distro but did not get it working.
Now I installed the Botic distro with the V4 driver and copied it to eMMC.

The unexpected part was now that the /boot/uboot/uEnv.txt was empty so I still had to start from scratch to get the correct info in here.

With the previous setup you can see in post 1510 that I really did not know what I was doing but in the meantime I learnt a little more :D

I dit not use the "optargs" function but now I set uEnv.txt like this:
optargs=fixrtc snd_soc_botic.ext_masterclk=1 snd_soc_botic.serconfig=I--- snd_soc_botic.dai_format=16385 snd_soc_botic.clk_44k1=16394400

I still have to connect it to my ES9023 dac to see if it works now.
In the meantime I am using a second BBB to play music through I2S with only the internal clock in standard (non-Botic) configuration.

Is the information for the uEnv.txt sufficient or am I still missing something ?

And is there any advantage for using Botic V5 instead of V4 as I do not need DSD ?
I only play PCM up to 24/192.

Thanks in advance.
 
I dit not use the "optargs" function but now I set uEnv.txt like this:
optargs=fixrtc snd_soc_botic.ext_masterclk=1 snd_soc_botic.serconfig=I--- snd_soc_botic.dai_format=16385 snd_soc_botic.clk_44k1=16394400

This will not work.

As pointed out in #1513 by francolargo, the clock frequency for 44k1 in optargs have to be the multiple of 2457600. Here, the "multiple" means an integer, implying the working frequencies such as 1 x 24576000, 2 x 24576000, and so on...