SPDIF RX questions

If you have a simple question and just want an answer.
User avatar
bowerymarc
Active Member
Posts: 40
Joined: Mon Dec 30, 2013 7:29 am

SPDIF RX questions

Post by bowerymarc »

I've been trying to figure out a couple of things about SPDIF_RX and have been studying the example code (USB Audio 6.1) and http://xcore.github.io/sc_spdif/api-rx.html etc. etc. and there are a couple of things that are unclear:

1. how can you get a extract a clock from an SPDIF (or AES/EBU) stream?  Of course, I'd expect it to be quantized (jittered) to the 100MHz timer probably, at least....    Clock at (a) sample rate (b) 64x sample rate (c) 128x would be great....  sync pulse at 'B' preamble (see http://www.hardwarebook.info/S/PDIF) would be nice also...

2. how do you get a sample rate indication from the stream?  

2a. how to get a sample rate measurement, to use for the USB Async rate throttling mechanism?

3. how to get the subcode info? (it's not clear when you get the sample data, if you get the preamble info to sync the subcode block, but it's clear the spdif_rx does not have any code to deal with the subcode block)

Maybe there's some example code I missed that has this info...