• 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

Member
Joined 2007
Paid Member
but still no DATA signal on R2, R3 (only on R4, R5)
Maybe there is something wrong with selected:
dai_format=16386
I don't understand syntax of this parameter. It should give right justified data format...
I have not needed to modify dai_format because I use I2S, so I have no experience with this issue. The format seems to be just a digital ID. Have you experimented with format 2?

Regarding the active data lines: Isn't it true that right-justified data, like I2S, uses a L/R clock for interleaving? Hence, four channels of data will fit on two data lines, as you are seeing. I believe R5 and R4 should be the only signal carriers unless you increase the number of channels to 6 or 8, which you can do in ALSA.
 
I have not needed to modify dai_format because I use I2S, so I have no experience with this issue. The format seems to be just a digital ID. Have you experimented with format 2?

Regarding the active data lines: Isn't it true that right-justified data, like I2S, uses a L/R clock for interleaving? Hence, four channels of data will fit on two data lines, as you are seeing. I believe R5 and R4 should be the only signal carriers unless you increase the number of channels to 6 or 8, which you can do in ALSA.

Code:
----------
DAI format
----------

Clock source and polarity for I2S mode is configurable via:
   - kernel option snd_soc_botic.dai_format
   - file /sys/module/snd_soc_botic/parameters/dai_format

Supported values:
    +1 ... I2S mode
    +2 ... Right Justified mode (LSB) -- BUG: does not work in botic4; fixed in botic5
    +3 ... Left Justified mode (MSB)
    +4 ... L data MSB after FRM LRC
    +5 ... L data MSB during FRM LRC

    +0 ... NB_NF: normal BCLK & LRCK
    +512 ... NB_IF: normal BCLK, inverted LRCK
    +768 ... IB_NF: inverted BCLK, normal LRCK
    +1024 ... IB_IF: inverted BCLK & LRCK

    +4096 ... CBM_CFM: DAC is BCLK & LRCK master
    +8192 ... CBS_CFM: DAC is BCLK slave, LRCK master
    +12288 ... CBM_CFS: DAC is BCLK master, LRCK slave
    +16384 ... CBS_CFS: DAC is BCLK & LRCK slave

Default value: I2S + NB_NF + CBS_CFS

Change via file is active on the next playback start.
So in the dai_format parameter for I2S it's 16385 and for right justified is 16386

When I scoped the right justified data last week it certainly looked like it was interleaved and providing both channels in a single data feed
 
Member
Joined 2007
Paid Member
Here is something definitive from an old Wolfson data sheet:

In left justified mode, the MSB is sampled on the first rising edge of BCLK following a LRCLK transition. LRCLK is high during the left data word and low during the right data word.

In right justified mode, the LSB is sampled on the rising edge of BCLK preceding a LRCLK transition. LRCLK is high during the left data word and low during the right data word.

In I2S mode, the MSB is sampled on the second rising edge of BCLK following a LRCLK transition. LRCLK is low during the left data word and high during the right data word.
 
I've updated core of boticize scripts for Debian Jessie:
- source code: https://github.com/miero/boticize (check for the instructions)
- download all: https://github.com/miero/boticize/archive/master.zip

If someone will do the clean install of Debian, please test.

Hi, I tried this with clean installation of Jessie but got stuck with errors after 02-install.sh like below:

