• 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

With the change in firmware and changes to mpd.conf to match yours there's a big improvement but there still a few minor crackles when playing DSD.
Well, there may be a few tweaks as option, though I'm not sure which one will work for your current issue.

1. Assuming that your current mpd is 0.18.22-dsd-rt, you might try to change the realtime priority of mpd process by executing the shell script like below ( this is a mere example):
Code:
#!/bin/sh

### BEGIN INIT INFO
# Provides:          rtset
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Set RT priority at boot time
# Description:       Set RT priority at boot time
### END INIT INFO

rtset_start () {
#       chrt -f -p 53 `pgrep irq/24-ehci_hcd`
#       chrt -f -p 55 `pgrep irq/29-eth0`
        chrt -f -p 53 `pgrep cifsd`
        chrt -f -p 55 `pgrep irq/35-musb-hdr`
        chrt -f -p 53 `pgrep irq/57-4a100000`
        chrt -f -p 53 `pgrep irq/58-4a100000`
}


rtset_stop () {
#       echo default-on > /sys/class/leds/cubox:red:health/trigger
        sleep 1
#       echo none > /sys/class/leds/cubox:red:health/trigger
        echo "rtset close"
}

case "$1" in
    start)
        rtset_start
        ;;
    stop)
        rtset_stop
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 2
        ;;
esac
2. As you are connecting your BBB to B3SE, you can try direct I2S connection without combo384 to the DAC with the pin mapping indicated by miero as shown in this URL. This may be the best option.

3. You might want to install the latest botic7 kernel to a debian system, particularly to the debian stretch (testing) with later installation of official MPD (not supporting realtime option) from musicpd.org. The debian stretch image is available from this site with the instruction below the section of "Debian Testing (stretch)".

4. With the current system, you might want try to build your own MPD binary but this requires to install many libraries necessary for binary building. If you want to try this option, starting from the debian stretch with botic7 kernel will be far less stressful.

Regards,
 
For option 2, I recall Miero saying that a direct I2S connection between the BBB and DAC is not recommended since it might damage the BBB??

From bbb.ieero.com:
I do not recommend to use direct I2S or I2C connection between DAC and BBB. Such connection does not provide necessary protection to BBB. One should use something like cape with isolators. Otherwise be prepared that yout BBB might be destroyed.

If I try this, exactly what pins from the BBB connect to which pins on the B3SE?

This is the BBB pin mapping from Miero's site:
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}.


The input pins on the B3SE are :

GND
DCK
D1
D2



Another thing I noticed is that when I plug the Amanaero into my Windows PC and play PCM and DSD files through Foobar2000 they play perfectly (DSD is native, not DoP). So that makes me suspect the problem lies somewhere with my BBB setup which means the problem may not go away even with the Hermes/Cronus.

I'll have to try what you suggest in points 3 and 4 when I get more time.
 
For option 2, I recall Miero saying that a direct I2S connection between the BBB and DAC is not recommended since it might damage the BBB??
For a while after the introduction of botic driver by miero, I used this direct connection and experienced no problems. Later I interconnected the BBB and B3SE via a teleporter system from TPA, which I suppose works as a kind of isolator. Most recently, I'm using an actual isolator (iso7640fm) between the BBB and B3E when not using Hermes/Cronus .

If I try this, exactly what pins from the BBB connect to which pins on the B3SE?
Though Amanero has two clocks on board (44K1 and 48K), BBB has only one on-board clock (48k). So, you have to provide an external clock for 44k1. Having both of 44k1 and 48k external clocks will be most desirable.

The I2S/DSD pin mapping of BBB on the botic system is as follows:

for PCM
P9_30: Data
P9_29: LRCK
P9_31: BCK

for DSD
P9_41: DSDR (D2)
P9_30: DSDL (D1)
P9_31: BCK

P9_25: external clock input
P9_01 or 02: GND

You might notice that the PCM and DSD share P9_30 as DATA and DSDL, respectively. So, you have to switch the pin connection each time from PCM to DSD or vice versa. This is quite tedious and you need a 2:1 MUX like a 16-pin 74HC157 for this job as seen on the Hermes-BBB board by connecting the input selector pin (pin 1 of 74HC157) to P9_26 and the input enabler pin (pin 15) to GND (P9_01 or 02).

