Re: [alsa-devel] USB Audio questions
Pierre-Louis Bossart wrote:
Any idea on how this frame number can be read,
With usb_get_current_frame_number().
This is not a technical problem; the problem is that nobody has found the time to implement this in the audio driver.
Regards, Clemens
Any idea on how this frame number can be read,
With usb_get_current_frame_number().
This is not a technical problem; the problem is that nobody has found the time to implement this in the audio driver.
Ok, will try to look at this. Thanks for the pointer.
Any idea on how this frame number can be read,
With usb_get_current_frame_number().
I hacked something to refine the delay information based on the USB frame number. see attached patch. Two points can be improved: - I am not sure how to convert from USB frames to ALSA frames. I used a fixed value based what my headset supports - Every second or so the estimate seems to be off by 96 samples, see below. Not sure why this happens, how accurate the counter is and if there a delay in handling retired urbs? Looks good enough though. Thanks, -Pierre
[10880.896486] plb-urb -- actual delay 96 estimated delay 0 [10881.917729] plb-urb -- actual delay 48 estimated delay 0 [10882.937948] plb-urb -- actual delay 96 estimated delay 0 [10883.966190] plb-urb -- actual delay 96 estimated delay 0 [10884.987425] plb-urb -- actual delay 96 estimated delay 0 [10886.008654] plb-urb -- actual delay 96 estimated delay 0 [10887.029931] plb-urb -- actual delay 96 estimated delay 0 [10888.050153] plb-urb -- actual delay 96 estimated delay 0 [10889.071375] plb-urb -- actual delay 96 estimated delay 0
participants (2)
-
Clemens Ladisch
-
Pierre-Louis Bossart