Synchronous or adaptative USB audio

If you have a simple question and just want an answer.
nleroy
Member
Posts: 8
Joined: Tue Jun 16, 2015 10:52 am

Synchronous or adaptative USB audio

Post by nleroy »

Hi all,

I am using USB slicekit with an audio slice to develop a USB audio device. The system works very well when connected to a Mac/PC that plays files since the XMOS clock is used in asynchronous mode.
However for a particular application, I would like that the XMOS device uses an adaptative clock mode : the device must synchronise to the host clock.
It seems that the code template that I used to develop my code is only asynchronous (the code is app_usb_skc_u16).
Is there a way to turn that code into adaptative or synchronous mode ? I can't find anything about that in the code.
Or is there a code example for those modes ?

Thanks for your help,
Nicolas
User avatar
Ross
Verified
XCore Legend
Posts: 1185
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Synchronous should be a relatively trial modification to the descriptors. You will then need to drive an external clock multiplier/VCXO or similar to generate the audio master-clock based on SOF's from the host (I've used CS2100 in the past)

I've never implemented adaptive in an xcore - but a similar scheme.
User avatar
Ross
Verified
XCore Legend
Posts: 1185
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Oh, you could also offer a mode that is synced to the PC but still runs in Async mode, this is sort of forbidden in the USB spec but will work. It also means you can change modes "on the fly"
nleroy
Member
Posts: 8
Joined: Tue Jun 16, 2015 10:52 am

Post by nleroy »

Hi thanks for your answer.
I will try to figure out how to get a clock from SOF as you said.
Regards
User avatar
Ross
Verified
XCore Legend
Posts: 1185
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

I did the descriptor work a while back.. descriptors file attached. Changes are guarded by USB_SYNC_MODE_SYNC. Let us know how you get on...

Cheers
You do not have the required permissions to view the files attached to this post.