• 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

What to do to set 'serconfig' and 'dai_format'?
Hi bern,

Setting dai_format or serconfig is not supported since I dropped the related code (only playback of both I2S as well as DSD is supported, no SPDIF) with standard dai format setting as appropriate for a Cronus or similar configuration.

If you have such a standard configuration this should work regardless of the dai_format / serconfig parameters.

Regards,
Christian
 
Last edited:
Second issue with the build kernel.
I'm trying to build lirc-bbb module. I installed generated headers 'linux-headers-4.19.79+_4.19.79+-1_armhf.deb' but stuck at 'fatal error: classmap.h: No such file or directory'. See details.

Code:
debian@beaglebone:/opt/lirc-bbb$ sudo make prepare
make -C /lib/modules/`uname -r`/build scripts
make[1]: Entering directory '/usr/src/linux-headers-4.19.79+'
  HOSTCC  scripts/selinux/genheaders/genheaders
scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory
 #include "classmap.h"
          ^~~~~~~~~~~~
compilation terminated.
make[4]: *** [scripts/Makefile.host:90: scripts/selinux/genheaders/genheaders] Error 1
make[3]: *** [scripts/Makefile.build:544: scripts/selinux/genheaders] Error 2
make[2]: *** [scripts/Makefile.build:544: scripts/selinux] Error 2
make[1]: *** [Makefile:1061: scripts] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.79+'
make: *** [Makefile:35: scripts] Error 2
 debian@beaglebone:/opt/lirc-bbb$
Should I install something?
Sorry, cannot be of much assistance here... Are the headers indeed installed in '/usr/src/linux-headers-4.19.79+'? Could it be that lirc_bbb is not compatible with the 4.19 kernel for some reason? If you install the headers of the standard buster kernel, does it work?
 
Hi bern,

Setting dai_format or serconfig is not supported since I dropped the related code (only playback of both I2S as well as DSD is supported, no SPDIF) with standard dai format setting as appropriate for a Cronus or similar configuration.

If you have such a standard configuration this should work regardless of the dai_format / serconfig parameters.

Regards,
Christian
Thanks for replay.
That's a pity since some users (including me) use Cronus and Right Justified Data Format 'dai_format=16386' (instead of default 16385). Could you consider to restore this parameter as variable in one of the next releases?

Sorry, cannot be of much assistance here... Are the headers indeed installed in '/usr/src/linux-headers-4.19.79+'?
Code:
debian@beaglebone:/usr/src/linux-headers-4.19.79+$ ls
Documentation  Makefile        arch   certs   drivers   fs       init  kernel  mm   samples  security  tools  virt
Kconfig        Module.symvers  block  crypto  firmware  include  ipc   lib     net  scripts  sound     usr
Could it be that lirc_bbb is not compatible with the 4.19 kernel for some reason?
I don't know. I tried to build GitHub - miero/lirc-bbb: LIRC driver for BeagleBone Black module several times with previous kernels add it worked.
If you install the headers of the standard buster kernel, does it work?
I have to check. I'm sure it worked with 'Linux beaglebone 4.8.13-botic7-rc3 #1 PREEMPT Sat Dec 10 01:35:51 CET 2016 armv7l GNU/Linux'
 
Thanks for replay.
That's a pity since some users (including me) use Cronus and Right Justified Data Format 'dai_format=16386' (instead of default 16385). Could you consider to restore this parameter as variable in one of the next releases?
I just updated the debian-buster branch and this parameter is again enabled. Please try whether right justified works fine for you now.
 
I just updated the debian-buster branch and this parameter is again enabled. Please try whether right justified works fine for you now.

Thank you!
I'm just checking out BBB debian kernel and going to build new one but this time I try to compile kernel directly on BBB machine (will take few hours:snail:). Last time I cross compiled BBB kernel on my home X64 Ubuntu server 19.10 machine.

Can you try to directly call
Code:
make build
and skip the prepare step?
I will try when I have a new kernel. Let's keep our fingers crossed for successful kernel and module build:xfingers:
 
It took 15h to bulid BBB kernal on BBB machine.
After installing new kernel dai_format paramater (in my case Right Justified data format) works properly.

