How do I know if my system is capable of playing 24bit/96kHz sound?

To find out what your sound card supports, have a look at

/proc/asound/card0/codec#2

(you can just type cat /proc/asound/card0/codec#2 in a terminal to read it)

Now, the 0 and the #2 may vary for you, type cat /proc/asound into the terminal and hit tab to see what's there,

in this file (which isn't really a file, but never mind), you'll find something like this:

[...]
Node 0x10 [Audio Output] wcaps 0xc1d: Stereo Amp-Out R/L
[...]
  PCM:
[...]
    rates [0x560]: 44100 48000 96000 192000
[...]

Also, you may be on the safe side typing cat /proc/asound/card0/codec#2 | grep rates and looking at the lowest common denominator, so to speak.

But: The DAC (digital to analogue converter), which the sound system really has nothing to do with, may just interpolate the signal, the sound card may even do some false advertising, you have no way of knowing safe from looking at the manufacturers website.

The reason for you not hearing a difference (I assert that there is one to be heard, all though that's subject of great debate) is - probably - that the DAC just isn't good enough. It's by far the weakest link (inside your computer).

As for your second question: While this of course isn't the place to discuss it, have a look at stuff like the "ESI Juli@" or the "Dr. Dac Nano", they are reasonably priced and play 192kHz / 96kHz respectively - and they're widely acknowledged to be "okay" by the ever picky audiophile community. Also, the best sound chip will do no good if the headphones/speakers/amplifier can't keep up.


I know this is an old question, but I stumbled upon it when I was researching similar questions of my own, and in the mean time I found an answer to this particular part of the original question, which hasn't been answered yet:

And if it can, how do I tell that it plays it instead of downsampling to 16-bit / 44 kHz?

The short answer

In most cases you can be sure that your system is downsampling your high quality music. By "most cases" I mean regular, everyday, normal operating system set-up.

The long answer, with a guide on how to verify it on your own

First, some assumptions - let's say your primary sound card is card0 (as in the first answer to this question), and that the standard stereo output (for front speakers) goes to the pcm0p device on that card (which stands for "PCM device 0, playback"). In such case, the file you are interested in is the following:

/proc/asound/card0/pcm0p/sub0/hw_params

where sub0 is a sub-device (more on this in a moment, but when only one sound is being played-back, then sub0 is the sub-device it will be sent to). If no sound is currently being sent to a particular sub-device, then the contents of the corresponding hw_params file will just be closed. So first you need to start a playback of your favourite, high quality sound file (that you know is more than 16bit and/or more than 44kHz) and then look into the hw_params file, checking what is the format and rate stated there. For instance if you know that your sound file uses 24 bits per sample, and you see format: S16_LE (16-bit signed integer, little-endian bit ordering), then you know that it is being downsampled somewhere along the way to your sound card.

If you see that your file is being downsampled, and would like to check wich part of your system is responsible (sound server? music player?), then read on.

First a bit more on the sub-devices, as promised. If your sound card supports hardware sound mixing, then the playback device will have multiple sub-devices. If it doesn't support hardware mixing, it will have only one sub-device - sub0. But even if it does have multiple sub-devices, it is rather certain that only sub0 is going to be used. That's because most (all?) modern operating systems use software sound mixing. Ubuntu, for instance, currently uses PulseAudio sound server, which does software mixing before it sends the sound further down the operating system. With hardware mixing, sound from multiple sources (multiple music players, for instance), would go to different sub-devices, and then the sound card would do the mixing in hardware. With software mixing, the sound from all sources goes to the sub0 sub-device. Just something to keep in mind - remember to look at the hw_params file in the correct sub-device.

Back to the main topic. Since we are talking about Ubuntu, we will stick to its software stack - at the backend of PulseAudio there is ALSA, which is the interface that talks to the hardware drivers, so that PulseAudio can be a fancy, high-level sound server which doesn't bother knowing what hardware it is talking to.

Knowing all the above, we can start ruling out potential suspects. We can really rule out automatically any sort of music player, as the only thing they do is they just open the sound file, decode it if it is encoded in some format other than PCM, and send the read/decoded content to, for instance, a sound server.

So we are left with the layers between the sound card's hardware driver and the music player - ALSA and PulseAudio. It is somewhat difficult to replace ALSA (for testing purposes) with some other sound sub-system (yet doable), but it is fairly easy to temporarily disable PulseAudio, which will force our music player to talk directly to ALSA. In order to achieve this, we execute the following commands from the terminal (as a normal user):

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service

Now you need to restart your music player, start the playback of your music file, and again look into the /proc/asound/card0/pcm0p/sub0/hw_params file. And this time you will see the correct values, which proves that, contrary to some opinions floating around the 'net, PulseAudio does downsample the sound.

I did my testing using a high resolution music file (24bit, 96kHz) that I found on a Sony website (https://helpguide.sony.net/high-res/sample1/v1/en/index.html), played it back in VLC and saw in the hw_params file that the sound card reports that it is being fed with data in S16_LE format, at 48000 rate. Then I've disabled PulseAudio, restarted VLC and played back the same file - this time the hw_params file reported format to be FLOAT_LE (floating point, which by definition is 32-bit, so actually upscaled from 24bit, probably by ALSA), and rate to be 96000 (so exactly what it should be).

After your testing is done, you can re-enable PulseAudio using the following commands:

systemctl --user start pulseaudio.service
systemctl --user start pulseaudio.socket

Edit: Perhaps I should also mentioned the sound card I used for my testing - (partial) output of lspci -v:

04:00.0 Audio device: Creative Labs EMU20k2 [Sound Blaster X-Fi Titanium Series] (rev 03)
    Subsystem: Creative Labs SB1270 [SoundBlaster X-Fi Titanium HD]
    Kernel driver in use: snd_ctxfi
    Kernel modules: snd_ctxfi