1 1

Squeezelite and spdif / sound frequently interrupted

Recommended Posts


I have just changed from a custom legacy kernel to armbian and like the experience.

I use the Logitech Media Server and squeezelite, mainly to play radio on the armbian box itself as well as on a Squeezebox Radio I still have.

This works in principle, but using the spdif optical output, I get an interrupt every minute or so of about half a second.

Is this common and do I need to install something in addition to use the spdif output?


System information:

  • Allwinner A20 cubietruck
  • Kernel (uname -r): 4.19.62-sunxi
  • Squeezelite v1.8

  • Logitech Media Server Version: 7.9.2 - 1565967976 @ Fri Aug 16 17:18:03 CEST 2019

  • output of aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: sun4icodec [sun4i-codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: SPDIF [On-board SPDIF], device 0: spdif-dit-hifi dit-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
  • output of squeezelite -l
Output devices:
  null                           - Discard all samples (playback) or generate zero samples (capture)
  default:CARD=sun4icodec        - sun4i-codec,  - Default Audio Device
  sysdefault:CARD=sun4icodec     - sun4i-codec,  - Default Audio Device
  dmix:CARD=sun4icodec,DEV=0     - sun4i-codec,  - Direct sample mixing device
  dsnoop:CARD=sun4icodec,DEV=0   - sun4i-codec,  - Direct sample snooping device
  hw:CARD=sun4icodec,DEV=0       - sun4i-codec,  - Direct hardware device without any conversions
  plughw:CARD=sun4icodec,DEV=0   - sun4i-codec,  - Hardware device with all software conversions
  default:CARD=SPDIF             - On-board SPDIF,  - Default Audio Device
  sysdefault:CARD=SPDIF          - On-board SPDIF,  - Default Audio Device
  dmix:CARD=SPDIF,DEV=0          - On-board SPDIF,  - Direct sample mixing device
  dsnoop:CARD=SPDIF,DEV=0        - On-board SPDIF,  - Direct sample snooping device
  hw:CARD=SPDIF,DEV=0            - On-board SPDIF,  - Direct hardware device without any conversions
  plughw:CARD=SPDIF,DEV=0        - On-board SPDIF,  - Hardware device with all software conversions


I run squeezlite with option -o hw:1

other options I tried was -o default:CARD=SPDIF, -o hw:CARD=SPDIF,DEV=0, plughw:CARD=SPDIF,DEV=0

The default option was the worst in terms of interrupts, I think.


Any hints?  Cannot see anything suspicious in the logs.  The interrupts do not appear if I use the hw:0 (sun4icodec), but the volume level and noise is much better with the spdif.

I read somewhere that it is normally not necessary to mess with buffer or alsa parameters. (-b / -a options in squeezelite)


Share this post

Link to post
Share on other sites

I am answering my own question.

I finally did play with the -a and -b options of squeezelite, and it seems that the option -a 400 does the trick, which is 400ms seconds of alsa buffer time, if I read the man page correctly.

I have been listening to squeezelite for the last 10 minutes or so and did not have an interruption, so far.

specifying a stream buffer with -b does not change anything (or only very marginally).

So for me:

To make squeezelite work well with spdif on a cubietruck (Allwinner A20 processor), I need to launch it as follows

squeezelite -o hw:1 -a 400

To properly load it with systemd, the following lines need to be in /etc/default/squeezelite :

SB_EXTRA_ARGS="-a 400"

Maybe it helps someone ;)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

1 1