One strange think I encounter is lack of automatic shutdown after plug out the mains when using battery attached to Hermes (about battery see the end of the first post of Hermes thread). Before installing new kernel when I plug out the mains Debian automatically switch off in few seconds . It currently doesn't work. System still running discharging batterry. How could I fix this?

Can you try to directly call
Code:
make build
and skip the prepare step?
It doesn't help much. Still lack of some files in headers directory:
Code:
debian@beaglebone:/opt/lirc-bbb$ sudo make prepare
make -C /lib/modules/`uname -r`/build scripts
make[1]: Entering directory '/usr/src/linux-headers-4.19.79+'
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c:97:10: fatal error: sys/types.h: No such file or directory
 #include <sys/types.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make[2]: *** [Makefile:467: scripts_basic] Error 2
make[1]: *** [Makefile:633: include/config/auto.conf.cmd] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.79+'
make: *** [Makefile:35: scripts] Error 2
debian@beaglebone:/opt/lirc-bbb$ sudo make build
make -C /lib/modules/`uname -r`/build M=$PWD
make[1]: Entering directory '/usr/src/linux-headers-4.19.79+'
  CC [M]  /opt/lirc-bbb/lirc_bbb.o
/opt/lirc-bbb/lirc_bbb.c:31:10: fatal error: media/lirc.h: No such file or directory
 #include <media/lirc.h>
          ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:310: /opt/lirc-bbb/lirc_bbb.o] Error 1
make[1]: *** [Makefile:1519: _module_/opt/lirc-bbb] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.79+'
make: *** [Makefile:12: build] Error 2
 
Functionality extension in micro audiorender (beta):
  1. New audio renders of the LMS and AirPlay protocols have been added.
  2. Added support for wpa WFi.
Linux kernel remains the same - 4.9.146-Botic7-rt
http://puredsd.ru/buildroot/sd_botic7_V2.img.gz
ssh root/root
 

Attachments

  • ezgif.com-optimize.jpg
    ezgif.com-optimize.jpg
    41.2 KB · Views: 227
It took 15h to bulid BBB kernal on BBB machine.
After installing new kernel dai_format paramater (in my case Right Justified data format) works properly.

One strange think I encounter is lack of automatic shutdown after plug out the mains when using battery attached to Hermes (about battery see the end of the first post of Hermes thread). Before installing new kernel when I plug out the mains Debian automatically switch off in few seconds . It currently doesn't work. System still running discharging batterry. How could I fix this?
I abandoned the code for powering down on battery automatically. For my BBBW use case I found that simply hard power down (without taking care of proper shutdown) does not cause any issues so I do not have any battery and also I often do not shut down properly before removing power.
If you want to have this functionality on more recent kernels, you can have a look and port this patch yourself: linux-dev/0013-pm-shutdown-on-power-button-press-or-power-loss.patch at botic7-v48 * miero/linux-dev * GitHub

With regards to the module compilation: Maybe try with the default buster kernel. If this leads to the same problems, then probably the outdated code of the lirc-bbb module is to blame. If it works then we need to further investigate how the kernel headers are built for the boticized kernel.
 
Last edited:
....If you want to have this functionality on more recent kernels, you can have a look and port this patch yourself: linux-dev/0013-pm-shutdown-on-power-button-press-or-power-loss.patch at botic7-v48 * miero/linux-dev * GitHub
Unfortunately I do not have sufficient skills. I'm no programmer or coder.

With regards to the module compilation: Maybe try with the default buster kernel. If this leads to the same problems, then probably the outdated code of the lirc-bbb module is to blame. If it works then we need to further investigate how the kernel headers are built for the boticized kernel.
I installed the newest image 'BBB-blank-debian-10.2-console-armhf-2019-12-02-1gb.img' which I could found in Index of /rootfs/bb.org/testing/2019-12-02/buster-console
The kernel is:
Code:
Linux beaglebone 4.19.79-ti-r30 #1buster SMP PREEMPT Mon Nov 4 20:38:01 UTC 2019 armv7l GNU/Linux
The compiling of 'lirc-bbb' stuck on:
Code:
debian@beaglebone:/mnt/SD/lirc-bbb$ sudo make prepare
make -C /lib/modules/`uname -r`/build scripts
make[1]: Entering directory '/usr/src/linux-headers-4.19.79-ti-r30'
  CC      scripts/mod/empty.o
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/selinux/genheaders/genheaders
scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory
 #include "classmap.h"
          ^~~~~~~~~~~~
