Playing 192Khz Files as a Bit-Perfect stream.

KiranPS

Well-Known Member
Joined
May 13, 2012
Messages
151
Points
63
Location
Chennai
Hi Guys,

It all started off as a request by FM to check out ASIO Driver with foobar to get bit-perfect sound. I also had a few 192Khz flac files that I had downloaded from High Resolution Music DOWNLOAD services .:. FLAC in free TEST BENCH and always wanted to hear how they sounded.

I will first do a brain dump of my understanding and then go into how to play 192Khz files (in Linux first).

After a little research I found the following (Gurus Please correct me if I am wrong in my understanding )

1. Bit perfect sound is the sound where the hardware/software does not do any DSP or other transformations like Down-sampling / Up-sampling on the source bit stream. So playing a 192Khz WAV Hits the DAC at 192Khz.

2. Most audio cards do not support sample rates above 48Khz so even if you play songs encoded at a higher rate , they gets down-sampled by the hardware/software before hitting the DAC.

2. To Play bit perfect hi-bitrate files in a PC we would need a Sound card that
has a high-end DAC or an external USB Sound Card.

3. To play bit-perfect files you would also have to bypass standard Windows audio drivers and mixers which have high latency and also down-sample the stream.

3. ASIO was developed to solve the above issue. This allowed the hi-end audio card Manufactures to bypass windows drivers altogether and send hi-bitrate streams directly to their hardware among other things.

4. Since not all hardware manufactures provided an ASIO driver, ASIO4All project was born. ASIO for all will work only if the hardware supports it. If the sound card is a low-end one then ASIO will not help.


The other Option to play Bit-perfect files is to bypass the Mother board DAC completely and get the Digital stream out using SPDIF and feed it to an extrenal DAC that supports 192Khz. I just had such a device, Marantz NA7004 Network Streamer.

It Plays FLAC only up to 96Khz over the network but supports 192Khz Audio Streams over SPDIF (Optical or Coax).

Next I needed to locate a PC Motherboard that supported SPDIF, I hunted for a few and the ones with Optical SPIDF were expensive. Then I remembered that most of the modern motherboards have a SPDIF header on the motherboard to feed graphics cards and wondered if this can be used as a Coax SPDIF connector. I found that It can, provided the SPDIF header
is not 5V TTL type.

I had a Motherboard that had a SPDIF header, so I connected two jumpers and tested the voltage and it was 0, then I went and un-muted the SPDIF in the Mixer and the Voltage jumped to 1.6 V. This meant that I could use the SPDIF header to connect to my DAC so I rigged up a simple Cable with Two jumpers on one end and a RCA Jack on the other and connected it to my NA7004. I could see that the DAC picked up the carrier and was showing 48Khz. So next I played a 192Khz FLAC file using mplayer and Voila I could see the DAC playing at 192Khz .


I have used Linux since I am familair with it and I could make a standalone player later.

If you guys need, I will test this out for WinXP and Win7 in the following posts.


The following commands are for Linux cmdline users (GUI Should be similar).

First you need to list the audio hardware using

#aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 1: ALC887-VD Digital [ALC887-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0


Here we see that the SPDIF device is Card1:Device1.

Next we need to run alsamixer and unmute all the spdif devices by pressing 'm'.

Now we can play a 192Khz file using mplayer using the following command.


#/opt/player/bin/mplayer -ao alsa:device=hw=1.1 /media/Mozart_192.flac

I am using Linux currently since I want to make this into a cheap 192Khz HardDisk MediaPlayer for all my Music. So others with Just DACs can also use this. We can use either XBMC or Music Player Daemon , since these come with android remote apps it should be easy to control them too.
 

Attachments

  • 1.jpg
    1.jpg
    24.1 KB · Views: 203
  • 2.jpg
    2.jpg
    22.1 KB · Views: 208
  • 3.jpg
    3.jpg
    12.3 KB · Views: 206
Last edited:
ASIO is pretty pointless now that you have the WASAPI plugin for foobar. The latter sounds far superior to my ears.

