384kHz playback on the Raspberry Pi

Some people claim to have a hardware available that is able to playback 384kHz files on an I2S sound card on the Raspberry Pi. They explain, there is “some stuttering”, because “the Raspberry Pi is not fast enough”. Really? Let’s have a look on the facts. The original HiFiBerry DAC (designed in 2013) already used a DAC chip that was able to run at 384kHz sample rate. Why was it never announced as 384kHz DAC? Because the whole driver infrastructure does not support it. It is not a question of the speed of the Raspberry Pi, but a general limitation of the ASoc sound subsystem.

Checking this is easy, if you develop your own driver. Let’s have a look at the Linux kernel. The important file here is include/sound/pcm.h

#define SNDRV_PCM_RATE_5512 (1<<0) /* 5512Hz */
#define SNDRV_PCM_RATE_8000 (1<<1) /* 8000Hz */
#define SNDRV_PCM_RATE_11025 (1<<2) /* 11025Hz */
#define SNDRV_PCM_RATE_16000 (1<<3) /* 16000Hz */
#define SNDRV_PCM_RATE_22050 (1<<4) /* 22050Hz */
#define SNDRV_PCM_RATE_32000 (1<<5) /* 32000Hz */
#define SNDRV_PCM_RATE_44100 (1<<6) /* 44100Hz */
#define SNDRV_PCM_RATE_48000 (1<<7) /* 48000Hz */
#define SNDRV_PCM_RATE_64000 (1<<8) /* 64000Hz */
#define SNDRV_PCM_RATE_88200 (1<<9) /* 88200Hz */
#define SNDRV_PCM_RATE_96000 (1<<10) /* 96000Hz */
#define SNDRV_PCM_RATE_176400 (1<<11) /* 176400Hz */
#define SNDRV_PCM_RATE_192000 (1<<12) /* 192000Hz */

These are the sample rates that the ALSA layer supports. How can it be that some people claim 384kHz support? Downsampling! That means the sample rate of a 384kHz file will be reduced before playing it back. I don’t know, if they don’t know that they do downsampling or if they don’t tell. I let you decide which is worse.

However, not having 384kHz is an non-issue. While there are a lot of discussions if there is an improvement of the sound quality from  48kHz and 192kHz, I don’t know anybody who claims, that 384kHz playback gives you better sound quality than 192kHz.

If you are looking for a proven 192kHz capable sound card for the Raspberry Pi, check out the HiFiBerry DAC+.

Leave a Reply