Hi Nikolaus,
While debugging the glitching audio noise issue (usually during loud volume playback), it is starting to seem like it is of electrical origin. I can trigger it consistently by enabling the vibrate while sound is playing (regardless of volume).
I also discovered that the TWL6040 has a test mode where it loops back downlink data to uplink.
I tested with this and the PDM data it was receiving was still correct, which pretty much eliminates a problem in the OMAP5 or between the OMAP5 and TWL.
This makes me think that high power consumption or electrical noise, due to loud volumes or the vibrate being turned on, is causing the TWL6040 to go haywire internally.
Comparing the Pyra schematics to the TWL6040 datasheet, it seems the 2.2uF capacitors on the HF amp and vibra power supplies are missing. Are you relying on decoupling elsewhere being enough? Do you think this could be the cause of the problem (I appreciate if it is then not much to be done about it now other than find the best possible software workarounds.)
Best
David