Also please do be aware that motherboard coaxial out is susceptible to a large amount of electrical noise and jitter aka timing errors. You are better off buying something like an m2tech hiface.

Also remember that while even if you get correct bits in sequence, not just the bits but the timing between the bits matter and they should be evenly spaced.
 
Last edited:
True reignofchaos,

It seems WASAPI is for Vista SP1 , Win7 and ASIO is for XP.

I am doing some tests on ASIO on XP and WASAPI on Win7, will let you know of the status.
 
Kiran,

current M2 tech Hiface model does not support Linux pc.
supports windows & Mac only ,as per review
 
Sir,

On Linux I think we can use the onboard spdif out . Since the this pc is going to be dedicated to playing music only, it should not have buffering issues. In normal windows PC we have so many things running in the background that any app can go to 100% CPU and choke the audio bit stream transfer. I hope this will not be an issue in Linux. We will test this out. If we get stuttering, I guess we can fallback to USB to spdif converters.

I just discovered a Linux distro for audiophiles AudioPhile Linux | Audio Perfection on Linux. Comes with rt kernel, media player etc, supposed to be low latency too.

Warm Regds,
Kiran.
 
No electrical noise on optical S/PDIF :D

Actually, a decade ago I used to use quite a lot of optical, but not co-ax, so have never compared the two. I had analogue out from the same high-quality sound card (RME) and never noticed that optical was any worse.

I just discovered a Linux distro for audiophiles...
That's interesting: I'll be looking at that link. I use KXStudio but I need jack and firewire support.

EDIT <A Quick Look Later>

Ah, I see this uses Jack, Jack is not necessarily the easiest thing to set up, and I didn't like qjackctl at all. The core of KXStudio is a tool called cadence, which makes setting up and control of jack relatively easy, and looks after sound from other stuff like YouTube/internet.

I just looked at the AP Linux FAQs, and I feel there is rather a lot of optimism about the plugging and playing of devices, especially USB devices with Linux.

Another thing is that Jack is started with a set of parameters which includes the sample rate and, I think I am right in saying that it is not possible to change that without stopping, reconfiguring, and restarting Jack. I use a player which will convert the sample rate before feeding the sound to Jack. As most of my music is CD quality, I just set everything for 44.1, and if the occasional piece isn't 44.1, then the player looks after that. Obviously, though, if I wanted to play 96khz (which as high as my interface goes) or higher, that would not do: I'd have to set jack to that. Whether this is a problem or not, depends on how much the sample of rate of a person's music library varies, and whether they mind the conversion in software or not. By the way, my player is Aqualung.

I dislike that the AP site quotes something about latencies as low as 10ms... This is music playback: latency is utterly irrelevant! So, I just think it is technically wrong to be making a selling point of that. With jack, you set the parameters to give the lowest latency at which the system still works if that matters to you. It will if you are doing mutli-track recording, overdubbing, and that sort of stuff, but not for playback.

Just a few initial responses... I'll check out more of the site.
 
Last edited:
Sir,

On Linux I think we can use the onboard spdif out . Since the this pc is going to be dedicated to playing music only, it should not have buffering issues. In normal windows PC we have so many things running in the background that any app can go to 100% CPU and choke the audio bit stream transfer. I hope this will not be an issue in Linux. We will test this out. If we get stuttering, I guess we can fallback to USB to spdif converters.

I just discovered a Linux distro for audiophiles AudioPhile Linux | Audio Perfection on Linux. Comes with rt kernel, media player etc, supposed to be low latency too.

Warm Regds,
Kiran.

Kiran - I just noticed another post by you on 192 khz stuff and ASIO.

Thing is - upsampling is not as big as it is made out to be. Again, YMMV :)

All this is moot if you have access to native 24 bit 96 khz (or 192 khz audio files). Then, as you say, all you want is for the OS to get out of the way and help you play your source file.

About Audiophile Linux - there are far better alternatives out there than this. A lot of people would talk about the superiority of either Linux or Windows - but that is just a wall waiting for people to bang their heads on - IMO. Bit perfect playback is achievable in both OS's. Perhaps a bit easily on Linux than on Windows.

