Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really would love an open source, hackable FPGA DAC like the Chord DACs. What would be needed in addition to these cool looking boards for that to happen, I guess to code is pretty complicated for the USB interface to make it appear as a sound output ideally without drivers. Some kind of accurate clock and an output stage? Not sure if actually converting PCM to voltages over time is really that complicated...


> Not sure if actually converting PCM to voltages over time is really that complicated...

!

As someone working in this area, the USB interface is the boring standard bit and the actual analogue bit is both difficult and determines quality.

For what purpose do you want an open source DAC? Would you be happy with a chip doing USB to I2S for you and then doing the DAC yourself?


As someone skilled in the RF space but not the audiophile space -- why are audio DACs still a focus for innovation? The bandwidth, linearity, isolation, and jitter requirements all seem quite modest and distant from the edges of what's possible along every performance axis. Is it linearity at high power that's still a problem? With feedback techniques available, I wouldn't think so, but I could certainly be missing something. What's the sticking point?

Or is this more of a marketing game of adding hiss / distortion / lowpass / other non-idealities that perceptually improve quality and convincing people to use your DAC to do it rather than software? It seems a bit unlikely.

If I had to guess, it would be that the narrowly defined task of a DAC has been thoroughly solved and commodified while the high end of the space differentiates itself with industrially relevant features like failover, monitoring, durability, and compatibility. But then why the interest in a DIY DAC? Maybe I'm reading too much into this, it's all curiosity driven, and I shouldn't interpret a desire for DIY DACs as a statement that audio DACs aren't a solved problem.


The real issue seems to be that audiophiles want something that is unrelated to actual perceptible sound quality. Instead people want to think that the sound is good, and they have some expectations as to what might make sound a little better. This is why there is garbage like silver-plated cable, expensive power cords, etc. People expect amplifiers to be heavy, so amplifiers use big transformers and such and end up heavy.

Unfortunately, this phenomenon seems to make it quite hard to find genuinely well designed equipment. I would love to get a small A/V receiver with high efficiency, the ability to drive a load of varying impedance from 1-16 ohms (possibly frequency dependent), and better linearity and noise characteristics than I can perceive. Actually buying such a thing is not so easy due to all the snake oil and the fact that almost no one reviews equipment on any objective axis.

There is one genuine complication that I’m aware of: analog audio connections tend to be old, bad designs. RCA is single-ended. XLR is a decent design, but it’s rare in home audio. Speaker wires, in all their silver-plated glory, aren’t twisted. So inductively coupled noise is everywhere, especially at 50-60 Hz. Ground loops are hard to avoid. Unlike RF, audio should have a flat response down to 20 Hz, so cheap, small tranformers are out of the question. Nice isolation hardware isn’t that expensive, but it would still add up if you wanted to build an A/V receiver with a bunch of isolated inputs and outputs. With professional systems, you are much more likely to encounter differential signaling, but you are also likely to have very, very long wires and rather low signal voltages from microphones and such. This can result in unpleasantness like AM radio becoming audible if you have non-linearities that might accidentally rectify the radio signal.

I would like to see the audio world move to digital signaling for everything, but good luck getting everything to interoperate.


If you look at a lot of audio amplifier ICs, they simply drive a 4-ohm speaker at a higher current and power than they do an 8-ohm speaker. The rest of the circuit needs to be designed around the anticipated power draw.

Matching impedance is necessary for connecting high-impedance output stages like tubes to low-impedance circuits like speakers. But transistor amps are generally already operating with low impedance outputs.


> XLR is a decent design, but it’s rare in home audio

XLR connectors are huge. One can get DVD players that are too slim to accomodate XLR plugs.


Fair enough. What I mean is: a balanced (differential) shielded cable is a reasonable way to transmit an analog audio signal — common mode noise can be rejected pretty well, as can currents that might be induced in the shield due to a ground loop.

With RCA, you have none of these benefits. Heck, with RCA stereo, unless one end is isolated or you cut one of the shields, you cannot avoid a ground loop — the stereo connection by itself contains a ground loop.


back when I was a stage tech I always carried a bunch of isolating transformers with me. Cost 5 bucks on ebay and save your ass when dealing with obscure loops.


There are mini XLR connectors too. I've seen them used in devices like wireless microphone transmitters.


Audio DACs are actually a lot more complicated than you might think. Human hearing is very sensitive to non-linearity and noise, especially certain kinds of noise. In terms of raw performance, the linearity and noise requirements were definitely the most demanding as far as state of the art when I was doing research. They're certainly still tougher than anything in the RF space (specifically cellular, bluetooth, and wlan). Also, because most of them use delta-sigma modulators, the jitter requirement was also very stringent, though high-performance digital and RF may at this point need lower jitter than audio.

