-/* $OpenBSD: uvideo.c,v 1.72 2008/08/02 17:30:31 mglocker Exp $ */
+/* $OpenBSD: uvideo.c,v 1.73 2008/08/02 20:05:28 mglocker Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
#define DPRINTF(l, x...)
#endif
+#define DEVNAME(_s) ((_s)->sc_dev.dv_xname)
+
int uvideo_enable(void *);
void uvideo_disable(void *);
int uvideo_open(void *, int, int *, uint8_t *, void (*)(void *),
void *arg);
int uvideo_close(void *);
-
int uvideo_match(struct device *, void *, void *);
void uvideo_attach(struct device *, struct device *, void *);
int uvideo_detach(struct device *, int);
usbd_status uvideo_vc_parse_desc(struct uvideo_softc *);
usbd_status uvideo_vc_parse_desc_header(struct uvideo_softc *,
const usb_descriptor_t *);
-
usbd_status uvideo_vs_parse_desc(struct uvideo_softc *,
struct usb_attach_arg *, usb_config_descriptor_t *);
usbd_status uvideo_vs_parse_desc_input_header(struct uvideo_softc *,
int uvideo_desc_len(const usb_descriptor_t *, int, int, int, int);
void uvideo_find_res(struct uvideo_softc *, int, int, int,
struct uvideo_res *);
-
usbd_status uvideo_vs_negotiation(struct uvideo_softc *, int);
usbd_status uvideo_vs_set_probe(struct uvideo_softc *, uint8_t *);
usbd_status uvideo_vs_get_probe(struct uvideo_softc *, uint8_t *, uint8_t);
uint8_t *, int);
void uvideo_mmap_queue(struct uvideo_softc *, uint8_t *, int);
void uvideo_read(struct uvideo_softc *, uint8_t *, int);
+
#ifdef UVIDEO_DEBUG
void uvideo_dump_desc_all(struct uvideo_softc *);
void uvideo_dump_desc_vc_header(struct uvideo_softc *,
int uvideo_get_bufsize(void *);
int uvideo_start_read(void *);
-#define DEVNAME(_s) ((_s)->sc_dev.dv_xname)
+struct cfdriver uvideo_cd = {
+ NULL, "uvideo", DV_DULL
+};
const struct cfattach uvideo_ca = {
sizeof(struct uvideo_softc),
uvideo_activate,
};
-struct cfdriver uvideo_cd = {
- NULL,
- "uvideo",
- DV_DULL
-};
-
-usbd_status
-uvideo_usb_request(struct uvideo_softc * sc, u_int8_t type, u_int8_t request,
- u_int16_t value, u_int16_t index, u_int16_t length, u_int8_t * data);
-
struct video_hw_if uvideo_hw_if = {
uvideo_open, /* open */
uvideo_close, /* close */
uvideo_start_read /* start stream for read */
};
+/*
+ * Some devices do not report themselfs as UVC compatible although
+ * they are. They report UICLASS_VENDOR in the bInterfaceClass
+ * instead of UICLASS_VIDEO. Give those devices a chance to attach
+ * by looking up their USB ID.
+ *
+ * If the device also doesn't set UDCLASS_VIDEO you need to add an
+ * entry in usb_quirks.c, too, so the ehci disown works.
+ */
+static const struct usb_devno uvideo_quirk_devs [] = {
+ { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_QUICKCAMOEM_1 }
+};
+
int
uvideo_enable(void *v)
{
return (0);
}
-/*
- * Some devices do not report themselfs as UVC compatible although
- * they are. They report UICLASS_VENDOR in the bInterfaceClass
- * instead of UICLASS_VIDEO. Give those devices a chance to attach
- * by looking up their USB ID.
- *
- * If the device also doesn't set UDCLASS_VIDEO you need to add an
- * entry in usb_quirks.c, too, so the ehci disown works.
- */
-static const struct usb_devno uvideo_quirk_devs [] = {
- { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_QUICKCAMOEM_1 }
-};
-
int
uvideo_match(struct device *parent, void *match, void *aux)
{