• 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,
Does botic support HDMI video output?
I've just seen this video:
https://www.youtube.com/watch?v=WP3q1-ywD-0
and thought that maybe for those using squeezelite player it might be worthwhile to tray Jivelite software with botic and 7" 800x480 touchscreen connected to bbb via HDMI?

Quick internet research shows that here are couple of available 7" Hdmi touch screens for example:
Raspberry pi display lcd and
7inch HDMI LCD (B) + Bicolor case

Potential issues:

  • Need USB driver for touch functionality, (it would need USB connection and external driver; for example this and this)
  • Screen current demand (screens are supplied via USB; probably need external power supply)
  • Influence on sound quality (can be adversely affected by attaching HDMI screens and USB?)
  • Performance (does bbb has enough CPU power to run Jivelite?)
What do you think?
 
HQ Player NAA - No Success

Today I finally found some time to explore again configuring my BBB/Botic as an HQPlayer NAA but no joy I'm sorry to report.

Here's what I did;

1. I did a clean install of the latest Debian Stretch from here;

BeagleBoardDebian - eLinux.org

2. Installed NAA and Botic;

wget http://ftp.uk.debian.org/debian/pool/main/g/gcc-6/gcc-6-base_6.1.1-6_armhf.deb
sudo dpkg –i gcc-6-base_6.1.1-6_armhf.deb
wget http://ftp.uk.debian.org/debian/pool/main/g/gcc-6/libstdc++6_6.1.1-6_armhf.deb
sudo dpkg –i libstdc++6_6.1.1-6_armhf.deb
wget https://www.signalyst.eu/bins/naa/linux/stretch/networkaudiod_3.4.0-32_armhf.deb
sudo dpkg -i networkaudiod_3.4.0-32_armhf.deb
wget http://repo.ieero.com/botic/pool/ma...age-4.5.0-botic7-rc1_4.5-botic7-rc1_armhf.deb
sudo dpkg –i linux-upstream/linux-image-4.5.0-botic7-rc1_4.5-botic7-rc1_armhf.deb

sudo nano /boot/uEnv.txt
# check if there is a line starting with dtb= and change it to dtb=am335x-boneblack-botic.dtb

sudo sync

sudo reboot

This is how things looked afterwards;

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


The output the NAA daemon, networkaudiod, reports;

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


miero, as you've previously reported success with Botic NAA,

http://www.diyaudio.com/forums/twisted-pear/258254-support-botic-linux-driver-158.html#post4694601

can you advise where I'm getting it wrong?

TIA

Ray
 
Hi,
Does botic support BCLK/MCLK=1/1 ratio?
Or can I use 22.5792/24.576Mhz clocks to play files with sample rate 352,8/384kHz?
Regards,

Bern - in the first post of the Cronus thread, Russ says:

The re-clocking section makes use of a Potato semi FlipFlop. When using a FF in this way the frequency of the clock input supplied to the FF must be at least 2 x any signal. For this reason ~22-24Mhz family clocks can be used for PCM signals up to 192Khz - for up to 384Khz you must double that. The device is capable of up to 768Khz PCM.

So probably not.
 
After a steer from Jussi, I now have my BBB/Botic running as an HQPlayer NAA for both PCM and DSD. I just had to update libasound2 to version 1.0.29 or later.

So Here's an updated set of instructions if you want to try it;

1. I did a clean install of the latest Debian Stretch image (2016-06-09) from here;

BeagleBoardDebian - eLinux.org

2. Installed NAA and Botic;

wget http://ftp.uk.debian.org/debian/pool....1-6_armhf.deb
sudo dpkg –i gcc-6-base_6.1.1-6_armhf.deb
wget http://ftp.uk.debian.org/debian/pool....1-6_armhf.deb
sudo dpkg –i libstdc++6_6.1.1-6_armhf.deb
wget https://www.signalyst.eu/bins/naa/li...0-32_armhf.deb
sudo dpkg -i networkaudiod_3.4.0-32_armhf.deb
wget http://repo.ieero.com/botic/pool/mai...-rc1_armhf.deb
sudo dpkg –i linux-image-4.5.0-botic7-rc1_4.5-botic7-rc1_armhf.deb