Using a breadboard will be quite convenient for this mapping and you can get those fixed output pins from the MUX for D1 (LRCK), D2 (DATA) and the pin from P9_31 for BCK to connect them to B3SE (via isolator or teleporter).

Similarly, if you have two external clocks, 44k1 and 48k, connected to another 2:1 MUX, the master clock frequency pertinent to the source can be automatically selected by connecting the selector pin of the MUX (pin 1) to P9_24 and the enabler pin (pin 15) to GND with the selected clock signal output to P9_25. If you have only a 44k1 clock, simple connection of clock output to P9_25 will be ok.

Another thing I noticed is that when I plug the Amanaero into my Windows PC and play PCM and DSD files through Foobar2000 they play perfectly (DSD is native, not DoP). So that makes me suspect the problem lies somewhere with my BBB setup which means the problem may not go away even with the Hermes/Cronus.

I'll have to try what you suggest in points 3 and 4 when I get more time.
You might want to try the disc image below which is a debian stretch with a 4.8.13-botic7-rc3 kernel and an mpd 0.20 I built. You need an 8GB SD card. dd if=./[downloaded].img of=/dev/sdx will be sufficient, though it takes a long time.

http://lydia.concorde.gr.jp/luke/debian_botic.img.gz (about 1.1GB)

Regards,
 
Member
Joined 2007
Paid Member
For option 2, I recall Miero saying that a direct I2S connection between the BBB and DAC is not recommended since it might damage the BBB??
Two thoughts:
I have experimented a good bit and never had a problem BUT I never powered down the BBB with the test rig attached and took extra care to prevent electrostatic discharge.

Proper isolation is a very desirable thing to have. While the ES9018 may be less affected than other dacs, I would always include isolation in any permanent setup.

Enjoy!
 
I tried building a new MPD 0.21 binary on the latest Debian stretch image with the 4.8.13-botic7-rc3 kernel and the problem's gone! No more popping and crackling while the music is playing!

The only issue that's left now is i hear a small pop when DSD files finish playing.

I had some problems getting MPD to run because it couldn't find mpd.conf although it was in /etc/. I just had to force it in mpd.service.
 
Last edited:
I tried building a new MPD 0.21 binary on the latest Debian stretch image with the 4.8.13-botic7-rc3 kernel and the problem's gone! No more popping and crackling while the music is playing!
That's a good news to me.

I had some problems getting MPD to run because it couldn't find mpd.conf although it was in /etc/. I just had to force it in mpd.service.
Here is a solution.

1. Edit the /lib/systemd/system/mpd.service and change the line of "ExecStart=/usr/bin/mpd --no-daemon $MPDCONF" to "ExecStart=/usr/bin/mpd --no-daemon /etc/mpd.conf".
2. If the mpd binary you built is in /usr/local/bin, then also change /usr/bin/mpd to /usr/local/bin/mpd in the line above.
3. Then link
/lib/systemd/system/mpd.service to /etc/systemd like below:
ln -s
/lib/systemd/system/mpd.seervice /etc/systemd/system/mpd.service
4. Finally do systemctl daemon-reload and then restart mpd (systemctl start mpd.service).

BTW, I assume that you've already enabled mpd.service (systemctl enable mpd.service). For details, you might check my previous post (
#1982).

Regds,
 
Tried the latest firmware. Same thing.

I thought I was outputting native DSD but doing a cat /proc/asound/Amanero/pcm0p/sub0/hw_params give me this output:


access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 352800 (352800/1)
period_size: 128
buffer_size: 131072

Earlier posts in this thread seem to indicate that Linux can't output native DSD to Amanero.

I'll just have to try I2S from the BBB.
 
Earlier posts in this thread seem to indicate that Linux can't output native DSD to Amanero.
The firmware 1099c and 1099be are intended to support native DSD (up to DSD512, but currently limited to DSD256) on linux. Have a look at the discussion here.
I'll just have to try I2S from the BBB.
That would be the right track, particularly to be concordant with this thread. :) BTW, it is possible to play native DSD512 with I2S connection by the botic system on BBB.

Regards,
 
Hello gents and Miero.

Huge thanks for the Botic driver dev.

I have been using miero's precompiled distro for a while, outputting I2S to a DDDAC.

