Archived:Development: USB based video drivers: Difference between revisions
No edit summary |
No edit summary |
||
Line 108: | Line 108: | ||
* run usbreplay as root or privileged user who has access to usbfs (usbreplay analyzed.log) |
* run usbreplay as root or privileged user who has access to usbfs (usbreplay analyzed.log) |
||
* select your desired usb device |
* select your desired usb device |
||
[[Image:usbreplay_setup.jpg]] |
|||
* start replaying usb data to the usb device |
* start replaying usb data to the usb device, just select a line and press return |
||
[[Image:usbreplay_mainwin.jpg]] |
|||
Revision as of 22:41, 25 March 2006
USB Video
see Em2820 for more information about how to write an usb video driver
What we need from you to get your USB Device work
Requested Devices
Device | Status |
Genius TVGO u202 | video/audio works (720x288 non interlaced half frames, Audio USB Audio) - no tuning yet |
ALI Corp 1.3M Pixel USB 2.0 | Bad quality video yet |
uli-m9205 | Driver is in development, quality will be good |
Aiptek USB DualCam | |
Hauppauge | WinTV USB 2.0 -- AUDIO! |
Best thing would be to donate(prefered of course for the work :) or send your device to a developer for a few weeks
Working Devices
Device | Status |
Pinnacle PCTV USB 2.0 | supported (Need support for PAL-M) /* please follow the description on this site and mail the parsed output to mrechberger@gmail.com */ |
Terratec Cinergy 250 USB 2.0 | supported |
MSI Vox USB 2.0 | supported (res. <= 640x480) |
Hauppauge WinTV USB 2.0 | supported |
Requirements
this site explains how to get empiatech devices or similar running with linux by applying changes which might only work with your device.
USBView output
We also need the linux usbview output of your device
Get usbsnoop for windows
http://benoit.papillault.free.fr/usbsnoop/
http://benoit.papillault.free.fr/stats/get.php?location=../usbsnoop/sniff-bin-1.8.zip
if the link is down, you can also ask in IRC
Set up usbsnoop and start sniffing
Before starting to sniff start up your TV application and set it to the highest resolution (for em2820/em2840 devices the highest resolution should be 720x576 or 720x480 or 640x480?)
also tell us which resolution you used for it
attach the sniffer to your device and start logging:
Finally start up your TV application again, everything will slow down after it's started but it's worth doing it that way hardware analyzers cost a few thousand dollars... please sniff about 200 - 300 MB! it will be easier for analyzing.
I wrote the parser for converting the usbsnoop logfile to a human readable format you can find it in my repository (http://linuxtv.org/hg/~mrechberger/v4l-dvb) in v4l_experimental/em2880 the file is called parser.pl
Tools for reverse engineering:
initgen.pl | this tool creates a struct with the usb data that got sent to the device |
log2bin.pl | extract videodata from the usbsnoop logfile (try to play it with mplayer(as a rawvideo, you need to figure out the raw videoformat of your device) |
usbanalyze.pl | convert the usbsnoop log to a human readable format for analyzing what's going on |
USB replay
usb replay is a small tool for replaying sniffed and prepared logfiles to a USB device. It's a simple to use ncurses frontend which shows up all prepared usb messages and lets you select whatever you want to replay. Note the source isn't clean, didn't spend too much time uppon this yet I'll do this by time when I'm bored unless you like to fix up the not freed buffers for me :)
Copyright (C) 2006 Markus Rechberger <mrechberger@gmail.com>
Installation:
hg clone http://linuxtv.org/hg/~mrechberger/v4l-dvb cd v4l_experimental/em2880 # please also have a look at README there gcc usbreplay.c -o usbreplay -lusb -lmenu
- sniff a usbdevice in windows with usbsnoop
- parse the logfile with parser.pl (perl parser.pl < usbsnoop.log > analyzed.log)
- run usbreplay as root or privileged user who has access to usbfs (usbreplay analyzed.log)
- select your desired usb device
- start replaying usb data to the usb device, just select a line and press return
Link | Device | Contact |
Markus Rechberger/irc mrec