17.1 Crash on DTS Passthrough

I noticed this issue on 17.1, may have been present on 17.0 (can’t find a simple way of downgrading to test, apt-get doesn’t list 17.0 as available). Definitely was not an issue with 16.x as my system worked great for months before this.

When I play files with DTS passthrough approximately 50% of the time Kodi will stutter, freeze, and then crash. Disabling DTS passthrough allows the files to play. These same files worked without issue on previous versions of Kodi. Files are MKV containers, h.264 video. Audio streams are DTS-HD and DTS-HD MA 6.1 or 7.1 channels (I’m not sure I’ve triggered the issue with plain DTS yet).

Steps to Reproduce:

  1. Enable passthrough for DTS & DTS-HD
  2. Play a Video file with DTS-HD

Symptoms:
Video initializes and starts playing but audio fails to negotiate with the receiver, after ~5 seconds video begins stuttering, then freezes. If I press “Stop” it eventually drops back to the menu, then after ~5 more seconds Kodi crashes and restarts.

I use a custom X-session that kills pulseaudio to enable all passthrough options straight to ALSA.

In the Debug log it took until the 3rd video I played before it failed, it seems to be a 50/50 shot of working per video.
In the log the file playing during the failure was “Star Wars: Episode VI – Return of the Jedi (1983).mkv” but it has failed on all 3 files in previous testing.
Debug Log Leading up to Crash: https://paste.ubuntu.com/24514212/
Crash Log: https://paste.ubuntu.com/24514217/

Hardware:
Intel NUC i3 D34010WYK x86_64
Firmware v44 (Dec 14, 2016)
8GB RAM
GPU: embedded

HDMI linked to Onkyo receiver (7.2 channel, supports all passthrough options and have successfully used them for months prior to this issue)

Software:
Linux Mint 17.2 (Kernel 3.19.0-32-generic) — Patched up-to-date May 4, 2017
Kodi from PPA – 2:17.1~git20170320.2031-final-0trusty
Default Skin (Estuary)
I have very few add-ons, this machine plays local content almost exclusively.

If anyone can explain how to downgrade to 17.0 I’ll test it there. There only seems to have been 1 patch in 17.1 related to the AudioEngine so if it’s not present in 17.0 that seems like it’d be a big hint as to what’s happening.