List Info

Thread: Re: Intro and question about High speed Isochronous




Re: Intro and question about High speed Isochronous
country flaguser name
Sweden
2008-05-01 16:57:47
On Thursday 01 May 2008, Marcin Cieslak wrote:
> Engineering wrote:
> >  I started using ugen and got most of the code
ported. Then I
> > found out ehci does not support isochronous!
>
> How did you try to use this?
>
> > 	Is there a new USB stack coming with high-speed
iso? Will it work with
> > ugen? If not ugen, how do I get at it?
>
> My advice would be not to use libusb, just prepare your
own kernel
> module. In most cases it is much simpler than ugen.
Have a look at
> simple drivers like uscanner to see how to start with
the USB kernel
> driver.
>
> > 	Is anyone working on a UVC driver? I don't need
all the features, just
> > to get at the stream data.
>
> You might want to have a look at Luigi Rizzo's work on
video:
>
> http://info.iet.unipi.it/~luigi/FreeBSD/usb-cameras.html

>
> --Marcin

Hi,

You will need the my USB stack for HS ISOC transfers. You
might be able to 
backport the HS ISOC part from my USB stack.

--HPS
_______________________________________________
freebsd-usbfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to
"freebsd-usb-unsubscribefreebsd.org"

RE: Intro and question about High speed Isochronous
country flaguser name
United States
2008-05-01 18:49:41

> -----Original Message-----
> From: owner-freebsd-usbfreebsd.org
> [mailto:owner-freebsd-usbfreebsd.org]On Behalf Of
Hans Petter Selasky
> Sent: Thursday, May 01, 2008 4:58 PM

> > >  I started using ugen and got most of the
code ported. Then I
> > > found out ehci does not support isochronous!
>
> Hi,
>
> You will need the my USB stack for HS ISOC transfers.
You might
> be able to
> backport the HS ISOC part from my USB stack.
>
> --HPS

Thank-you. I have been to your website for reference, it is
nice to hear
from you. How do I go about getting your stack? Is it
compatible with ugen,
or otherwise accessible from userland?

Thanks
Sam

_______________________________________________
freebsd-usbfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to
"freebsd-usb-unsubscribefreebsd.org"

Webcam ugen iso transfer problems
country flaguser name
United States
2008-05-11 11:21:36
Hello

I am having much trouble trying to read isochronous data
from a UVC webcam.
I understand that a full driver is being worked on right
now, but I'd love
to be able to get my 'mini-driver' which only does one frame
rate working in
the meantime.

I have updated the USB stack with Hans Petter Selasky's
work, and am now
able to get data. The problem is, much of the YUV data seems
to be missing.

I have just run tests through all of the Alt Interfaces, and
have some
results.

I am just setting the cam to 160x120 uncompressed, and
trying to get the
stream

In each case, I try to set the buffer to wMaxPacketSize *
400 (ugen seems to
collect 50 * 8 packets)

I notice at the faster interfaces, the ugen Frame Size no
longer matches
wMaxPacketSize.

This should give me 12 byte stream headers, and lots of YUV
data. I read the
results as a 2 channel raw file in Photoshop. I discarded
the 2nd channel
(UV) for clarity, so the 12 bytes headers become 6 bytes,
which you can see
in the png files.

the basic test code loop is

dev->isopipe = open(pipename,O_RDONLY);
(set the buffer size, timeout, short XFER)
FILE *f;
f =
fopen("/usr/src/sys/dev/usb/test.raw","wb&quo
t;);
int i;
int bytes;
for(i = 0;i<210;i++)
{
	bytes = read(dev->isopipe,uvcbuf,UVCBUFSIZE); // 42240
	if (bytes > 0)
	{
		fwrite(&uvcbuf,bytes,1,f);
		zinfo("read %d bytesn",bytes);
	}
}
fclose(f);

Basic setup info...

VS_FRAME_UNCOMPRESSED
 length 50
 type 24
 subtype 05
 frame_index 5
 capabilities 0
 width 160
 height 120
 minbitrate 38400
 maxbitrate 1152000
 max_video_frame_buffer_size 38400
 default_frame_interval 333333
 frame_interval_type 6
 frame_interval[0] 333333

USB_DO_REQUEST SEND...length = 34
USB_DO_REQUEST RECV...length = 34
UVC Stream probe
 bmHint 01
 bFormatIndex 1
 bFrameIndex 5
 dwFrameInterval 333333
 wKeyFrameRate 1
 wPFrameRate 1
 wCompQuality 10000
 wCompWindowSize 0
 wDelay 34055
 dwMaxVideoFrameSize 42240
 dwMaxPayloadTransferSize 1600
 dwClockFrequency 1852381070
 bmFramingInfo B2
 bPreferedVersion 175
 bMinVersion 250
 bMaxVersion 180

Alt Interface 1:
Setting altinterface to 1:1
Getting altinterface for 1
00 00 00 00 01 00 00 00 01 00 00 00
Getting interface description
 bLength 09
 bDescriptorType 04
 bInterfaceNumber 01
 bAlternateSetting 01
 bNumEndpoints 01
 bInterfaceClass 0E
 bInterfaceSubClass 02
 bInterfaceProtocol 00
 iInterface 00
