Hi,

I'm writing an USB Video Class Driver (UVC) to use the DaVinci EVM 
(1.10) as a video class device (camera). The UVC driver is based on the 
gadget zero skeleton (USB Gadget API for Linux).
I have configured an isochronous in-endpoint with a payload size of 642 
byte [1]. The Video Class Device (DVEVM) gets correctly recognized when 
connected via USB to a Windows XP host. I'm also able to activate the 
iso endpoint (alternate setting changes to one) or rather the DVEVM 
starts streaming of video data. But the video software on the XP host 
does not show any (moving) picture.

[UVC driver code debugging]
I added some "printk's" in the reinit_write_data(..) function, which is 
called when a request completes. These kernel messages show me 
respectively the first then bytes of every microframe which are passed 
to the buffer (req->buf).  If I understood things correctly this should 
be done every 125us [1] in our case. The mentioned kernel messages seems 
to be right on the DVEVM. In addition, the manually set header toggles 
every 240 [1] microframes to indicate the end of a video frame. To sum 
up, the generated stream (from a video file) respectively the packed 
microframes show up as expected.
But what I see on the screen isn't what I receive on the XP host or I 
would see at least a picture (or  the complete video stream). This 
assumption is confirmed by using a USB Sniffer-Tool on the XP host[3]; A 
microframe of 642 bytes is received, but gets repeated afterwards many 
times [3] before the payload changes.

Additionally, I added the dmesg debug output [2a, 2b].

Any help or direction are much appreciated.

Thanks in advance!
Patrik


[1]
-YUV 4:2:2 format with 30 frames / sec
-Videoframesize: 320*240*16Bit (uncompressed)
-bInterval ("sampling rate") is set to one -> 125us -> 8000 microframes 
per second
-8000/30fps = 266 Microframes/Videoframe
=> 240 microframes per packet with payload of 640 byte + 2 byte header
=> 16 zero length frames
=> High-Speed transfer is sufficient

[2a]
Output dmesg with original kernel 2.6.10_mvl401-davinci_evm:
musb_gadget_queue 947: <== to ep2in request=c673a960
txstate 228: hw_ep2, maxpacket 642, fifo count 642, txcsr 6004
musb_write_fifo 276: TX ep2 fifo c805e428 count 642 buf c6727c00
txstate 303: ep2in TX/IN pio len 642/642, txcsr 6007, fifo 642/642
musb_interrupt 1375: <== IRQ peripheral usb0000 tx0004 rx0000
musb_g_tx 323: <== ep2in, txcsr 6004
musb_g_tx 349: underrun on ep2, req c673a960
musb_g_giveback 129: ep2in done request c673a960,  642/642
musb_gadget_queue 947: <== to ep2in request=c673a960
txstate 228: hw_ep2, maxpacket 642, fifo count 642, txcsr 6004
musb_write_fifo 276: TX ep2 fifo c805e428 count 642 buf c6727c00
txstate 303: ep2in TX/IN pio len 642/642, txcsr 6007, fifo 642/642
musb_interrupt 1375: <== IRQ peripheral usb0000 tx0004 rx0000
musb_g_tx 323: <== ep2in, txcsr 6004
musb_g_tx 349: underrun on ep2, req c673a960
musb_g_giveback 129: ep2in done request c673a960,  642/642

[2b]
Output dmesg with kernel 2.6.19-rc3-omap1 from git:
musb_gadget_queue 1162: <== to ep2in request=c7587520
txstate 280: hw_ep2, maxpacket 642, fifo count 642, txcsr 6004
musb_write_fifo 242: TX ep2 fifo c805e428 count 642 buf ff6c2000
txstate 388: ep2in TX/IN pio len 642/642, txcsr 6000, fifo 642/642
musb_interrupt 1327: ** IRQ peripheral usb0000 tx0004 rx0000
musb_g_tx 408: <== ep2in, txcsr 6000
musb_g_giveback 142: ep2in done request c7587520,  642/642
musb_gadget_queue 1162: <== to ep2in request=c7587520
txstate 280: hw_ep2, maxpacket 642, fifo count 642, txcsr 6004
musb_write_fifo 242: TX ep2 fifo c805e428 count 642 buf ff6c2000
txstate 388: ep2in TX/IN pio len 642/642, txcsr 6000, fifo 642/642
musb_interrupt 1327: ** IRQ peripheral usb0000 tx0004 rx0000
musb_g_tx 408: <== ep2in, txcsr 6000
musb_g_giveback 142: ep2in done request c7587520,  642/642

[3]
"Complete" trace:
http://www.anduril.ch/utlog.rar -> unzipped : 128Mb

"Shrinked" trace:
http://www.anduril.ch/utlog_small.rar -> unzipped: 7Mb


-------------------------------------------------------------------------
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
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to