DACless audio - Page 1
Forum section: electronics / general

author: grumpydoc
author_rank: Super Contributor
timestamp: September 14, 2022, 02:22:57 pm
content: Random thoughtIf you have a "digital" audio source, say from Bluetooth or optical and a class D output amp, presumably one could calculate the PWM duty cycle direct from the digital signal and avoid what is essentially a digital->analog->digital->analog conversion.Has any system ever done this?Was it worth it?

author: tszaboo
author_rank: Super Contributor
timestamp: September 14, 2022, 02:38:12 pm
content: There are countless number of class D amplifiers with I2S inputs.

author: grumpydoc
author_rank: Super Contributor
timestamp: September 14, 2022, 02:42:03 pm
content: ThanksAny end user products that you know of using them (specifically Bluetooth amps).

author: themadhippy
author_rank: Super Contributor
timestamp: September 14, 2022, 02:52:30 pm
content: Quotesort of, but not blue tooth though,more your pro pa rig ,analogue into the desk,spat out as aes into outboard processing then aes out the processors into the amps.as for being worth it,maybe,it certainly cut the latency down,but whether that was noticable to your average punter who knows

author: tom66
author_rank: Super Contributor
timestamp: September 14, 2022, 03:13:34 pm
content: Quote from: tszaboo on September 14, 2022, 02:38:12 pmI think many of these do internally do an analog to digital conversion - they use a ramp generator, DAC and comparator to generate PWM so technically they're analog (though would you ever be able to tell the difference?)This is because to get e.g. 16-bit PWM at 48kHz you would need an PWM clock of ca. 3GHz - there are ways to get around this like delta-sigma or MASH PWM which essentially reduce the resolution as you get closer to the cutoff frequency, but they require fairly complex digital logic.How many I2C class D amps are there that implement true digital modulation?

author: tszaboo
author_rank: Super Contributor
timestamp: September 14, 2022, 03:47:31 pm
content: Quote from: tom66 on September 14, 2022, 03:13:34 pmBut audio doesn't work that way. You don't need to reconstruct all the samples at 48khz, because the sound was recorded with ~10khz input bandwidth. Just look at DSD encoding. That's approximately CD quality at 2.8MHz. Similar, there are digital filters that convert it from PCM to PWM and the internal frequency of these signals are not going to be that high. They just move it out of the audible range, somewhere in a few MHz range, where it doesn't jam radios.

author: gf
author_rank: Super Contributor
timestamp: September 14, 2022, 04:01:50 pm
content: If the input is analog, then the delta-sigma modulator is analog, too. The modulator is not so complex, even if higher order. It just needs to be very linear and low noise. I guess this is the challenge.(OTOH, the complex part in an audio codec is rather the DSP for low-pass and decimation, in order to obtain 16 or 24 bit PCM from the 1-bit delta-sigma stream. But a class D amp does not need this - it sends the 1-bit stream to the speaker.)

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 14, 2022, 04:09:47 pm
content: Quote from: grumpydoc on September 14, 2022, 02:22:57 pmAt least NXP microcontrollers like i.MX RT1062 support MQS or Medium Quality Sound using a dedicated subsystem. Basically, the MQS subsystem controls any two PWM pins, connected to a power amplifier, to drive stereo speakers or headphones, given 2-channel 16-bit LSB data stream at 44 kHz or 48 kHz sample rate. For up to 10 kHz, the signal to noise ratio is about 20 dB, or roughly equivalent to 8-bit audio, like on old Amigas and Sound Blasters. It's not Hi-Fi, but surprisingly okay. It is even supported forTeensy 4.0 and 4.1by the Teensy Audio library.Considering it is basically a DMA-capable fire-and-forget subsystem in the chip hardware, I'd be surprised if it was particularly rare.I seem to recall that in the 1988-1991 time frame, there were some demos (and maybe even games) that used the PC beeper –– which is a PWM only audio device –– for PCM audio effects (screams, even rough music). Ah, yes; see e.g.https://youtu.be/pzNbGa05dfgfor examples.(In a couple of different threads here, I've mentioned PDM – pulse density modulation – and how, by sacrificing a bit of the output Vpp, say instead of 0..Vpp to Vpp/16..Vpp×15/16, you can move all the quantization noise quite high in the spectrum, so that a simple low-pass filter will yield surprisingly good results. It's dead simple to do, too: all you need is an adder and a register. On each clock cycle, you add the current sample value to the register. If the addition overflows/carries, set the output high, and otherwise low. You can modify the current sample value at any point in time, but technically, to get 2n-bit output, you should emit the same sample for 2nclock cycles. If you do vary the sample, the output is the inverse of a delta-sigma ADC; a "delta-sigma DAC?" It was common in embedded audio DACs with binary sample input streams at some point, not sure if still common.)

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 14, 2022, 07:00:09 pm
content: As some said, there are integrated solutions for this.If the question is for your personal interest, sure you can. The way I would personally do it is implement a sigma-delta modulator and feed its output to the class-D amp.

