Hello everyone:
I encountered a problem when modifying ADAT to two output channels. Specifically, using two channels and two threads to output different 8-channel audio data for two IO ports. The current resource usage is that both tile cores are fully occupied, each occupying 8 channels, and each core resource should be used to the limit. When both threads output ADAT signals, it can be executed correctly at 441K and 48K sampling rates. However, at 882K and 96K, my IIS signal drops to 441K and 48K. When I comment out a portion of the statements in one of the two ADAT threads, the IIS signal returns to normal. May I ask if this situation is due to insufficient resources, I should consider or modify in that direction (I have tried to transfer data from two channels in one thread, but this should take a longer time, and all sampling rates will be halved)
ADAT output and sampling rate issues
-
- Junior Member
- Posts: 6
- Joined: Wed Apr 10, 2024 2:57 am
-
- XCore Addict
- Posts: 246
- Joined: Mon Jan 08, 2018 4:14 pm
Hi Izg
the adat tasks can handle 8 channels at 48k (equivalent to 192k sampling rate) without issue and having 2 in parallel is fine.
The question is how you manage i2s and synchronize it with the 2 adat tasks.
if your i2s is managed in a dedicated task then you have plenty of time at 192k (>250 instructions per channel in fact)
but you have to deliver the data to adat and to i2s in a very synchronized way. the i2s use 32 bit buffered ports and then when you put a value in the p_i2s port, it block and wait until the previous sample is sent. the adat use chanend which normally are able to buffer 1 or 2 words. this type of behavior must be taken into account.
I m sure this doesn't solve your problem but may bring some food for thoughts
the adat tasks can handle 8 channels at 48k (equivalent to 192k sampling rate) without issue and having 2 in parallel is fine.
The question is how you manage i2s and synchronize it with the 2 adat tasks.
if your i2s is managed in a dedicated task then you have plenty of time at 192k (>250 instructions per channel in fact)
but you have to deliver the data to adat and to i2s in a very synchronized way. the i2s use 32 bit buffered ports and then when you put a value in the p_i2s port, it block and wait until the previous sample is sent. the adat use chanend which normally are able to buffer 1 or 2 words. this type of behavior must be taken into account.
I m sure this doesn't solve your problem but may bring some food for thoughts