• 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

Botic driver for linux 5.0.7 with ES9018K2M support

Since I recently bought a ES9018K2M DAC PCB board I hacked together a driver for it together with an DTS overlay so that it can be used together with the Cronus module and a BBB.

The github repo (GitHub - coroner21/linux-am33xbot: Arch Linux ARM Kernel with botic patches) was updated also to linux version 5.0.7 in addition.

If you have an ES9018K2M-based DAC and want to use it with BBB-Cronus just connect its I2C to the isolated I2C header on the Hermes board and make sure that you enable the ES9018K2M device tree overlay in boot.txt (see instructions in github). Afterwards you will be able to control the DAC volume and filter settings using ALSA mixer.
 
Member
Joined 2007
Paid Member
Since I recently bought a ES9018K2M DAC PCB board I hacked together a driver for it together with an DTS overlay so that it can be used together with the Cronus module and a BBB.

Christian,

Thank you for this contribution! We need the same for the ES90X8PRO DACs as well! Plus, in the (I hope 'near') future, it will be useful to have an overlay for I2C control by BBB and other Linux SBCs that can supply ES90X8 DACs via USB. [I am now building a USB->Buffalo3Pro setup, which will allow many options for the music source. The convenience of linking alsamixer to DAC volume control via I2C is very worthwhile, IMO. I'll be starting with a RPi as USB source.]

I would be delighted to contribute but I only use Linux for the hobby of high resolution audio, so my experience is limited. Still, I am interested in broadening and simplifying control interfaces for the higher-end ESS chips, and any guidance on adapting your code from GitHub would be appreciated. [I'm 'functional' with Python and lost with C! :p Can a device overlay be written in Python?]

Best,

Frank
 
Last edited:
Hi Frank,

This should be easier than you think in my view. Just copy what I did for the es9018k2m chip (src/linux-5.0/sound/soc/codecs/es9018k2m.c) and adapt it as needed for the es90X8 pro chips. If you can work with Python you have a general feeling for programming therefore having a look at the working C code and adapting it to your needs should be possible... In the end it is not much more than knowing the register and value combinations for the different functions and defining the respective controls accordingly.

Regarding device tree: This is just a file that specifies which hardware is there on the ARM platform and is required to enable direct loading of the drivers. This is actually easier than python and C and would be the last step which just makes sure that your driver is actually loaded in the end. Have a look at bb.org-overlays/BOTIC-ES9018K2M-00A0.dts at master * coroner21/bb.org-overlays * GitHub for the es9018k2m device tree overlay.
 
Member
Joined 2007
Paid Member
Christian,

Thanks for the encouragement! When the time arrives (4-5 weeks with luck) I will take this on and test your overlay on a backup BBB - then see whether I can adapt it for the RPi. My son 'does C' and the current batch project includes a Pi-driven USB DAC for him. So I'll have help. I envision an overlay that just manages on-chip volume and setup registers, with a choice between synchronous vs. asynchronous operation. Everything else for our specific project I would prefer to do in Python; that includes a wifi/TCP control interface (already running on my current rig) and 'old-school' front panel volume control using a rotary encoder.

When effort begins on that objective I'll start a new thread and post a link to it from here.

Cheers!
 
Hi,

I'm hoping someone can help me get the BBB with Botic working.
I've been trying to migrate from a RPi3+Amanero (via usb) to the BBB+Hermes for DSD512 playback, but I can't seem to have any music play via the BBB with Botic.

My setup is the following: BBB - Hermes (with small u.fl adapter) - McFifo (connected SCK, D1, D2 and MCLK slave from the McFifo to the Hermes). I used a Botic with Volumio image from the Volumio.org forums from 2018 on an SD card. The BBB boots correctly and I'm able to set Volumio with its web interface to use Botic for native DSD.

The uEnv.txt file in /boot is modified with the following lines:
Code:
optargs=snd_soc_botic.ext_masterclk=3 snd_soc_botic.serconfig=DD-- snd_soc_botic.clk_44k1=90316800 snd_soc_botic.clk_48k=49152000 snd_soc_botic.dsd_format_switch=1

Checking the parameters I get the correct settings:
Code:
volumio@hermesbbb:/boot$ for i in /sys/module/snd_soc_botic/parameters/*; do echo "* $i"; cat $i; done                                                                                  
* /sys/module/snd_soc_botic/parameters/blr_ratio
64
* /sys/module/snd_soc_botic/parameters/clk_44k1
90316800
* /sys/module/snd_soc_botic/parameters/clk_48k
49152000
* /sys/module/snd_soc_botic/parameters/dai_format
16385
* /sys/module/snd_soc_botic/parameters/dsd_format_switch
1
* /sys/module/snd_soc_botic/parameters/ext_masterclk
3
* /sys/module/snd_soc_botic/parameters/pinconfig
default
* /sys/module/snd_soc_botic/parameters/serconfig
DD--

When I try to play a file from Audirvana to the BBB, it just stays at 0:00 without playing anything.

Is there a step I missed when setting up the BBB?

Thanks
 
Member
Joined 2007
Paid Member
Hi,

Is there a step I missed when setting up the BBB?

Thanks

The Volumio project was fairly fast-moving when it adopted the botic kernel, and the distributions quit working within a few months due to feature 'advances' for other single-board platforms than the BBB. Not to fret: there are other very adequate interface systems that the BBB will run using MPD or Squeezelite. Consider starting with a fresh non-volumio distro...

I can't offer granular support for DSD, but suggest you start with playing PCM files from the command line. The 'verbose' option in 'aplay' gives a lot of good debug information. Yes it's a pain to manually enter all of the file attributes of the test music, but you'll get worthwhile feedback on the basic data path. Once that's nailed down, you can address the more 'esoteric' refinements to achieve DSD512.
 
I use Audirvana to upsample to DSD512 on the macbook. Audirvana then sends the upsampled stream to Volumio which acts as a UPnP renderer.
In Volumio you can specify the output, depending on what is connected to it. In my case, Audirvana sees Volumio in its UPnP list and Volumio recognizes Botic as the audio output.

It seems that despite all this, the BBB isn't receiving the any data (Volumio playback doesn't show anything being loaded, and Audirvana doesn't show the music file being played).
 
This is what I get with 'arecord -L':
Code:
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Botic
    Botic, 
    Default Audio Device
sysdefault:CARD=Botic
    Botic, 
    Default Audio Device
dmix:CARD=Botic,DEV=0
    Botic, 
    Direct sample mixing device
dsnoop:CARD=Botic,DEV=0
    Botic, 
    Direct sample snooping device
hw:CARD=Botic,DEV=0
    Botic, 
    Direct hardware device without any conversions
plughw:CARD=Botic,DEV=0
    Botic, 
    Hardware device with all software conversions

and with 'aplay -L':
Code:
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Botic
    Botic, 
    Default Audio Device
sysdefault:CARD=Botic
    Botic, 
    Default Audio Device
dmix:CARD=Botic,DEV=0
    Botic, 
    Direct sample mixing device
dsnoop:CARD=Botic,DEV=0
    Botic, 
    Direct sample snooping device
hw:CARD=Botic,DEV=0
    Botic, 
    Direct hardware device without any conversions
plughw:CARD=Botic,DEV=0
    Botic, 
    Hardware device with all software conversions

The only thing that changed in my hardware is removing the Amanero and connecting the BBB with Hermes-BBB.
Will try to add a music file on the SD card and play it.
 
Member
Joined 2007
Paid Member
ALSA, which manages the digital streams, doesn't recognize any Volumio inputs that the BBB could output to the DAC. If Volumio can be configured to output to 'hw:0,0', give it a try. Is there some kind of configuration file for that? Sorry I don't know more... You really must confirm that the DAC is working. I suggest 'speaker-test -c 2'.

F.
 
I get an error with 'speaker-test -c 2':
Code:
speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy

The problem is that the McFifo isn't receiving anything since it's Empty LED is on and the DSD and Lock status LEDs remain off.
In Volumio, I can choose the audio output device, and the only option I have is "Botic".
 
It seems the problem is the Hermes isolator between the BBB and McFifo. Once removed and the BBB connected, the speaker-test works and McFifo locks onto a signal signal.

Only problem now is that once I stream music from Audirvana, the clock selection on the McFifo+DualXO goes a little crazy and can't seem to pick one of the 2 clocks.
 
I was streaming DSD512 from Audirvana to the RPi3 running Volumio via UPnP (and connected to Amanero via USB). It was working (confirmed that the McFifo was receiving a DSD signal and not downsampled PCM from RPi3). The problem with that setup is that the latest Amanero firmware for Linux DSD512 is still a little buggy. Lately I've been getting high frequency distortion every few minutes, requiring me to pause the music and restart again. I figured that the BBB with Botic and Hermes would be more stable, but it's clearly not as straightforward.