diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-09-19 12:51:09 -0300 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-09-19 12:51:09 -0300 |
commit | 8f897863702b3f9c82b1a14571c52d758b868302 (patch) | |
tree | e9409e709d929c1bd8ee935f4d6a7de71e35df0c /linux/drivers/media/dvb/dvb-usb/umt-010.c | |
parent | d1301189ccbf756badbde417ca0cc4e4e115f703 (diff) | |
download | mediapointer-dvb-s2-8f897863702b3f9c82b1a14571c52d758b868302.tar.gz mediapointer-dvb-s2-8f897863702b3f9c82b1a14571c52d758b868302.tar.bz2 |
cf4dcf5526aa0e0acd02
Multi-input patch for DVB-USB device
From: Patrick Boettcher <pb@linuxtv.org>
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 <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/umt-010.c')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/umt-010.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/umt-010.c b/linux/drivers/media/dvb/dvb-usb/umt-010.c index 7e94ead18..ba0c4ab3f 100644 --- a/linux/drivers/media/dvb/dvb-usb/umt-010.c +++ b/linux/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", |