Tool/software:
Between SDK versions 09.02.00.009 and 09.02.00.010 the following patch broke audio streaming from McASP:
commit 67d5b24398155d07376b04dd8b3d858d049a5e17 Author: Jai Luthra <j-luthra@ti.com> Date: Mon Apr 29 16:06:55 2024 +0530 dmaengine: ti: k3-udma: Fix teardown for cyclic RX with PDMA When receiving data in cyclic mode from PDMA peripherals, where reload count is set to infinite, any TR in the set can potentially be the last one of the overall transfer. In such cases, the EOP flag needs to be set in each TR and PDMA's Static TR "Z" parameter should be set, matching the size of the TR. This is required for the teardown to function properly and cleanup the internal state memory. This only affects platforms using BCDMA and not those using UDMA-P, which could set EOP flag in the teardown TR automatically.
The UDMA is configured for audio streaming as:
- PDMA with ACC32, BURST
- cyclic
- period_len=65536
- buf_len=524288
Before this patch audio streaming worked correctly, meaning the output bytes matched the input.
After this patch audio streaming is broken:
- Every 65536 bytes in output there is a discontinuity with extra null bytes (observed both 16 and 32 bytes offset)
- Due to #1 TDM streams get moved to different channels
- Manually tracking changed offsets in data stream still has discontinuity in audio signal, possibly indicating lost samples
Attached file normal_tdm128.wav is a recording using arecord from 09.00.00.010. File bad_tdm128.wav is a recording using arecord from 09.02.00.010. Both recordings are 128 channels with 24 channels streaming audio and the rest zero. Both recordings have a tone input on one channel that will be seen at much smaller magnitude on at least 3 other channels due to proximity.