Achieving bit-perfect output
Aug 11, 2006 at 10:59 PM Thread Starter Post #1 of 12

jvs

Head-Fier
Joined
Jul 21, 2005
Posts
61
Likes
1
[size=small]Background[/size]
A year ago I built an audio pc based on a VIA Epia ME6000 motherboard to use with an external Digital-to-Analog Converter (DAC) from a manufacturer of audio equipment (Cambridge Audio). I choose the Epia because it is fanless (no noise). At first I wanted to use the motherboard's own coaxial digital output but when i realised it was not possible to get bit-perfect output from it I bought a PCI soundcard, the Chaintech AV-710. The AV-710 itself has bad drivers that do not allow bit-perfect output but it can be 'flashed' (comparable with a BIOS update) to make it 'think' it is an Audiotrak Prodigy 7.1. Then you can use the better Audiotrak drivers, you loose the analog functionality of the AV-710 but you get a bit-perfect digital signal to go into your external DAC. This works with any audio player, I use iTunes.

While trying to get a bit-perfect digital signal to my DAC I was at first overwhelmed with all the information I found in the computer audio forums. I think I managed to make some sense of it all eventually and want to share this information with you. I am no audio expert so I cannot guarantee that the information I compiled in this post is correct but I did my best and hope it is. All comments, corrections and additions are welcome though.

[size=small]Limitations[/size]
I focussed on two channel output.
I will not discuss USB sound solutions.
I will not discuss the sound quality of the different soundcards’ analog output stages.
The information is not entirely up-to-date; e.g. the X-Fi is a newish card from Creative that is not included but supposedly offers bit-perfect digital output too.

[size=small]Apple[/size]
Apple’s big advantage is that it has bit-perfect output by default, directly from its computers as well as through the Airport Express. The disadvantages are that if you want to use analog output directly to your amp you cannot choose the best soundcard available, you will have to use the one that is built-in. If you are using digital output with an external Digital-to-Analog converter (DAC) this is not an issue, you can choose the best DAC available. Apple only offers digital output using optical cables (with Toslink connector, mini-Toslink in fact). In audio circles electrical digital cables (coax) are generally considered superior to optical, although being near and connected to computer hardware the electrical interface may be more susceptible to interferences than the optical.

[size=small]Windows[/size]
With Microsoft Windows OS’s it is - as usual - less simple to achieve descent audio output.

WaveOut
WaveOut is the old, outdated API (Application Programming Interface) for playing digital sounds in 32bit Windows OS's. Old OS's (all win9x and nt4) have good waveOut implementation; you should use waveOut output on those for best performance. waveOut features are limited; it doesn't even natively support mixing multiple streams. It appears that waveOut is provided in win2k/xp only for compatibility with old software - win2k/xp waveOut implementation is rather bad, it doesn't use any kind of hardware acceleration; all mixing is performed by software (may interrupt sound when CPU usage is high).

DirectSound
DirectSound is the new sound playback API, available for all 32bit Windows OS's. DirectSound natively supports mixing multiple streams, independent volume control, hardware acceleration layer & hardware emulation layer. DirectSound should be generally fine to use everywhere except for nt4 (bad implementation), as long as you have latest DirectX version for your OS and proper soundcard drivers installed. DirectSound is preferred over waveOut on win2k/xp, because their DirectSound implementation is relatively good (eats less CPU than waveOut and is free of win2k/xp waveOut implementation glitches). DirectSound was originally designed to let games utilize hardware acceleration available on your system without having to touch low-level hardware functions directly.

If you decide to use the 'normal' WDM (Windows Driver Model) you should use WaveOut on win95/98/me/nt4 and DirectSound on win2k/xp. However, on win2k/xp both WaveOut and DirectSound resample to 48KHz (goes through Kmixer.exe). WaveOut on win95/98/me/nt4 should be bit-perfect by design suing non-AC'97 compliant hardware (see below) but you cannot use the newer player software with those OS's.

ASIO
ASIO was developed for sound recording and editing applications where latency is important. Latency is no issue in audio playback. A welcome side effect of ASIO is that it allows for bit-perfect output because it avoids Windows’ Kmixer.exe. Some proprietary soundcard drivers support ASIO natively. The player software needs to support ASIO in order to use it.

ASIO4ALL
ASIO4ALL is a universal ASIO Driver for WDM audio. Foobar and Winamp offer plug-ins for using ASIO4ALL.

