• 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

Regards, Duffy. I am not an expert but I am learning slowly by trial and error.

Show us the result of 'ps -A'

This is every process your software is running. If I try to run speaker-test while squeezelite is also running, I get 'device or resource busy'. ...though MPD is usually not a problem when it runs unneeded. ...still, perhaps there will be a clue, like a duplication, etc.

Code:
root@botic:~# ps -A
  PID TTY          TIME CMD
    1 ?        00:00:01 systemd
    2 ?        00:00:00 kthreadd
    3 ?        00:00:05 ksoftirqd/0
    5 ?        00:00:00 kworker/0:0H
    6 ?        00:00:00 kworker/u2:0
    7 ?        00:00:00 rcu_preempt
    8 ?        00:00:00 rcu_sched
    9 ?        00:00:00 rcu_bh
   10 ?        00:00:00 watchdog/0
   11 ?        00:00:00 khelper
   12 ?        00:00:00 kdevtmpfs
   13 ?        00:00:00 netns
   14 ?        00:00:00 perf
   16 ?        00:00:00 khungtaskd
   17 ?        00:00:00 writeback
   18 ?        00:00:00 ksmd
   19 ?        00:00:00 crypto
   20 ?        00:00:00 kintegrityd
   21 ?        00:00:00 bioset
   22 ?        00:00:00 kblockd
   23 ?        00:00:00 ata_sff
   24 ?        00:00:00 devfreq_wq
   25 ?        00:00:00 rpciod
   26 ?        00:00:00 kswapd0
   27 ?        00:00:00 fsnotify_mark
   28 ?        00:00:00 nfsiod
   36 ?        00:00:00 kthrotld
   37 ?        00:00:00 kapmd
   38 ?        00:00:00 irq/29-48060000
   40 ?        00:00:00 irq/177-4803800
   41 ?        00:00:00 irq/176-4803800
   42 ?        00:00:00 ipv6_addrconf
   43 ?        00:00:00 deferwq
   45 ?        00:00:00 irq/155-44e0b00
   46 ?        00:00:00 irq/182-tps6521
   47 ?        00:00:00 irq/156-4802a00
   48 ?        00:00:00 irq/157-4819c00
   52 ?        00:00:00 mmcqd/1
   53 ?        00:00:00 mmcqd/1boot0
   54 ?        00:00:00 mmcqd/1boot1
   87 ?        00:00:00 kworker/0:1H
   96 ?        00:00:00 jbd2/mmcblk0p2-
   97 ?        00:00:00 ext4-rsv-conver
  117 ?        00:00:00 systemd-journal
  118 ?        00:00:00 kauditd
  132 ?        00:00:00 systemd-udevd
  363 ?        00:00:00 cifsiod
  579 ?        00:00:00 rpcbind
  628 ?        00:00:00 rpc.statd
  678 ?        00:00:00 rpc.idmapd
 1083 ?        00:00:33 mpd
 1092 ?        00:00:00 acpid
 1097 ?        00:00:02 ympd
 1100 ?        00:00:00 systemd-logind
 1101 ?        00:00:00 rsyslogd
 1103 ?        00:00:00 dbus-daemon
 1111 tty1     00:00:00 agetty
 1112 ttyO0    00:00:00 agetty
 1150 ?        00:00:00 cron
 1178 ?        00:00:07 upmpdcli
 1254 ?        00:00:00 file-storage
 1255 ?        00:00:00 file-storage
 1290 ?        00:00:00 dhclient
 1312 ?        00:00:14 cifsd
 1409 ?        00:00:00 sshd
 1443 ?        00:00:00 kworker/0:0
 1446 ?        00:00:00 sshd
 1448 pts/0    00:00:00 bash
 1452 ?        00:00:00 kworker/0:1
 1453 ?        00:00:00 kworker/u2:2
 1459 pts/0    00:00:00 speaker-test
 1539 pts/0    00:00:00 ps
 
