[ale] Squeezelite + ecasound + sox on Beaglebone Black

Horkan Smith ale at horkan.net
Thu Jul 9 10:32:13 EDT 2015


On pre-systemd Debian systems, I usually put stuff like this in /etc/rc.local - not sure if that survived the systemd changes, I'll have to look.

Diagnosis:

Have you been able to get any logs of your attempts?

Just to make sure it's running, and capture the easy-to-capture errors, I'll usually put simple 'I got this far' logs around whatever I try to start; to log to the console and to append to a file in /tmp - something like

---
echo $(/bin/date): hey im about to start my program here
echo $(/bin/date): hey im about to start my program here >>/tmp/hslogfile.txt

#actually start my program 2>&1 | tee -a /tmp/hslogfile.txt

echo $(/bin/date): hey i got back from starting my program
echo $(/bin/date): hey i got back from starting my program >>/tmp/hslogfile.txt
---


Is there any reason to think one of your components doesn't like being backgrounded, or disconnected from a tty?

Manually from the command line, try running something like:

# ./squeezelite.sh &

or

# ./squeezelite.sh </dev/null >/dev/null 2>&1

or

# nohup ./squeezelite.sh </dev/null >/dev/null 2>&1

or even

# batch <<end
./squeezelite.sh </dev/null >/tmp/logfile.txt 2>&1
end

Something else to try; you could add something like this to your startup script, once you're sure it's running:

screen -d -m -S "squeezelite" bash /path-to-squeezelite.sh/squeezelite.sh

Then, once you're booted and can look at it, try:

# screen -ls

To list the available screen sessions, and:

# screen -r squeezelite

to rejoin the screen session in progress.  When you want to disconnect from that session, type a Control-A followed by a 'd'.

later!
   horkan


On Wed, Jul 08, 2015 at 12:47:02AM -0400, Ian Forrest wrote:
> Hey all,
> 
> I suspect that this is an easier question than I'm making it; I ran linux
> forever before law school, but never got too creative with it, so please
> forgive me if I'm missing something obvious.
> 
> I am using a Beaglebone Black running Debian as the brains of a stereo
> setup. I am running squeezelite (a software player for the logitech media
> server), piping it into ecasound for equalization and crossover filters,
> and finally sox for dithered re-quantization so that everything can be sent
> out to a dinky USB soundcard. This is all I plan on having the Beaglebone
> do, at least for the time being.
> 
> I have a bash script that does all this, cobbled together from a really
> great guide at
> http://rtaylor.sites.tru.ca/2013/06/25/digital-crossovereq-with-open-source-software-howto/
> . With a couple anonymizing modifications, it looks something like this:
> 
> 
> #!/bin/sh
> /home/debian/squeezelite -o - -u vL -a ::32:0 -n Speakers -s 192.168.x.x |
> ecasound -q -z:mixmode,sum -x -a:pre -f:s32_le,2,44100 -i:stdin
> -pf:/home/debian/ecasound/pre.ecp -o:loop,1 -a:woofer,fullrange -i:loop,1
> -a:woofer -pf:/home/debian/ecasound/woofer.ecp -chorder:1,2,0,0
> -a:fullrange -pf:/home/debian/ecasound/fullrange.ecp -chorder:0,0,1,2
> -a:woofer,fullrange -f:f32_le,4,44100 -o:stdout | sox -q -c 4 -r 44100 -b
> 32 -e float -L -t raw - -e signed -c 4 -b 16 -t alsa surround40:Device
> dither -s
> 
> This works. ./squeezelite.sh runs and is off to the races, makes pretty
> noises, etc.
> 
> The problem is daemonizing it and having it run at startup. Something tells
> me this is due to failure to understand scripting generally and pipes
> specifically. For now, I have to start a putty session and run the script
> myself. I have yet to find a good way to get it going automatically.
> 
> I have tried to modify the init.d script given here without luck (most
> recently by just shoving my pipes in as squeezelite arguments):
> http://www.computeraudiophile.com/blogs/k-man/configuring-beaglebone-black-run-squeezelite-452/
> 
> I have also tried a few named pipe experiments, all of which work in a
> putty session, but none of which behave without me initiating them.
> 
> If possible, I'd like to do it all with a small change to the linked
> script, rather than going off on my own. Anyone have thoughts on what that
> modification might look like, or (more likely) what question I OUGHT to be
> asking?
> 
> Thanks, and hope to see some of you all this Sunday.
> 
> Best regards,
> Ian
> 
> -- 
> R. Ian Forrest
> (404) 236-9436
> J.D. 2013, University of Kentucky College of Law

> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


-- 
Horkan Smith
678-777-3263 cell, ale at horkan.net


More information about the Ale mailing list