Set max sample rate for USB audio output

I love RoPieee and use it on a bunch of Pi4s. I’ve run into a problem recently however.

RoPieee is connected via USB to drive a RME ADI-2 Pro which then drives Genelec active speakers over AES. It’s an all digital signal chain, D/A conversion is done inside the Genelecs. Works great, and excellent to have just one cable.

My issue is that RoPieee defaults to the maximum sample rate that the ADI-2 can accept, e.g. when the DAC is powered on or wakes from standby. In the case of my ADI-2, max sample rate is 768 kHz. This sample rate setting is sent over USB and used by my ADI-2 to set the sample rate conversion value for all its outputs for all other sources (e.g. for my TV which is a source into it over SPDIF). The problem is that Genelec speakers cannot read any digital audio above 192kHz, so the system is completely mute if connected to the TV source. I need to first play something in Roon, which forces RoPieee to set the sample rate over USB to some reasonable value (e.g. 192/96/48 etc. whatever the track is recorded at), then switch to my TV source, which the Genelec’s can then understand. This is a bit frustrating and I’d love to stop RoPieee setting the sample rate to extreme (but for me problematic) values like 768 kHz.

Would it be possible to please have the facility to set RoPieee a maximum, or a standby, sample rate over USB? E.g. to say, please don’t try by default to switch my DAC to a sample rate over 192kHz?

It should be the player to send the right output rate, RoPieee just define which is the maximum rate that can be accepted and doesn’t oversample at all … which player are you using?
.
Or maybe it is the RME that oversample …

I use Roon, but the issue is when the player is not active at all – e.g. at startup. RoPieee defaults to setting the DAC to 768 kHz over USB, which I guess is the max sample rate it can see of the connected device.

To be clear, in my Roon 192 kHz is set as maximum sample rate for this audio output device. The issue is what Ropieee does when Roon is not active.

RoPieee doesn’t set anything.

If you use Roon you could limit the max sample rate in there.

Ropieee doesn’t set the sample rate; it’s not a player. For Roon, it installs Roon Bridge. I suspect the RME is returning to 768 kHz once Roon releases the device. The RME only outputs 192 kHz to S/PDIF and AES.

Thanks, just to say that Roon is configured for this device to a max sample rate of 192 kHz (see pic).

However, the device always gets set to a sample rate of 768 kHz over USB on startup (see pic).

If RoPieee (the OS) is not setting this sample rate, then what is?

NB. Once I start playing a track in Roon the sample rate is set as expected by Roon. The issue is what the sample rate is set to on startup.

The RME is setting the defaults. However, I fail to understand the issue since you’ve highlighted USB, and the speakers use AES.

If you have other devices connected to the RME, then adjust the setting in the player associated with that or within the RME’s setup screens.

I fail to see how this relates to either Ropieee or Roon.

The signal chain is Pi/RoPiee —USB—> ADI-2 —AES—> Genelecs. The ADI-2 has other digital inputs (like my TV over SPDIF optical). I use it for switching between them and volume control.

The RME sets the sample rate for its SRC for all inputs based on what it sees on its USB input. It assumes it is connected to a computer and you are somehow setting this sample rate over USB. If it sees a 96kHz signal over USB, it sets the sample rate for SRC over SPDIF to 96kHz, etc. It is impossible to change this sample rate manually on the unit itself while a USB cable connected to a computer.

The only way to change it is to (a) ask the Pi to play something over USB at the sample rate (i.e. less than 768); (b) physically unplug the USB cable from the ADI-2 to the Pi (or power down the Pi), at which point the ADI-2 unit allows one to manually set the sample rate for SRC on the unit.

My understanding is that the ADI-2 is sensing its connection the the Pi over USB and the Pi is either telling it over USB that it should be at 768 kHz or perhaps not making any request to it about sample rate at all. I am not sure what processes, user space or kernel, on the Pi are talking to the DAC over USB. I would just like to have them request a default sample rate of less than 192 kHz so the ADI-2 is not by default set on startup to higher sample rates.

You’re using Roon, so the RPi are largely irrelevant. The same behaviour applies regardless of the computer since it is Roon Bridge that is communicating with the DAC.

When you stop playback through Roon, the DAC is released, and no longer influenced by Roon.

What happens if you remove the rpi from the chain and connect the RME directly to Roon?

Yes, that is exactly it. When USB playback is controlled by Roon (i.e. playing a track), there is no issue. The issue is what happens when Roon is not controlling it – for example, on startup, before any track in Roon is played. Something other than Roon is setting the default sample rate over USB.

It is the same if the unit were connected to a Mac. There the default sample rate on the unit will be set by whatever setting one has selected in CoreAudio. Roon will change this if necessary when it starts to play.

That’s the DAC, i.e., the ADI-2.

You probably have the RME set to automatically select the input, but the detection seems flawed and defaults to the high rate when USB is idle.

Maybe there‘s a new firmware or better consult RME forum for help.

You could also configure to manually switch digital inputs to circumvent your issue.

Wouldnt the easiest way be to just set up maximum sample rates via MUSE in Roon and just set anything over 192khz to a divisible by 2 or 4 sample rate?

My screen grab isnt the settings you need just an indicator of where to set them :slight_smile:

Perhaps I am missing something?

Regards Andrew

Yes, everything works as expected using Roon as the source.

I think ideally you need to tell the RME to set the clock from one of the other inputs (since the input is no longer USB).

But that will require intervention on the RME (although you can use saved settings to make it simple).

Thank you all for the suggestions.

I’m not sure if I have been able to convey clearly what I am looking for. It is simply for RoPieee to have the ability to set some value default value for the sample rate on an attached USB DAC at startup. (Just as on CoreAudio one might select the default sample rate used by the OS as 48kHz).

Once Roon starts playing, or indeed any other service run by OS, they can change this sample rate as required.

Fortunately, I’ve found a workaround for my RME unit that prevents it going into high sample rates. If anyone is interested, the relevant discussion is posted on the RME forum linked here.

That said, I would still appreciate the ability to set a default sample rate for the OS.

I think you have misunderstood what Ropieee does. Ropieee doesn’t set anything. At a basic level, it is a stripped down OS to run Roon Bridge, and it is this software that communicates with the DAC. Neither Ropieee nor the RPi is setting anything.

When Roon has exclusive control of the DAC it can set the sample rate. However, when playback stops, the DAC is released, and any setting you see is determined by the DAC itself or another player.

Since S/PDIF works to 192 kHz, and hi-res content is no higher, there should be no reason for Roon to exceed this setting anyway.