• 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

Hi, Fedor.
I'm using HQPlayer for PCM-DSD512 online conversion, server is on ThreadRipper 1950X processor. BBB is only receives the stream and passes it to the DAC (NAA in term of HQPlayer design).

Best regards,
Vit.

Thank you for the answer.

This HQPlayer deal is new to me, sorry, so just to get it straight, is this how it works?

We have two devices connected via network:
1. powerful x64 PC running linux (or windows) where HQPlayer is running and resampling all the media files to DSD512, and HQPlayer output is set to "NetworkAudioAdapter" with the IP of BBB
2. BBB running image of Network Audio Daemon: 3.5.4, to which Botic kernel is applied
 
Thank you for the answer.
We have two devices connected via network:
1. powerful x64 PC running linux (or windows) where HQPlayer is running and resampling all the media files to DSD512, and HQPlayer output is set to "NetworkAudioAdapter" with the IP of BBB
2. BBB running image of Network Audio Daemon: 3.5.4, to which Botic kernel is applied

Yes. As for me - BBB with Debian Stretch + Botic kernel + NAA deb package (3.5.4) installed.
BBB's processor load ~ 35% while playing DSD512.
 
Hi All,
I've started working with Botic, but I've had no success so far. Perhaps someone can point out where I've gone wrong?

I have installed, on a SD card, a fresh installation of bone-debian-9.4-lxqt-armhf-2018-06-01.
I then booted into it and installed the package linux-image-4.8.13-botic7-rc3_1_armhf
This placed a new kernel, system.map, config file, and initrd image in /boot, and created a directory called 4.8.13-botic7-rc3 under /boot/dtbs. It also modified the uEnv.txt file so that uname_r pointed to the new kernel.

The Botic kernel boots with no problems - I now see:
debian@beaglebone:~$ uname -a
Linux beaglebone 4.8.13-botic7-rc3 #1 PREEMPT Sat Dec 10 01:35:51 CET 2016 armv7l GNU/Linux


I then modified uEnv.txt to put the Botic configuration into the kernel command line. This worked - and I now see:
debian@beaglebone:~$ cat /proc/cmdline
console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait fixrtc coherent_pool=1M net.ifnames=0 snd_soc_botic.pinconfig=default snd_soc_botic.ext_masterclk=0 snd_soc_botic.dsd_format_switch=0 snd_soc_botic.serconfig=IIII snd_soc_botic=dai_format=16385 snd_soc_botic.blr_ratio=64 snd_soc_davinci_mcasp.mute_pin=-1


However, there is no /sys/module/snd_soc_botic directory, and ALSA does not see any audio interfaces:
debian@beaglebone:~$ cat /proc/asound/cards
--- no soundcards ---


Does anyone know what I have done wrong, or what I need to do next?


On a separate question, I notice that the HDMI output is now disabled - does anyone know how to enable it again?

Your patience is much appreciated - I'm doing my best to make sense off this, but I am struggling.
 
1) I'm not sure if HDMI drivers are enabled in botic kernel, I guess they are not.
2) you need to load a proper DTB file in uEnv.txt file, otherwise driver will not be loaded:


dtb=am335x-boneblack-botic.dtb




In the next driver release, there will be DTB overlays, so you would be easily able to use HDMI. But now, there it is not, unless you will compile your own DTB file.
 
Thanks Miero,
I'd assumed that it was picking up which .dtb to use based on the uname_r entry, as this seemed to be selecting kernel, system map and everything else - I was wrong!
I will try this tomorrow.

Eventually I will need to get HDMI working, but for now just having an I2S interface will allow me to prove my hardware.
 
Miero, good afternoon!
In the current driver I use MPD when rewinding a track or changing a track, the DAC perceives as a signal loss, and some DACs emit a click of the relay, sometimes clicks can also be heard on the speakers / headphones.
For example, if you play through Logitech Media Server - click data is not heard,
But MPD is much more convenient.
Tell me please, in the new driver, you can make no clicks, so that the signal is not lost when rewinding.
Thank you
 
Miero: Good news - thanks to your help, it appears to be working. I've not actually tried connecting to the DAC/ADC yet, but all the signals look as expected (actually, it's running at 96k, not 48, but I think I know why).

I've had no success getting HDMI to work, yet, but I'll keep working on it.
 
Sorry for the delay, here it is.

I'd like to point out that I'm not a Linux guru, so some commands in this instruction may be redundant or doing nothing :)

1. Download latest Debian image for BBB. I've used this one - http://debian.beagleboard.org/images/bone-debian-9.3-iot-armhf-2018-03-05-4gb.img.xz

2. Write it to the SD card using Win32DiskImager, if on Windows. Should be something similar for MAC

3. It may be a good time to expand the partition to which the image was written. I've used Partition Guru, as it can work with SD cards and Linux file systems.

4. Plug SD card into the BBB, connect the ethernet cable, and power on. From now on I'm using connection to BBB over SSH by using Putty.

5. The default login-password is debian/temppwd. One can use these credentials all the way, but I was too lazy to type sudo on every command, so I've just enabled root:



6. Enable root over SSH:



7. Download and install latest Botic:


8. Edit uEnv.txt


Then


9. Prior to compiling MPD, there are some dependencies that must be installed:



10. Download MPD (the files will be downloaded into your home directory, so if under root, it will be in "root" dir):
Either from official site, where tested versions are stored:

Or from GitHub, where there is a latest code (probably would need to install git, automake and autoconf first - "apt-get install git automake autoconf"):


11. Now comes the fun part:


Here I've disabled almost all plugins, except for the ones that are needed for music reproduction (I've tried experimenting with Tidal, but the plugin is still beta, so didn't work).
Please note, that if you'll want to enable some of the plugins, it's quite possible that you will need to install additional libraries (step 9) to support this plugin.



Now this command will take a lot of time, something like 20-30 minutes, since our BBB is not really fast (I know that you could compile it on your desktop PC using cross-compiling, but just didn't have time to research this any further)

So after it compiles succesfully, doing



12. Now we need to create all the directories and files for MPD to work:


13. Also, we need a user named "mpd":


14. Then we need a startup script (), it should be placed in /etc/init.d directory (named "mpd" in attached zip)

15. Make this script executable, and update main startup script, so that our "mpd" script will launch after reboot:


16. We need to grant permissions for our mpd user to change the files in /run/mpd/, so we need to put "mpd.conf" into /etc/tmpfiles.d/ (it's in the attached zip, it's not the config of mpd, it's some script that runs on system startup)

17. We need to enable mpd.service daemon:


18. Also, you will need to configure your mpd.config with music directory and output device:


19. Reboot, and mpd should work. Try to connect to it via some client app.


I think this is it. I've omitted the setup of network interfaces (it's DHCP by default, but you may need to change it to static or wifi, etc.), shares and mounts, as this is all varies between users.

Troubleshooting:

there are several places where something can go wrong:
1. Installing the dependencies. Well, we all know that Linux is better than Windows in all possible ways (at least that's what Linux guys tell us :)) but it gets really nasty if some dependency depends on some lib, and this lib conflicts with other lib, and so on. So when I'm presented with some error when doing "apt-get install" I would just google the error message, as I don't know better. But, if using only the stable repository (default config of apt-get) in the sources list - it should not be a problem.

2. When running configure - if there are errors, it would mean that some dependency lib is not installed, and you should run apt-get install <lib>

3. When building - now this is also tricky, and I would just google if anything goes wrong.

4. When starting mpd service - you can test starting the mpd by running "service mpd start" if there are some errors, you could see detailed info by running "systemctl status mpd.service", and then again, google :)

Not much of a troubleshooting section I guess :)

That's it, the scripts in the attached zip are coming from mpd Debian package, so they are not mine :)

Thanks,
Fedor

PS. I forgot to mention - I was using WinSCP to upload and edit files on the BBB. It's much easier than doing editing via nano.

Very good!
But now, equally easy instructions about installing V1.8 or higher of Squeezelite are missing... for those who want to feed BBB with a DSD-converted stream from LMS. Old posts seem a bit outdated...
Could please someone provide us with those too?
 
In addition to the squeezelie installation covered #1947 you may have to take additional steps. Since the latest Debian distributions use systemd instead of (described #1947) init system in case of issues in newer distributions replace /etc/init.d/squeezelite file with /etc/systemd/system/squeezelite.service
Follow the next steps:
Code:
##remove init script
rm /etc/init.d/squeezelite

##create systemd service script
touch /etc/systemd/system/squeezelite.service
chmod  -R 644 /etc/systemd/system/squeezelite.service

##copy and save text below to /etc/systemd/system/squeezelite.service
[Unit]
Description=squeezelite
Wants=network-online.target
After=network-online.target multi-user.target

[Service]
Type=simple
EnvironmentFile=/etc/systemd/system/squeezelite.arg
ExecStart=/usr/local/bin/squeezelite -o hw:CARD=Botic,DEV=0 -p 55 -n BBB -C 1
User=squeezelite

[Install]
WantedBy=multi-user.target

## reload the services
systemctl daemon-reload

## analyze the squeezelite options
squeezelite -?

## and adjust 'ExecStart=' line from the script to your needs
 
In addition to the squeezelie installation covered #1947 you may have to take additional steps. Since the latest Debian distributions use systemd instead of (described #1947) init system in case of issues in newer distributions replace /etc/init.d/squeezelite file with /etc/systemd/system/squeezelite.service
Follow the next steps:
Code:
##remove init script
rm /etc/init.d/squeezelite

##create systemd service script
touch /etc/systemd/system/squeezelite.service
chmod  -R 644 /etc/systemd/system/squeezelite.service

##copy and save text below to /etc/systemd/system/squeezelite.service
[Unit]
Description=squeezelite
Wants=network-online.target
After=network-online.target multi-user.target

[Service]
Type=simple
EnvironmentFile=/etc/systemd/system/squeezelite.arg
ExecStart=/usr/local/bin/squeezelite -o hw:CARD=Botic,DEV=0 -p 55 -n BBB -C 1
User=squeezelite

[Install]
WantedBy=multi-user.target

## reload the services
systemctl daemon-reload

## analyze the squeezelite options
squeezelite -?

## and adjust 'ExecStart=' line from the script to your needs


Thank you,
you're very kind!