3. Updated libasound2;

wget http://ftp.uk.debian.org/debian/pool/main/a/alsa-lib/libasound2-data_1.1.1-1_all.deb

sudo dpkg –I libasound2-data_1.1.1-1_all.deb
wget http://ftp.uk.debian.org/debian/pool/main/a/alsa-lib/libasound2_1.1.1-1_armhf.deb
sudo dpkg –I libasound2_1.1.1-1_armhf.deb

sudo nano /boot/uEnv.txt
# check if there is a line starting with dtb= and change it to dtb=am335x-boneblack-botic.dtb

sudo sync

sudo reboot

Media is upsampled from PCM FLAC files (mostly 16bit 44.1KHz) with HQPlayer.

I've successfully played music on the BBB/Botic/NAA at rates up to 192KHz PCM and up to DSD256 (mostly).

PCM 384KHz won't play properly, lots of dropouts and noises.

DSD256 is a little marginal, mostly it's fine but I experience very occasional dropouts. I suspect DSD256 is on the edge of what the BBB can handle as I don't get the dropouts with my other DAC projects, which use an Intel NUC as the NAA computer and connect to the DACs via USB. Maybe a trimmed down or realtime Linux distro would help?

Anyway, it's good stuff - excellent sound quality.

Thanks to miero and Jussi for making this possible.

Ray
 
Member
Joined 2007
Paid Member
After a steer from Jussi, I now have my BBB/Botic running as an HQPlayer NAA for both PCM and DSD. I just had to update libasound2 to version 1.0.29 or later.
...

DSD256 is a little marginal, mostly it's fine but I experience very occasional dropouts. I suspect DSD256 is on the edge of what the BBB can handle as I don't get the dropouts with my other DAC projects, which use an Intel NUC as the NAA computer and connect to the DACs via USB. Maybe a trimmed down or realtime Linux distro would help?

Anyway, it's good stuff - excellent sound quality.

Thanks to miero and Jussi for making this possible.

Ray

Congratulations, Ray! While DSD256 is running, can you run 'top' (perhaps from a separate login)? It would be interesting to see how the NAA loads the CPU, and consider whether increasing its priority might help with dropouts.
 
Congratulations, Ray! While DSD256 is running, can you run 'top' (perhaps from a separate login)? It would be interesting to see how the NAA loads the CPU, and consider whether increasing its priority might help with dropouts.

Thanks Frank.

I've been running top for a while; networkaudiod is always the top CPU using process at around 15-18% with nothing else showing as a significant load. When I get the dropouts the networkaudiod CPU load goes to 65-85% for a short time.

networkaudiod priority = 10 and its nice number = -10.

Ray
 
Member
Joined 2007
Paid Member
Thanks Frank.

I've been running top for a while; networkaudiod is always the top CPU using process at around 15-18% with nothing else showing as a significant load. When I get the dropouts the networkaudiod CPU load goes to 65-85% for a short time.

networkaudiod priority = 10 and its nice number = -10.

Ray

Seems like a challenge! I'm rather new to this but curious if it would help to set the nice number at -20. I'm glessing not, based on the number of other processes at 0/-20. But depending on what else the system is doing, maybe it would help to set networkaudiod priority somewhere slightly less than zero using 'chrt'? ...hoping you can find a path beyond this drawback... :)
 
Member
Joined 2007
Paid Member
Is the kernel preempt-rt enabled?

I don't know a direct query, but I believe the following is evidence that preempt-rt is enabled.

After I start a program like SoX using 'chrt -f 45 sox...', I can get the following report:
Code:
root@beaglebone:/# chrt -p [sox pid]
pid 582's current scheduling policy: SCHED_FIFO
pid 582's current scheduling priority: 45

Thanks for your attention to this!
 
