Intermittent Audio Passthrough with RPi3 and HiFiBerry Digi

I wanted to share my experience using the latest OSMC Kodi 16.1 RC3 and my HiFiBerry Digi+.

Summary of issue is that while watching a movie (avi or mp4) that has the audio saved as DTS or AC3 5.1 and while using the audio passthru option enabled , the audio will cut out and go to a static noise randomly in 2 to 5 minute intervals lasting a few minutes. I know my Digi+ is working OK because:

1-If I turn off audio pass thru then the audio is fine as OSMC will send a DPL2 data stream. Plus other sources like mp3 music work fine too using the same interface.
2-More importantly, if during the audio pass thru static noise I enter the System->Audio Output menu and change something like the “keep alive” from 1 min to always (or vice versa) the sound will come back for a period. Or if I change the audio mode from Fixed to Optimized or if I change the sample rate limit the sound will also come back for a few seconds to minutes.

I did experiment using many OSMC settings and media files and came to the conclusion that the OSMC is losing the synchronization of the SPIDF output as the receiver will go to PCM input status during the static noise. No combination of settings (other than disabling passthru) will resolve issue for good.

My setup is using the Composite Video out and the SPIDF audio out. I am using a Yamaha RX-V800 reciever for the audio. The analog audio does work fine also.

I run NOOBS as the base OS and I also had similar issues (actually worse) with OPEN-ELEC.

I plan on capturing some scope traces of the digital audio output to confirm my suspicions that something is happening to the data stream to cause the issue. I also will try running the HDMI video instead of the composite video to see if that changes anything with regards to the audio out.

Taking a look at the system resources i see the CPUs and memory are all less than 20% used so I do not see any issues there. Also I have the RPi as a WIRED connection to reduce any network issues.

I would like to hear if anyone has similar issue.

edit:I added logs here: http://paste.osmc.io/oqimiruhiq
edit: new log after disabling cec : http://paste.osmc.io/ukupurucot

Update: I did an install using OSMC installer (to eliminate NOOBS) and issue still present in the April and the Feb release (I tried both). Feb release seemed to be worse.

Update2:I also removed my switch from ethernet path and issue still seen. I did confirm that with the keep alive set to none, then pausing and resuming video will eliminate the static. Could be a clue as to root cause here with the keep alive signals.

Update3:I did looks at the SPDIF voltage traces for the good and failed states and the signal seems to look fine in both as a 1vpp signal. SO my conclusion is there is a bit error being introduced.

Update4:I compared the Digi+ outputs vs my working (but ancient) DSM320 that was able to pass the AC3/DTS audio . I did not notice any obvious differences in these waveforms, but I do not know the SPDIF waveform requirements. Also enabled buffering in the advancedsettings.xml and no change noted.

Related issues:

Thanks!

1 Like

I would say that something similar is happening to me, with the last april version I got random audio dropouts with dts, I tried openelec and all I got is static. Something is missing about software and RPi3

Same issue here with HifiBerry also.
The audio come back if I pause and resume play.
The problem appeared as soon as I updated to the April update.

Edit: implied HifiBerry Digi+

Are you all using Pi3?

Yes I my case, I am indeed using a Pi3.

Like @LouFromDetroit, the audio cut-outs I experience are only when playing a video file with AC-3 (and probably DTS?) audio, i.e. movies, but not when playing TV series with 2ch audio.

Same here, since upgrading my Pi 2 to a Pi 3, I get frequent audio “drops” using a Digi+…

If you still have a Pi2 can you confirm, with the same sdcard, if the Pi2 is free from the issue.

Please try download these two files:

https://github.com/raspberrypi/firmware/raw/master/boot/bcm2710-rpi-3-b.dtb

Put the above one in /boot

Then download

https://github.com/raspberrypi/firmware/raw/master/boot/overlays/pi3-miniuart-bt-overlay.dtb

and put it in /boot/overlays directory.

You can do this from a PC.

Make sure you reboot after updating the files.

1 Like

I did move those files into the directories as noted but my Pi3 will not boot up now after doing so. I also cannot SSH in either. Any suggestions before re-imaging?

If you delete those files again, you should get a basic boot.

Then you can run

sudo apt-get install --reinstall rbp2-image-4.4.6-4-osmc

to restore our version of the overlays.

Sam

I did a reimage to the April build and ran the command above as I do not have a way to remove the files (no linux PC - I moved them there via USB in OSMC shell first time).

For the command line I get this now:

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Apr 11 08:55:46 2016
osmc@osmc:~$ sudo apt-get install --reinstall rbp2-image-4.4.6-4-osmc
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package rbp2-image-4.4.6-4-osmc
E: Couldn’t find any package by regex ‘rbp2-image-4.4.6-4-osmc’

Are you pushing a new kernel update?

You don’t need a Linux partition. The partition with /boot is fat32 and can be accessed from Windows

No – the suggestion above was to make your system workable again. It’s not needed on your fresh install

1 Like

Great thanks I will remember this next time.

As far as a fix, did you find something at the Digi+ driver level that needs update to work with the RPI3?

Should I try to move the 2 .dtb files again as perhaps I made an error first time?

Also - I see my current kernel is the 4.4.6-3-osmc

I haven’t found anything. I suspect the pins were not free which caused the issue, hence updating the overlays, but that did not work for you

Try both files again.
Move them one at a time.
Keep a backup of the old ones.
Use your PC to do it.

I did just retry moving files via PC and I reconfirmed that the RPi3 will not boot using the update file:
https://github.com/raspberrypi/firmware/raw/master/boot/bcm2710-rpi-3-b.dtb

This file seemed to have no effect on the issue:
https://github.com/raspberrypi/firmware/raw/master/boot/overlays/pi3-miniuart-bt-overlay.dtb

Also tried the 2 files.
The bcm2710-rpi-3-b.dtb prevents the RPi3 to boot.
I tried “wgetting” the file into the /boot directory and then copying the file from my Mac : same result.

Try this:

This new bcm2710-rpi-3-b.dtb allows the RPi3 to boot. Thanks.

Yes new file does allow the booting now - I did a retest and still have the audio dropout however :frowning: