Locking sample rate from Hifiberry Digi+ i/o toslink input to 96kHz

I have a pro-ject digital turntable which outputs audio via toslink at 96/24

I’m trying to use volumio premium (testing during my free trial) to bridge audio between my turntable and a separate amp in a different room, with toslink input.

I’m trying to use a Hifiberry Digi+ i/o optical input to capture the output of the turntable, then use multi-room setup to cast this to my second raspberry pi which has a PiFi Digi+ card with toslink output.

When I select the digital input (which displays as HiFiberry ADC), it displays “inputs 48 kHz 16 bit”. If I set this up for multi-room playback, occasionally some distorted audio is transmitted. This is because the card is not capable of detecting the incoming bitrate. Recording from this card works correctly from the command line using “arecord -D plughw:0,0 -r 96000 -f S24_3LE -d 5 -c 2 output.wav”

I think I need to hack asound.conf to force ALSA to use a sampled bitrate of 96kHz - unless this is configurable elsewhere. But I’m feeling around in the dark here. Any suggestions would be gratefully received :slight_smile:

Hello. You can install the plugin FusionDsp and use resampling feature from its menu. Let me know.

1 Like

Thanks for the quick reply. Checking it out now.


OK, having checked it out I think your plugin is for further down the processing chain (unless I’ve misunderstood). I need to force the card to capture at 96/24 - even when I install the plugin, enable resampling and turn everything up to 96kHz, the digital input still displays as “inputs 48 kHz 16 bit”, presumably because that’s the default for the card?

Hi sorry. I misunderstood your problem. Yes the plugin operates near the end of the Alsa chain.

This is coming through the premium audio input so I can’t look at the source code. Can anyone from volumio comment please? I can see when the plugin is running that a file called /tmp/audioinput.sh is created, containing this command:

/usr/bin/sox -q -t alsa plughw:2,0 -t alsa volumio

adding -r 96000 would be a solution, but this script gets regenerated every time the input is toggled.

Multiroom is fixed at 48kHz. Not sure if there is any reason this could not be ‘hacked’

1 Like