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/umt-010.c | 38 +++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'drivers/media/dvb/dvb-usb/umt-010.c') diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c index 418a0b7..f9941ea 100644 --- a/drivers/media/dvb/dvb-usb/umt-010.c +++ b/drivers/media/dvb/dvb-usb/umt-010.c @@ -50,7 +50,7 @@ static int umt_mt352_demod_init(struct dvb_frontend *fe) return 0; } -static int umt_mt352_frontend_attach(struct dvb_usb_device *d) +static int umt_mt352_frontend_attach(struct dvb_usb_adapter *adap) { struct mt352_config umt_config; @@ -58,21 +58,21 @@ static int umt_mt352_frontend_attach(struct dvb_usb_device *d) umt_config.demod_init = umt_mt352_demod_init; umt_config.demod_address = 0xf; - d->fe = dvb_attach(mt352_attach, &umt_config, &d->i2c_adap); + adap->fe = dvb_attach(mt352_attach, &umt_config, &adap->dev->i2c_adap); return 0; } -static int umt_tuner_attach (struct dvb_usb_device *d) +static int umt_tuner_attach (struct dvb_usb_adapter *adap) { - d->pll_addr = 0x61; - d->pll_desc = &dvb_pll_tua6034; - d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; + adap->pll_addr = 0x61; + adap->pll_desc = &dvb_pll_tua6034; + adap->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } /* USB Driver stuff */ -static struct dvb_usb_properties umt_properties; +static struct dvb_usb_device_properties umt_properties; static int umt_probe(struct usb_interface *intf, const struct usb_device_id *id) @@ -90,25 +90,22 @@ static struct usb_device_id umt_table [] = { }; MODULE_DEVICE_TABLE (usb, umt_table); -static struct dvb_usb_properties umt_properties = { +static struct dvb_usb_device_properties umt_properties = { .caps = DVB_USB_IS_AN_I2C_ADAPTER, .usb_ctrl = CYPRESS_FX2, .firmware = "dvb-usb-umt-010-02.fw", - .size_of_priv = sizeof(struct dibusb_state), - + .num_adapters = 1, + .adapter = { + { .streaming_ctrl = dibusb2_0_streaming_ctrl, - .power_ctrl = dibusb_power_ctrl, .frontend_attach = umt_mt352_frontend_attach, .tuner_attach = umt_tuner_attach, - .i2c_algo = &dibusb_i2c_algo, - - .generic_bulk_ctrl_endpoint = 0x01, /* parameter for the MPEG2-data transfer */ - .urb = { - .type = DVB_USB_BULK, + .stream = { + .type = USB_BULK, .count = 20, .endpoint = 0x06, .u = { @@ -118,6 +115,15 @@ static struct dvb_usb_properties umt_properties = { } }, + .size_of_priv = sizeof(struct dibusb_state), + } + }, + .power_ctrl = dibusb_power_ctrl, + + .i2c_algo = &dibusb_i2c_algo, + + .generic_bulk_ctrl_endpoint = 0x01, + .num_device_descs = 1, .devices = { { "Hanftek UMT-010 DVB-T USB2.0", -- cgit v1.1