Question for Miero:
When using Botic's new recording function, is there any way to "auto-detect" the I2S frequency of an external, incoming I2S signal? ...say, from the L-R clock line? That information would be useful for setting up a variety of functions.
TIA!
When using Botic's new recording function, is there any way to "auto-detect" the I2S frequency of an external, incoming I2S signal? ...say, from the L-R clock line? That information would be useful for setting up a variety of functions.
TIA!
No, a sampling frequency must be know before the recording is started.
Moreover, as the driver is currently implemented & configured, the BBB has to use same master clock source for both record and playback.
There is a separate MCLK pin for asynchronous recording.
Moreover, as the driver is currently implemented & configured, the BBB has to use same master clock source for both record and playback.
There is a separate MCLK pin for asynchronous recording.
Last edited:
Hi
I used -L parameter of squeezelite to check which volume controls Botic supports:
I expected to see (in addition to 'Master') also 'PCM' on the list.
As I understand PCM allows to control the volume (also using IR and LRIC).
Is it possible to add also 'PCM' volume to botic?
Does it make sense?
What would be the sound quality of such volume control?
I used -L parameter of squeezelite to check which volume controls Botic supports:
Code:
root@botic:~# squeezelite -o hw:CARD=Botic,DEV=0 -L
Volume controls for hw:CARD=Botic,DEV=0
Master
As I understand PCM allows to control the volume (also using IR and LRIC).
Is it possible to add also 'PCM' volume to botic?
Does it make sense?
What would be the sound quality of such volume control?
There is no "software" volume control implemented in the Botic driver.
If you want it, you can configure ALSA to do it - http://alsa.opensrc.org/Softvol
The non-working Master control is there for applications that refuse to start without ALSA control.
If you have ES9018 based stereo DAC you can use "...-botic-sabre32.dtb" which enables control of ESS DAC via I2C.
If you want it, you can configure ALSA to do it - http://alsa.opensrc.org/Softvol
The non-working Master control is there for applications that refuse to start without ALSA control.
If you have ES9018 based stereo DAC you can use "...-botic-sabre32.dtb" which enables control of ESS DAC via I2C.
No, a sampling frequency must be know before the recording is started.
Moreover, as the driver is currently implemented & configured, the BBB has to use same master clock source for both record and playback.
There is a separate MCLK pin for asynchronous recording.
Thanks Miero!
Thanks miero,There is no "software" volume control implemented in the Botic driver.
If you want it, you can configure ALSA to do it - alsa.opensrc.org
The non-working Master control is there for applications that refuse to start without ALSA control.
If you have ES9018 based stereo DAC you can use "...-botic-sabre32.dtb" which enables control of ESS DAC via I2C.
Since as I suspected 'software' volume control degrades the sound then I don't need it.
I stay with classic analog volume control (shunt attenuator in my amplifier).
Hmm, it should work. Please check ...
For other foolish DIYers like me, the problem with 'Boticized Debian Jessie' has been solved. 🙂 I went back to Jessie 8.3 and the new Botic7 runs just fine. I have removed a number of processes to make the system more lean like Debian 7.5. I had to do a lot of debugging to update my python control scripts, and that isn't completely done. But now the system will run new LADSPA crossover filters and they are worth the work!
http://www.diyaudio.com/forums/twis...rs-digital-crossovers-bbb-21.html#post4726458
The only downside is that Squeezelite doesn't stay 100% stable as it does in Wheezy 7.5. There are a couple of controls in the iOS remote program that initiate noise in the music. Usually a stop-start fixes it. It was worse in 8.4 than 8.3. I'm learning as I go - will pay attention to issues, causes and remedies.
In addition to the occasional instability in which steady noise surrounded a degraded signal, the Squeezelite controls were noisy, producing snaps and pops. However, after re-arranging filters in an ALSA configuration, now the noise symptoms are gone. Fingers crossed that it was nothing more than that.I'm learning as I go - will pay attention to issues, causes and remedies.