Kernel Streaming
WDM devices support Kernel Streaming (KS). Kernel Streaming allows for high bit rates without burdening the host CPU. WDM-based filters can use Kernel Streaming to pass multimedia data directly from one hardware device to another, either on the same card or on a different card, without copying the data into the system's main memory until it is rendered on the sound card. Generally, the main reason to use Kernel Streaming is to achieve extremely low latency output.

Kernel Streaming plug-ins
Kernel Streaming plug-ins bypass the Windows KMixer and sends data directly to the audio driver. Generally, the main reason to use Kernel Streaming is to achieve low latency output, because KMixer adds about 30 ms latency. As stated earlier, low latency output is not useful for audio playback, only for recording and editing but since KMixer doesn't get to mess with your audio data KS also allows for bit-perfect output. Kernel Streaming plug-ins prevent all other programs from playing sound during audio playback and can be considered a rather 'crude hack'.
Kernel Streaming plug-ins are available for Foobar and Winamp. The Winamp KS implementation is considered inferior to the one for Foobar because it does not use audio buffering. This makes it more susceptible to sound dropouts. Foobar is widely considered one of the best audio players but is a real pain in the @$$ to configure.

Proprietary WDM drivers (e.g. ESI E-WDM)
A number of soundcard manufacturers use drivers that by-pass KMixer. These manufacturers essentially use kernel streaming techniques in their drivers. The advantage is that they allow bit-perfect playback with all audio applications (iTunes, Media Player, musikCube etc.), not just with Foobar and Winamp.
Manufacturers that use these more advanced drivers are: ESI, AudioTrak, M-Audio, RME, amongst others.

[size=small]Windows on-board sound solutions[/size]
In on-board sound solutions the sound chips are integrated on the motherboard, not on a separate (PCI) soundcard. Many motherboards have integrated sound chips, they are generally built according to the following two standards:

AC'97
AC'97 (short for Audio Codec '97) is Intel's audio standard developed in 1997, and used mainly in on-motherboard (a.k.a. 'on-board' or 'integrated') sound cards. AC'97 supports 96 kHz in 20-bit stereo resolution and 48 kHz in 20-bit with (up to) six channels (5.1).

AC’97 compliant sound cards cannot output 44.1kHz used on normal cd’s, they will always resample to 48 kHz. Bit-perfect output is not possible with these soundcards. If you have a AC’97 compliant soundcard you might as well play through Kmixer.exe, the upsampling process of Kmixer.exe might be better than the upsampling process of the hardware.

Integrated sound solutions supporting 44.1kHz output were scarce in the AC’97 era. The ones using VIA’s Envy sound chip are OK. The integrated sound on VIA Epia motherboards however is AC’97 complaint and will therefore not allow 44.1kHz output.

HD Audio
In 2004 AC'97 was superseded by Intel High Definition Audio (HD Audio). HD Audio is Intel’s new standard for onboard audio. HD Audio allows playback of audio at 32 bit/192 KHz. Supposedly HD Audio digital output is bit-perfect, at least with the Realtek ALC880 chipset.
 
Aug 12, 2006 at 11:52 AM Post #2 of 12
Quote:

Originally Posted by jvs
Kernel Streaming plug-ins prevent all other programs from playing sound during audio playback.


I'm using KS with foobar, my efforts to use ASIO have lacked fruit. Anytime I try it, my PC gets locked up.

I noticed this phenomenom the other day. While playing music through foobar, no other program on my PC has audio. But once foobar has stopped, audio on other stuff is restored.
Perfect for me, I thought I had to change my audio settings before if I wanted to watch an avi or a youtube video.

Does ASIO do this?
 
Aug 12, 2006 at 12:20 PM Post #3 of 12
Quote:

Originally Posted by Chri5peed
I'm using KS with foobar, my efforts to use ASIO have lacked fruit. Anytime I try it, my PC gets locked up.

I noticed this phenomenom the other day. While playing music through foobar, no other program on my PC has audio. But once foobar has stopped, audio on other stuff is restored.
Perfect for me, I thought I had to change my audio settings before if I wanted to watch an avi or a youtube video.

Does ASIO do this?




This is a direct result of bypassing kmixer, so yes.
 
Aug 12, 2006 at 12:46 PM Post #4 of 12
It think the question should be: "Does ASIO4ALL do this?".
The answer: I don't know.

But I think it doesn't. Since ASIO is meant for audio recording/editing/mixing I guess you would need to have several applications use the soundcard at the same time... (anyone?)

With your ESI Juli@ soundcard you don't need the Foobar Kernel Streaming plug-in nor ASIO4ALL to get bit-perfect output AFAIK. In your case the Foobar KS plugin is only useful for blocking any other application from using the soundcard like you described. The Juli@ supports ASIO 2.0 natively by the way.
 
Aug 12, 2006 at 12:54 PM Post #5 of 12
Quote:

Originally Posted by cclragnarok
This is a direct result of bypassing kmixer, so yes.


Unless the ASIO capable driver has it's own mixer device. This may (will) be better than kmixer and not resample everything to 48kHz.
 
Aug 12, 2006 at 12:58 PM Post #6 of 12
Quote:

Originally Posted by jvs
It think the question should be: "Does ASIO4ALL do this?".
The answer: I don't know.



It does if it is able to get it to work with your soundcard. It falls back to directsound otherwise.

I got ASIO4ALL to work with the 2006 Total Bithead. Well, at least all other sounds got blocked like they are supposed to be.
 
Aug 12, 2006 at 1:11 PM Post #7 of 12
Quote:

Originally Posted by cclragnarok
This is a direct result of bypassing kmixer, so yes.


Nice, that is how I would dream it worked.
eggosmile.gif
Is that why the DSPs still work in foobar, I had thought they'd be bypassed using KS.

Quote:

Originally Posted by jvs
With your ESI Juli@ soundcard you don't need the Foobar Kernel Streaming plug-in nor ASIO4ALL to get bit-perfect output AFAIK. In your case the Foobar KS plugin is only useful for blocking any other application from using the soundcard like you described. The Juli@ supports ASIO 2.0 natively by the way.


I had all the Kernel Streaming & DirectSound outputs, when I installed foobar0.9.2
It does run ASIO2.0 natively, but I still had to get the Juli@ ASIO plugin to get it as an output option in foobar & 'ASIO Virtual Devices', but like I said for some reason it doesn't work? But KS does, so I'm happy...
 
Aug 12, 2006 at 4:37 PM Post #8 of 12
You say that AC'97 devices resample everything to 48khz and that VIA Envy devices are AC'97 compatible. Would it be true then that the AV710 is resampling everything to 48khz, even when using Kernel Streaming or ASIO? Since AV710 is a VIA Envy device?
 
Aug 12, 2006 at 4:50 PM Post #9 of 12
No, the VIA Envy chip is not AC'97 compliant. The integrated sound on VIA Epia motherboards is AC'97 compliant but those don't use the Envy chip but a cheaper one.
 
Aug 16, 2006 at 7:33 PM Post #10 of 12
i just posted in another thread about my seemingly successful attempt at incorporating asio4all with an edirol ua-1x. i did this to prove i can get bit-perfect output regardless of usb device as i am planning on getting headroom's desktop amp w/DAC (obviously, my intent is to use the usb for my pc hookup - i want to save the optical for my cd player).

so with asio4all installed and selected in foobar, according to the Control Panel and the sound app for my onboard sound i don't even have an audio device. it is all grayed out. this to me seems to tell me i am definitely bypassing the k-mixer and getting 44.1 out to the edirol device from foobar. the only thing of concern though, is the volume is VERY low. is this normal?
 
Aug 16, 2006 at 9:39 PM Post #11 of 12
Quote:

Originally Posted by warrior05
this to me seems to tell me i am definitely bypassing the k-mixer and getting 44.1 out to the edirol device from foobar. the only thing of concern though, is the volume is VERY low. is this normal?



The best way I know of dong this is that no computer audio works. Pause a track and run an avi or something and you shouldn't hear a peep.

Also tied into this, no volume control should work. The only volume control I have is the potentiometer of my amp.


Sound comes back if I stop a track completely, no volume control however. Although is this a feature of Kernel Streaming?
 
Aug 17, 2006 at 3:31 PM Post #12 of 12
I used the av710 with foobar and asio4all for a few months and now I have flashed the card to prodigy and use the prodigy asio driver. There are no major differences in sound (it may have improved a bit, but it might be placebo), but the prodigy drivers are much, much better. The audio can switch automatically between 48KHz and 44.1 KHz. The old envy driver used to get stuck for a while.
 

Users who are viewing this thread

Back
Top