AirPlay stuttering with FusionDSP enabled (Volumio 4.119, Raspberry Pi 4, HiFiBerry AMP4 Pro)

System

  • Volumio: 4.119
  • FusionDSP: 3.0.6
  • Hardware: Raspberry Pi 4 (4 GB)
  • DAC: HiFiBerry AMP4 Pro
  • Audio source: Apple Music via AirPlay
  • AirPlay: shairport-sync (default Volumio configuration)

Problem

AirPlay playback works perfectly until FusionDSP is enabled.

As soon as FusionDSP is enabled, AirPlay playback starts to stutter heavily with irregular audio dropouts.

The dropouts are not periodic. They occur randomly every few seconds.


What works perfectly

  • Webradio
  • Local playback
  • FusionDSP with multiple filters enabled
  • Loudness
  • High Shelf
  • Low Shelf
  • Peaking EQ
  • Gain

No stuttering occurs with these sources.


What does NOT work

  • Apple Music via AirPlay
  • FusionDSP enabled

Even with an empty DSP configuration, AirPlay stutters immediately.


Important finding

I completely removed all DSP processing.

Current CamillaDSP configuration:

filters: {}
mixers: {}
pipeline: []

Therefore no DSP processing is taking place.

The audio is only routed through FusionDSP/CamillaDSP.

Nevertheless AirPlay still stutters.

This suggests that the issue is not related to DSP filters.


Diagnostics performed

CPU

CPU usage remains low.

No overload.

Memory

More than enough free RAM.

CamillaDSP

Running normally.

No crashes.

No restarts.

DSP load approximately 0.5%.

ALSA

Routing appears correct:

Shairport
    ↓
volumio
    ↓
FusionDSP FIFO
    ↓
CamillaDSP
    ↓
HiFiBerry AMP4 Pro

Sample rate

AirPlay stream parameters:

44100,S32_LE,2,32

No unexpected sample-rate conversion.

CamillaDSP log

No underruns or FIFO errors.

Only clipping warnings when intentionally boosting EQ:

Clipping detected

These disappear after reducing gain and are unrelated to the stuttering.


Additional observations

Changing

queuelimit: 1

to

queuelimit: 8

did not improve the problem.


Reproduction

  1. Disable FusionDSP
  2. Play Apple Music via AirPlay
  3. Playback is perfect

Then

  1. Enable FusionDSP
  2. Leave DSP completely empty
  3. Play the same AirPlay stream

Result:

Immediate heavy random stuttering.


Comparison

Source FusionDSP Result
Webradio OFF OK
Webradio ON OK
Webradio + Filters ON OK
AirPlay OFF OK
AirPlay ON Heavy random stuttering

Question

Is this a known issue between Shairport-sync and FusionDSP 3.0.6?

Since the problem also occurs with an empty DSP pipeline, it appears that the issue is somewhere in the AirPlay → FusionDSP audio path rather than in CamillaDSP processing itself.

Any suggestions for additional debugging would be greatly appreciated.

Hi tsmac,

had exactly the same problem (though with rpi5) and took me ages to figure it out. The solution was to access the camilladsp gui in webbrowser (in my case ip:5011) and set the chunksize under devices to 4800. Since then, no more stuttering!!

Let me know, if this works for you!
T.

Hello!
By default, chunksize is already set to 4800 in FusionDsp.


FusionDsp.prototype._doCreateCamilladspfile = function (callback) {
  const self = this;
  var hcurrentsamplerate = 44100;
  let selectedsp = self.config.get('selectedsp')
  let chunksize = 4800;
  let strCamillaConf;

How can it be different in your case?

Hi,

funny thing:
with chunksize set to 2400 all distortions over airplay/raop are gone ;-D

Same here; setting buffers chunksize to 1024 fixes the issue airplay stuttering.
Unfortunately, in my instance, buffer chunksize is periodically overwritten to 4800

Hi,

a) edit /data/plugins/audio_interface/fusiondsp/index.js, line 4074 (like me):

let chunksize = 2400; //4800

or

b) install the new beta-version

Please don’t! See here now : FusionDsp : the complete Dsp center for Volumio3 and Volumio4! - #1494 by balbuze