Last weekend I made it to split left and right data, with right justified data for a direct connection to the PCM1794 chip (http://www.diyaudio.com/forums/digi...pcm1794-waveio-usb-input-471.html#post4361633).

First playback was sick, with weired noise only at playback.
I changes snd_soc_botic.blr_ratio= from 32 to 64, and the noise has gone.

BUT the songs lack their top end : high frequencies aren't reproduced anymore.
For example it's obvious with Ray Lamontagne's "God Willin' and the Creek Don't Rise" song.
You only hear a faint reverb of the third instrument (higher than battery and guitar), the one you hear in the first seconds.

I pretty much suspect a software problem, especially from snd_soc_botic.blr_ratio, which seems to drive the whole music reproduction.
Note that I just upgraded to Volumio 2 with embedded Botic driver, edited /boot/uEnv.txt and created the botic split in /etc/asound.conf. Problem stays.

Anybody could help me troubleshooting ?
 
Hello gents and Miero.

Huge thanks for the Botic driver dev.

I have been using miero's precompiled distro for a while, outputting I2S to a DDDAC.

Last weekend I made it to split left and right data, with right justified data for a direct connection to the PCM1794 chip (http://www.diyaudio.com/forums/digi...pcm1794-waveio-usb-input-471.html#post4361633).

First playback was sick, with weired noise only at playback.
I changes snd_soc_botic.blr_ratio= from 32 to 64, and the noise has gone.

BUT the songs lack their top end : high frequencies aren't reproduced anymore.
For example it's obvious with Ray Lamontagne's "God Willin' and the Creek Don't Rise" song.
You only hear a faint reverb of the third instrument (higher than battery and guitar), the one you hear in the first seconds.

I pretty much suspect a software problem, especially from snd_soc_botic.blr_ratio, which seems to drive the whole music reproduction.
Note that I just upgraded to Volumio 2 with embedded Botic driver, edited /boot/uEnv.txt and created the botic split in /etc/asound.conf. Problem stays.

Anybody could help me troubleshooting ?

Your DAC's chips suport max 24bit resolution. Have you specified 24-bit format in the ALSA params of your player?
 
Hi G600,

I am using botic-split a long time already.

snd_soc_botic.blr_ratio=64 should be the right value.

But check if volumio 2 is setting the values correctly.

cat /sys/module/snd_soc_botic/parameters/dai_format should return "16386"

cat /sys/module/snd_soc_botic/parameters/blr_ratio should return "64"

During playback you can check the format alsa is using with:

cat /proc/asound/card0/pcm0p/sub0/hw_params

format should be: S24_LE

This is for mpd, some other players work better with the 32bit format

My /etc/asound.conf now looks like this:

pcm.!default {
type plug
slave {
pcm botic-split
channels 2
}
}

ctl.!default {
type
hw card 0
}

pcm.botic-split {
type route;
slave {
pcm "hw:0,0"
channels 4
}
ttable.0.0 1;
ttable.1.1 1;
ttable.0.2 1;
ttable.1.3 1;
}
 
I run the dlna player from Computer Audiophiles on my BBB which uses the wheezy distribution of Debian and MPD. I like to connect a I2S DAC and play all bitrates of FLAC without downsampling so I searched and found this Botic driver. Is it possible to install the Botic driver on my currently installed image? If yes, can anyone point me to the correct version and docs on how to install and configure it?
 
So I tried to update to the latest version(?), to see if I could get a more stable MPD (not sure if it actually is MPD that is to blame, but music tends to drop out for long periods at the time, and MPD disappears from 'top' in Linux), but now I get no sound at all.

It seems that there must be a setting somewhere turning the sound cards on/off?

This is the error I get: ERROR: Failed to open audio output

uname gives this: 4.5.0-botic7-rc1

I'm using DDDAC with waveio, and everything was working great before, except for the dropouts that is ...

Any help would be appreciated greatly!
 
Member
Joined 2007
Paid Member
OK, I rolled back to start; going back to "Linux botic 3.18.7-botic4 #1 PREEMPT" which seems to work quite well. What do I miss by using this, and not the newest versions?

If MPD is your only player software and the BBB is only acting as a player, you miss nothing IMHO - except dropouts... The newer updates allow compatibility with other programs that depend on newer operating systems.
 
If MPD is your only player software and the BBB is only acting as a player, you miss nothing IMHO - except dropouts... The newer updates allow compatibility with other programs that depend on newer operating systems.

Thanks! I'd like to keep it as simple as possible, so MPD and YMPD works well for me. I'm still haven't figured out why I get these time outs, though. Maybe something wrong with my power supply (the main I mean) maybe?