USB audio feedback

Status
Not open for further replies.

hbo

New member
Hi,

I need some clarification on the USB audio feedback from usb_audio.cpp file in teensy4 core. I've read the USB2.0 specifications on the feedback but their is a few things that I'm not sure to understand and I wanted to see the implementation of Paul to understand better but it didn't answer all my questions.

1. In usb_audio_configure function, the variable feedback_accumulator is initialised to 739875226 (44.1 * 2^24). When feedback_accumulator is sent, there is a right shift applied according to USB speed. So for full speed, the right shift is 10 therefore, I get a 10.14 bit value. But why the 2^24 for the initialization? I guess it is to get the max value of the 10.14 bit (x 44.1) ? In this last case, it would only work for full speed

2. If the initialisation value of feedback_accumulator is to get the max value. Could someone explain why start wit the max value?

3. in function AudioInputUSB::update, the difference between the number of received samples and number of expected samples is calculated. This difference is added to the feedback_accumulator variables. Since it is already left shifted, it will take a very very long time for this increment to actually do something on host side won't it?

4. Why is the accumulator sent and not the desired data rate ?

Thanks!
Hugo
 
Status
Not open for further replies.
Back
Top