Also if you all you want to achieve on Linux is bit perfect playback try something like Aqualung or Deadbeef. Both include resampling (upsampling) with SSRC algorithm. And you do not need something like ASIO to be installed.

Windows offers a few more audiophile playthings like Fidelizer, Pure Player, JEP, JPlay etc. So does the MAC environment but that is totally another topic.

Lastly a Real Time Kernel and Low latency is required for Music "production", not necessarily "reproduction". All the best!
 
I use KXStudio but I need jack and firewire support.

Interesting Thad! I did try kxstudio but unfortunately it was not stable for some reason with my operating environment.

Lately I have found that something really simple like Manjaro really works and does everything that I need. Linux Mint of course is the best if you want convenience as well as stability. But these are not specific audiophile os - nor do they need to be, IMO :)

With Manjaro you are cool to use your own custom kernel (very easy to do so in this distro) - if you so please. So low latency demons may flock here...
 
Around a decade ago I bought a sound card called Creative Audigy 2ZS. It could do 24/96 D-A for all 7 channels and 24/192 D-A in stereo only. The best part was, it could do a bit-perfect pass-through of all channels over SP-DIF with a one click setting. I am sure it wouldn't have been so straight forward with Unix/Linux systems, but then, why bother about the OS as long as it works well? I guess, there are times when being a Windows user is a Godsend.

It served me as a great transport both for stereo and AV duties. As a two channel transport it was better than many mid-priced CDPs those days. I haven't touched that thing for I don't know how many years though.

Those days high-res stereo content was scarce and I only used it for playing FLACs in bit-prefect mode. It would be interesting to check it's performance (primarily jitter performance) when playing 24/96 or 24/192 content available now. Should be worth a shot as it hardly needs any configuration. Just open control panel and set SPDIF out to bit-perfect and there you go, your 24/192 files are being sent to the DAC as bit-perfect stream. All this at zero configuration.
 
Interesting Thad! I did try kxstudio but unfortunately it was not stable for some reason with my operating environment.
Whilst kxstudio is now available as a distro iso, my base package is Ubuntu Studio with the required kxstudio ppas, but not installing/using KDE. Actually, I use MATE, which is not fully supported by KXS at this time but is mostly fine.

Even if you install the KXS distribution, it is Ubuntu at heart.

Again, studios and recording people need stuff like the lightest-weight desktops. For playback, I'm not bothered. Not that MATE is heavy-weight, but I do use Compiz as well. I guess I'd turn that off for recording, if I ever did any.

Word on the street (well, at linuxmusicians, at least ;) ) is that a realtime kernel is not necessary any longer. The "low latency" kernel is just fine. That's low-latency as in delay taken to process interrupts, not as in the 10ms aforementioned.

The great thing about KXS is the Cadence tools. No need to install the whole thing if not wanted. This thread will help to determine what is needed and what is not.
 
Around a decade ago I bought a sound card called Creative Audigy 2ZS. It could do 24/96 D-A for all 7 channels and 24/192 D-A in stereo only. The best part was, it could do a bit-perfect pass-through of all channels over SP-DIF with a one click setting. I am sure it wouldn't have been so straight forward with Unix/Linux systems, but then, why bother about the OS as long as it works well? I guess, there are times when being a Windows user is a Godsend.

It served me as a great transport both for stereo and AV duties. As a two channel transport it was better than many mid-priced CDPs those days. I haven't touched that thing for I don't know how many years though.

Those days high-res stereo content was scarce and I only used it for playing FLACs in bit-prefect mode. It would be interesting to check it's performance (primarily jitter performance) when playing 24/96 or 24/192 content available now. Should be worth a shot as it hardly needs any configuration. Just open control panel and set SPDIF out to bit-perfect and there you go, your 24/192 files are being sent to the DAC as bit-perfect stream. All this at zero configuration.

With today's Linux distro's I will not be surprised if it is simply plug and play with this sound card as well. Best part is before you commit to an installation you can always test the Live CD :)
 
Whilst kxstudio is now available as a distro iso, my base package is Ubuntu Studio with the required kxstudio ppas, but not installing/using KDE. Actually, I use MATE, which is not fully supported by KXS at this time but is mostly fine.

Even if you install the KXS distribution, it is Ubuntu at heart.

Again, studios and recording people need stuff like the lightest-weight desktops. For playback, I'm not bothered. Not that MATE is heavy-weight, but I do use Compiz as well. I guess I'd turn that off for recording, if I ever did any.

Word on the street (well, at linuxmusicians, at least ;) ) is that a realtime kernel is not necessary any longer. The "low latency" kernel is just fine. That's low-latency as in delay taken to process interrupts, not as in the 10ms aforementioned.

The great thing about KXS is the Cadence tools. No need to install the whole thing if not wanted. This thread will help to determine what is needed and what is not.

Am not a big fan of the 'buntu line of OS'. Particularly not the Unity environment!

Cinnamon - as compared to MATE - is both lighter weight and more stable. Worth a try?
 
Around a decade ago I bought a sound card called Creative Audigy 2ZS. It could do 24/96 D-A for all 7 channels and 24/192 D-A in stereo only. The best part was, it could do a bit-perfect pass-through of all channels over SP-DIF with a one click setting. I am sure it wouldn't have been so straight forward with Unix/Linux systems, but then, why bother about the OS as long as it works well? I guess, there are times when being a Windows user is a Godsend.

It served me as a great transport both for stereo and AV duties. As a two channel transport it was better than many mid-priced CDPs those days. I haven't touched that thing for I don't know how many years though.

Those days high-res stereo content was scarce and I only used it for playing FLACs in bit-prefect mode. It would be interesting to check it's performance (primarily jitter performance) when playing 24/96 or 24/192 content available now. Should be worth a shot as it hardly needs any configuration. Just open control panel and set SPDIF out to bit-perfect and there you go, your 24/192 files are being sent to the DAC as bit-perfect stream. All this at zero configuration.

Audigy2 zs had a huge huge flaw when used as a digital out or when using analog outputs - it would resample everything to 48kHz/96kHz/192kHz. It could not output 44.1/88.2/176.4 content - it was a hardware limitation. Also if any dsp effects were enabled, everything was automatically resampled to 48kHz.

Creative fixed this in the xfi's CA20k2 DSP. However its analog output was nothing great.
 
The biggest problem I have faced with my ASUS Xonar D2X sound card is that the manufacturer is unable to provide a decent 32 bit ASIO driver! So I have to resort to ASIO4ALL!

I think the Creative sound card had the same issue...maybe Ranjeetrain can confirm.
 
With today's Linux distro's I will not be surprised if it is simply plug and play with this sound card as well. Best part is before you commit to an installation you can always test the Live CD :)

Quite likely. I forgot that one can boot from the KXStudio ISO. It would help to have a working DVD drive, though!

Am not a big fan of the 'buntu line of OS'. Particularly not the Unity environment!

Cinnamon - as compared to MATE - is both lighter weight and more stable. Worth a try?
I hate Unity. I might have liked it on a phone/tablet, but I have been put off it the extent that I'm not seeking a Ubu-phone!

I am well stuck with my W95/2000/XP desktop paradigm. It's the one thing I can thank MS for! With added panels and some Compiz functionality. Ubuntu made it easy to switch from XP to U.10.04, and MATE allows me to go on having the same experience. I like customising my desktops, but I am not adventurous with the architecture!
 
Quite likely. I forgot that one can boot from the KXStudio ISO. It would help to have a working DVD drive, though!

Well, you could boot using a USB flash drive too (check 'unetbootin')
I hate Unity. I might have liked it on a phone/tablet, but I have been put off it the extent that I'm not seeking a Ubu-phone!

I am glad others feel the same as me about Unity. It is such a disaster I wonder why the Ubuntu management went with it...
 
Get the Award Winning Diamond 12.3 Floorstanding Speakers on Special Offer
Back
Top