author: tom66
author_rank: Super Contributor
timestamp: September 14, 2022, 07:35:36 pm
content: Quote from: tszaboo on September 14, 2022, 03:47:31 pmYes, that's delta-sigma encoding, but it's my understanding that's reserved for higher end class-D chips (if it's used at all).Something like e.g. TAS2552 (I2S input class-D amplifier) is doing the PWM in analog, for a few reasons:* Power FETs have a minimum on/off time which a simple delta-sigma modulator may not respect (requires additional care in the design of the modulator) - this isn't a problem if you're just driving logic into e.g. an LC filter network which most of those CD players are effectively doing* EMC - a lot easier to jitter a centre carrier to spread the energy than to guarantee performance of a wide-spectrum noise generator (which is what delta sigma is) - EMC is of course an issue for many so-called filterless class D amps* Doing it in analog is cheaper than in pure digital logic, esp. if you only need THD ~0.1% or so.I haven't seen many class D DACs with digital inputs that could be called truly DAC-less. In terms of modulation done digitally the closest you might get are the Tripath ones, no longer manufactured, though they don't disclose how the modulator works and the devices only had analog inputs. I've had a play with modulation techniques, and I've got an FPGA design running at 600MHz to do some modulation of audio and there are a lot of difficult headaches that come when driving power transistors this way.

author: Marco
author_rank: Super Contributor
timestamp: September 14, 2022, 07:45:11 pm
content: Quote from: tom66 on September 14, 2022, 03:13:34 pmThe effective PWM clock, physically it can be a bunch of delay shifted lower speed clocks.

author: langwadt
author_rank: Super Contributor
timestamp: September 14, 2022, 08:00:39 pm
content: Quote from: tom66 on September 14, 2022, 07:35:36 pmyeh, doing it digitally you need very fast transistors and the PSRR is basically zero

author: Benta
author_rank: Super Contributor
timestamp: September 14, 2022, 08:58:48 pm
content: I remember that back in the late 1980s, Philips presented the 16-bit digital loudspeaker at some audio show/symposium.The speaker element consisted of a small central diaphragm, surrounded by 15 concentric circular diaphragms of varying width; every diaphragm individually driven..The idea was, that each diaphragm be assigned to a bit in the 16-bit audio signal: the central (smallest) LSB, the outer (largest) MSB.Strict on/off control of each diaphragm at 44.1 kHz, volume control by varying the suppy voltage to the 16 output stages.Never caught on, of course (far too expensive, though that's not really an issue for an audio buff), but it never got past the exhibition stage.Crazy days back then...

author: jonpaul
author_rank: Super Contributor
timestamp: September 14, 2022, 10:06:23 pm
content: check out the oversampling ADC and DAC, available from AKM, Crystal/Cirrus, TI, since 1986.Use a 1 bit high frequency sampler and digital filters and DSP decimationJon

author: tooki
author_rank: Super Contributor
timestamp: September 15, 2022, 05:10:39 pm
content: Quote from: tszaboo on September 14, 2022, 03:47:31 pmSorry, what?!? 44.1kHz and 48kHz sample rates are used in order to cleanly cover the 20Hz-20kHz frequency range without needing brutally steep low pass filters.