Unfortunately a lot of the advancement, especially in the high end space, is proprietary. I read a somewhat vague article about some of the more recent innovations, and one that stood out was the need to set the Initial Condition of the Delta Sigma Modulator in a specific way. Delta Sigma quantization noise is notoriously poorly behaved, and because of its periodicity, it was actually perceptible even at its lower levels.

I would agree that audio DACs are indeed a "solved" problem, but at this point so is pretty much everything in integrated circuit design. Most advances in design are very incremental. The need for innovation comes from the continued push to reduce power and cost. Eventually you have to change process node - smaller transistors means a smaller die and lower cost, and also lower power for many circuits. That tends to be very challenging for a lot of mixed-signal circuits because the smaller transistors are worse in analog domains. You end up having to play a lot of tricks to make things work, but its pretty well understood and nothing revolutionary.


(obligatory reference to employer's parts catalog: https://www.cirrus.com/our-technology/audio/hifi/ - I'm prepared to say that 24/192/114db should be good enough for anybody!)

So you're right that within the industry we already have the analog side as re-usable IP. However, someone starting from scratch - and especially starting with a FPGA - would need a lot of analog design experience. Analog silicon design is an even more rare skill (we are, I think, hiring if you have this).

What we are generally doing is support features; headphone detect, power management, power amplification (built-in boost converters etc), as well as post-processing and EQ. You can use EQ to compensate for the nonlinear response of tiny speakers in mobile phones.

(An odd side effect of the hardware pipeline and my role in software support is that anything you can actually see on the public website is very out of date compared to what's in development and heavily NDAd)

I'm still not clear why the OP wanted an open source DAC.


Here, on HN and similar places, people have strong bias toward scientism, making fun of audiophile cables and such, but the actual truth is, audio business is ultimately an entertainment business, and if, for some unknown (and potentially very subtle) reason something sounds better, no one really is willing to research the matter deeper, because, the research may become prohibitively expensive, with weak or no results all. Of course, there are general trends, like more linear DAC usually sounds better than less linear, but it is not always true. I mean, sometimes, two seemingly equivalent designs may sounds noticeably different, yet their physical measurement would suggest otherwise (which means, we are measuring the wrong thing).


I would love to know the answer to this for all the same reasons. Is there some actual special sauce or is the world of 'audiophile DACs' just the new 'Monster Cable' FUD?


I don't think there's any special sauce, at least nothing that justifies stupidly high audiophile pricing.

ESS "sabre32" DAC ICs are widely regarded as excellent and even integrated into high end audio products, yet they can be bought in small quantities for 12$ each: http://www.shawelectronics.com/es9018k2m.html


$12 is a huge price for a DAC. You will also need some expensive board design and opapmps and passives, to match the performance of the DAC.


That's definitely possible. The actual DAC but it's trivial - the hard but is that you would need to implement the USB Audio device class and a USB stack. That's a hell of a lot of code. Also what would be the point?


Luckily there are wonderful USB stacks implemented in open FPGA toolchains these days - check out the toolchains described at https://workshop.fomu.im/en/latest/


I wondered if there might be, but did you post the right link? I can't see anything about open source USB device implementations there.


Kate Temkin's Luna project is super cool, although I think it's still a WIP: https://github.com/greatscottgadgets/luna

It's a USB stack implemented as pure gateware - no hard/soft CPU needed, although I think you can hook one up if you want to.


The code linked there is all open, and has a USB device softcore. It's the most approachable FPGA USB implementation I've played with.

edit: Here is the actual USB core that's in there: https://github.com/im-tomu/valentyusb/


> USB Audio device class and a USB stack. That's a hell of a lot of code.

Its actually not that much for the bare minimum needed, though the USB docs are pretty daunting.

If you go with USB1, you basically just need enough to answer the descriptor and set interface queries and set up the endpoints (in particular the isochronous endpoint for audio is a bit more complex). If you stick to exactly one supported format and sample rate and don't include any control units, you can basically skip all the audio class control messages.

For USB1, in a pinch, you can use a cheap generic 24MHz usb logic analyzer and pulseview to decode the raw usb protocol for debugging (though with 24MHz you get some corruption in the capture from clock drift, you need at least 48MHz for more reliable signal sampling).

I'd guess you can make do with ~1k LOC in this case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: