This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use the Asynchronous Isochronous of usb UAC

Now I want to use a cortex-m0 device to implement a uac device of IOS, but if I use Synchronous synchronization type, my device will get click noise because of the IPHONE and My device's audio clock is not the same.
So I want to use Asynchronous, How to do this? As far as I know, I need to change the endpoint to Asynchronous in config descriptor, And need add a Isochronous Synch Endpoint. And what other should I do? Thanks!

Chris

Parents
  • Sound like you are making a USB audio sink (Speaker) device, instead of source (microphone).

    > but if I use Synchronous synchronization type, my device will get click noise because of the IPHONE and My device's audio clock is not the same.

    Such a problem often lies in your device side, not in the iPhone side.
    For Synchronous, the host assumes that sampling clock on your device is synchronized to the bus timing (ie. SOF interval). But SOF interval is not exactly 1ms. USB spec allows some tolerance, 1.000 ms +/- 500 ns.

    Your Synchronous sink device should implement one of these options,
    a) Frequency domain - Run a PLL to generate local sampling clock, synchronized to SOF timing.
    OR
    b) Data domain - play back the data at device's sampling clock, independent to SOF. One sample data is added / skipped to escape from buffer under-/over-flow.



    > So I want to use Asynchronous, How to do this?

    It was discussed on this topic, once.
    http://www.keil.com/forum/19557/

    > Now I want to use a cortex-m0 device

    What is your MCU?
    USB engine is specific to the MCU, even if the core would be common.

    Tsuneo

Reply
  • Sound like you are making a USB audio sink (Speaker) device, instead of source (microphone).

    > but if I use Synchronous synchronization type, my device will get click noise because of the IPHONE and My device's audio clock is not the same.

    Such a problem often lies in your device side, not in the iPhone side.
    For Synchronous, the host assumes that sampling clock on your device is synchronized to the bus timing (ie. SOF interval). But SOF interval is not exactly 1ms. USB spec allows some tolerance, 1.000 ms +/- 500 ns.

    Your Synchronous sink device should implement one of these options,
    a) Frequency domain - Run a PLL to generate local sampling clock, synchronized to SOF timing.
    OR
    b) Data domain - play back the data at device's sampling clock, independent to SOF. One sample data is added / skipped to escape from buffer under-/over-flow.



    > So I want to use Asynchronous, How to do this?

    It was discussed on this topic, once.
    http://www.keil.com/forum/19557/

    > Now I want to use a cortex-m0 device

    What is your MCU?
    USB engine is specific to the MCU, even if the core would be common.

    Tsuneo

Children
No data