+ Reply to Thread
Page 1 of 6 123 ... LastLast
Results 1 to 10 of 58

Thread: Yet Another DIY DAC (work in progress)

  1. #1
    Join Date: Nov 2008

    Location: North Texas

    Posts: 21
    I'm Jon.

    Default Yet Another DIY DAC (work in progress)

    The objective is to compare different DAC chips and topologies.

    A local oscillator and synchronous counter provide all timing and export clocks to slave a CDP or PC sound card. Analog output via passive I/V, transformer, and deemphasis and reconstruction filters. Digital to analog conversion is non-oversampled, 2x or 4x oversampled with null insertion and/or analog interpolation, or 8x oversampled with digital interpolation. There is also a hybrid mode that combines 2x and 8x oversampling.

    Additional features and options include:
    · 256Fs or 384Fs system clock.
    · Slow or fast digital filter roll-off.
    · Input to the clock divider from MCLK instead of the oscillator for occasional use with unsynced digital sources.
    · S/PDIF input via transformer-coupled coax or via twisted pair using the same differential transceivers that transmit the CDP clock; i.e., one Cat5 cable between the DAC and CDP.
    · The sample position within the sub-frame is optimized for best sound. Right-shifting the sample reduces the maximum and RMS sample value, which reduces the maximum and RMS output current of the DAC. Right shifting also reduces the maximum and RMS step size, which reduces di/dt and DAC settling time.
    · With different DAC and fan-out modules almost any kind or number of DAC chips can be evaluated.

    I’ve designed two DAC modules so far: One uses four PCM1704K that can be configured as two parallel or differential pairs and the other uses two PCM1794A that can be configured as two singles or one pair. Each DAC module has a corresponding fan-out module: 1:16 and 1:4. Summing the output of many parallel DACs improves S/N, dynamics, and reveals more low-level detail. The observed effect is greater than the theoretical +3dB S/N per doubling because human hearing and perception are not simple linear processes. This technique is common practice in astrophotography.

    The project started with the idea of comparing NOS with 8x digital interpolation using four PCM1704 and a DF1704. It then grew in successive stages:

    · Added shift register to time-align the left and right sub-frames. (This is an issue only when using mono DAC chips.)
    · Added shift register to optimize sample position in the sub-frame.
    · Added 2x OS with null insertion. (This is the simplest form of OS and only required the addition of a mux.)
    · Added fan-out for 16 PCM1704 modules.
    · Added 2x OS with analog interpolation. (Requires more shift registers and twice as many DAC chips as null insertion.)
    · Added 4x OS with null insertion or analog interpolation. (Requires more shift registers and twice as many DAC chips as 2x OS.)
    · Added PCM1794 module. (Required a different interface to include signals for system clock, deemphasis, and reset.)
    · Added fan-out for 4 PCM1794 modules.
    · Added hybrid 2x & 8x OS. (This was lurking in the design and only needed a unique 2x word clock to make it usable.)

    I achieved 4x oversampling by double pumping the DIR and demultiplexing the stereo data stream.

    Double pumping the DIR means running the BCK and WCK inputs at twice the incoming sample rate. The DIR responds by outputting each sample frame twice. This requires a DIR configured in slave mode and a source that is also slaved to the DAC clock otherwise samples may be missed or repeated.

    The sample frames coming from the CDP looks like this:

    | L1 R1 | L2 R2 | L3 R3 | L4 R4 |

    Where Ln and Rn are the left and right samples for frame n. The vertical bars represent the frame boundaries (WCK).

    The outgoing frames from the DIR looks like this:

    |L1 R1|L1 R1|L2 R2|L2 R2|L3 R3|L3 R3|L4 R4|L4 R4|

    That 2x stereo stream is demultiplexed into two mono streams.

    The demultiplexed frames look like this:

    |L1|L1|L1|L1|L2|L2|L2|L2|L3|L3|L3|L3|L4|L4|L4|L4|
    |R1|R1|R1|R1|R2|R2|R2|R2|R3|R3|R3|R3|R4|R4|R4|R4|


    With that stream and four DACs per channel, all permutations of NOS, 2x, and 4x OS are possible. (For clarity, the following stream diagrams omit the L/R channel prefix.)

    NOS:
    |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|
    |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|
    |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|
    |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|


    2x null insertion:
    |1|1| | |2|2| | |3|3| | |4|4| | |
    |1|1| | |2|2| | |3|3| | |4|4| | |
    |1|1| | |2|2| | |3|3| | |4|4| | |
    |1|1| | |2|2| | |3|3| | |4|4| | |


    2x analog interpolation:
    |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|
    |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|
    |0|0|1|1|1|1|2|2|2|2|3|3|3|3|4|4|
    |0|0|1|1|1|1|2|2|2|2|3|3|3|3|4|4|


    4x null insertion:
    |1| | | |2| | | |3| | | |4| | | |
    |1| | | |2| | | |3| | | |4| | | |
    |1| | | |2| | | |3| | | |4| | | |
    |1| | | |2| | | |3| | | |4| | | |


    4x analog interpolation:
    |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|
    |0|1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|
    |0|0|1|1|1|1|2|2|2|2|3|3|3|3|4|4|
    |0|0|0|1|1|1|1|2|2|2|2|3|3|3|3|4|


    Combining null insertion with analog interpolation yields many possible combinations limited only by the multiplexer configuration. Two examples:

    |1| |1| |2| |2| |3| |3| |4| |4| |
    |1| |1| |2| |2| |3| |3| |4| |4| |
    |0| |1| |1| |2| |2| |3| |3| |4| |
    |0| |1| |1| |2| |2| |3| |3| |4| |

    |1| |1| |2| |2| |3| |3| |4| |4| |
    |1|1| | |2|2| | |3|3| | |4|4| | |
    |1|1| | |2|2| | |3|3| | |4|4| | |
    |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|


    The hybrid 2x & 8x mode sends a 2x data stream to each of two PCM1794 chips, which do the 8x digital interpolation.

    No interpolation method if perfect. Null insertion attenuates the signal and increases sampling noise. Analog interpolation attenuates the high frequencies. Digital interpolation adds enharmonic ringing to transients and music is full of transients. Perhaps combining 4x null insertion with 4x analog interpolation will be preferable to either one alone because null insertion better approximates the ideal sinc function and provides some high frequency boost.

  2. #2
    Join Date: Jan 2008

    Location: Norfolk, UK

    Posts: 6,209
    I'm BigBobJoylove.

    Default

    You say you achieved the 4x oversampling rate by double pumping the DIR and demultiplexing the stereo signal (I assume into two mono streams), does the demultiplexing aspect have a negative effect on the quality of the signal when compared to the non-demultiplexed 2x oversampled signal? It is essentially adding an additional decoding process to the stream after all, and that (in my mind anyway) would make it immediately inferior, be it only marginally and perhaps inaudibly.

    I thoroughly appreciate this sentence by the way, it proves you're really in touch with how the result matters in the real world and it also means that you haven't made that oft made error of 'numbers is everything':

    Quote Originally Posted by Tam Lin View Post
    ...The observed effect is greater than the theoretical +3dB S/N per doubling because human hearing and perception are not simple linear processes.
    More please Tam, this is first class stuff and heavily technical.

    Ben Duncan mains conditioner
    2022 MacBook Pro 14" M1 Pro 10/16/16/16
    Samsung QE75Q90T 75" QLED TV
    XMOS DSD Async USB to Coax converter
    RME Audio ADI-2 FS (AK4493) DAC
    Chord Clearway XLR interconnects
    Audioquest Crimson USB interconnect
    QED Quartz Reference optical interconnect
    Edifier S3000 Pro active speakers
    Atacama SE24 stands

  3. #3
    Join Date: Jan 2008

    Location: Norfolk, UK

    Posts: 6,209
    I'm BigBobJoylove.

    Default

    Also, I guess you're listening mainly and measuring secondly, may I ask what equipment you're listening through?

    Ben Duncan mains conditioner
    2022 MacBook Pro 14" M1 Pro 10/16/16/16
    Samsung QE75Q90T 75" QLED TV
    XMOS DSD Async USB to Coax converter
    RME Audio ADI-2 FS (AK4493) DAC
    Chord Clearway XLR interconnects
    Audioquest Crimson USB interconnect
    QED Quartz Reference optical interconnect
    Edifier S3000 Pro active speakers
    Atacama SE24 stands

  4. #4
    Join Date: Nov 2008

    Location: North Texas

    Posts: 21
    I'm Jon.

    Default

    Quote Originally Posted by Filterlab View Post
    You say you achieved the 4x oversampling rate by double pumping the DIR and demultiplexing the stereo signal (I assume into two mono streams), does the demultiplexing aspect have a negative effect on the quality of the signal when compared to the non-demultiplexed 2x oversampled signal? It is essentially adding an additional decoding process to the stream after all, and that (in my mind anyway) would make it immediately inferior, be it only marginally and perhaps inaudibly.
    I’m not quite sure what you are getting at. Of course the mono data streams are fed to mono DACs. And, like mono amps, mono DACs don’t suffer from cross-talk as stereo DACs do. The only potential problem that comes from demultiplexing the stereo samples is not time-aligning the left and right sub-frames. You also might look at demultiplexing as undoing the damage that was inflicted on the signal by multiplexing it in the first place.

    In the digital recording process the signals from the stereo microphones are sampled simultaneously at precise intervals, converted to binary numbers, and recorded. At that moment, the samples are divorced from time and become featureless binary numbers. In the digital playback process, the samples are put in their original order and, at precisely the same intervals at which they were recorded, the left and right samples are simultaneously converted to analog signals that are more or less identical to the original signals from the microphones.

    Until the samples are reunited with time during the A/D process, what happens to the bits has no effect on the sound they represent. Almost all digital recording and transmission methods are serial and the left and right channel data is necessarily multiplexed. Not only that, but the bits themselves may be reordered and translated into different encoding schemes for different media.

    Contrary to popular belief, the data on the CD is not the ones and zeros of the original samples that are sent down the S/PDIF pipe as they are read from the disc. To create the CD data image the samples are dissected, interleaved, combined with error correction syndromes, track ids, and other bits necessary for the CD reading hardware to stay on track. In fact, only half the “bits” on the CD actually contain sample data. That conglomeration of bits are then converted into an 8:14 encoding scheme and recorded as a sequence of pits on the surface of the CD disk.

    When the CD is read, the 8:14 data is decoded into octets, which are buffered in local RAM inside the CD reader hardware. The bits from each sample are scattered across many octets. Misreading a single octet only effects 1 bit in each of a number of samples and one-bit errors are always corrected. If an octet contained 8 bits from the same sample, error correction would not be possible and the entire sample would be invalid. The samples are then reconstructed by gathering bits from different octets in the RAM buffer. Finally the samples are assembled in to a frame with parity and other information, translated to bi-phase encoding, and transmitted via S/PDIF. In a one box CDP, only the last step is omitted. Note: Recording on a hard disk involves a similar process.

    If, in your estimation, my demultiplexing the stereo signal might degrade its quality, how could any digital audio signal survive the massive multiplexing/demultiplexing, encoding/decoding, rearranging, and other manipulations it goes through before I get it? The reason is very simple: Until the samples are locked in time and converted to analog, there is no audio and no sound. They’re just bits. As long as the bits going into the DAC are identical to the bits that came out of the ADC and the sampling interval is identical, nothing has changed other than the anomalies produced the A/D and D/A processes.

    In the DAC box, the bi-phase S/PDIF data is decoded and the sample bits are rearranged to match the format needed for the DAC chips, e.g., left-justified, right-justified, 16-, 18-, 20-, or 24-bits, or I2S. In a stereo DAC chip, the left channel sample is received first and is latched. After the right sample is received and latched, both samples are converted to analog simultaneously. True mono DAC chips have no concept of left and right; they convert the sample they receive when they receive it. (As with all things, there are exceptions but lets keep this simple, for now.) If we send the stereo data stream to two mono DACs and instruct one to convert the first (left) sample and the other to convert the second (right) sample, there will be an 11 us delay between the changing of the left and right samples. All Audio Note DACs that use the AD1865 exhibit this defect but nobody seems to care. (The AD1865 is essential two, independent mono DACs in the same chip.) They say the delay is exactly the same as moving one of your speakers forwards or back a couple of millimeters and nobody can hear that. Oh, yeah? If no one can hear an 11 us timing anomaly, how can anyone hear the effects of jitter. After all, jitter is exactly the same thing as rapidly moving your speakers forward and back a few nanometers, a distance shorter than the wavelength of visible light, 44100 times a second. Anyone who claims to hear jitter but doesn't hear an 11 us inter-channel delay has no credibility with me.

    Quote Originally Posted by Filterlab View Post
    Also, I guess you're listening mainly and measuring secondly, may I ask what equipment you're listening through?
    I think, study, and analyze first; build/modify and measure second; listen and evaluate third. Then, if I am not satisfied, I repeat the entire process. I don’t subscribe to the notion that you can start with a defective, ill conceived, or sub-optimal design and turn it into something exceptional by substituting different capacitors, tubes, and opamps, or by sprinkling it with fairy dust and snake oil. Nor do I subscribe to the notion that a theoretically perfect design will always sound perfect: Witness digital audio – perfect sound forever. (I’ll save that rant for another time.)

    I listen through a Hovland HP-100, Art Audio Jotas, and Avantgarde Trios. I also have an SME-30 with an SME IV/Vi arm and Cardas Heart MC cartridge, and 8 or 9 other DACs to serve as reference as well as numerous real, live, acoustic, musical instruments. All interconnects and cables are my own design.

  5. #5
    Join Date: Jan 2008

    Location: Norfolk, UK

    Posts: 6,209
    I'm BigBobJoylove.

    Default

    Ahh, I see. Your first and sixth paragraph have cleared things up in my mind. I'm not anywhere near as knowledgeable of digital as you, but I am very interested in learning as much as I can about the entire process of obtaining the best results from converting a digital signal into a very high quality audio signal. It's a subject that becomes more relevant by the week as more and more advance is made in digital based technology in all areas of the arena, and now with another digital source entering the audiophile world (i.e. computers) it's ramped up the requirements for very high quality DACs.

    I may well throw more seemingly odd questions at you, bear with me.

    Quote Originally Posted by Tam Lin View Post
    ...Witness digital audio – perfect sound forever. (I’ll save that rant for another time.)...
    Oh, you may have a large discussion on your hands there mate, but I know exactly which angle you're viewing it from.

    Ben Duncan mains conditioner
    2022 MacBook Pro 14" M1 Pro 10/16/16/16
    Samsung QE75Q90T 75" QLED TV
    XMOS DSD Async USB to Coax converter
    RME Audio ADI-2 FS (AK4493) DAC
    Chord Clearway XLR interconnects
    Audioquest Crimson USB interconnect
    QED Quartz Reference optical interconnect
    Edifier S3000 Pro active speakers
    Atacama SE24 stands

  6. #6
    Join Date: Nov 2008

    Location: North Texas

    Posts: 21
    I'm Jon.

    Default

    Quote Originally Posted by Filterlab View Post
    Oh, you may have a large discussion on your hands there mate, but I know exactly which angle you're viewing it from.
    Hmmm. Which angle might that be?

  7. #7
    Join Date: Jan 2008

    Location: Norfolk, UK

    Posts: 6,209
    I'm BigBobJoylove.

    Default

    The angle of someone who truly understands digital and how if it's done correctly it can be a perfect way to store music.

    Ben Duncan mains conditioner
    2022 MacBook Pro 14" M1 Pro 10/16/16/16
    Samsung QE75Q90T 75" QLED TV
    XMOS DSD Async USB to Coax converter
    RME Audio ADI-2 FS (AK4493) DAC
    Chord Clearway XLR interconnects
    Audioquest Crimson USB interconnect
    QED Quartz Reference optical interconnect
    Edifier S3000 Pro active speakers
    Atacama SE24 stands

  8. #8
    Join Date: Nov 2008

    Location: North Texas

    Posts: 21
    I'm Jon.

    Default

    That’s an interesting perspective. Many people who know far more than I have been trying to do digital audio “correctly” for many years and, in my opinion, have come up short. One of the reasons is that the performance bar was set so low. Whereas analog recording techniques, theoretically, can be improved without an upper limit, digital audio is constrained by the limits of the mutually agreed upon sample rate and sample width. The 44.1K samples per second and 16-bit samples chosen for Red Book CD presents a severe limitation. It’s amazing RBCD can sound as good as it does.

    In the 1970’s I was involved with digital music synthesizers. The DAC chips of the day were only 10- or 12-bits wide and very slow. Obviously, the sound quality was not very good. The big question was: How fast and how wide did the sampling need to be to make digitally recorded music indistinguishable from live music. Stanford University’s newly endowed Center for Computer Research in Music and Acoustics took up the challenge. Their study found that the minimum requirement was 32-bit samples with a 1 MHz sample rate. At the time, 32-bits at 1 MHz was like asking the Wright brothers to build an airplane that could exceed the speed of sound.

    Today some would argue that the minimum requirements set by the CCRMA study are too severe and that today’s DVD-A and DSD are sufficient. I’m not so sure. There is always room for improvement and until we can do 32-bits at 1MHz, we will never know.

  9. #9

    Default

    Quote Originally Posted by Tam Lin View Post

    The big question was: How fast and how wide did the sampling need to be to make digitally recorded music indistinguishable from live music. Stanford University’s newly endowed Center for Computer Research in Music and Acoustics took up the challenge. Their study found that the minimum requirement was 32-bit samples with a 1 MHz sample rate. At the time, 32-bits at 1 MHz was like asking the Wright brothers to build an airplane that could exceed the speed of sound.

    .
    How did they prove this, without the technology ?
    Hans

    MBL 1531 -> Allnic L-4000 -> Audiolab 8000S used as power amp only -> Quad 2805. Cables: Transparent Ultra

  10. #10
    Join Date: Nov 2008

    Location: North Texas

    Posts: 21
    I'm Jon.

    Default

    The CCRMA study’s conclusion was not a formal proof but a reasoned conjecture. Matters of human perception are rarely 100% provable. Remember, the question the study attempted to answer was: What is the minimum sample width and rate that would make digitally reproduced music indistinguishable from the real thing. When developing the CD a dozen years later, Sony and Philips approached the question from the other side and asked: What is the minimum sample width and rate necessary to reproduce 20-20,000 Hz with low distortion and 90dB S/N. There is little doubt, although the first generation of digital recordings met the Sony/Philips requirements, the sound was easily distinguishable from the real thing.

    I should also point out that the CCRMA study looked at PCM only and did not consider the effects of digital filters, which have become so prevalent these days. In my opinion, the sonic signature of digital filters makes the whole question moot.

+ Reply to Thread
Page 1 of 6 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •