I recently switched from a Raspberry Pi 2 running Arch Linux to a Banana Pi (the original) running Armbian for music streaming using MPD. My output device is an XMOS-based Gustard U12 asynchronous USB transport feeding my DAC via AES/EBU.
Using Armbian on the Banana Pi, all my 24-bit/192kHz music is being played back as 24/96, according to the display on the transport and DAC. All other sample rates (44.1, 88.2 etc.) are being played back in their native sample rates, as expected.
Is ALSA on Armbian system-wide limited to 96 kHz?
I have never had an issue like this before, and I don't know where to begin in regards to troubleshooting. I'm guessing that the audio is being passed through dmix, but I don't understand why it only happens to 24/192 content.
The Banana Pi is using kernel 4.9.12, whereas my Raspberry Pi with Arch is using version 4.9.27.
I'm using the following in my mpd.conf:
audio_output {
type "alsa"
name "Gustard U12"
device "hw:1,0"
mixer_type "software"
auto_resample "no"
auto_channels "no"
auto_format "no"
use_mmap "yes"
}
I have also tried use_mmap "no", to no avail.
EDIT:
According to /proc/asound, it seems like the ALSA device is limited to 96kHz:
$ cat /proc/asound/card1/stream0
XMOS xCORE USB Audio 2.0 at usb-1c1c400.usb-1, full speed : USB Audio
Playback:
Status: Running
Interface = 1
Altset = 2
Packet Size = 224
Momentary freq = 44096 Hz (0x2c.1880)
Feedback Format = 18.14
Interface 1
Altset 1
Format: S24_3LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000
Interface 1
Altset 2
Format: S16_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000
Interface 1
Altset 3
Format: SPECIAL DSD_U32_BE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000
But how can that be, when it works just fine on a different distro? Could it be the USB port falling back to USB 1.1 speeds for some reason? Can I check that somehow?
EDIT²:
Okay, my USB 1.x theory turned out to be correct - the cable was the culprit. When switching to the Banana Pi, I also switched to a shorter cable which apparently was an ancient USB 1.x cable. After replugging the old cable, everything is fine and 192kHz works as expected. Now the proc output also says "high speed" instead of "full speed":
$ cat /proc/asound/card1/stream0
XMOS xCORE USB Audio 2.0 at usb-1c1c000.usb-1, high speed : USB Audio
Playback:
Status: Running
Interface = 1
Altset = 2
Packet Size = 28
Momentary freq = 44097 Hz (0x5.8318)
Feedback Format = 16.16
Interface 1
Altset 1
Format: S32_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Data packet interval: 125 us
Interface 1
Altset 2
Format: S16_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Data packet interval: 125 us
Interface 1
Altset 3
Format: SPECIAL DSD_U32_BE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Data packet interval: 125 us