Is speaker-test intentionally running (in process 1459)? To end a running process like speaker-test usually use 'Control+C'. If it is not actively cycling on the command line, kill it [using 'kill -15 1459' or 'pkill speaker-test'. Then confirm by typing another 'ps -A'. Then execute a 'aplay -L' to rattle ALSA a bit... Then try either MPC or 'speaker-test -c 2 -D hw:0,0'. Now you know how to keep programs that use the ALSA resource from colliding. See where that takes you... If nowhere, how about a couple of hard re-boots, then maybe we can look at MPD's configuration...

F.
 
As an alternative to a front panel display why not get the same information presented to you on a tablet/smartphone in the comfort of your listening seat? Oh, and be able to select what is playing from your network music library on the same device (and, I'm hoping, be able to control the volume too - presume that will need miero to release a Botic distribution with i2c).
Ray

I have been working on and off on the kinds of things that Ray spoke about some time ago. There are many ways to integrate the functions of these little boards and I have come up with a very personal version of a full-function audio appliance. The controller uses the NetIO application for iOS, and my wireless remote is comprehensive for my needs. All volume functions are at the level of the ES9018 DACs. Photo attached. An on-going 'how-to' thread exists nearby. I welcome your questions and comments there.

Best,

Frank
 

Attachments

  • IMG_0287.PNG
    IMG_0287.PNG
    158.1 KB · Views: 303
Crackling issue

I am using squeezelite on a BBB running Botix 4.0.

The only way to get sound out of it is to run squeezelite with option -a 16384:1024:: as was kindly suggested in an earlier contribution to this thread.

The crackling suggests that I need a larger buffer size, but I lose sound if I enter any other number instead of the above.

is there any alternative solution?

Many thanks,
Giulio
 
I am using squeezelite on a BBB running Botix 4.0.

The only way to get sound out of it is to run squeezelite with option -a 16384:1024:: as was kindly suggested in an earlier contribution to this thread.

The crackling suggests that I need a larger buffer size, but I lose sound if I enter any other number instead of the above.

is there any alternative solution?

Many thanks,
Giulio

Two suggestions, Giulio:

in the -a options, the first number is the buffer size and the second number is the period size. Buffer/Period must be an integer. The default ratio is 4, yours is 16. I suspect some of your buffer space is being wasted or badly accessed. I personally use 8192:2048::0 and it works great up to 192kHz. I suggest you experiment with buffer/period ratios no larger than 6, and your current buffer size should be more than enough. The last thing is I suggest you specify that the memory be unmapped, for speed. So you might try: -a 16384:4096::0... Don't be afraid to experiment. Here is the manual page: Ubuntu Manpage: squeezelite - Lightweight headless Squeezebox emulator
 
Thank you and sorry for the late update.

I can add the 0 at the end without ill effects ( I guess I need more testing to be sure it cures the problem), but any number other than 1024 in the second position resukta in no sound.

I am sorry that I can't test your settings in my system - I am traveling at the moment. Still a few ideas:

Here is my command line: squeezelite -z -o default -a 8192:2048::0
No resampling, very simple. Are you using the -u option?

Perhaps you can use the -d and -f flags to report what is going on.

Perhaps you could try entering time parameters rather than memory parameters into the -a option arguments. Something like -a 200:50::0

What happens if you simply omit the -a flag?

Best of luck!
 
If I run squeezelite with no buffer parameters or with buffer parameters with which it fail to roduce sound I get the error message

alsa_open: 303 unable to get period size: Invalid argument

or
alsa_open: 309 unable to get buffer size: Invalid argument

I have also tried time parameters

-a 800:50::0 works out with much more stuttering than -a 16384:1024::

I have not been able to find any other combination of time parameters that produces sound.

This is using BBB with Botic on an i2s connection. Never had problems with any buffer size when using an Alix pc into a Usb to i2s convertor


Thanks for your help
 
Last edited:
The highest real-time priority number is 99. But it should not matter, because you do not have other real-time priority task.

Has it solved your issues, or you still observe dropouts? If yes, try to remove all buffer settings for sequeezelite and let it to use default values. (( This works for me. ))
 
Is speaker-test intentionally running (in process 1459)? To end a running process like speaker-test usually use 'Control+C'. If it is not actively cycling on the command line, kill it [using 'kill -15 1459' or 'pkill speaker-test'. Then confirm by typing another 'ps -A'. Then execute a 'aplay -L' to rattle ALSA a bit... Then try either MPC or 'speaker-test -c 2 -D hw:0,0'. Now you know how to keep programs that use the ALSA resource from colliding. See where that takes you... If nowhere, how about a couple of hard re-boots, then maybe we can look at MPD's configuration...

F.

I had it running earlier. I previously just hit the Break key to stop it. I tried aplay -L

Code:
root@botic:~# aplay -L
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

speaker-test -c 2 -D hw:0,0 did nothing

How do I do a hard reboot?
 
Hi Miero,
Thanks for Botic support. I appreciate your work on Botic🙂
A few weeks ago there were rumors of version 6 of Botic. When can we expect the release of version 6? What will be the main changes? Will there be support for user LED configuration?
Thanks,
bern
 
LEDs can be already controlled by user 🙂

Exactly.

Here are the shell scripts based on the miero's original to turn on/off LEDs.

Turning on LEDs:
Code:
#!/bin/sh

###
### GPIO pin setup for LEDs on
###

### LED1 ###
echo 30 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio30/direction
echo 1 > /sys/class/gpio/gpio30/value

### LED2 ###
echo 60 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio60/direction
echo 1 > /sys/class/gpio/gpio60/value

### LED3 ###
echo 31 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio31/direction
echo 1 > /sys/class/gpio/gpio31/value
Turning off LEDs:
Code:
#!/bin/sh

###
### GPIO pin setup for LEDs off
###

### LED1 ###
echo 30 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio30/direction
echo 0 > /sys/class/gpio/gpio30/value

### LED2 ###
echo 60 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio60/direction
echo 0 > /sys/class/gpio/gpio60/value

### LED3 ###
echo 31 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio31/direction
echo 0 > /sys/class/gpio/gpio31/value