From 4d43e13f723e12734257277cc38497fab1efc605 Mon Sep 17 00:00:00 2001 From: Patrick Boettcher Date: Sat, 30 Sep 2006 06:53:48 -0300 Subject: V4L/DVB (4643): Multi-input patch for DVB-USB device This patch is the first commit of the Multiple Input Patch for the DVB-USB frame work. It changes the DVB-USB-device to be able to have more than one streaming input (e.g. multiple DVB-T sources) on one device. This is a necessary feature for the upcoming DiB7700 driven devices. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-usb/gp8psk.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'drivers/media/dvb/dvb-usb/gp8psk.c') diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c index 9a98f3fdae3..334269bd065 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk.c +++ b/drivers/media/dvb/dvb-usb/gp8psk.c @@ -161,19 +161,18 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) } -static int gp8psk_streaming_ctrl(struct dvb_usb_device *d, int onoff) +static int gp8psk_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) { - return gp8psk_usb_out_op(d, ARM_TRANSFER, onoff, 0 , NULL, 0); + return gp8psk_usb_out_op(adap->dev, ARM_TRANSFER, onoff, 0 , NULL, 0); } -static int gp8psk_frontend_attach(struct dvb_usb_device *d) +static int gp8psk_frontend_attach(struct dvb_usb_adapter *adap) { - d->fe = gp8psk_fe_attach(d); - + adap->fe = gp8psk_fe_attach(adap->dev); return 0; } -static struct dvb_usb_properties gp8psk_properties; +static struct dvb_usb_device_properties gp8psk_properties; static int gp8psk_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) @@ -188,20 +187,18 @@ static struct usb_device_id gp8psk_usb_table [] = { }; MODULE_DEVICE_TABLE(usb, gp8psk_usb_table); -static struct dvb_usb_properties gp8psk_properties = { - .caps = 0, - +static struct dvb_usb_device_properties gp8psk_properties = { .usb_ctrl = CYPRESS_FX2, .firmware = "dvb-usb-gp8psk-01.fw", + .num_adapters = 1, + .adapter = { + { .streaming_ctrl = gp8psk_streaming_ctrl, - .power_ctrl = gp8psk_power_ctrl, .frontend_attach = gp8psk_frontend_attach, - - .generic_bulk_ctrl_endpoint = 0x01, /* parameter for the MPEG2-data transfer */ - .urb = { - .type = DVB_USB_BULK, + .stream = { + .type = USB_BULK, .count = 7, .endpoint = 0x82, .u = { @@ -210,6 +207,11 @@ static struct dvb_usb_properties gp8psk_properties = { } } }, + } + }, + .power_ctrl = gp8psk_power_ctrl, + + .generic_bulk_ctrl_endpoint = 0x01, .num_device_descs = 1, .devices = { -- cgit v1.2.3-70-g09d2