Headphone vs HDMI audio

I did an R-2R one back in 1971, but that was for a PDP11

Reply to
Gareth's was W7 now W10 Downstairs Computer
Loading thread data ...

1968 IIRC

-- The biggest threat to humanity comes from socialism, which has utterly diverted our attention away from what really matters to our existential survival, to indulging in navel gazing and faux moral investigations into what the world ought to be, whilst we fail utterly to deal with what it actually is.

Reply to
The Natural Philosopher

So, those economical adapters have sufficient circuitry inside to do the DAC for the audio and video.

I was curious about how much +5V HDMI current was available for that circuitry and found this thread in the RPi section of stackexchange:

formatting link
How much current can I draw from each model's HDMI socket?

--
Mike Easter
Reply to
Mike Easter

Bluetooth speakers may be another option for Pis with wireless. These again receive digital audio and have built-in DACs.

It is.

It is.

They are actually, and VGA video is analogue as well, which is actually a much bigger ask. All the devices probably use a similar chip which has been developed to integrate the whole functionality into one $0.40 lump which just needs to be soldered onto a circuit board with a few other parts like the plugs and sockets. Quite possibly the cheap devices (maybe the expensive ones too) use chips from some unheard-of Chinese company that doesn't care about quality but sells them cheap enough to put in a $10 adapter. The few additional components like filter capacitors could also have been stuffed up, causing noise to be introduced to the analogue audio output. All the same, the chip itself most likely uses a real DAC which is better quality than that used for the onboard analogue audio from the Pi, and so in theory the result should be better quality.

For better audio you want a well designed DAC. It can connect to GPIO, HDMI, or bluetooth, all equally effective at conveying the same digital audio signal from the Pi.

What you get with the onboard analogue audio output on the Pi is a cheaply designed (for probably justified reasons) DAC which also uses the same digital audio data, but produces analogue audio using a function of the SoC hardware that was not designed to be used as an audio DAC. As such the results are not optimal.

--
__          __ 
#_ < |\| |< _#
Reply to
Computer Nerd Kev

Actually it does have hardware PWM, see page 138:

formatting link

But this by no means implies that they designed it to work as a DAC for audio output. It's also possible that the Pi doesn't actually use the hardware PWM function for whatever reason and does it in software

- I haven't checked.

That much is true. There are no analogue inputs or outputs, and no intended form of hardware DAC. The PWM is just the closest that the Pi designers could get while adding the minimum number/cost of additional components.

--
__          __ 
#_ < |\| |< _#
Reply to
Computer Nerd Kev

Its in the spirit of the beast. It demomonstartes the principle and allows some crude sound.

Not a huge amount to pay

--
The lifetime of any political organisation is about three years before  
its been subverted by the people it tried to warn you about. 

Anon.
Reply to
The Natural Philosopher

Oh! My bad. I guess I didn't look further after reading that Pis aren't really suited to servo control due to timing issues with the multitasking operating system. I think I mistakenly concluded that that meant no hardware pwm.

Maybe the problem with servo control isn't setting the pwm signal and letting it run without interference from system load (obviously there shouldn't be any with hardware pwm), but varying it with precise timing.

Reply to
A. Dumas

If you want better servo control you can always add something like a

including VAT. They all accept serial input and can drive 1-4 servos depending on which version you buy. Servo control is fire-and-forget: you change the pwm setting as needed and the PICAXE continues to output that pulse width until you change it.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

On Sat, 24 Aug 2019 02:26:47 +0000 (UTC), snipped-for-privacy@telling.you.invalid (Computer Nerd Kev) declaimed the following:

If one really needs analog I/O, one probably should examine the Beaglebone Black (lots of I/O variations, on board eMMC [so don't /need/ to use an SD card], but otherwise a bit underwhelming compared to current model R-Pis [1GHz single core vs 1.4GHz quad core -- but the BBB does have a pair of PRUs -- which can run independent of main processor for real-time tasks]).

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

If you want to use the Pi to digitise analogue recordings from tape/vinyl, you need analogue input. But that's a fairly rare occurrence.

For feeding speakers or headphones you can use a Bluetooth-to-analogue adaptor in the speakers or headphones, with one big proviso: the range of Bluetooth is crap compared with the range of FM headphones that require an analogue input. I can go round all of our house (and it has a lot of masonry internal walls *) and still get good reception with my FM headphones, but I can barely get good reception on the other side of the room from my laptop using a bluetooth adaptor that my earbuds plug into. There needs to be a longer-range digital equivalent of Bluetooth which is point-to-point but which has a range of maybe 100 metres through several brick walls.

(*) Even our DECT handsets get a bit iffy at the opposite end of the house to the base station - sadly there are only phone sockets at one end of the house.

Reply to
NY

Yes, that's it exactly.

However there is this project that uses the DMA sub-system in the SoC to change the PWM/GPIO configuration quickly enough to allow servos and stepper motors to be controlled (well that's the claim, I haven't tried it myself):

formatting link
More specifically:
formatting link

Also:

formatting link

Servos and stepper motor controllers take signals that are mainly repeating though, audio requires constant updates so I'm guessing that the DMA method might be less effective. I'm not sure whether the audio driver for the pi uses that method or not.

Then of course there are the various real-time operating systems / environments which allow software to run with the same reliable timing as on a microcontroller. They might be quite practical for servo control, but most users wanting nice audio probably also like running standard Linux.

--
__          __ 
#_ < |\| |< _#
Reply to
Computer Nerd Kev

$10

I expect there is just a single, SOC type, chip that does the lot and it's up to the adapater maker to decide what features are made available to the user. Remember that there is more to such an adapter than just the DAC. Each end of the HDMI talk to each other to find the "best" resolution and bit rates they have in common.

That was a slight concern for the one I bought but it works fine connected to Pi3B+.

--
Cheers 
Dave.
Reply to
Dave Liquorice

It's very dependent on the devices, ear buds given their size will be particularly low power. Larger devices such as keyboards can exceed Bluetooth's stated 10m range by a considerable margin.

That would be massive overkill for most of the things Bluetooth is used for, and lead to reception problems as far more devices would interfere with each other. Plus your ear buds would look more like a set of over ear cans.

---druck

Reply to
druck

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.