Go Back   Home > Forums > > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Twisted Pear Superior quality electronic kits

Reply
 
Thread Tools Search this Thread
Old 17th November 2015, 08:30 AM   #21
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Quote:
Originally Posted by miero View Post
in botic6 with enabled i2c control of es9018 within kernel driver the dac will be muted (by using mute flag in that register) everytime
OK - that's reassuring! It is easier to use register 10 than both 22 and 23!
Quote:
Originally Posted by miero View Post
I have to figure out how to integrate control of multiple DACs into ALSA control system.
Me too! When I want to use headphones I only need 2 channels with 1 DAC. So what I have been doing is using a script to a) cp a 2 channel version of the Alsa configuration file to asound.conf, then b) execute aplay -L, then c) kill and restart squeezelite. I do the same procedure using an 8 channel Alsa crossover configuration to change back to speaker output. I think there must be a better way!

Thanks for your dedication!

Frank
  Reply With Quote
Old 17th November 2015, 09:21 PM   #22
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Quote:
Originally Posted by miero View Post
but I have to figure out how to integrate control of multiple DACs into ALSA control system.
...silly of me - it was too late at night...

I confirmed today that all of the relevant plugins can live in the same asound.conf file, as long as they have separate names/pathways from input to output. So in my easy case with all Buffalo DACs, I send squeezelite output to 'default' for 6 channels and I send it to the 'phones' plugin for 2 channels. That way, the control script to go between speaker vs. headphone configurations only needs to kill squeezelite and restart it with a different '-o' parameter.

Though I imagine you (Miero) are contemplating a far broader range of compatibility issues... If there is any way I can help, please let me know.

Code:
root@botic:/etc# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
filter1
delay
speaker
t-table8
default
phones
t-table2
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
root@botic:/etc# squeezelite -z -o phones -a 8192:2048::0
  Reply With Quote
Old 20th November 2015, 11:14 PM   #23
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Default Good performance using NetIO for BBB control

I have been pounding away with Python and now have a very decent remote system controller running on my iPad. In terms of the BBB, it uses a combination of GPIO controls/interrupts, I2C from both shell and python scripts, and the NetIO system using a python TCP server on the BBB. There are a couple of inputs (spdif sources) that must await Botic 6, but with luck they will incorporate easily. I hope to run them through the BBB rather than directly to one BuffaloIIIse because the BBB is also running a 3-way non-resampling LADSPA crossover. This explains the ability to trim each stereo Buffalo to shape the driver responses. While i was at it - making an old-school preamp at 48 bits - I threw in a left/right balance control.

Several posts back are photos of the DACs and unfinished BBB case. I'm updating just to show the finished (2.5"X11") BBB faceplate with momentary buttons for 'manual' control (via GPIO). The buttons launch the same scripts as the input/output buttons in the tablet controller. My favorite little gizmo? the sample rate "speedometer"! At 176kHz it was playing vintage Brubeck.

The code to integrate the system all works but is a bit rough because I am not a programmer! I would like to have it reviewed by somebody knowledgable in Python. Best to optimize it, because it is now using subprocess calls with shell=True. I will post when that process is complete. If others will use the code, better to adhere to 'best practices' as much as possible. It is my intention to make all of this freely available because, when you start digging, the NetIO documentation is pretty sketchy.

This effort only builds peripherally on the fundamental expertise and, I would say, passion of Miero, Russ, and Brian. I have said before that I think these headless clock-switching systems have a good bit of room for development remaining. I look very much forward to seeing what is in store in Botic 6. "Recording", hopefully!!!

Best,

Frank
Attached Images
File Type: png IMG_0287.PNG (158.1 KB, 328 views)
File Type: jpg BBB.jpg (808.1 KB, 332 views)
  Reply With Quote
Old 21st November 2015, 06:46 AM   #24
Kaskade is offline Kaskade  Norway
diyAudio Member
 
Join Date: Apr 2015
This is awesome!

