Support for Botic Linux driver - Page 169 - diyAudio
Go Back   Home > Forums > Commercial Sector > Manufacturers > Twisted Pear
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Twisted Pear Superior quality electronic kits

Reply
 
Thread Tools Search this Thread
Old 30th May 2016, 07:59 AM   #1681
bern is offline bern  Poland
diyAudio Member
 
Join Date: Jul 2010
Quote:
Originally Posted by miero View Post
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
    }
}
optargs line of uEnv.txt file (hope right justified DATA format is selected):
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
squeezelite runs with following parameters: ('botic-split' as output device is selected as well as 24 bit output with -a ::24)
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
squeezelite log:
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
Where I made a mistake? I would be grateful for any hints.
I use botic 4.5.0-botic7-rc1
TIA

Last edited by bern; 30th May 2016 at 08:02 AM.
  Reply With Quote
Old 30th May 2016, 07:17 PM   #1682
bern is offline bern  Poland
diyAudio Member
 
Join Date: Jul 2010
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:
Quote:
.....
....
....
[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 by bern; 30th May 2016 at 07:39 PM.
  Reply With Quote
Old 30th May 2016, 08:48 PM   #1683
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
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!
  Reply With Quote
Old 31st May 2016, 02:34 AM   #1684
bern is offline bern  Poland
diyAudio Member
 
Join Date: Jul 2010
Quote:
Originally Posted by francolargo View Post
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!
Thanks Frank,
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
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...
  Reply With Quote
Old 31st May 2016, 01:24 PM   #1685
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Quote:
Originally Posted by bern View Post
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.
  Reply With Quote
Old 31st May 2016, 01:33 PM   #1686
dwjames is offline dwjames  United Kingdom
diyAudio Member
 
dwjames's Avatar
 
Join Date: Jun 2012
Quote:
Originally Posted by francolargo View Post
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
  Reply With Quote
Old 31st May 2016, 01:53 PM   #1687
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
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.
  Reply With Quote
Old 31st May 2016, 02:13 PM   #1688
twluke is offline twluke  Japan
diyAudio Member
 
Join Date: Nov 2012
Location: Tokyo
Quote:
Originally Posted by miero View Post
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 Debian -- Security Information jessie/updates InRelease
Hit Index of / jessie InRelease                                   
Hit Index of / jessie InRelease                                     
Get:1 Debian -- Security Information jessie/updates/main armhf Packages [299 kB]   
Get:2 Index of / jessie/main armhf Packages [469 kB]              
Get:3 Index of / jessie/main armhf Packages [4567 B]                
Get:4 Debian -- Security Information jessie/updates/contrib armhf Packages [994 B] 
Get:5 Debian -- Security Information jessie/updates/non-free armhf Packages [20 B] 
Ign Debian mirrors HTTP redirector jessie InRelease                               
Hit https://deb.nodesource.com jessie InRelease                             
Get:6 https://deb.nodesource.com jessie/main armhf Packages [976 B]            
Hit Debian mirrors HTTP redirector jessie-updates InRelease                       
Hit Debian mirrors HTTP redirector jessie Release.gpg                             
Hit Debian mirrors HTTP redirector jessie Release                                 
Get:7 Debian mirrors HTTP redirector jessie-updates/non-free armhf Packages [450 B]
Get:8 Debian mirrors HTTP redirector jessie-updates/contrib armhf Packages [20 B] 
Get:9 Debian mirrors HTTP redirector jessie/contrib armhf Packages [44.6 kB]      
Get:10 Debian mirrors HTTP redirector jessie/main armhf Packages [8834 kB]        
Get:11 Debian mirrors HTTP redirector jessie-updates/main armhf Packages [9276 B] 
Get:12 Debian mirrors HTTP redirector 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
  Reply With Quote
Old 31st May 2016, 02:29 PM   #1689
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Quote:
Originally Posted by twluke View Post
Hi, I tried this with clean installation of Jessie but got stuck with errors after 02-install.sh like below:
That's the exact same error I got.

For those who want to push the boundaries of Botic, I think Jessie will be preferable to Wheezy. So the effort to make Boticize scripts will be an investment in progress. Many thanks in advance!
  Reply With Quote
Old 31st May 2016, 05:07 PM   #1690
miero is offline miero  Czech Republic
diyAudio Member
 
Join Date: Jun 2011
Location: Prague
Try to remove the linux-libc-dev=... from that script and rerun.

I'm not able to test that in these days.
__________________
BeagleBone Black with I2S, DSD and SPDIF interface (Linux driver)
http://bbb.ieero.com/
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open baffle with fullrange driver and bass support Godzilla Full Range 5 22nd July 2011 01:32 PM
Low end support for single driver monitors strider75 Multi-Way 97 30th September 2009 03:02 PM
ASIO support (driver) for Labview Aoxomox Digital Line Level 0 3rd May 2009 05:29 PM
Linux/BruteFIR support coming in LspCAD tcpip Multi-Way 18 18th October 2005 03:08 AM
linux badgers Introductions 3 3rd April 2005 03:27 PM


New To Site? Need Help?

All times are GMT. The time now is 10:24 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright 1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2
Wiki