On Friday 13 April 2007, Danny Budik wrote: > On Apr 12, 2007, at 9:27 PM, Pete Zaitcev wrote: > > On Thu, 12 Apr 2007 17:42:49 -0400, Danny Budik <[EMAIL PROTECTED] > > > > traffic.com> wrote: > >> It looks like I can add a constant say USBDEVFS_FRAMENUM in > >> usbdevice_fs.h, add new case to .../drivers/usb/core/devio.c, add a > >> function called proc_framenum > >> that would call usb_get_current_frame_number() and return the frame > >> number. Is this a reasonable and/or feasible solution? > > > > This is doable, but I'm curious what do you use it for? > > I'm using the frame number and the real time clock on the host > computer to synchronize all of the USB data collection devices > that are attached. The USB device samples the frame counter that it > receives at the same time that it collects the data and then sends it > back to the host. Then the host can use the RTC and the frame count > to determine the exact time that the data was collected. > > A feature like this was just put into the Windows Vista and XP USB > APIs but we're moving over to Linux.
I would also be interested in that feature for the Linux UVC driver. UVC devices timestamp video frames with an internal clock (this is called the PTS value). To synchronise the internal clock with the host clock, the device samples the internal clock and the SOF counter before sending a data packet, and includes those information (called the SCR value) in the data header. The driver needs to find the relationship between the host clock and the device clock. The device clock/SOF counter synchronisation can be achieved using the SCR values received with every data packet, but I found no easy way to synchronise the SOF counter and host clock. Laurent Pinchart ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
