8

I have installed the latest version of OSMC on my Raspberry Pi B+.

In Kodi I output audio through both HDMI and the analog jack. There is an option "HDMI+analogue" in the settings menu for this.

Unfortunately, one of the output signals is just a little faster, so they sound like some kind of echo effect together. Is there a setting for latency? If yes, can this setting be different for HDMI and analogue out?

Also, I don't really know how HDMI and analogue at the same time (option "HDMI+analogue") is achieved. Because, in the Raspberry Pi settings there is, (usually) just an option between either HDMI or analogue.

mike65535
  • 141
  • 1
  • 1
  • 6
Wauzl
  • 181
  • 4

1 Answers1

1

I too am intrigued by the notion of outputting sound out via both HDMI and analogue at the same time.

After doing a bit of digging it does seem like people have experimented with it. Firstly, its not possible in OS's like XBMC because ALSA is not implemented. ALSA is the Advanced Linux Sound Architecture. Its software that allows audio software to interface with the Kernel. Which is required for sound through both HDMI and analogue at the same time. This answer gives a nice explanation of it.

Here's the reason for the delay. Without getting into the detail too much here's how it works. HDMI supports both sound and video, so the sound gets outputted along with the video through HDMI. However the sound through the analogue jack is created using PWM. So the sound over HDMI and over the analogue jack take a different route through the hardware on the Pi. This is what generates the latency. This answer here explains it well, if you are after more detail.

How can you reduce the latency. From what limited posts I've seen only I don't think there is a fix for it. The issue is the two audio signals take different paths, and I don't believe there is a way of combining them on the hardware level. So, you would have to use some software magic to slightly delay the transmission time of one or the other. I don't think this is really an option.

The thing is I don't believe the Foundation considered the possibility of people wanting to use two audio outputs simultaneously for the same audio source. However, if you want to distinct pieces of audio to play then the latency between the two isn't really an issue so much.

Darth Vader
  • 4,206
  • 24
  • 45
  • 69
  • When using the HDMI+analogue option in OSMCs Kodi, which sound is created first? With which software components is then the other sound output created and from what? It would be sufficient to introduce a manually tunable delay in the output that is behind in order to reduce the perceivable latency. – Wauzl May 26 '17 at 06:55