SPDIF Digital Audio gets pops playing music.

Max2Play Home 2016 (en) Forums Max2Play as Squeezebox (Player / Server) SPDIF Digital Audio gets pops playing music.

This topic contains 14 replies, has 2 voices, and was last updated by  Raymond Day premium 3 weeks, 2 days ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • 23. Oktober 2020 at 15:11 #49899

    Not sure what is wrong. I got Max2play installed on Ubuntu desktop 20.04 updated from 18. On a Atom Intel stick.

    Got a USB to audio. It’s a „VAlinks USB 2.0 External sound card 6 channel 5.1 Surround Optical S/PDIF Audio Sound card Adapter…“

    Picked the audio s/pdif out and it works. But every 20 sec. or so get a pop sound.

    „iec958 – USB Sound Device, USB Audio – IEC958 (S/PDIF) Digital Audio Output, CARD=Device,DEV=0“ is what I picked for the Soundcard under Audioplayer and got checked Use USB-DAC.

    Could the S/PDIF cable be dirty? I am just not sure.

    -Raymond Day

    25. Oktober 2020 at 14:23 #49904

    I think I have to increase the buffer size. Read „if hearing any clicks, pops. or other flitches. If the buffer size is too small“ is there a way to type in to ALSA Parameter something to do this. Right now just have „80:4::“ in there now. At the man page for squeezelite is shows command but is there one to increase the buffer size?

    -Raymond Day

    25. Oktober 2020 at 14:28 #49905

    Here is what it says there:

    -a <params>
    Specify parameters used when opening an audio output device. For ALSA, the format
    <b>:<p>:<f>:<m> is used where <b> is the buffer time in milliseconds (values less
    than 500) or size in bytes (default 40ms); <p> is the period count (values less
    than 50) or size in bytes (default 4 periods); <f> is the sample format (possible
    values: 16, 24, 24_3 or 32); <m> is whether to use mmap (possible values: 0 or 1).
    For PortAudio, the value is simply the target latency in milliseconds. When the
    output is sent to standard output, the value can be 16, 24 or 32, which denotes the
    sample size in bits.

    So how would I put that in the „ALSA Parameter“ part under „Audioplayer“ I did a „a b32“ to say buffer time 32 in size. But I don’t think that is the right way to do it. They should show some examples on that man page.

    -Raymond Day

    • This reply was modified 1 month ago by  Raymond Day.
    25. Oktober 2020 at 14:36 #49907

    In the „ALSA Parameter“ I put just „a“ and the „Command Line Options“ „b499“ I thought it would make the buffer big. But I still get Pops in the songs.

    -Raymond Day

    27. Oktober 2020 at 11:43 #49919

    Here is the „DEBUG Informationen“

    #### SQUEEZELITE VERSION ####
    Squeezelite v1.8, Copyright 2012-2015 Adrian Smith.
     
    
    #### SQUEEZELITE BUILDOPTIONS ####
    Build options: LINUX ALSA EVENTFD RESAMPLE FFMPEG VISEXPORT IR DSD LINKALL
     
    
    #### AUDIOPLAYER CONFIG ####
    ### Configuration of Audioplayers
    SQUEEZELITE_PARAMETER=-o iec958:CARD=Device,DEV=0 -a 80:4::
    SQUEEZESLAVE_PARAMETER=-n plugequal
    SHAIRPORT_PARAMETER=-d iec958:CARD=Device,DEV=0
    USE_USB_DAC=1
    USE_EQUALIZER=0
     
    
    #### SQUEEZELITE -l ####
    Output devices:
      null                           - Discard all samples (playback) or generate zero samples (capture)
      samplerate                     - Rate Converter Plugin Using Samplerate Library
      speexrate                      - Rate Converter Plugin Using Speex Resampler
      jack                           - JACK Audio Connection Kit
      oss                            - Open Sound System
      pulse                          - PulseAudio Sound Server
      upmix                          - Plugin for channel upmix (4,6,8)
      vdownmix                       - Plugin for channel downmix (stereo) with a simple spacialization
      default:CARD=Audio             - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Default Audio Device
      sysdefault:CARD=Audio          - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Default Audio Device
      hdmi:CARD=Audio,DEV=0          - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - HDMI Audio Output
      hdmi:CARD=Audio,DEV=1          - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - HDMI Audio Output
      hdmi:CARD=Audio,DEV=2          - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - HDMI Audio Output
      dmix:CARD=Audio,DEV=0          - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct sample mixing device
      dmix:CARD=Audio,DEV=1          - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct sample mixing device
      dmix:CARD=Audio,DEV=2          - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct sample mixing device
      dsnoop:CARD=Audio,DEV=0        - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct sample snooping device
      dsnoop:CARD=Audio,DEV=1        - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct sample snooping device
      dsnoop:CARD=Audio,DEV=2        - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct sample snooping device
      hw:CARD=Audio,DEV=0            - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct hardware device without any conversions
      hw:CARD=Audio,DEV=1            - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct hardware device without any conversions
      hw:CARD=Audio,DEV=2            - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Direct hardware device without any conversions
      plughw:CARD=Audio,DEV=0        - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Hardware device with all software conversions
      plughw:CARD=Audio,DEV=1        - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Hardware device with all software conversions
      plughw:CARD=Audio,DEV=2        - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi - Hardware device with all software conversions
      usbstream:CARD=Audio           - Intel HDMI/DP LPE Audio - USB Stream Output
      default:CARD=Device            - USB Sound Device, USB Audio - Default Audio Device
      sysdefault:CARD=Device         - USB Sound Device, USB Audio - Default Audio Device
      front:CARD=Device,DEV=0        - USB Sound Device, USB Audio - Front speakers
      surround21:CARD=Device,DEV=0   - USB Sound Device, USB Audio - 2.1 Surround output to Front and Subwoofer speakers
      surround40:CARD=Device,DEV=0   - USB Sound Device, USB Audio - 4.0 Surround output to Front and Rear speakers
      surround41:CARD=Device,DEV=0   - USB Sound Device, USB Audio - 4.1 Surround output to Front, Rear and Subwoofer speakers
      surround50:CARD=Device,DEV=0   - USB Sound Device, USB Audio - 5.0 Surround output to Front, Center and Rear speakers
      surround51:CARD=Device,DEV=0   - USB Sound Device, USB Audio - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
      surround71:CARD=Device,DEV=0   - USB Sound Device, USB Audio - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
      iec958:CARD=Device,DEV=0       - USB Sound Device, USB Audio - IEC958 (S/PDIF) Digital Audio Output
      dmix:CARD=Device,DEV=0         - USB Sound Device, USB Audio - Direct sample mixing device
      dsnoop:CARD=Device,DEV=0       - USB Sound Device, USB Audio - Direct sample snooping device
      hw:CARD=Device,DEV=0           - USB Sound Device, USB Audio - Direct hardware device without any conversions
      plughw:CARD=Device,DEV=0       - USB Sound Device, USB Audio - Hardware device with all software conversions
      usbstream:CARD=Device          - USB Sound Device - USB Stream Output
    
     
    
    #### SHAIRPORT (SYNC) VERSION ####
     
    
    #### OUTPUT SOUND DETAILS CARD 0 ####
    closed
     
    
    #### OUTPUT SOUND DETAILS CARD 1 ####
    access: MMAP_INTERLEAVED
    format: S16_LE
    subformat: STD
    channels: 2
    rate: 44100 (44100/1)
    period_size: 441
    buffer_size: 1764

    Guess I just have to make the „buffer_size: 1764“ bigger. How do I do that?

    -Raymond Day

    27. Oktober 2020 at 12:42 #49925

    Hi Raymond,

    Please try something like „-a 160:4::“ instead of „-a 80:4::“ to increase the buffer size.

    27. Oktober 2020 at 17:10 #49934

    Thank you MarioM. I did that in the ALSA Parameter and rebooted.

    It seperated it with just the -a in ALSA Parameter and in the Command Line Options put the 160:4::

    Took a screenshot of it to show this. Linked it to my Google photos.

    But it still get pops when playing music. Maybe not as much. Maybe I can do the 160 number more?

    The command line still shows the buffer_size the same 1764:

    [email protected]:~# cat /proc/asound/card1/pcm0p/sub0/hw_params
    access: MMAP_INTERLEAVED
    format: S16_LE
    subformat: STD
    channels: 2
    rate: 44100 (44100/1)
    period_size: 441
    buffer_size: 1764
    [email protected]:~#

    -Raymond Day

    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.

    [email protected]:/opt/max2play# squeezelite -o hw:CARD=Device,DEV=0 > /dev/null 2>&1                                                                                  &
    [1] 3594
    [email protected]:/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
    [email protected]:/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

    28. Oktober 2020 at 5:40 #49939

    Still been working on it.

    Been editing the /opt/max2play/alsa_max2play_usb.conf and /usr/share/alsa/alsa.conf.d they are the same files.

    near the end I changed the „buffer_size“ from 8024 to 11264 and rebooted. If I did it over that seems like the audio would not play.

    But I still get pops like in the sound.

    Did fix it so only one Squeezelite is running unchecked the „Autostart Squeezelite“ because I got it starting in the custom_autostart.sh file. but I checked and still it has now 4 running.

    /usr/bin/squeezelite -n rayday1
    sudo -u root -H -s squeezelite -o hw:CARD=Device,DEV=0
    /bin/sh -c squeezelite -o hw\:CARD\=Device\,DEV\=0
    squeezelite -o hw:CARD=Device,DEV=0

    Then 4. I can kill all but the last one. If I kill the last one the music stops. But it will auto start again. Even with just that running I still get clicks in the music every now and then.

    Hard thing to fix this SPDIF Digital Audio. Maybe I should just switch it to the RCA audio plugs but it be nice to get it working good with the SPDIF Digital Audio.

    It sounds like old click in a vinyl record with dust on it.

    -Raymond Day

    28. Oktober 2020 at 14:47 #49962

    Hi Raymond,

    Please try again to enter „160:4::“ in the ALSA parameters without the „-a“, which is already in front of the parameter. You can also use values greater than 160 (up to 500). I believe, however, that the dropouts have more to do with the system itself or the sound card. Unfortunately, we can only offer you limited support because you do not run Max2Play on a Raspberry Pi as intended.

    28. Oktober 2020 at 22:48 #49971

    I put ‚500:4::‘ but it still clicks. I got a cleaner for SPDIF and I clean it but it did not fix it.

    Just don’t know what it wrong with it. It Clicks just how old vinyl record when vinyl record is no clean. I bought it from Amazon but like I said it did not fix it.

    -Raymond Day

    3. November 2020 at 14:09 #49997

    Hi Raymond,

    Have you already tested the sound card with other audio sources? Do such clicks also occur there? Maybe there is a hardware defect.

    3. November 2020 at 18:19 #50003

    No I don’t have any other but looking to buy one.

    When I did one says to do this „Please choose PCM/LPCM on your TV as audio output format.“ is there a way to set Max2play like that. Maybe that’s it.

    -Raymond Day

    4. November 2020 at 17:16 #50037

    I seen I can put more than 500 in the „ALSA Parameter“ I was adding 1024 on it and rebooting till Squeezelite started to run again. I got up to 10240. So in it now is 10240:4:: and it works but still get clicks but not as much and not as long now.

    Should get another USB to S/PDIF converter only cost $5.59 at Amazon.

    Will see if that fixes it. If not guess will just use the RCA audio plugs.

    -Raymond Day

    5. November 2020 at 0:53 #50038

    I got it today and it works!

    Very good USB to SPDIF. This one works very good now no clicks now!

    I picked this one:

    iec958:CARD=Set,DEV=0 - C-Media USB Headphone Set, USB Audio - IEC958 (S/PDIF) Digital Audio Output

    Wow it only cost less then $6 from Amazon. I order it yesterday and I got it today. No clicks now sounds very good. So that fixed it.

    -Raymond Day

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.

Register here