compilation terminated.
make[4]: *** [scripts/Makefile.host:90: scripts/selinux/genheaders/genheaders] Error 1
make[3]: *** [scripts/Makefile.build:544: scripts/selinux/genheaders] Error 2
make[2]: *** [scripts/Makefile.build:544: scripts/selinux] Error 2
make[1]: *** [Makefile:1061: scripts] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.79-ti-r30'
make: *** [Makefile:35: scripts] Error 2
 
Unfortunately I do not have sufficient skills. I'm no programmer or coder.
You might just want to try out what you can achieve. This is diy :) Apparently there is also a (in my view much simpler) solution using some python scripting retrieving the status of the PMIC (see discussion in batteries - How can I power Beagle Bone Black with 3.7V LiPo? - Electrical Engineering Stack Exchange).

I installed the newest image 'BBB-blank-debian-10.2-console-armhf-2019-12-02-1gb.img' which I could found in Index of /rootfs/bb.org/testing/2019-12-02/buster-console
...
I believe that is a sign that the code of lirc-bbb needs updating to ensure that it is still possible to build it using newer kernel versions.
 
Member
Joined 2007
Paid Member
Gentlemen!!!


How do i config alsa so it sees the Botic device as multichannel?! I have MMMM in serconfig but aplay sees only two.
/etc/asound.conf is pretty much default, but the board does see a USB multichannel DAC as really multichannel if plugged in.


Thank you!

Not sure what you are trying to accomplish but if you want ‘aplay’ to output multiple channels then use the -c flag followed by the number of channels. If you are more specific about what you want ALSA to do (you can’t assume much...) it may become a question of tweaking /etc/asound.conf

Frank
 
Functionality extension in micro audiorender (beta):
  1. New audio renders of the LMS and AirPlay protocols have been added.
  2. Added support for wpa WFi.
Linux kernel remains the same - 4.9.146-Botic7-rt
http://puredsd.ru/buildroot/sd_botic7_V2.img.gz
ssh root/root

Thanks for your botic firmware.
How to make squeezelite output native DSD directly ? When I using HQplayer can output native DSD, but using squeezelite playing dsd files it converted to PCM format . I'm using PPY's reclocker .
 
Thanks for your botic firmware.
How to make squeezelite output native DSD directly ? When I using HQplayer can output native DSD, but using squeezelite playing dsd files it converted to PCM format . I'm using PPY's reclocker .

There is squeezelite missing command string,I tried run /usr/bin/squeezelite -D delay : u32le,and it can output native DSD and work prefect . But I still cannot let command string run correctly at /etc/init.d/S99squeezelite and /etc/rc.botic/S99squeezelite !
 
Not sure what you are trying to accomplish but if you want ‘aplay’ to output multiple channels then use the -c flag followed by the number of channels. If you are more specific about what you want ALSA to do (you can’t assume much...) it may become a question of tweaking /etc/asound.conf

Frank

Frank, thank you for replying. I just say that aplay -l or -L sees only two channels instead of 8 expected by serconfig.
Is this normal to force channel number in alsa config? An external USB multichannel DAC looks initially as a device with 8 outs. Me stupid?
 
Member
Joined 2007
Paid Member
Frank, thank you for replying. I just say that aplay -l or -L sees only two channels instead of 8 expected by serconfig.
Is this normal to force channel number in alsa config? An external USB multichannel DAC looks initially as a device with 8 outs. Me stupid?

The etc/asound.config file is very basic in the ‘stock’ distribution of Botic. I am traveling currently but when back with my home system l will reply again with some additions for asound.conf that you can use to open more channels and manage signal routing within them. Shoot a reminder if you don’t see something next week. :)
F.