Bonjour, I'm building a GPS based timecode generator with a T4. I already have a working solution with a SAMD21, outputting an analog audio signal that goes into the camera MIC input. But now I want an USB audio class device doing the same thing, but plugged into a cellphone.
With the SAMD21 analog onboard DAC, when post processing audio and video files on a desktop, I can obtain syncing precisions of around 0.08 ms. I understand the Teensy Audio library imposes a latency of around 2.9 ms... determined by the AUDIO_BLOCK_SIZE value, fixed at 128 minimum when using AudioOutputUSB.
I don't mind if the FSK word is more or less at the right place (I already wrote a custom Audio synth object for FSK, my first c++ object!) but I would really like to position the syncing spike (identified here by a yellow vertical marker in the middle of the plot) within a precision of say, 0.1 ms... Although most people don't perceive out of sync interval (between audio and video) shorter than 10 ms, one of my selling points is "sub millisecond syncing"
I know usb.c is a hell of a beast... I read this post about USB and DMA from Paul and it discouraged me...
But could it be possible to inject somewhere a 32767 value inside the DMA buffer just before it is read by the USB controller/USB PHY ?
Without any help, I'm stuck: looking into schedule_transfer(), my head turns, with or without consulting p.2468 in the i.MX RT1060 Reference Manual Rev. 1
Thanks in advance!
With the SAMD21 analog onboard DAC, when post processing audio and video files on a desktop, I can obtain syncing precisions of around 0.08 ms. I understand the Teensy Audio library imposes a latency of around 2.9 ms... determined by the AUDIO_BLOCK_SIZE value, fixed at 128 minimum when using AudioOutputUSB.
I don't mind if the FSK word is more or less at the right place (I already wrote a custom Audio synth object for FSK, my first c++ object!) but I would really like to position the syncing spike (identified here by a yellow vertical marker in the middle of the plot) within a precision of say, 0.1 ms... Although most people don't perceive out of sync interval (between audio and video) shorter than 10 ms, one of my selling points is "sub millisecond syncing"
I know usb.c is a hell of a beast... I read this post about USB and DMA from Paul and it discouraged me...
But could it be possible to inject somewhere a 32767 value inside the DMA buffer just before it is read by the USB controller/USB PHY ?
Without any help, I'm stuck: looking into schedule_transfer(), my head turns, with or without consulting p.2468 in the i.MX RT1060 Reference Manual Rev. 1
Thanks in advance!