Code:
root@beaglebone:/usr/src/boticize-master# uname -a
Linux beaglebone 4.5.0-botic7-rc1 #1 PREEMPT Tue May 17 00:51:35 CEST 2016 armv7l GNU/Linux
-snip-
root@beaglebone:/usr/src/boticize-master# bash 02-install.sh
Hit [URL="http://security.debian.org"]Debian -- Security Information[/URL] jessie/updates InRelease
Hit [URL="http://repos.rcn-ee.com"]Index of /[/URL] jessie InRelease                                   
Hit [URL="http://repo.ieero.com"]Index of /[/URL] jessie InRelease                                     
Get:1 [URL="http://security.debian.org"]Debian -- Security Information[/URL] jessie/updates/main armhf Packages [299 kB]   
Get:2 [URL="http://repos.rcn-ee.com"]Index of /[/URL] jessie/main armhf Packages [469 kB]              
Get:3 [URL="http://repo.ieero.com"]Index of /[/URL] jessie/main armhf Packages [4567 B]                
Get:4 [URL="http://security.debian.org"]Debian -- Security Information[/URL] jessie/updates/contrib armhf Packages [994 B] 
Get:5 [URL="http://security.debian.org"]Debian -- Security Information[/URL] jessie/updates/non-free armhf Packages [20 B] 
Ign [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie InRelease                               
Hit [URL]https://deb.nodesource.com[/URL] jessie InRelease                             
Get:6 [URL]https://deb.nodesource.com[/URL] jessie/main armhf Packages [976 B]            
Hit [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie-updates InRelease                       
Hit [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie Release.gpg                             
Hit [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie Release                                 
Get:7 [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie-updates/non-free armhf Packages [450 B]
Get:8 [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie-updates/contrib armhf Packages [20 B] 
Get:9 [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie/contrib armhf Packages [44.6 kB]      
Get:10 [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie/main armhf Packages [8834 kB]        
Get:11 [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie-updates/main armhf Packages [9276 B] 
Get:12 [URL="http://httpredir.debian.org"]Debian mirrors HTTP redirector[/URL] jessie/non-free armhf Packages [74.5 kB]    
Fetched 9738 kB in 1min 27s (111 kB/s)                                         
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '4.5-botic7-rc1_armhf' for 'linux-libc-dev' was not found
Need your advice miero. TIA
 
Member
Joined 2007
Paid Member
Try to remove the linux-libc-dev=... from that script and rerun.

I'm not able to test that in these days.

Will do at some point today... :)

Meanwhile, I found that the Debian 8.3 version I have been testing (separate from the 'Boticize' experiments) had the CPU frequency governor set to 'on demand'. I edited /etc/init.d/cpufrequtils to 'performance' and now it seems squeezelite is running like it does in Botic5+Debian 7.5. Also the LADSPA filters in ALSA are now consuming the predicted amount of CPU...

If others are curious to learn more, this is the source that I found helpful.
 
Member
Joined 2007
Paid Member
Will do at some point today... :)

I just tested the latest scripts with the one line deleted from 02-install.sh. I think the script is very close, but not quite correct yet. Note PM with screen log.

I only saw three error messages:
Code:
Setting up linux-image-4.5.0-botic7-rc1 (4.5-botic7-rc1) ...
Error! Bad return status for module build on kernel: 4.5.0-botic7-rc1 (armv7l)
Consult /var/lib/dkms/temperature-mod/1.0.1/build/make.log for more information.
Error! Bad return status for module build on kernel: 4.5.0-botic7-rc1 (armv7l)
Consult /var/lib/dkms/debugss-mod/1.3.0/build/make.log for more information.
Error! Bad return status for module build on kernel: 4.5.0-botic7-rc1 (armv7l)
Consult /var/lib/dkms/cmem-mod/4.11.00.00/build/make.log for more information.

I saw these same errors previously when I was experimenting with 8.3. They did not prevent me from using the system.

However, the eventual problem from the first series of boticize scripts remains - the BBB doesn't register with the network after the reboot. Thus, there is no ip address to -ssh or sftp into the system.

I'm happy to test any other ideas... :)

Frank
 
However, the eventual problem from the first series of boticize scripts remains - the BBB doesn't register with the network after the reboot. Thus, there is no ip address to -ssh or sftp into the system.

I'm happy to test any other ideas... :)

Frank
I did experience the same result. Boticization of Jessie appeared successful but after reboot the BBB has lost its way on the network. Maybe I'll try again tonight.
 
Member
Joined 2007
Paid Member
I tried several times to make the boticize scripts work. With Jessie 8.4 there is something in script 02-install.sh that results in the system becoming unaddressable.

To be sure that I'm not doing something systematically wrong, I re-created the basic system config that is playing in the other room. Starting with a fresh image of Debian 8.3:
1. I expanded the uSD card partition ['/opt/scripts/tools/grow_partition.sh']
2. I installed the headers...deb and image-4.5.0...deb from bbb.ieero.com and used 'dpkg -i' first on the headers and then on the image.
3. I changed the /boot/uEnv.txt line to 'dtb=am335x-boneblack-botic.dtb' and rebooted.
4. I can log in and 'aplay -l' lists Botic as the only playback hardware device.

Success. That much works...
 
Last edited:
Member
Joined 2007
Paid Member
I found the problem in 02-install.sh of boticize-master. It is 'nfs-common' that disables the networking of the BBB. I don't know how to correct this specific problem, but after I edited that line out of the installation script then the system of 5 scripts resulted in an addressable OS. The 02-install.sh script was:
Code:
#!/bin/bash

### Install packages
apt-get update
apt-get install --no-install-recommends -y \
        sox libsox-fmt-all \
        alsa-utils \
        ntpdate \
        openssh-server openssh-client \
        cifs-utils \
        dbus wireless-tools wpasupplicant \
        i2c-tools \
        acpid \
        cpufrequtils usbutils \
        less psmisc \
        python-alsaaudio \
        lirc \
        linux-headers-4.5.0-botic7-rc1 \
        linux-image-4.5.0-botic7-rc1 
apt-get autoremove

The fresh starting image was Jessie 8.4 from here. Before further testing I will uninstall a couple of things that I personally don't need. Also, I will edit /etc/init.d/cpufrequtils from 'GOVERNOR="on demand"' to 'GOVERNOR="performance"'. This seems to speed up boots and shutdowns. ;)

Cheers,

Frank
 
Last edited:
So in the dai_format parameter for I2S it's 16385 and for right justified is 16386

When I scoped the right justified data last week it certainly looked like it was interleaved and providing both channels in a single data feed

Yes. Finally I realized that dai_format parameter is sum of three variables from three sections describing dai_format from the manual.
For default I2S the value of 16385 is a sum of I2S + NB_NF + CBS_CFS (e.g. 1+0+16384) and for right justyfied data=16386 is a sum of (2+0+16384).
Thanks for clarification James.
BTW do your dddac after squeezelite and botic parameters modifications (24 bit output set and BCLK/LRCLK ratio=64) play smoothly without glitches and noises (especially with higher sample rates eg 176,4 and 192kHz)?
Do you enjoy the NOS dac sound? Do you use squeezelite upsampling ?
Sorry for questions overload;)

..... I believe R5 and R4 should be the only signal carriers unless you increase the number of channels to 6 or 8, which you can do in ALSA.
You are right Frank. When I changed numbers of channels from 4 to 8 in the asound.conf after appropriate channels mapping I received signals on R5 and R4:)
But it turned out that phase inversion for two channels (volume set as -1) is demanding for CPU. CPU usage increases about 12% when such phase inversion take place. So I decided to stay with 4 channels and do phase inversion by PCM chips (they have dedicated pin and when that pin is sorted to negative digital Vcc) they 'produced' phase inverted output.

see draft schematic
and compare with
previous one
 
BTW do your dddac after squeezelite and botic parameters modifications (24 bit output set and BCLK/LRCLK ratio=64) play smoothly without glitches and noises (especially with higher sample rates eg 176,4 and 192kHz)?
Do you enjoy the NOS dac sound? Do you use squeezelite upsampling ?
Sorry for questions overload;)
I only checked with 44khz so far, but that plays perfect, no glitch.
The nos sounds wonderful. So musical and full of life :)
No upsampling currently.
I checked your diagrams, are you planning to only have 2 channel stereo but you want pos and neg out to use as a balanced output? This is how the dddac is set up, so it uses 2 x pcm1794, each is set in mono mode which gives pos and neg outputs for each channel. Works very nicely. The schematic is available on the dddac website if you're interested.
 
Hi,
I'am trying to run lirc+'botic7-rc1'
I've connected TSOP2236 to the Hermes (pin 66 and VCC=+3.3V) and use Apple A1294 remote control.
Using:
Code:
irrecord -d /dev/lirc0 /etc/lirc/lircd.conf
I created lircd.conf file.
But unfortunately got stuck.
I cannot run 'irw' command to check assignment codes to remote control keys.
I suspect that something wrong is with old (2009), default, boot service file: /etc/init.d/lirc
Code:
root@botic:/usr/bin# /etc/init.d/lirc start
[ ok ] Starting lirc (via systemctl): lirc.service.
root@botic:/usr/bin# irw
connect: No such file or directory
root@botic:/usr/bin#
It seems like lirc service starts but at the same time cannot see deamon lircd on htop's process list.
What do you think?
 
Member
Joined 2007
Paid Member
Hi Bern,

...no personal experience with lirc, but it simply sounds like something is out of place. Have you looked at DIR=, DAEMON=, and ARGS= of /etc/init.d/lirc? If you compare the directories and paths to those of the lircd.conf file, is everything where it should be?

Meanwhile, I found a configuration for my wifi remote (old cell phone) so it equals the convenience of the little Apple remote. ... except for one thing, it needs to be returned to a charging cradle when not in use. But, doing that helps to keep it from getting lost! :)
 
Last edited:
Hi Bern,

...no personal experience with lirc, but it simply sounds like something is out of place. Have you looked at DIR=, DAEMON=, and ARGS= of /etc/init.d/lirc? If you compare the directories and paths to those of the lircd.conf file, is everything where it should be?
Thanks Frank.
Before checking suggested things I tried run lirc deamon manually.
And reseive strange message: 'Driver `lirc_bbb' not supported.'...


Code:
root@botic:~# /usr/sbin/lircd --driver=lirc_bbb --device=/dev/lirc0
Driver `lirc_bbb' not supported.
Supported drivers:
        accent
        alsa_usb
        asusdh
        atilibusb
        atwf83
        audio_alsa
        awlibusb
        bte
        bw6130
        commandir
        creative
        creative_infracd
        default
        devinput
        dfclibusb
        dsp
        dvico
        ea65
        ftdi
        i2cuser
        irlink
        irman
        livedrive_midi
        livedrive_seq
        logitech
        macmini
        mp3anywhere
        mplay
        mplay2
        mouseremote
        mouseremote_ps2
        null
        pcmak
        pinsys
        pixelview
        samsung
        sb0540
        silitek
        srm7500libusb
        tira
        tira_raw
        udp
        uirt2
        uirt2_raw
        usb_uirt_raw
        usbx
root@botic:~# lircd -v
lircd 0.9.0-pre1
root@botic:~# dmesg | grep lirc
[    4.053320] lirc_dev: IR Remote Control driver registered, major 245
[    4.062163] lirc_bbb lirc_bbb.0: lirc_dev: driver lirc_bbb registered at minor = 0
[    5.022933] lirc_bbb: auto-detected active low receiver on GPIO pin 66
[    5.022955] lirc_bbb: transmitter on GPIO pin 67
root@botic:~#
Meanwhile, I found a configuration for my wifi remote (old cell phone) so it equals the convenience of the little Apple remote. ... except for one thing, it needs to be returned to a charging cradle when not in use. But, doing that helps to keep it from getting lost! :)
Practical approach:cool:
 
All of my lirc configuration is in the https://github.com/miero/lirc-bbb/tree/master/example_lirc_conf

According it you need to use the "default" driver.

Thanks miero
The change to "default" driver in my /etc/lirc/hardware.conf file was a key to run litcd service:):
Code:
root@botic:~# systemctl status lirc.service
lirc.service - LSB: Starts LIRC daemon.
   Loaded: loaded (/etc/init.d/lirc)
   Active: active (running) since Mon 2015-02-16 02:29:31 CET; 1 years 3 months ago
  Process: 1097 ExecStart=/etc/init.d/lirc start (code=exited, status=0/SUCCESS)
   CGroup: name=systemd:/system/lirc.service
           ├─1201 /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput
           └─1214 /usr/bin/irexec -d /etc/lirc/lircrc

Feb 16 02:29:30 botic systemd[1]: Starting LSB: Starts LIRC daemon....
Feb 16 02:29:31 botic lirc[1097]: Loading LIRC modules:.
Feb 16 02:29:31 botic lirc[1097]: Starting remote control daemon(s) : LIRC :could not open uinput
Feb 16 02:29:31 botic lirc[1097]: No such file or directory
Feb 16 02:29:31 botic lirc[1097]: .
Feb 16 02:29:31 botic lircd-0.9.0-pre1[1201]: lircd(default) ready, using /var/run/lirc/lircd
Feb 16 02:29:31 botic lircd-0.9.0-pre1[1201]: accepted new client on /var/run/lirc/lircd
Feb 16 02:29:31 botic lirc[1097]: Starting execution daemon: irexec:.
Feb 16 02:29:31 botic systemd[1]: Started LSB: Starts LIRC daemon..
root@botic:~#
Should I afraid of massage: 'LIRC :could not open uinput
]: No such file or directory"?

Now I can run 'irw':
Code:
root@botic:~# irw
0000000077e13af4 00 KEY_PLAYPAUSE Apple_A1294
0000000077e160f4 00 KEY_NEXT Apple_A1294
0000000077e160f4 01 KEY_NEXT Apple_A1294
0000000077e190f4 00 KEY_PREVIOUS Apple_A1294
0000000077e190f4 01 KEY_PREVIOUS Apple_A1294
BTW please check if in configuration files and manual the name of lirc module shouldn't be 'lirc_bbb' instead of 'lirc-bbb'?

Now I have to experiment with new/etc/lirc/lricrc....
 
Finally botic+lirc+squeezelite works fine:)
I use squeezelite with IR support so I added:
Code:
-i /etc/lirc/.lircrc
parameter to my squeezelite bootscript and created new .lircrc file in /etc/lirc.
I just copied content of this file to /etc/lirc/.lircrc:
https://raw.githubusercontent.com/ralph-irving/tcz-lirc/master/lircrc-RMTD116A
and changed: remote, prog and config lines to fit my remote control Apple_a1294 keys.

My remote control is common for bbb and the amplifier.
For bbb I use only play, pause, next and previous button.
The rest buttons Vol up, down, source selection, power off/on is used to control my diy amplifier.