I have just finished my B3SE build with BBB and a small Python program to control volume and inputs with a rotary encoder.

Would love to try NetIO later when I get time.
Thanks for sharing!
  Reply With Quote
Old 21st November 2015, 01:24 PM   #25
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Thanks @Kaskade. There is plenty of room for expanding these methods and making them suit others' individual systems. One thing that occurs to me is expanding the server to listen on more than one TCP port. For example, Squeezelite can be controlled from several sources at once. It would be nice if each could have volume control via TCP. ...but first I will work on cleaning up the existing Python code for sharing...
  Reply With Quote
Old 22nd November 2015, 07:17 PM   #26
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Here is a fantastic tip for BBB tinkerers:

Unbrick BeagleBone Black without erasing eMMC | Hipstercircuits

As written, it mounts the eMMC after booting from the uSD card. If you want to go the other way, change 'mmcblk0p2' to 'mmcblk1p2'. I used it to undo a flub and it saved me many hours.
  Reply With Quote
Old 14th December 2015, 07:46 PM   #27
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
I showed the python controller script to a friend with significant Python saavy. He felt the code was good to share with the caveat that the TCP ports it opens are not very secure. I use wired internet for my BBB, so i have no qualms considering my other firewalls. I doubt that the "keys to the palace" can be found loaded into our Audio BBBs, but I would think about network security if I used this script via wifi in a crowded digital environment!

I have moved to GitHub to distribute code: https://github.com/francolargo/BBB-audio/tree/master

The server that runs on the BBB is 'netio_server.py' and the controller file to upload to a Netio account is 'BBB_iPad'. I am not done tinkering and learning so I will keep the GitHub code up to date, with descriptions and comments here. I'd like an iPhone version that can run concurrently but its priority is low right now.

Cheers,

Frank
  Reply With Quote
Old 14th December 2015, 08:17 PM   #28
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
One frustration I have faced with the netio_server.py script is that I can only launch it from the command line in Botic. On the command line several of the usual syntaxes work well. However, none of them work if included in /etc/rc.local (even though a different python script does launch reliably from rc.local). Also, I have tried creating an init.d script and none of the 'stock' formats will launch this TCP server. I don't know what I need to learn. Any suggestions from anybody?
  Reply With Quote
Old 14th December 2015, 09:09 PM   #29
miero is offline miero  Czech Republic
diyAudio Member
 
Join Date: Jun 2011
Location: Prague
probably some console dependency ... standard input or output

try to execute it following way: nohup /path/to/script/netio_server.py

this should redirect output to file nohup.out ... check its content if it started correctly
__________________
BeagleBone Black with I2S, DSD and SPDIF interface (Linux driver)
http://bbb.ieero.com/
  Reply With Quote
Old 14th December 2015, 10:23 PM   #30
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Thanks Miero, I will look into it tonight.

For now, things fell into place and I have two TCP ports working simultaneously in netio_server.py. Thus, I can control BBB from both iPad and iPhone simultaneously. Here is a screenshot of the current iPhone control panel. iPhone 6S is a little tricky compared to iPad because the finger pressure has to be correct.
Attached Images
File Type: png IMG_2717.PNG (67.1 KB, 246 views)
  Reply With Quote

Reply


Control of BBB-based audio appliancesHide 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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a volume control to a TPA3122-based audio kit i336 Class D 2 9th June 2015 07:50 AM
How do I use my appliances on a Furman PL8CE? Akins Equipment & Tools 21 20th May 2015 06:24 PM
Powering non-speaker appliances with an amp cspirou Everything Else 4 4th November 2014 11:34 AM
Household Appliances repair forum Tarzan Everything Else 7 22nd August 2012 08:54 PM
Transformer-based volume control wboyd Analogue Source 4 18th August 2004 05:57 PM


New To Site? Need Help?

All times are GMT. The time now is 02:02 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Copyright ©1999-2019 diyAudio
Wiki