Getting endpoint description
 bLength 07
 bDescriptorType 05
 bEndpointAddress 81
 bmAttributes 05
 wMaxPacketSize 0080 (128)
 bInterfaceSubClass 01

Opening isopipe /dev/ugen0.1...
returned 5
Setting buffer size 51200
Setting short xfer...
Setting timeout to 1
ugen Frame size 128
ugen Buffer size 51200
dev->MaxPacketSize = 128
dev->endpoint = 81

result:
www.athyriogames.com/ai1.png


Alt Interface 2:
Setting altinterface to 1:2
Getting altinterface for 1
00 00 00 00 01 00 00 00 02 00 00 00
Getting interface description
 bLength 09
 bDescriptorType 04
 bInterfaceNumber 01
 bAlternateSetting 02
 bNumEndpoints 01
 bInterfaceClass 0E
 bInterfaceSubClass 02
 bInterfaceProtocol 00
 iInterface 00
Getting endpoint description
 bLength 07
 bDescriptorType 05
 bEndpointAddress 81
 bmAttributes 05
 wMaxPacketSize 0100 (256)
 bInterfaceSubClass 01
Opening isopipe /dev/ugen0.1...
returned 5
Setting buffer size 102400
Setting short xfer...
Setting timeout to 1
ugen Frame size 256
ugen Buffer size 102400
dev->MaxPacketSize = 256
dev->endpoint = 81
result:
www.athyriogames.com/ai2.png

Alt Interface 3:
Setting altinterface to 1:3
Getting altinterface for 1
00 00 00 00 01 00 00 00 03 00 00 00
Getting interface description
 bLength 09
 bDescriptorType 04
 bInterfaceNumber 01
 bAlternateSetting 03
 bNumEndpoints 01
 bInterfaceClass 0E
 bInterfaceSubClass 02
 bInterfaceProtocol 00
 iInterface 00
Getting endpoint description
 bLength 07
 bDescriptorType 05
 bEndpointAddress 81
 bmAttributes 05
 wMaxPacketSize 0320 (800)
 bInterfaceSubClass 01
Opening isopipe /dev/ugen0.1...
returned 5
Setting short xfer...
Setting timeout to 1
ugen Frame size 800
ugen Buffer size 65536
dev->MaxPacketSize = 800
dev->endpoint = 81
result:
www.athyriogames.com/ai3.png

Alt Interface 4:
Setting altinterface to 1:4
Getting altinterface for 1
00 00 00 00 01 00 00 00 04 00 00 00
Getting interface description
 bLength 09
 bDescriptorType 04
 bInterfaceNumber 01
 bAlternateSetting 04
 bNumEndpoints 01
 bInterfaceClass 0E
 bInterfaceSubClass 02
 bInterfaceProtocol 00
 iInterface 00
Getting endpoint description
 bLength 07
 bDescriptorType 05
 bEndpointAddress 81
 bmAttributes 05
 wMaxPacketSize 0B20 (2848)
 bInterfaceSubClass 01
Opening isopipe /dev/ugen0.1...
returned 5
Setting buffer size 1139200
Setting short xfer...
Setting timeout to 1
ugen Frame size 1600
ugen Buffer size 262144
dev->MaxPacketSize = 2848
dev->endpoint = 81
result:
www.athyriogames.com/ai4.png

Alt Interface 3:
Setting altinterface to 1:5
Getting altinterface for 1
00 00 00 00 01 00 00 00 05 00 00 00
Getting interface description
 bLength 09
 bDescriptorType 04
 bInterfaceNumber 01
 bAlternateSetting 05
 bNumEndpoints 01
 bInterfaceClass 0E
 bInterfaceSubClass 02
 bInterfaceProtocol 00
 iInterface 00
Getting endpoint description
 bLength 07
 bDescriptorType 05
 bEndpointAddress 81
 bmAttributes 05
 wMaxPacketSize 1320 (4896)
 bInterfaceSubClass 01
Opening isopipe /dev/ugen0.1...
returned 5
Setting buffer size 1958400
Setting short xfer...
Setting timeout to 1
ugen Frame size 2400
ugen Buffer size 262144
dev->MaxPacketSize = 4896
dev->endpoint = 81
result:
www.athyriogames.com/ai5.png



Alt Interface 6:
Setting altinterface to 1:6
Getting altinterface for 1
00 00 00 00 01 00 00 00 06 00 00 00
Getting interface description
 bLength 09
 bDescriptorType 04
 bInterfaceNumber 01
 bAlternateSetting 06
 bNumEndpoints 01
 bInterfaceClass 0E
 bInterfaceSubClass 02
 bInterfaceProtocol 00
 iInterface 00
Getting endpoint description
 bLength 07
 bDescriptorType 05
 bEndpointAddress 81
 bmAttributes 05
 wMaxPacketSize 1400 (5120)
 bInterfaceSubClass 01
Opening isopipe /dev/ugen0.1...
returned 5
Setting buffer size 2048000
Setting short xfer...
Setting timeout to 1
ugen Frame size 3072
ugen Buffer size 262144
dev->MaxPacketSize = 5120
dev->endpoint = 81
result:
www.athyriogames.com/ai6.png


Thank you for any help you can give me
Sam

_______________________________________________
freebsd-usbfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to
"freebsd-usb-unsubscribefreebsd.org"

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )