Offset sound

I’m running OSMC on a RPi B. I’m using an additional stereo amp and speakers to widen the sound for movies etc. Centre sound is via HDMI to a TV with soundbar. To do this I’m using the “HDMI plus analogue” audio output setting in Kodi/OSMC. The result is generally good but gets slightly disconcerting as the volume is turned up. I’ve realised that there is a time offset between the two signals (~150-200 mS at a guess) which generates a phasing effect. Surprisingly (to me) the analogue is behind the digital. It may be slightly outside the brief of OSMC, but can anyone suggest a means of reducing the gap, eg by delaying the HDMI signal only? Alternatively, is it possible to use my IQaudio card for the analogue output, and would the offset be any better (or worse)?

Some tvs or amps have an option to delay the audio.
Alternatively a hdmi audiosplitter could work.

Thanks. I will look into the HDMI splitter option.
I was wondering though whether it can be done digitally within the Pi, perhaps via Alsa or Pulse Audio. I’d like to hear from anyone with experience in that space.

Pulse audio certainly has the ability to change ‘latency’ for each output device in it’s GUI on a linux desktop. If you can install it, I guess there should be some commands to do that in a terminal. Somehow, I wonder if the delay will always be consistent between media sources and you may have to dig out an oscilloscope to set it up :wink:

The analogue should be behind the digital if the digital is passed straight through but the Pi has to decode and generate analogue.


Actually A/D conversion happens in both cases, but I guess the Pi is slower. I’ve had variable success with pulse audio and alsa mixer using command line on the Pi in the past but will look further. Not sure though how to differentially treat the two streams.

Curious about this too.
I’m using the HDMI to connect to the TV and the analogue to connect to an older amp, also getting that phasing effect.

It seems pulse doesn’t want to start without X running. There’s a workaround but I think I’ll stop there before I break something.

Since Kodi can nudge the audio relative to the video, I wonder if that could be done differently for the two audio devices.

You’re right about the D/A conversion of course. :blush:

Easy way to get Pulse is to get the official OSMC package for it:

But changing the audio sink isn’t the right solution here.

You may be able to set something on the TV or soundbar itself.