aboutsummaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorLars Engels <lme@FreeBSD.org>2009-09-09 18:12:16 +0000
committerLars Engels <lme@FreeBSD.org>2009-09-09 18:12:16 +0000
commit0f060f5e863c5ad335c22ca081e798e6b5304a37 (patch)
tree6d9dc74a44f5cacc63dead9500dfb5abefad2ed6 /multimedia
parent61808ab509d9582fbbbab5f50cb5bf9d1664db42 (diff)
downloadports-0f060f5e863c5ad335c22ca081e798e6b5304a37.tar.gz
ports-0f060f5e863c5ad335c22ca081e798e6b5304a37.zip
Notes
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/pwcbsd/Makefile8
-rw-r--r--multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c8
-rw-r--r--multimedia/pwcbsd/files/extra-patch-pwc.c54
-rw-r--r--multimedia/pwcbsd/files/extra-patch-pwc.h23
4 files changed, 53 insertions, 40 deletions
diff --git a/multimedia/pwcbsd/Makefile b/multimedia/pwcbsd/Makefile
index 28f73a2f06cc..d9a8523ba83c 100644
--- a/multimedia/pwcbsd/Makefile
+++ b/multimedia/pwcbsd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= pwcbsd
PORTVERSION= 1.4.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= multimedia sysutils kld
MASTER_SITES= http://raaf.atspace.org/ \
http://www.bsd-geek.de/FreeBSD/distfiles/ \
@@ -27,11 +27,11 @@ OPTIONS= PROGRAMS "Build the programs" on \
.include <bsd.port.pre.mk>
-.if (${OSVERSION} > 800063) && (${OSVERSION} < 800090)
-BROKEN= Please update to a newer version of FreeBSD 8-CURRENT
+.if (${OSVERSION} > 800063) && (${OSVERSION} < 800094)
+BROKEN= Please update to a newer version of FreeBSD 8
.endif
-.if ${OSVERSION} >= 800090
+.if ${OSVERSION} >= 800094
EXTRA_PATCHES= ${FILESDIR}/extra-patch-Makefile.kld \
${FILESDIR}/extra-patch-pwc-ctrl.c \
${FILESDIR}/extra-patch-pwc-v4l.c \
diff --git a/multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c b/multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c
index 73bd0e74c71e..fa8e27e62701 100644
--- a/multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c
+++ b/multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c
@@ -1,11 +1,11 @@
--- pwc-ctrl.c.orig 2007-07-02 08:54:19.000000000 +0200
-+++ pwc-ctrl.c 2009-05-27 20:22:49.137318240 +0200
++++ pwc-ctrl.c 2009-09-09 10:34:41.000000000 +0200
@@ -130,7 +130,7 @@
static void pwc_set_image_buffer_size(struct pwc_softc *pdev);
/****************************************************************************/
-static int usb_control_msg(usbd_device_handle udev,u_int pipe,u_int8_t request,u_int8_t requesttype,
-+static int usb_control_msg(struct usb2_device *udev,u_int pipe,u_int8_t request,u_int8_t requesttype,
++static int usb_control_msg(struct usb_device *udev,u_int pipe,u_int8_t request,u_int8_t requesttype,
u_int16_t value, u_int16_t index, void *data, u_int16_t size,int timeout)
{
usb_device_request_t req;
@@ -14,7 +14,7 @@
USETW(req.wIndex, index);
USETW(req.wLength,size);
- return -usbd_do_request(udev, &req, data);
-+ return -usb2_do_request(udev, NULL, &req, data);
++ return -usbd_do_request(udev, NULL, &req, data);
}
-
+
@@ -26,7 +26,7 @@
&buf, buflen, 500)
-static int send_video_command(usbd_device_handle udev, int index, void *buf, int buflen)
-+static int send_video_command(struct usb2_device *udev, int index, void *buf, int buflen)
++static int send_video_command(struct usb_device *udev, int index, void *buf, int buflen)
{
return usb_control_msg(udev,
0,
diff --git a/multimedia/pwcbsd/files/extra-patch-pwc.c b/multimedia/pwcbsd/files/extra-patch-pwc.c
index a0dea9ab5594..468c429c7b31 100644
--- a/multimedia/pwcbsd/files/extra-patch-pwc.c
+++ b/multimedia/pwcbsd/files/extra-patch-pwc.c
@@ -1,12 +1,12 @@
--- pwc.c.orig 2007-10-09 09:14:01.000000000 +0200
-+++ pwc.c 2009-05-27 20:22:49.147289211 +0200
++++ pwc.c 2009-09-09 10:33:33.000000000 +0200
@@ -28,7 +28,8 @@
#include "pwc-dec1.h"
#include "pwc-dec23.h"
-static void pwc_isoc_handler(usbd_xfer_handle xfer, usbd_private_handle addr,usbd_status status);
-+static void pwc_isoc_rx_callback(struct usb2_xfer *xfer);
-+static void pwc_isoc_handler(struct usb2_xfer *xfer, void *addr);
++static void pwc_isoc_rx_callback(struct usb_xfer *xfer, usb_error_t err);
++static void pwc_isoc_handler(struct usb_xfer *xfer, void *addr);
static void pwc_reset_buffers(struct pwc_softc *sc);
static void pwc_free_buffers(struct pwc_softc *sc, int detach);
@@ -20,7 +20,7 @@
- int type;
- char *name;
+
-+static const struct usb2_config pwc_config[MAX_ISO_BUFS] = {
++static const struct usb_config pwc_config[MAX_ISO_BUFS] = {
+ [0] = {
+ .type = UE_ISOCHRONOUS,
+ .endpoint = UE_ADDR_ANY,
@@ -73,7 +73,7 @@
- {{ 0x0d81, 0x1910 }, 740, "Visionite VCS-UC300" },
- {{ 0x0d81, 0x1900 }, 730, "Visionite VCS-UM100" },
+
-+static const struct usb2_device_id pwc_devs[] = {
++static const struct usb_device_id pwc_devs[] = {
+ {USB_VPI(0x0471, 0x0302, 645)}, /* Philips PCA645VC */
+ {USB_VPI(0x0471, 0x0303, 646)}, /* Philips PCA646VC */
+ {USB_VPI(0x0471, 0x0304, 646)}, /* Askey VC010 type 2 */
@@ -121,7 +121,7 @@
DEVMETHOD(device_attach, pwc_attach),
DEVMETHOD(device_detach, pwc_detach),
{0,0},
-@@ -120,85 +136,52 @@
+@@ -120,41 +136,25 @@
MODULE_DEPEND(pwc, usb, 1, 1, 1);
static int
@@ -130,7 +130,7 @@
{
- struct usb_attach_arg *uaa = device_get_ivars(self);
- usb_interface_descriptor_t *id;
-+ struct usb2_attach_arg *uaa = device_get_ivars(self);
++ struct usb_attach_arg *uaa = device_get_ivars(self);
- Trace(TRACE_PROBE,"pwc_match: vendor=0x%x, product=0x%x release=%04x\n",uaa->vendor, uaa->product,uaa->release);
-
@@ -169,20 +169,19 @@
+ if (uaa->info.bIfaceIndex != 0)
+ return (ENXIO);
+
-+ return (usb2_lookup_id_by_uaa(pwc_devs, sizeof(pwc_devs), uaa));
++ return (usbd_lookup_id_by_uaa(pwc_devs, sizeof(pwc_devs), uaa));
+
+ return (0); /* success */
}
static int
- pwc_attach(device_t self)
+@@ -162,43 +162,26 @@
{
struct pwc_softc *sc = device_get_softc(self);
-- struct usb_attach_arg *uaa = device_get_ivars(self);
+ struct usb_attach_arg *uaa = device_get_ivars(self);
- char devinfo[1024];
- const char *tmpstr;
- const struct pwc_info *info;
-+ struct usb2_attach_arg *uaa = device_get_ivars(self);
char *sizenames[PSZ_MAX] = { "sqcif", "qsif", "qcif", "sif", "cif", "vga" };
- int i, err;
+ const char *tmpstr;
@@ -194,7 +193,7 @@
- device_get_nameunit(sc->sc_dev),uaa->vendor,uaa->product);
- return ENXIO;
- }
-+ device_set_usb2_desc(self);
++ device_set_usb_desc(self);
- usbd_devinfo(uaa->device, 0, devinfo);
sc->sc_dev = self;
@@ -265,7 +264,7 @@
- sc->sc_videopipe = NULL;
- }
+
-+ usb2_transfer_unsetup(sc->sc_xfer, MAX_ISO_BUFS);
++ usbd_transfer_unsetup(sc->sc_xfer, MAX_ISO_BUFS);
sc->error_status = EPIPE;
@@ -348,7 +347,7 @@
-
- usbd_set_interface(sc->sc_iface, 0);
+
-+ usb2_set_alt_interface_index(sc->udev, sc->sc_iface_index, 0);
++ usbd_set_alt_interface_index(sc->udev, sc->sc_iface_index, 0);
+
pwc_set_leds(sc,0,0);
@@ -371,6 +370,15 @@
if (sc->error_status)
return sc->error_status;
+@@ -565,7 +515,7 @@
+ if(count + sc->image_read_pos > bytes_to_read)
+ count = bytes_to_read - sc->image_read_pos;
+
+- Trace(TRACE_READ_VERBOSE, "pwc_read: wants: %d bytes, reading: %d bytes\n",uio->uio_resid,count);
++ Trace(TRACE_READ_VERBOSE, "pwc_read: wants: %d bytes, reading: %d bytes\n",(int)uio->uio_resid,count);
+
+ err = uiomove(sc->images[sc->fill_image].bufmem + sc->image_read_pos,count,uio);
+ if(err)
@@ -583,10 +533,9 @@
int
pwc_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *p)
@@ -429,7 +437,7 @@
-
+ int i, err, ret;
+
-+ usb2_transfer_unsetup(sc->sc_xfer, MAX_ISO_BUFS);
++ usbd_transfer_unsetup(sc->sc_xfer, MAX_ISO_BUFS);
+
pwc_reset_buffers(sc);
@@ -440,7 +448,7 @@
- err = usbd_set_interface(sc->sc_iface,sc->valternate);
- if(err != USBD_NORMAL_COMPLETION) {
-+ err = usb2_set_alt_interface_index(sc->udev, sc->sc_iface_index, sc->valternate);
++ err = usbd_set_alt_interface_index(sc->udev, sc->sc_iface_index, sc->valternate);
+ if(err != USB_ERR_NORMAL_COMPLETION) {
printf("%s: Failed to set alternate interface to: %d (%d)\n",device_get_nameunit(sc->sc_dev),sc->valternate,err);
return -err;
@@ -472,7 +480,7 @@
- if(err != USBD_NORMAL_COMPLETION) {
- printf("%s: Failed to open videopipe (%d)\n",device_get_nameunit(sc->sc_dev),err);
+ /* Allocate iso transfers */
-+ if (usb2_transfer_setup(sc->udev, &sc->sc_iface_index, sc->sc_xfer,
++ if (usbd_transfer_setup(sc->udev, &sc->sc_iface_index, sc->sc_xfer,
+ pwc_config, MAX_ISO_BUFS, sc, &Giant)) {
+ printf("%s: Failed to setup USB transfers\n", device_get_nameunit(sc->sc_dev));
return -err;
@@ -490,7 +498,7 @@
- pwc_isoc_handler);
-
- usbd_transfer(sc->sbuf[i].xfer);
-+ usb2_transfer_start(sc->sc_xfer[i]);
++ usbd_transfer_start(sc->sc_xfer[i]);
}
if(sc->state & PWC_INIT)
@@ -499,7 +507,7 @@
static void
-pwc_isoc_handler(usbd_xfer_handle xfer, usbd_private_handle addr,usbd_status status)
-+pwc_isoc_rx_callback(struct usb2_xfer *xfer)
++pwc_isoc_rx_callback(struct usb_xfer *xfer, usb_error_t err)
{
- struct pwc_iso_buf *req = addr;
- struct pwc_softc *sc = req->sc;
@@ -517,7 +525,7 @@
+ xfer->frlengths[i] = xfer->max_frame_size;
+
+ xfer->nframes = xfer->max_frame_count;
-+ usb2_start_hardware(xfer);
++ usbd_transfer_submit(xfer);
+ break;
+ default:
+ if (xfer->error != USB_ERR_CANCELLED)
@@ -527,7 +535,7 @@
+}
+
+static void
-+pwc_isoc_handler(struct usb2_xfer *xfer, void *addr)
++pwc_isoc_handler(struct usb_xfer *xfer, void *addr)
+{
+ struct pwc_softc *sc = addr;
struct pwc_frame_buf *fbuf;
@@ -577,7 +585,7 @@
}
else {
- memcpy(fillptr, iso_buf, flen);
-+ usb2_copy_out(xfer->frbuffers, iso_buf, fillptr, flen);
++ usbd_copy_out(xfer->frbuffers, iso_buf, fillptr, flen);
fillptr += flen;
}
}
@@ -611,7 +619,7 @@
int i;
Trace(TRACE_MEMORY, "Entering free_buffers(%p).\n", sc);
+
-+ usb2_transfer_unsetup(sc->sc_xfer, MAX_ISO_BUFS);
++ usbd_transfer_unsetup(sc->sc_xfer, MAX_ISO_BUFS);
+
if (sc->fbuf != NULL) {
for (i = 0; i < sc->pwc_fbufs; i++) {
diff --git a/multimedia/pwcbsd/files/extra-patch-pwc.h b/multimedia/pwcbsd/files/extra-patch-pwc.h
index 5c514ba7f8fc..2797847d8e1a 100644
--- a/multimedia/pwcbsd/files/extra-patch-pwc.h
+++ b/multimedia/pwcbsd/files/extra-patch-pwc.h
@@ -1,17 +1,22 @@
--- pwc.h.orig 2006-09-27 07:21:01.000000000 +0200
-+++ pwc.h 2009-05-27 20:22:49.147289211 +0200
-@@ -44,8 +44,16 @@
++++ pwc.h 2009-09-09 10:16:04.000000000 +0200
+@@ -44,8 +44,21 @@
#include <vm/pmap.h>
#include <dev/usb/usb.h>
-#include <dev/usb/usbdi.h>
-#include <dev/usb/usbdi_util.h>
++/* GJ
+#include <dev/usb/usb_mfunc.h>
+#include <dev/usb/usb_error.h>
++*/
+
++#include <dev/usb/usbdi.h> /* GJ */
+#include <dev/usb/usb_core.h>
+#include <dev/usb/usb_debug.h>
++/* GJ
+#include <dev/usb/usb_lookup.h>
++*/
+#include <dev/usb/usb_util.h>
+#include <dev/usb/usb_busdma.h>
+#include <dev/usb/usb_request.h>
@@ -19,7 +24,7 @@
#include "pwc-uncompress.h"
#include "pwc-ioctl.h"
#include "videodev.h"
-@@ -69,7 +77,7 @@
+@@ -69,7 +82,7 @@
#define TRACE_READ_VERBOSE 0x0800
#define TRACE_SEQUENCE 0x1000
@@ -28,7 +33,7 @@
#define Trace(R, A...) if (pwcdebug & R) printf(PWC_NAME " " A)
#define Debug(A...) if(pwcdebug) printf(PWC_NAME " " A)
extern int pwcdebug;
-@@ -93,14 +101,9 @@
+@@ -93,14 +106,9 @@
#define FRAME_LOWMARK 5
/* Size and number of buffers for the ISO pipe. */
@@ -45,7 +50,7 @@
/* Frame buffers: contains compressed or uncompressed video data. */
#define MAX_FRAMES 5
-@@ -133,17 +136,17 @@
+@@ -133,17 +141,17 @@
struct pwc_softc
{
device_t sc_dev;
@@ -53,8 +58,8 @@
- usbd_interface_handle sc_iface;
- usbd_pipe_handle sc_videopipe;
+
-+ struct usb2_xfer *sc_xfer[MAX_ISO_BUFS];
-+ struct usb2_device *udev;
++ struct usb_xfer *sc_xfer[MAX_ISO_BUFS];
++ struct usb_device *udev;
struct cdev *sc_dev_t;
struct selinfo rsel;
@@ -68,7 +73,7 @@
int error_status; /* set when something goes wrong with the cam (unplugged, USB errors) */
int usb_init; /* set when the cam has been initialized over USB */
-@@ -165,7 +168,6 @@
+@@ -165,7 +173,6 @@
int vframe_count; /* received frames */
int vframes_dumped; /* counter for dumped frames */
int vframes_error; /* frames received in error */
@@ -76,7 +81,7 @@
u_int16_t vlast_packet_size; /* for frame synchronisation */
int visoc_errors; /* number of contiguous ISOC errors */
int vcompression; /* desired compression factor */
-@@ -187,15 +189,7 @@
+@@ -187,15 +194,7 @@
Note that MAX_ISO_BUFS != MAX_FRAMES != MAX_IMAGES....
We have in effect a back-to-back-double-buffer system.
*/