Re: Kinect sensor and Linux kernel driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 12/09/2010 06:04 PM, Jason wrote:
On 12/09/2010 10:33 AM, Antonio Ospite wrote:
On Tue, 07 Dec 2010 12:29:31 +0100
Hans de Goede<hdegoede@xxxxxxxxxx>  wrote:

On 12/06/2010 10:18 PM, Antonio Ospite wrote:

[...]

    - Check if gspca can handle two video nodes for the same USB device
      in a single driver (Kinect sensor uses ep 0x81 for color data and
      ep 0x82 for depth data).

Currently gspca cannot handle 2 streaming endpoints / 2 video nodes for 1
usb device. I've been thinking about this and I think that the simplest solution
is to simply pretend the kinects video functionality consists of 2 different
devices / usb interfaces in a multifunction device. Even though it does not
what I'm proposing is for the kinect driver to call: gspca_dev_probe twice with
2 different sd_desc structures, thus creating 2 /dev/video nodes, framequeues and
isoc management variables.

This means that the alt_xfer function in gspca.c needs to be changed to not
always return the first isoc ep. We need to add an ep_nr variable to the
cam struct and when that is set alt_xfer should search for the ep with that
number and return that (unless the wMaxPacketSize for that ep is 0 in the
current alt setting in which case NULL should be returned).


Thanks for these directions, it doesn't sound too hard to do.


as for two endpoints, I've been playing with getting the code from
drivers/media/video/gspca/konica.c. into kinect.c.  It enumerates
multiple URBs for one USB device.  Perhaps a combination of the above
and the konica driver will work?

When you do the above (in essence let gspca think it is dealing with 2 separate cameras
the multiple urb stuff is not necessary.

Also note that the konica case is very special as it has 2 endpoints, but
both endpoints are related to 1 stream. Rather ugly really, but ah well
I did not design the hardware :)

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux