RoopieXL with Apple USB-C DAC

Hi,

I’m trying to use RoopieXL as an AirPlay endpoint. I have an USB-A to USB-C adapter that I’m connecting to a RPi4. To that, I then connected Apple’s USB-C to 3.5mm dongle-DAC

I can see the endpoint and stream audio to it, however, it consistently stutters. I’ve tried connecting via Ethernet only and via Wifi. Same behavior. Tried with both the latest Stable and Beta channel versions.

Is this setup supported? If so, is there some kind of workaround to get it up and running?

(BTW: this is just a temporary solution, as I’m waiting delivery of a Topping E30 USB DAC)

Hi,

This is the first time I’ve heard of this setup.

Few things:

  • have you tried something else then just Airplay? What about RAAT (Roon)?
  • have you tried with different sample rates (and start with a simple 44.1/16).
  • can you send feedback? You can find that option on the ‘advanced’ tab.

Thanks

Hi @spockfish!

I’m just using it as a simple Airplay endpoint. I’m streaming from Apple Music (not a Roon subscriber yet). I also tried streaming a podcast from a different app (Overcast), to the same effect. Don’t really sure how I can change the sample rates with this simple setup / apps.

To be clear on the hardware front: I’m plugging this adapter into the RPi4 (https://www.amazon.com/gp/product/B08HPX2WG4/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1), and this Apple dongle/DAC (https://www.apple.com/shop/product/MU7E2AM/A/usb-c-to-35-mm-headphone-jack-adapter).

I just sent feedback via the Advanced tab, with unique ID 4a09f5f8d1b8055a

Happy to provide additional more debugging info or try different approaches, if that helps at all

All best,
Daniel

Hi @Daniel_Zacarias,

The logs are flooded with large sync error messages. Not entirely clear what those mean (although I’m pretty sure they cause the stutter).

Just to be sure this is not an existing bug I’ve just released the latest version of Shairport-Sync (the Airplay component used by XL) to the beta channel.

Can you try that one out?

Thanks

Hey,

I just applied the update, but the problem persists. I also sent you feedback (with ID 6cf503e02d84b7ee), in the hope that being a new update and a shorter time since the previous feedback sent, the logs are more readable

Let me know if there’s anything I can do. Happy to SSH into the RPi and do any debugging on my end (I’m comfortable in a Linux shell)

Hi,

Indeed. logs show the same sync errors.
Now, there are a few parameters concerning these sync errors; if you got experience with SSH and Linux then I suggest you may do some testing yourself (as this makes the cycle a little bit more convenient then me changing something and you testing).

You can login with username: root and password: ropieee.

The configuration file is:

/opt/RoPieee/shairport-sync/config

When you change something in this file you can test with:

systemctl restart shairport-sync

Here are the parameters you can play with:

resync_threshold_in_seconds, drift_tolerance_in_seconds

More info can be found here: https://github.com/mikebrady/shairport-sync/blob/master/README.md

Never mind that @Daniel_Zacarias

I think I know what the problem is: your DAC is not capable of doing 44.1k.

After looking into your logs again I found this:

*warning: Speed requested: 44100. Speed available: 48000.

And that is a problem. To make sure this is the issue, can you test with 48k content.
I expect that will work without any issues.

Let me know how it goes.

Thanks!

Hey @spockfish

I think we’re on the right track, but just streaming in 48k doesn’t do the trick. The issue seems to be related to the alsa + shairport-sync configs

See here and here

As per those instructions, I tried modifying /etc/asound.conf from its default content:

pcm.!default {
    type hw
    card 0
    device 0
}

ctl.!default {
    type hw
    card 0
}

To this:

pcm.!default {
    type plug
    slave.pcm {
        type dmix
        ipc_key 1024
        slave {
            pcm "hw:0"
            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 0
}

… And then restarted the RPi, but still didn’t get it to work.

There might be some other setup issues or files that are loaded that override this behavior, so maybe this input helps you in pointing me to the right location / configs to change.

Thanks so much for all your support so far on this esoteric setup :slightly_smiling_face:

Are you sure Apple’s USBC-3.5mm works for non apple devices? I wouldn’t place any bets on it.

Yeah. I’ve read multiple posts of people using it in non Apple devices. And it does work on the RPi, it just stutters via Shairport-Sync as reported in the project’s repo.

Just wanted to share that it’s not a hardware issue. This seems specific to the shairport+alsa config. I just tried the same data sources on Roon, and even at 44k, it works just fine :+1: