Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 19 12311 ... LastLast
Results 1 to 10 of 188
  1. #1

    Start/restart squeezelite when plug-in USB dac

    It Is possibile to do this?
    I need to start or restart squeezelite when i Power on my USB dac.
    Because if dac Is off squeezelite dont start and i need to start It manualy.
    By udev event?

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    3,641
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  3. #3
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    1,975
    Quote Originally Posted by Paul Webster View Post
    I'm not sure this will help in this case. That tweak means that once Squeezelite has started, it doesn't mind the USB DAC disappearing - it will output to it again without intervention once the DAC reappears. But in my experience Squeezelite will still fail to start at boot time if the DAC isn't there.

    That tweak MAY help the OP if he can find a way to force Squeezelite to start regardless of whether the DAC is present (I'd be interested in such a solution too) - that tweak may then mean that as soon as the DAC appears Squeezelite will then be happy to output to it.

  4. #4
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,790
    Try enabling the Close output setting (-C) option with a value of 5.

    It's suppose to allow squeezelite to start and wait for the device to appear.

    You need to use the hw:CARD= device with the -o option not plughw:CARD=
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

  5. #5
    Quote Originally Posted by ralphy View Post
    Try enabling the Close output setting (-C) option with a value of 5.

    It's suppose to allow squeezelite to start and wait for the device to appear.

    You need to use the hw:CARD= device with the -o option not plughw:CARD=
    Not works.
    Now, my dac Is Power off. Squeezelite Is down. I try to start squeezelite by SSH to Copy the output:
    tc@Stereo:~$ /usr/local/bin/squeezelite -n "Stereo" -o hw:CARD=R20,DEV=0 -a 80:4::1: -C 5
    [13:10:54.592723] test_open:281 playback open error: No such device
    [13:10:54.592815] output_init_common:394 unable to open output device: hw:CARD=R20,DEV=0
    tc@Stereo:~$

    As you see, if the dac Is off, squeezelite dont accept "-o hw:card....." because It not exist. If i Power on dac It works.
    I'm thinking an udev rule that start squeezelite when dac Is on...

  6. #6
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    1,975
    Quote Originally Posted by ralphy View Post
    Try enabling the Close output setting (-C) option with a value of 5.

    It's suppose to allow squeezelite to start and wait for the device to appear.

    You need to use the hw:CARD= device with the -o option not plughw:CARD=
    Thanks Ralphy - that's done the trick in my case. With the output set to hw:CARD=DAC,DEV=0, and the -C 5 option, Squeezelite starts up even if the DAC is off, and starts outputting to it as soon as the DAC appears. It's also equally robust if I should disconnect and then reconnect the DAC while it's playing.

  7. #7
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    1,975
    @corrobor - you posted just before me, and evidently have different results. I think my case is slightly different, in that my USB DAC is one of several inputs built into my amp (a Hypex DLCP). Previously, if I had the amp switched to 'optical' instead of 'USB' while the Pi was booting, the DAC would not be found and Squeezelite would not start. But now I find that I can even do without the '-C 5' option. The difference is that I'm now using 'hw:CARD=DAC,DEV=0' under pCP7, whereas previously I was using 'front:CARD=DAC,DEV=0' under pCP6. Something has clearly changed, for the better in my case.

  8. #8
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,790
    Using an ALSA output prefix other than hw: with the -o option "hides" some or all of the physical capabilities of the audio hardware from squeezelite behind the ALSA subsystems.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

  9. #9
    Quote Originally Posted by ralphy View Post
    Using an ALSA output prefix other than hw: with the -o option "hides" some or all of the physical capabilities of the audio hardware from squeezelite behind the ALSA subsystems.
    I Need to automatcly "Press" the squeezelite restart button when dac Is plugin. I can write udev rules but what Is the command ti press the restart button?

  10. #10
    Quote Originally Posted by ralphy View Post
    Using an ALSA output prefix other than hw: with the -o option "hides" some or all of the physical capabilities of the audio hardware from squeezelite behind the ALSA subsystems.
    Sorry, why if i press the "restart" button in the web interface squeezelite start (the icon become green) and instead if i do this command in SSH Shell "/usr/local/bin/squeezelite -n "Stereo" -o hw:CARD=R20,DEV=0 -a 80:4::1:" the icon Is Red ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •