2015-04-13, 22:36
Hello all,
I think I've already solved my problem. I thought I'd post it here in case some other poor soul ran across the same thing. I was also curious about WHY this problem exists and I wonder if anyone can add some information -- specifically where I should file a bug report (kodi? alsa? Linux kernel?)
Problem: If I enable audio passthrough over HDMI to my receiver and play an AC3 or DTS audio track, I get no audio, and jerky video which eventually grinds to a freeze-frame halt.
The problem is NOT triggered when passthrough is disabled. The problem is also NOT triggered when doing passthrough with DTS-HD MA or TrueHD audio. Only AC3 and DTS seem vulnerable. I don't have any EAC3 tracks to test.
On first playing a problem track I see the following in kodi.log:
Activating the problem once seems to put the sound hardware into a bad state. I'm unable to play any other videos after triggering the bug once. I get a mix of ActiveAE-related error messages in kodi.log, like the following:
After blind experimentation I discovered the problem is only triggered with "intel_iommu=on" on the kernel command line (or CONFIG_INTEL_IOMMU_DEFAULT_ON=y in the kernel config). This option seems to be recommended for enabling Intel VT-d. My solution was to remove both of these.
I also noticed that with "intel_iommu=on", I see the following in dmesg shortly after boot:
I am using Kodi 14.1 on Gentoo on an Intel Haswell NUC D54250WYK1. I can provide more hardware info or software config reports if it helps anybody.
I think I've already solved my problem. I thought I'd post it here in case some other poor soul ran across the same thing. I was also curious about WHY this problem exists and I wonder if anyone can add some information -- specifically where I should file a bug report (kodi? alsa? Linux kernel?)
Problem: If I enable audio passthrough over HDMI to my receiver and play an AC3 or DTS audio track, I get no audio, and jerky video which eventually grinds to a freeze-frame halt.
The problem is NOT triggered when passthrough is disabled. The problem is also NOT triggered when doing passthrough with DTS-HD MA or TrueHD audio. Only AC3 and DTS seem vulnerable. I don't have any EAC3 tracks to test.
On first playing a problem track I see the following in kodi.log:
Code:
12:49:45 T:140451512305408 ERROR: CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
12:49:46 T:140453665691392 ERROR: ActiveAE::UnconfigureSink - failed to unconfigure
12:49:48 T:140453665691392 ERROR: ActiveAE::FlushEngine - failed to flush
12:49:50 T:140453665691392 ERROR: ActiveAE::UnconfigureSink - failed to unconfigure
Activating the problem once seems to put the sound hardware into a bad state. I'm unable to play any other videos after triggering the bug once. I get a mix of ActiveAE-related error messages in kodi.log, like the following:
Code:
12:50:09 T:140453665691392 ERROR: ActiveAE::InitSink - failed to init
12:50:24 T:140453657298688 ERROR: Previous line repeats 2 times.
12:50:24 T:140453657298688 ERROR: CAESinkALSA - snd_pcm_writei(-5) Input/output error - trying to recover
12:50:24 T:140453657298688 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error)
12:50:25 T:140453665691392 ERROR: ActiveAE::InitSink - failed to init
12:50:34 T:140453657298688 ERROR: Previous line repeats 1 times.
12:50:34 T:140453657298688 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(2)) - snd_pcm_writei returned -5 (Input/output error)
12:50:36 T:140453665691392 ERROR: ActiveAE::InitSink - failed to init
After blind experimentation I discovered the problem is only triggered with "intel_iommu=on" on the kernel command line (or CONFIG_INTEL_IOMMU_DEFAULT_ON=y in the kernel config). This option seems to be recommended for enabling Intel VT-d. My solution was to remove both of these.
I also noticed that with "intel_iommu=on", I see the following in dmesg shortly after boot:
Code:
[ 35.168233] snd_hda_intel 0000:00:03.0: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.
I am using Kodi 14.1 on Gentoo on an Intel Haswell NUC D54250WYK1. I can provide more hardware info or software config reports if it helps anybody.