Is the kernel preempt-rt enabled? Without such, there could be increased latencies. How does the networkaudiod output look like when started for DSD256?

How do I find out if the kernel is preempt-rt enabled?

This is what uname -a shows me;

Linux arm 4.5.0-botic7-rc1 #1 PREEMPT Tue May 17 00:51:35 CEST 2016 armv7l GNU/Linux

Separately, I used renice to set networkaudiod niceness to -20 and that improved things.

Ray
 
All good then?

Better, but not perfect. Still some dropouts, which are shorter and associated CPU peaks lower.

If not, you can try using 'chrt' to make networkaudiod "naughty". ;) [Nauti?]

I was looking into 'chrt' and will try it later. 'renice' and 'chrt' are interactive commands and it would be better to start the process with the required runtime attributes; is that possible or do I need a small script?


Nah! I'm a good boy I am!:p
 
Member
Joined 2007
Paid Member
I was looking into 'chrt' and will try it later. 'renice' and 'chrt' are interactive commands and it would be better to start the process with the required runtime attributes; is that possible or do I need a small script?

I should really get going with this stuff but unfortunately it must remain below the top of the 'to-do' list for a while more. Thus, it is a great service for you to be blazing the trail. :)

I assume networkaudiod normally runs as a daemon. If so, then it will probably have a startup script in /etc/init.d, which can be edited once appropriate settings are found.

The command 'chrt' can be used ahead of other program calls to set the priority with which they run. On my BBB I sometimes use USB input to an single process of SoX that executes both 'record' and 'playback' to ALSA. With the default priority that process ran very badly, but when I increased the priority it became rock solid. So I encourage you to try different priorities using the command line, and hopefully you will find a configuration that works. Then the init.d script can be edited to start up the daemon using whatever worked from the command line.

Here is the command that works on my BBB running Debian Jessie.
Code:
chrt -f 45 sox --buffer 2048 -r 48000 -c 2 -t alsa hw:1,0 -t alsa plug:filter1
This sets the priority of SoX at '45', and keeps it above system interference. In your experiments you can use 'top' to check where networkaudiod falls in the priority sequence among processes, which is all that matters. So my suggestion is to try 'chrt -f <priority number from 0 to 99> <your normal command line to start the process>'. If something works then we can deal with making it start that way as default.

Cheers,

Frank
 
An update on my BBB/Botic/NAAadventure...

I set the networkaudiod process to 'nice' value of -20 and priority to 'rt' (FIFO) but I'm still experiencing occasional dropouts with DSD256. DSD128 and PCM up to 192KHz seem OK. DSD256 playback is fine most of the time, I'm getting a dropout every couple of minutes or so (typically once or twice during an average length song) .

I've been monitoring using 'top' on the BBB and the Windows 10 performance monitoring tools on the HQPlayer computer. On the HQPlayer computer the dropouts show as a 'glitch' on the network and cpu graphs.

To try and isolate the problem to the BBB I've been doing the same monitoring on my other NAA setup, which uses a more powerful Intel NUC device (1.6GHz processor and Gigabit network port). The NUC drives a USB DAC. Apart from the NUC replacing the BBB everything else is identical, even the music tracks. On the NUC 'top' is telling me that cpu load is around 3-4% and on the HQPlayer computer the cpu and network graphs are all but flat lines with absolutely no glitches.

I believe that is telling me that the problem is with the capability of the BBB. I'm wondering if the issue is network related rather than cpu; the BBB has a 100Mb network interface and DSD256 presents a constant data stream of 24-25Mbps so perhaps my initial conclusion that DSD256 is marginal on the BBB was correct.

Any ideas/suggestions?

Ray
 
I believe that is telling me that the problem is with the capability of the BBB. I'm wondering if the issue is network related rather than cpu; the BBB has a 100Mb network interface and DSD256 presents a constant data stream of 24-25Mbps so perhaps my initial conclusion that DSD256 is marginal on the BBB was correct.

Any ideas/suggestions?

Ray

Hi Ray,