Last edited:
I'm still getting more dropouts with squeezelite than I would like using Debian 8.3. They seem related to periodic system activity rather than a steady state of data under/over-runs. If I raise the priority of squeezelite too much, then the remote controls become erratic. I wonder if any Linux experts out there can identify unneeded processes in the following list. (python, rc.local, and sox are necessary - cron and connmand are hard to kill.) I'm hoping to limit these periodic interrupts at their source. Many thanks in advance!
Frank
Frank
Code:
root@beaglebone:/# ps -A
PID TTY TIME CMD
1 ? 00:00:06 systemd
2 ? 00:00:00 kthreadd
3 ? 00:00:00 ksoftirqd/0
4 ? 00:00:00 kworker/0:0
5 ? 00:00:00 kworker/0:0H
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 kworker/u2:2
46 ? 00:00:00 irq/155-44e0b00
47 ? 00:00:00 irq/182-tps6521
48 ? 00:00:00 mmcqd/0
49 ? 00:00:00 irq/156-4802a00
50 ? 00:00:00 irq/157-4819c00
54 ? 00:00:00 mmcqd/1
55 ? 00:00:00 mmcqd/1boot0
56 ? 00:00:00 mmcqd/1boot1
92 ? 00:00:00 kworker/0:1H
109 ? 00:00:00 jbd2/mmcblk0p1-
110 ? 00:00:00 ext4-rsv-conver
141 ? 00:00:00 kauditd
144 ? 00:00:00 systemd-journal
155 ? 00:00:00 systemd-udevd
210 ? 00:00:00 systemd-timesyn
252 ? 00:00:00 cron
266 ? 00:00:00 systemd-logind
281 ? 00:00:00 avahi-daemon
282 ? 00:00:00 dbus-daemon
288 ? 00:00:00 python
323 ? 00:00:00 avahi-daemon
335 ? 00:00:00 connmand
336 ? 00:00:00 rsyslogd
356 ? 00:00:00 file-storage
357 ? 00:00:00 file-storage
369 ? 00:00:00 wpa_supplicant
370 ? 00:00:00 sshd
371 ? 00:00:00 rc.local
388 ? 00:00:00 lightdm
415 tty7 00:00:00 Xorg
426 ? 00:00:01 python
459 ? 00:00:00 dnsmasq
488 ? 00:00:00 lightdm
493 ? 00:00:00 systemd
494 ? 00:00:00 (sd-pam)
496 ? 00:00:00 openbox
517 ? 00:00:00 ssh-agent
520 ? 00:00:00 dbus-launch
521 ? 00:00:00 dbus-daemon
541 ? 00:14:59 sox
542 ? 00:00:00 kworker/u2:4
548 ? 00:00:00 sshd
550 pts/0 00:00:00 bash
557 ? 00:00:00 kworker/0:2
558 pts/0 00:00:00 ps
Last edited:
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.
Packages contain also ALSA libraries for DSD+HD playback.
Caveat: There is no MPD (with DSD support) or ympd, so one would need to install squeezelite, hqplayer, roon....
- 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.
Packages contain also ALSA libraries for DSD+HD playback.
Caveat: There is no MPD (with DSD support) or ympd, so one would need to install squeezelite, hqplayer, roon....
Last edited:
francolargo: have you tried to increase sox priority? if it does not help, you can try also setting it to real-time priority using chrt 1 sox ...
Hi,
I'm considering connecting dual mono balanced NOS DAC (4x PCM1704) directly to the Cronus
(as in the diagram)
I've seen (in this post) that there is possible to split DATA to Left and Right data channel (thank you Frank And James!).
But could it be possible to split additionally each (R,L channel) to positive and negative (inverted) balanced data signal?
If so, is this 'software' split (R+, R-, L+, L-) and mapping could give me good quality sound?
Is that split and mapping can be demanding for bbb's CPU?
I'm considering connecting dual mono balanced NOS DAC (4x PCM1704) directly to the Cronus
(as in the diagram)
I've seen (in this post) that there is possible to split DATA to Left and Right data channel (thank you Frank And James!).
But could it be possible to split additionally each (R,L channel) to positive and negative (inverted) balanced data signal?
If so, is this 'software' split (R+, R-, L+, L-) and mapping could give me good quality sound?
Is that split and mapping can be demanding for bbb's CPU?
francolargo: have you tried to increase sox priority? if it does not help, you can try also setting it to real-time priority using chrt 1 sox ...
Hi Miero! I will experiment with this more. I use either SoX or squeezelite, and SoX runs well when I increase its priority using chrt -f 45... However, something is interrupting squeezelite from time to time. If I increase the priority of squeezelite by 19 using 'nice' - improvements but still interruptions. Increase by a full 20%, then the remote control gets poorly responsive. I will explore...
Thanks very much for the Jessie boticize script! I will test it now on a spare uSD card. 🙂
Frank
Last edited:
If someone will do the clean install of Debian, please test.
Hi Miero,
I sent PMs with Boticize process logs. ...hope they help...
Frank
Yes, it is possible.
You would need to assign a negative volume (-1) to the - channels.
thanks miero,
I've made some tests.
Unfortunately I can't receive data signal on R2, R3 resistors.
I have data signal only on R4, R5 resistors.
My configurations is as fallows:
asound file:
Code:
pcm.!botic-split {
type plug
slave {
pcm "t-table"
rate "unchanged"
}
}
ctl.!default {
type hw
card 0
}
pcm.t-table {
type route
slave {
pcm "hw:0,0"
channels 4
}
ttable {
0.0 1 #left channel to output 0
1.1 1 #right channel to output 1
2.0 -1 #left channel to output 2 inverted
3.1 -1 #right channel to output 3 inverted
}
}
Code:
optargs=snd_soc_botic.ext_masterclk=3 snd_soc_botic.serconfig=MMMM snd_soc_botic.dai_format=16386 snd_soc_botic.blr_ratio=64
Code:
squeezelite -o botic-split -a ::24 -n BBB -r 192000 -u hs::0.5:28:91.3:100:0 -D 80 -C 1 -f /opt/squeezelite.log -d all=info
Code:
usr/local/bin/squeezelite -o botic-split -a ::24 -n BBB -r 192000 -u hs::0.5:28:91.3:100:0 -D 80 -C 1 -f /opt/squeezelite.log -d all=info
[17:10:31.901061] stream_init:294 init stream
[17:10:32.070841] output_init_alsa:865 init output
[17:10:32.071085] output_init_alsa:895 requested alsa_buffer: 40 alsa_period: 4 format: 24 mmap: 1
[17:10:32.083488] output_init_common:411 supported rates: 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000
[17:10:32.087831] output_init_alsa:909 unable to lock memory: Cannot allocate memory
[17:10:32.602781] decode_init:130 init decode, include codecs: exclude codecs:
[17:10:32.617075] register_dsd:625 using dsd to decode dsf,dff
[17:10:32.742154] register_ff:732 using ffmpeg to decode alc
[17:10:32.742370] register_ff:716 using ffmpeg to decode wma,wmap,wmal
[17:10:32.742428] register_faad:641 using faad to decode aac
[17:10:32.742758] register_vorbis:330 using vorbis to decode ogg
[17:10:32.742842] register_flac:286 using flac to decode flc
[17:10:32.742889] register_pcm:404 using pcm to decode aif,pcm
[17:10:32.742993] register_mad:413 using mad to decode mp3
[17:10:32.760272] resample_init:362 resampling sync recipe: 0x44, flags: 0x00, scale: 0.94, precision: 28.0, passband_end: 0.91300, stopband_begin: 1.00000, phase_response: 0.0
[17:10:32.760656] discover_server:807 sending discovery
[17:10:32.771538] discover_server:818 got response from: 192.168.1.1:3483
[17:10:32.772063] slimproto:899 connecting to 192.168.1.1:3483
[17:10:32.773377] slimproto:932 connected
[17:10:32.773556] sendHELO:136 mac: 0f:0c:43:01:0a:94
[17:10:32.773659] sendHELO:138 cap: Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=v1.8.4-720,ModelName=SqueezeLite,MaxSampleRate=192000,dsf,dff,alc,wma,wmap,wmal,aac,ogg,flc,aif,pcm,mp3
[17:10:32.822952] codec_open:221 codec open: 'f'
[17:10:32.823584] stream_sock:393 connecting to 192.168.1.1:9000
[17:10:32.825062] stream_sock:422 header: GET /stream.mp3?player=0f:0c:43:01:0a:94 HTTP/1.0
[17:10:32.901102] stream_thread:180 headers: len: 118
HTTP/1.1 200 OK
Server: Logitech Media Server (7.9.0 - 1463778102)
Connection: close
Content-Type: audio/x-flac
[17:10:33.157421] write_cb:116 setting track_start
[17:10:33.157677] resample_newstream:189 resampling from 96000 -> 192000
[17:10:33.250471] output_thread:664 open output device: botic-split
[17:10:33.259939] alsa_open:381 opening device at: 44100
[17:10:33.418525] alsa_open:432 opened device botic-split using format: S24_LE sample rate: 44100 mmap: 1
[17:10:33.422848] alsa_open:511 buffer: 40 period: 4 -> buffer size: 1764 period size: 441
[17:10:33.748937] process_newstream:124 processing: active
[17:10:33.904445] _output_frames:62 start buffer frames: 45240
[17:10:33.904699] _output_frames:147 track start sample rate: 192000 replay_gain: 0
[17:10:33.914896] output_thread:664 open output device: botic-split
[17:10:33.915455] alsa_open:381 opening device at: 192000
[17:10:33.918829] alsa_open:432 opened device botic-split using format: S24_LE sample rate: 192000 mmap: 1
[17:10:33.920507] alsa_open:511 buffer: 40 period: 4 -> buffer size: 7680 period size: 1920
[17:10:34.011930] output_thread:698 XRUN
[09:21:48.392636] stream_thread:253 end of stream
I use botic 4.5.0-botic7-rc1
TIA
Last edited:
When I use botic 4.0.0-botic5 instead of botic 4.5.0-botic7-rc1 with squeezelite I receive 'unable to set period count Invalid argument'. See log:
.....
....
....
[21:10:25.882294] decode_flush:193 decode flush
[21:10:25.882512] process_flush:173 process flush
[21:10:25.882613] output_flush:424 flush output buffer
[21:10:25.955206] codec_open:221 codec open: 'f'
[21:10:25.955475] stream_sock:393 connecting to 192.168.1.1:9000
[21:10:25.956950] stream_sock:422 header: GET /stream.mp3?player=0f:0c:43:01:0a:94 HTTP/1.0
[21:10:25.975717] stream_thread:180 headers: len: 118
HTTP/1.1 200 OK
Server: Logitech Media Server (7.9.0 - 1463778102)
Connection: close
Content-Type: audio/x-flac
[21:10:26.471537] write_cb:116 setting track_start
[21:10:26.471984] resample_newstream:189 resampling from 88200 -> 176400
[21:10:26.696273] process_newstream:124 processing: active
[21:10:28.235325] output_thread:664 open output device: botic-split
[21:10:28.240107] alsa_open:381 opening device at: 44100
[21:10:28.243571] alsa_open:432 opened device botic-split using format: S24_LE sample rate: 44100 mmap: 1
[21:10:28.244620] alsa_open:471 unable to set period count Invalid argument
[21:10:33.244814] output_thread:664 open output device: botic-split
[21:10:33.247604] alsa_open:381 opening device at: 44100
[21:10:33.250991] alsa_open:432 opened device botic-split using format: S24_LE sample rate: 44100 mmap: 1
[21:10:33.252036] alsa_open:471 unable to set period count Invalid argument
[21:10:38.252241] output_thread:664 open output device: botic-split
[21:10:38.255477] alsa_open:381 opening device at: 44100
[21:10:38.258872] alsa_open:432 opened device botic-split using format: S24_LE sample rate: 44100 mmap: 1
[21:10:38.259916] alsa_open:471 unable to set period count Invalid argument
......
.......
Last edited:
Hi Bern,
The problem may be in the '-a' parameters. You have only the bit depth, the 3rd of 4 parameters. Numbers 1 and 2 are the buffer size and the period size. It is confusing that this specification can be used with two different units - either time (in msec?) or bytes. If you choose time for the buffer (say, '80') then the periods parameter is the count of periods (say, '4'). However, if you choose bytes (I use '8192') then the period size is also measured in bytes (and I use '2048'). So I think squeezelite just needs more info to run. Perhaps test with values that are close to default like: '-a 80:4:24:0'
Good luck!
The problem may be in the '-a' parameters. You have only the bit depth, the 3rd of 4 parameters. Numbers 1 and 2 are the buffer size and the period size. It is confusing that this specification can be used with two different units - either time (in msec?) or bytes. If you choose time for the buffer (say, '80') then the periods parameter is the count of periods (say, '4'). However, if you choose bytes (I use '8192') then the period size is also measured in bytes (and I use '2048'). So I think squeezelite just needs more info to run. Perhaps test with values that are close to default like: '-a 80:4:24:0'
Good luck!
Thanks Frank,Hi Bern,
The problem may be in the '-a' parameters. You have only the bit depth, the 3rd of 4 parameters. Numbers 1 and 2 are the buffer size and the period size. It is confusing that this specification can be used with two different units - either time (in msec?) or bytes. If you choose time for the buffer (say, '80') then the periods parameter is the count of periods (say, '4'). However, if you choose bytes (I use '8192') then the period size is also measured in bytes (and I use '2048'). So I think squeezelite just needs more info to run. Perhaps test with values that are close to default like: '-a 80:4:24:0'
Good luck!
With 4.0.0-botic5 I tried '-a 80:4:24:0' and '-a 16384:1024:24:' and couldn't run squeezelite (still receive error: 'unable to set period count Invalid argument') so I returned to botic 4.5.0-botic7-rc1.
In both botic 4.0.0-botic5 and 4.5.0-botic7-rc1 I can play:
Code:
root@botic:~# speaker-test -D botic-split -c 4
speaker-test 1.0.27.2
Playback device is botic-split
Stream parameters are 48000Hz, S16_LE, 4 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 4 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
0 - Front Left
1 - Front Right
3 - Rear Right
2 - Rear Left
Time per period = 11.624481
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...
- Home
- More Vendors...
- Twisted Pear
- Support for Botic Linux driver