diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uvideo.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 7a4f78aa637..e216059dd4c 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.133 2010/07/15 04:46:33 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.134 2010/07/26 07:01:08 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -328,6 +328,13 @@ struct uvideo_devs { NULL, UVIDEO_FLAG_FIX_MAX_VIDEO_FRAME_SIZE }, + { + /* Needs to fix dwMaxVideoFrameSize */ + { USB_VENDOR_MICRODIA, USB_PRODUCT_MICRODIA_CAM_1 }, + NULL, + NULL, + UVIDEO_FLAG_FIX_MAX_VIDEO_FRAME_SIZE + }, }; #define uvideo_lookup(v, p) \ ((struct uvideo_devs *)usb_lookup(uvideo_devs, v, p)) @@ -1116,7 +1123,7 @@ uvideo_vs_parse_desc_frame_uncompressed(struct uvideo_softc *sc, sc->sc_fmtgrp[fmtidx].pixelformat == V4L2_PIX_FMT_YUYV) { fd = (struct usb_video_frame_uncompressed_desc *) sc->sc_fmtgrp[fmtidx].frame[d->bFrameIndex]; - fbuf_size = UGETW(fd->wWidth) * UGETW(fd->wHeight) * 2; + fbuf_size = UGETW(fd->wWidth) * UGETW(fd->wHeight) * 4; DPRINTF(1, "wWidth = %d, wHeight = %d\n", UGETW(fd->wWidth), UGETW(fd->wHeight)); } else @@ -1469,7 +1476,7 @@ uvideo_vs_get_probe(struct uvideo_softc *sc, uint8_t *probe_data, sc->sc_fmtgrp_cur->pixelformat == V4L2_PIX_FMT_YUYV) { USETDW(pc->dwMaxVideoFrameSize, UGETW(sc->sc_fmtgrp_cur->frame_cur->wWidth) * - UGETW(sc->sc_fmtgrp_cur->frame_cur->wHeight) * 2); + UGETW(sc->sc_fmtgrp_cur->frame_cur->wHeight) * 4); } } |