X-Git-Url: https://git.ao2.it/gspca_kinect.git/blobdiff_plain/71e0499aba69e53fc7d1d9e7742ed70c8cec70de..71340e51fc094a564c462be235d36cf7ae3fac10:/kinect.c diff --git a/kinect.c b/kinect.c index 34cbf0b..0d8acda 100644 --- a/kinect.c +++ b/kinect.c @@ -31,6 +31,11 @@ MODULE_AUTHOR("Antonio Ospite "); MODULE_DESCRIPTION("GSPCA/Kinect Sensor Device USB Camera Driver"); MODULE_LICENSE("GPL"); +#ifdef DEBUG +int gspca_debug = D_ERR | D_PROBE | D_CONF | D_STREAM | D_FRAM | D_PACK | + D_USBI | D_USBO | D_V4L2; +#endif + struct pkt_hdr { uint8_t magic[2]; uint8_t pad; @@ -49,9 +54,6 @@ typedef struct { uint16_t tag; } cam_hdr; -int gspca_debug = D_ERR | D_PROBE | D_CONF | D_STREAM | D_FRAM | D_PACK | - D_USBI | D_USBO | D_V4L2; - /* specific webcam descriptor */ struct sd { struct gspca_dev gspca_dev; /* !! must be the first item */ @@ -145,7 +147,7 @@ static int send_cmd(struct gspca_dev *gspca_dev, uint16_t cmd, void *cmdbuf, memcpy(obuf+sizeof(*chdr), cmdbuf, cmd_len); res = kinect_write(udev, obuf, cmd_len + sizeof(*chdr)); - info("Control cmd=%04x tag=%04x len=%04x: %d", cmd, sd->cam_tag, cmd_len, res); + PDEBUG(D_USBO, "Control cmd=%04x tag=%04x len=%04x: %d", cmd, sd->cam_tag, cmd_len, res); if (res < 0) { err("send_cmd: Output control transfer failed (%d)", res); return res; @@ -154,7 +156,7 @@ static int send_cmd(struct gspca_dev *gspca_dev, uint16_t cmd, void *cmdbuf, do { actual_len = kinect_read(udev, ibuf, 0x200); } while (actual_len == 0); - info("Control reply: %d", res); + PDEBUG(D_USBO, "Control reply: %d", res); if (actual_len < sizeof(*rhdr)) { err("send_cmd: Input control transfer failed (%d)", res); return res;