I am currently trying to get the AC-3 decoder module decoding an incoming data stream over S/PDIF on the ADSP-21489 EZ-Board. There is a great example for using the AC-3 decoder provided by ADI, but unfortunately the example just decodes a raw AC-3 data file rather than a data stream over S/PDIF. This is an older discussion for someone with a similar problem. From what I understand the raw AC-3 packets are wrapped in another packet as defined by IEC 61937-3. I have been able to write some software to begin to identify an IEC 61937 packet. I can identify the sync words 0xF872 & 0x4E1F, followed by the data type which is 0x1 for AC-3. After that (according to the other post) I should receive the length of the payload in bytes. Right now I am reading a length of 14336 bytes. That sounds reasonable, but I get another frame header after just 6144 bytes, so I must not be interpreting the length correctly.
Anyway my main question is: Should I be writing this software from scratch? Seems like this should be a very common use case and there should be some sample code available. I could continue down this path and do more research on the IEC 61937-3 format and continue to develop my software but I feel like I would be reinventing the wheel. Do you have any advice for my situation?