First of all, thank you for giving me a chance to try HQP with NAA using Botic system. Out of curiosity I followed your instruction skipping installation of gcc-6-base and libstdc++6 after making a basic debian-stretch system and proceeded directly to installation of botic image and NAA with update of libasound2. After that, I confirmed the Botic system was well recognized as NAA on the setting panel of HQP running on Ubuntu Desktop as shown below. BTW this Ubuntu is virtually running via Parallels Desktop on my MacBook.

Despite this limited CPU performance on a virtual system, playing DSD128 and DSD64 sources with a 5.6448 bit rate went quite smooth without any glitches as well as FLAC sources of 44.1/16 up-sampled to 176.4. Playing these DSD sources with a 11.2896 bit rate, however, became quite sluggish but this was mainly due to low-powered CPU performance on my MacBook and I did not recognize any further additional glitches related to data processing. BTW the Botic-BBB with MPD can play a DSD256 source from 2L without any problems.

So it’s my impression that Botic-BBB system will be quite promising as an NAA working with HQP as long as you can use a PC of appropriate power for HQP, though this is not a style I'm looking for as an audiophile.

Below is the record of CPU loads from top command in various conditions. My poor MacBook can not deal with the huge appetite of HQP :( but the Botic on BBB appears well dealing with the demand from it :).

Code:
DSD128@11.2896

NAA on Botic-Debian
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
  540 root      10 -10   16364   6284   2696 S 17.0  1.2   6:02.41 networkaudi+

HQP on Ubuntu
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
 3085 xxxxx   20   0 6988044 277684  58944 S 93.8  6.9  11:40.95 hqplayer    


DSD128@24.576

Botic
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
  540 root      10 -10   19760   9528   2696 S 21.9  1.9   6:37.87 networkaudi+

HQP
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
 3085 xxxxx     20   0 5239988 233432  61072 S 92.8  5.8  10:17.12 hqplayer    


DSD64@5.6448

Botic
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
  540 root      10 -10   15576   5056   2696 S 10.7  1.0   6:48.53 networkaudi+

HQP
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
 3085 xxxxx     20   0 3928124 212756  42776 S 77.6  5.3   9:14.44 hqplayer    

FLAC 44.1/16@176.4

Botic
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
  540 root      10 -10   15576   5128   2696 S  8.4  1.0   7:06.25 networkaudi+

HQP
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
 3085 xxxxx     20   0 3669388 162504  34528 S  5.0  4.0   9:03.66 hqplayer
 

Attachments

  • naa.jpg
    naa.jpg
    74.6 KB · Views: 293
Thanks twluke. I think you've essentially confirmed the majority of my observations, the only difference being with DSD256, where my HQPlayer PC is barely breaking into a sweat upsampling 16bit/44.1KHz PCM to DSD256 (CPU loading of around 32%). DSD256 is faultless when I use my Intel NUC as the NAA device.

A suggestion regarding your HQPlayer settings; check the 'auto rate family' box and HQPlayer will automatically set integer upsampling rates (for example, 4 x 44.1KHz = 176.4KHz whereas 4 x 48KHz = 192KHz, so in this instance just set the max sample rate to 192KHz).

I'm a bit confused by your table of results regarding DSD rates. The original DSD (i.e. SACD) has now become known as DSD64 (64 times the CD Audio sampling rate of 44.1 kHz) with a bit rate of 2.8224MHz (or 64 times 48KHz = 3.072MHz).

Double rate DSD = DSD128 has bit rates of 5.6448MHz (128 x 44.1KHz) or 6.144MHz (128 x 48KHz).

Quad rate DSD = DSD256 has bit rates of 11.2896/12.288MHz.

Octuple rate DSD = DSD512 has bit rates of 22.5792/24.576MHz

Or perhaps I'm misreading your table and you're upsampling DSD64 to DSD256 in the first set of results?

I have some DSD256 recordings that I plan to load onto the BBB and play with MPD but I'm convinced that'll work perfectly.

Ray