We have developed a PVR application running on a quad core (i.mx6q), we use Yocto (fido branch) with the latest meta-fsl-arm from git. Our application isn't very cpu intensive but it does use several devices, it captures DVB-t video via PCIe, stores it on a hard disk and is later retrieved for playback. The playback is done using gstreamer, currently using playbin which selects the freescale beepdec for audio playback to an alsasink, we are not using pulseaudio, I have also experimented with different codecs without success with this problem.
If we stop the recording of data via PCIe, then already captured data will play without issue, so we do not believe that it is a HDMI issue or a codec issue. When our application is running as intended i.e. recording data and doing playback then the average CPU load is between 0.58 and 1.0 and the CPU usage is around 350% idle, so the CPU is not stressed other than with the number of interrupts which is around 1000/second.
The issue is that when the application is running and doing playback we will occasionally get hdmi audio corruption, but the video is fine. The corruption can sometimes resolve itself quickly or it can last for the whole playback of a file. We have been able to chase down the cause of the corruption to a link with the number of interrupts on the system, originally we were testing with a USB hard disk and when we installed and ran irqbalance which spread the interrupts across the CPUs the audio corruption disappeared. Unfortunately we want to ultimately use a SATA drive and when I switched to the SATA device realised that it generates far more interrupts than USB and the audio corruption returns even with irqbalance. I have been manually tuning the irqs and have tried putting the dma and IPU/VPU irqs on their own CPUs amongst other setups and can recuce the corruption but not get rid of it.
I would like to understand why the irqs are seemingly affecting the audio so badly and not the video, is this a buffer size issue and if so, where can the hardware audio buffer size be adjusted?