High quality nonos PC based DAC
I have an idea for a non oversampling PC based DAC that others may be interested in. Here is my plan (after much research):
1) Ripping my over 500 CDs to a PC media server. Why?
Because it is so much more convenient to have music on a PC, it can be sorted using a jukebox program, you dont need to constantly select & insert & put away CDs, your CDs never get scratched, the music is available on other PCs via the network.
2) Use high quality ripping software. Using a decent CD drive (plextor burners are best) you are guaranteed to get a bit exact copy of the CD onto the hard disk in WAV format. Use Exact Audio Copy or the Plextools application if you have a Plextor.
But what about the sound quality of using a CDROM? I dont believe that a PC CDROM drive is inferior to a CD transport, bits are bits and a quality PC drive can do (IMO) a better job of retrieving the bits off the disk that a normal CD player can as it can re-read the tracks without having to worry about real time playback, especially if you have CD's that have some blemishes on the surface. You can also slow the CD drive right down to minimise any errors, although a good drive with C2 error correction will do a great job and store the track on the PC hard disk with NO jitter even at 2-4 times normal playback speed. I have tested digital ripping several times to the point that I'm comfortable that a good ripper & drive will give you perfect results if setup properly. You can double check this by having Exact Audio Copy test the ripped track and comparing checksums (even with checksums created by other people of the same track).
3) Use lossless compression to reduce the size of the WAV files to a manageable size. Why?
500 CDs x 500Mb average per PC is 250Gb, quite a bit to store although you are now able to purchase single PC disk drives with 250Gb storage. Using a lossless compressor will shrink the size of the WAV file using special compression algorithms (similar to MLP used in DVD-Audio) down to 50-60% of the WAV size and save disk space. I'm using Windows Media Audio lossless codec & encoder which can be downloaded free from Microsoft and has pretty wide software support (eg. Windows Media Player, Foobar, Winamp).
4) Use a software player that supports WMA lossless and is able to bypass the internal Windows audio processing engine Kmixer. Why?
The software player expands the lossless WMA format back into a PCM stream for the PC to process. The software player is also the interface that the user interacts with (eg. Jukebox functionality, playlists, shuffle etc). The player needs to support Kernel Streaming mode to bypass Kmixer and allow the PC to use the native bit perfect PCM stream without processing it. The Foobar (www.foobar2000.org) player will do this.
If you are still with me so far, we have stored and can play a bit perfect copy of the CD on the PC. Now we have to get the PCM out of the PC and convert it to audio using as high a quality DAC conversion as we can. The conventional approach is to do this using a soundcard like the Creative Audigy cards, or even better some of the pro music cards like the Delta 410 or RME cards. Note that these pro cards in a Digital Audio Workstation (DAW) process a fair chunk of the music produced today in the audio production process. However I'm proposing that we do things a little different (this is a DIY site after all) and that we host the DAC external to the PC and that we use non oversampling and all the other great techniques articulated in previous posts about DAC design.
Why? Because the PC is a noisy environment to be doing the digital to analog conversion, there is heaps of EMI boucing around the place and the PC powersupply is no place to hang a sensitive DAC chip to (having said this, the pro audio cards do a great job). An obvious option here is to use a decent soundcard and use the SPDIF output into a DIY high quality DAC. I think we can do better that this because SPDIF is such a crummy interface and hard to do correctly, and surely with a PC we can create an I2S feed that can go straight into the DAC and forget about jitter?
So how do we do it? Use a USB soundcard, but these have fair to average audio specifications (eg. the PCM2904) and are not non oversampling. I have been hunting around the main semi manufacturers sites to find a USB converter chip that doesn't just convert USB data to audio, but allows an I2S output, and I have found the Philips UDA1321 chip, which is an inbuilt USB decoder, controller and DAC with inbuilt DSP functions. Most importantly it is relatively simple to control (does not need an external micro or EEPROM) and will output I2S. So we can take the I2S signal direct from the UDA1321, buffer & reclock it and feed it directly into a fine non OS DAC design like the TDA1541, using the usual tricks like highly regulated power supply, quality filter & output stage. This should allow us to create an audiophile PC based DAC, and from what I can work out no one has attempted to do this before.
It will actually be quite easy to do. Purchase a Xitel USB soundcard from ebay (or wherever, about $30 - $50) as it uses the UDA1321 and has all the USB connectors & auxillary stuff needed, and tap into the I2S pins on the circuit board and connect this to your favourite DIY nonos DAC (keep the I2S patch length short though).
I'm not sure who on this board is interested in this approach (high end audio & PC convergence) but I think this will make a decent and unique high end DIY project, and a good use for my recently purchased TDA1541A-S2 chips. It would also make a good candidate to connect up to the digital inputs of a digital amplifier like a hacked Panasonic XR10/45 (see digital amplifier thread) to remove the DAC conversion (or at least do the analog conversion after the power stage). I'd expect the quality to be stunning, especially with a decent digital amp & no analog pathways.
I'm interested to hear if anyone else has any thoughts on this approach, I'll post the results, schematics etc. as this project progresses.
I've been thinking along those lines myself lately, and come to many of the same conclusions as you.
The I2S-idea is very good! I hadn't thought of that :)
As for lossless compression, I've found one that I really like - Monkey's Audio. Besides being among the absolute best compression-wise (~ 50%), it's extremely fast. On my computer, ripping and compressing takes no more time than just ripping the cd to file(s).
It's also completely free (and hassle-free as opposed to WMA), and supported by winamp, eac, and foobar.
There is one additional problem with using the PC as a jukebox - fan noise. This problem must be adressed through using "silent" fans and psu, and temperature-monitoring fan controllers.
AFAIK the only way a soundcard can be played to avoiding the windows mixer is to use a sound card that has ASIO support.
I think youll find thats what Foobar uses for "Kernel Streaming".
Cards that normally support ASIO are only the cards at the higher end of the soundcard market.
Although, the nForce2 also supports it (what im using).
I have made an "external soundcard", using the PCM2902. But i use its SPDIF output which i then turn into I2S using a DIR1703.
This works very well and is quite simple.
Details are here:
Also might i sugest staying clear of WMA and using another lossless compression format... there are plenty around that winamp and foobar support.
Windows Media Audio
The reason why I chose WMA is because the format is likely to stay around for a long time because its Microsoft & will be supported by hardware devices like CD players and portable players. APE is good but who knows where it will be in 3 years time? One good thing about a lossless compressor is that you can change formats if you want without loss of quality by re-encoding. Don't worry about DRM in WMA, you can turn that off if you are making your own copies.
Agree that Foobar is the best player for maximum quality (kernal streaming).
PC & Fan noise can be addressed by using a low noise fan and an acoustic damped case. There are many sites on the web that will sell low/no noise PC components.
On the hardware side, the biggest challenge will be the clock management as the I2S output will be jittery due to the asynchronous nature of the USB bus. It will need reclocking, probably using a FIFO arrangement. The Xitel DG2 uses a custom ASIC chip to do this, and if you apply the reclocking circuits discussed on this board you should have a stable clock for the DAC.
The I2S input to a digital amp is what I think is the exciting bit, with Panasonic 6x100W digital amps to be had on ebay for $150, a hacked DG2 patched into the Equibit TI digital amps for $200 looks like a great all digital experiment. I'd run the Equibit amps bridged to get more power although this would require I2S inversion (more logic).
Re: Windows Media Audio
Thanks Brian, good tip.
Been doing some more digging, I can confirm that the Xitel AN1 which uses the UDA1321 Philips chip is hackable. The UDA1321 reads its config from an EEPROM but it has a couple of internal configuration tables, one of which is 16 bit I2S output. The AN1 goes for about $30 on ebay, and comes with the USB connector and auxillary components to support the UDA1321. A couple of alterations on the PCB will be necessary to disable the EEPROM chip and set the configuration pins to the correct config map (map #2), as well as take off BCK, WS and D to route (over a very short wire!) to the Async SRC.
WS will not be constant and suffers from the occassional 1ms dropout due to USB delays. The role of the ASRC is to buffer the i2S and stabilise the clock. The AD1895 looks good, as it is easy to get and although the TI ASRC has better specs, it is still redbook audio we are dealing with which the AD1895 will do without compromising quality. I have a couple of questions about the AD1895 using it for 44.1KHz input & output:
- Will it buffer the odd pause in the I2S clock caused by a delay in the USB subsystem (which must be expected)?
- It needs a rock stable master clock (input slave, output master)?
MWP, great link, your project is similar to mine except I want to use an external DAC to maximise the output quality which is why I need the Philips chip (looks like the only one to convert USB to I2S). Also, kernel streaming is not the same as ASIO. ASIO (apart from being a secret in Australia!) is a low latency professional audio interface from Steinberg and needs to have hardware support on the soundcard. Both ASIO and kernel streaming will avoid kmixer, for USB audio because it is native Windows you must use kernel streaming. Foobar is ideal.
As for clocking, look over the evaluation board here:
The manual shows schematics of clocking.
What about grabbing i2s from a pci sound card to get rid of the usb delay? A short cable could be run inside the computer to a shielded box, containing the dac. As for the computer, if the switching power supply was removed, replaced with a normal linear supply, would noise be lowered a bit?
The AD1896 will buffer up to 512 L+R words although the datasheet is not clear if this buffering is available if you dont perform sample rate conversion (ie. 44.1KHz -> 44.1KHz). I think I need to look for a more dedicated FIFO buffer, although I'm not sure what happens when you have input rate = output rate and there is a slight clock speed mismatch or the USB dropouts, in theory the output clock will need to be variable to keep the buffer from emptying or overflowing.
Maybe MWP has the right idea and just go back to SPDIF, although SPDIF is a problematic interface if it is simply used to interconnect 2 chips within a PCB it should be less prone to jitter.
It may be possible to house the DAC in a shielded box inside the PC and connect a short length of I2S from the soundcard to the DAC. It is not practical to change the PC power supply to linear due to size & dissipation, and anyway the switching speeds of the PC bus will radiate as much hash as the SMPS.
Been there, done that. Here is my solution, it works.
I use a RME Digi96 soundcard (SPDIF + ADAT out) which fulfills all the conditions : bit accuracy, etc.
My DAC has its own clock for reclocking.
I generate a SPDIF signal using the DAC clock and send it to the soundcard. I set the soundcard to slave its clock to the incoming SPDIF. Thus it generates a SPDIF which is in sync with the DAC embedded clock.
I feed this SPDIF to my DAC (non-os TDA1545A).
I have checked everything on the scope : with the soundcard to Master, it's asynchronous reclocking, with the soundcard to slave, everything is perfectly synchronous. The clock PLL in the RME soundcard is amazing by the way. It'll sync instantly without any audible transient.
You don't need to use clumsy chips to do sample rate conversion or FIFO's. The soundcard will do all the work for you. The 250 euros it cost are well worth the hours it'd have taken me to implement a FIFO correctly. And I run my SPDIF through transformers to achieve total isolation between the PC and the DAC.
The only way to make it skip is to play a file from a harddisk which has spun down to powersave mode. Then you get 1 second of silence and then music. Apart from that, never, ever got any problem. It ROCKS.
And it sounds fabulous.
Glad to hear your setup works, and I'm sure it sounds as good as the best audiophile transports & DACs for a whole lot less (and more flexible). The RME is a good card, there are a number of threads at avsforum that highlight this card as the ultimate for a home theatre PC.
Can you elaborate how you fed the DAC clock back to the soudcard? What physical connection & format does the soundcard use to sync from an external clock? I agree this would be the easiest way to attach an external DAC to the PC and minimise distortion like SPDIF jitter.
|All times are GMT. The time now is 06:00 PM.|
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright ©1999-2017 diyAudio