## How the JACK Sound Daemon is capable of running at 192kHz

Most of my Linux-computers have as their sound-server ““. But specifically on my laptop named ‘‘, I have set up the to be able to run as an alternative, yet not to be running by default. I have performed experiments on that laptop, to confirm that I can launch this sound-server, using a GUI named ‘‘, but have also had to make modifications to how this GUI executes commands from the user, so that its start-up pauses the , which has been able to resume successfully after I was done using . Without such a detail, the attempt should not be made.

One fact which I can see in , is that is capable of running at 192kHz, even though it has not interrogated any of the available devices, about their real capabilities are.

The reason this is possible is the fact that individual sound devices are just clients to that daemon, including any number of devices that act as sound-sources, rather than acting as sinks, i.e. that act as inputs rather than as one output.

I also own a USB-Sound-Device named the ‘‘, which is mainly intended for use in sound capture, but which also has outputs intended for monitoring purposes.

If I was to run at 192kHz, then one simple consequence of that would be, that zero actual sound-devices would remain compatible with it. As to how cleanly an attempt to connect to an incompatible device exits, giving error messages or crashes, I have not tested, because when I tested the , I took into account the real limit of that device at 96kHz.

Similarly, the runs with 32-bit linear precision by default. In this case, when we enable devices to act as clients, which are only capable of 24-bit sample-depth, which is common, the mismatch is safely ignored. already sees to it, that the last 8 bits of precision get ignored.

Now, I could be cautious and worry, that because of errors in the Linux drivers, those last 8 bits somehow get mapped to a control register as an error. But then the simple way to test for that, was simply to send some 32-bit sound through JACK, to this output device. What I found when testing this, is that the basic operation of the was not disturbed, even though my hearing was not good enough, to tell me when I had my Sennheisers on, whether in fact 24-bit precision was still working. I was mainly testing, that trying to send a 32-bit value, does not disrupt the actual operation.

## Testing of USB Sound Device Complete.

According to my previous posting, I needed to do a more thorough test of the USB Sound Card I have bought, which is a “Focusrite Scarlett 2i2“.

In particular, I needed to address the discrepancy according to which, the Linux JACK daemon reports capture at 32 bits, while the specifications of the sound card state a 24 bit sample format.

Also, I needed to be sure whether it would run as well at 96 kHz, as it already did at 48 kHz.

According to my more complete test, the 32-bit sample-format which ‘QJackCtl‘ shows me, which can be viewed in its Messages box, state the ALSA parameters and not the JACK internals. Therefore, JACK has after all chosen to capture and/or play back audio at a physical 32 bits, at the 96 kHz sample-rate. This is not, after all, a statement of the JACK internal behavior.

Since I am using Linux, and since the manufacturer chose to rate this capture device as only being capable of 24-bit capture, I must assume that for hardware reasons the device uses 32-bit registers, but that only the first, most-significant 24 of those bits are accurate. Therefore, when I open ‘QTractor‘ – the Digital Audio Workstation / Tracker application, it is best to truncate its capture format to 24 bits as well, which is most probably what the Windows or Mac drivers for this device do.

Aside from that, using QTractor next, to capture a 96 kHz, 24-bit, stereo FLAC file was easy and uneventful. Further, the stability of my software suggests that I can play with the GUIs as much as I need to, to figure them out, and I will not screw anything up.

After I closed JACK, I next imported this FLAC file, that plays for 14 seconds, into “Audacity“, which has been set up to use the default sound settings (‘PulseAudio‘), and which performs an on-demand re-sampling of the FLAC file.

The on-demand FLAC playback is not filtered well by Audacity, but since it is running at 96 kHz, compared with the 44.1 kHz that the internal sound of the laptop runs at, this observation is not surprising.

And then the captured sound clip simply contains, what I spoke into my microphone.

Dirk

## USB Sound Card

One of the recent developments in Computing is, that the actual PCs and laptops have relatively poor sound-chip-sets inside, but that we can add an external sound card via USB. I refer to these as ‘USB Sound Cards’, but think that most people just refer to them as ‘USB Sound Devices’. An actual sound card, used to refer to a PCIe interface card, which we could physically insert into our PC bus, inside the case.

When people buy a USB microphone, because the USB connection is digital, they are in fact buying the Analog / Digital converter inside that microphone, which also makes it the logical equivalent to a sound card. And the fact that it would be a USB mike, does not imply worse quality than an external sound card. To the contrary, users can expect their USB mikes to outperform the internal sound on their devices, which is the whole point in buying them.

I have embarked on yet another project, which is to buy an external sound card that is physically separated from any actual mike or sound source, and to buy a quality mike as well. Hence, I have received my USB sound device already, that has 2 output channels and 2 input channels.

Mine is a “Focusrite Scarlett 2i2” USB Sound Device, even though I usually try not to make endorsements or indictments of commercial products. It is stated to be capable of sampling at 48 and 96 kHz, and stated to be capable of 24-bit precision. It requires a USB 2 connection.

Because sound is taken very seriously with such devices, its only available inputs are a combined XLR / TRS jack each (not a 3.5mm mini-cable). This means that I am still waiting for my XLR-jack microphone to arrive, without which I cannot test the Focusrite. ( :1 )

A plausible question which some readers might ask would be, Why did Dirk not just buy a USB mike? And my answer would be, Because what I pictured wanting was closer to a USB Sound Card, hence an Analog / Digital converter, that can accept a variety of input devices.

But this would also be the context, in which it might make sense to switch my laptop ‘Klystron’ into JACK sound-mode, which supports real-time 48 kHz at 24 bits, and which also supports 96 kHz…

After all, not long ago I was pondering what the settings should be, with which JACK will start, in terms of sample-rate etc..

A key point of this project is again, to test whether the device will work properly under Linux. ( :2 )

## Another Reason, for me Not To Set Up JACK as the Back-End For PulseAudio

According to This Posting, I had written that hypothetically, it might make some sense for me to set up ‘JACK‘ as the back-end, by which ‘PulseAudio‘ sends its sound output, full-time. As opposed to the notion not making sense, to allow a few scripts to do so temporarily, that are being run by the ‘QJackCtl‘ GUI.

Well there is still a reason, why this might not be so. Doing so would be consistent, with setting up a Debian system completely according to our own preferences, and then if something does not work, we are up to our own devices to fix it.

My laptop ‘Klystron’ is a Kanotix / Spitfire system, which is also Debian-based, but in which the exact configuration has been done for me, by the Kanotix team, from their Live Disk (which can actually be written onto a USB-Key). This means that there is an advantage to me, in keeping certain configuration details conform to what the Kanotix people prescribed. If I did run into trouble with it, they would have some chance of maybe suggesting solutions, but only on the assumption that mine is still functioning within their parameters.

The way those parameters are, the current back-end to the PulseAudio sound server is displayed in the GUI as being “gstreamer“, and yet good compatibility with all things ALSA is maintained…

If I was to reconfigure my computers completely, for example because I wanted to change them to use the ‘GNOME desktop manager’ for instance, instead of ‘KDE‘, then the Kanotix team would say ‘Sorry, we are not familiar with the details of your system anymore. Therefore, we cannot help you.’

Yet, more generally, Debian allows deep changes to a configuration.

Dirk