Possible solution for Stuttering with USB DACs and shairport-sync

I had issues getting my Qudelix 5K to playback smoothly with RoPieeeXL but it worked fine on all other devices. I was already running via Ethernet but tried WiFi too and it made no difference (hence it was unlikely to be the USB + Ethernet bandwidth issues that some people talk about). I also tried these things with no change. I did not have the stuttering issue with a SoundBlaster 3 Play! that I tried, which means it was something specific to the Qudelix 5K.

As part of my troubleshooting I setup vanilla Raspberry Pi OS Lite setup and installed shairport-sync myself. At first the stuttering was even worse (faster and more choppy) that when using RoPieeeXL but after some searching around I found this which fixed the issue completely for me. Basically just leave the shareport-sync config as-is and setup /etc/asound.conf as follows (replacing the card # and hw: value with ones for your system, see link for how to get those). Note that I did not have to limit the rate to 48 khz for my Qudelix 5K on a Pi 3 B v1.2. I removed that line entirely and it worked fine.

pcm.!default {
    type plug
    slave.pcm {
        type dmix
        ipc_key 1024
        slave {
            pcm "hw:1"
            rate 48000        # this line is only needed for USB DACs which only support 48khz
            period_time 0
            period_size 1920
            buffer_size 19200
        }
    }
}
ctl.!default {
    type hw
    card 1
}

I don’t know if this will work in an RoPiee setup but it’s worth a shot for those having stuttering issues with USB DACs. I will attempt to test that later. If it does work @spockfish maybe some options can be added to the UI to apply this fix?

1 Like

Hi,

Could you please adjust the tile and mention ‘shairport-sync’?

In general there is no problem in RoPieee with stuttering DACs.

That being said, this change won’t land in RoPieee as it changes the global ALSA setting.
I’m about to upgrade shairport-sync (Airplay 2) and let’s see how often this use case helps and what can be done about it in the context of shairport-sync.

Thanks