Reply To: SPDIF Digital Audio gets pops playing music.

Max2Play Home Forums Max2Play as Squeezebox (Player / Server) SPDIF Digital Audio gets pops playing music. Reply To: SPDIF Digital Audio gets pops playing music.

28. Oktober 2020 at 4:16 #49938

Been trying to fix this.

I know to start squeezelite I had to put a command in /opt/max2play/custom_autostart.sh else it will not play but it shows it running.

I started it on the command line and it starts to play then. But is this the right way to start it. I all so did a aplay -l to show what I should pick to start it. I am using the USB sound.

root@rayday1:/opt/max2play# squeezelite -o hw:CARD=Device,DEV=0 > /dev/null 2>&1                                                                                  &
[1] 3594
root@rayday1:/opt/max2play# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Audio [Intel HDMI/DP LPE Audio], device 0: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Audio [Intel HDMI/DP LPE Audio], device 1: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audio [Intel HDMI/DP LPE Audio], device 2: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
root@rayday1:/opt/max2play#

Here is what the custom_autostart.sh file looks like:

#!/bin/bash
#Custom Autostart File
sudo -u root -H -s squeezelite -o hw:CARD=Device,DEV=0 > /dev/null 2>&1 &

If I look what squeezelite is running is shows 3 of them on boot.

sudo -u squeezelite -o hw\:CARD\=Device\,DEV\=0
/bin/sh -c squeezelite -o hw\:CARD\Device\,DEV\=0
squeezelite -o hw:CARD=Device,DEV=0

I can kill the top 2 and it still works. If I put a # before the Custom Auto Start so it don’t start then it shows this running:

/usr/bin/squeezelite -n rayday1

But it will not play I have to run the:

squeezelite -o hw:CARD=Device,DEV=0 > /dev/null 2>&1 &

Then it starts to play.

I can kill the /usr/bin/squeezelite -n rayday1 and it still plays. That is how it starts up if I don’t do the custom_autostart.sh. But then it don’t play.

But I still get little clicks with just one squeezelite running the one I do with the custom_autostart.sh. So maybe I should edit that command some my fix it?

Were does max2play do the /usr/bin/squeezelite -n rayday1 maybe I can edit that so only one will be running the one that works.

-Raymond Day