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/vp7045.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/vp7045.c')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/vp7045.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/vp7045.c b/linux/drivers/media/dvb/dvb-usb/vp7045.c index 20beb2539..02c6776d2 100644 --- a/linux/drivers/media/dvb/dvb-usb/vp7045.c +++ b/linux/drivers/media/dvb/dvb-usb/vp7045.c @@ -169,31 +169,31 @@ static int vp7045_read_mac_addr(struct dvb_usb_device *d,u8 mac[6]) return vp7045_read_eeprom(d,mac, 6, MAC_0_ADDR); } -static int vp7045_frontend_attach(struct dvb_usb_device *d) +static int vp7045_frontend_attach(struct dvb_usb_adapter *adap) { u8 buf[255] = { 0 }; - vp7045_usb_op(d,VENDOR_STRING_READ,NULL,0,buf,20,0); + vp7045_usb_op(adap->dev,VENDOR_STRING_READ,NULL,0,buf,20,0); buf[10] = '\0'; deb_info("firmware says: %s ",buf); - vp7045_usb_op(d,PRODUCT_STRING_READ,NULL,0,buf,20,0); + vp7045_usb_op(adap->dev,PRODUCT_STRING_READ,NULL,0,buf,20,0); buf[10] = '\0'; deb_info("%s ",buf); - vp7045_usb_op(d,FW_VERSION_READ,NULL,0,buf,20,0); + vp7045_usb_op(adap->dev,FW_VERSION_READ,NULL,0,buf,20,0); buf[10] = '\0'; deb_info("v%s\n",buf); /* Dump the EEPROM */ /* vp7045_read_eeprom(d,buf, 255, FX2_ID_ADDR); */ - d->fe = vp7045_fe_attach(d); + adap->fe = vp7045_fe_attach(adap->dev); return 0; } -static struct dvb_usb_properties vp7045_properties; +static struct dvb_usb_device_properties vp7045_properties; static int vp7045_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) @@ -210,24 +210,17 @@ static struct usb_device_id vp7045_usb_table [] = { }; MODULE_DEVICE_TABLE(usb, vp7045_usb_table); -static struct dvb_usb_properties vp7045_properties = { - .caps = 0, - +static struct dvb_usb_device_properties vp7045_properties = { .usb_ctrl = CYPRESS_FX2, .firmware = "dvb-usb-vp7045-01.fw", - .power_ctrl = vp7045_power_ctrl, + .num_adapters = 1, + .adapter = { + { .frontend_attach = vp7045_frontend_attach, - .read_mac_address = vp7045_read_mac_addr, - - .rc_interval = 400, - .rc_key_map = vp7045_rc_keys, - .rc_key_map_size = ARRAY_SIZE(vp7045_rc_keys), - .rc_query = vp7045_rc_query, - /* parameter for the MPEG2-data transfer */ - .urb = { - .type = DVB_USB_BULK, + .stream = { + .type = USB_BULK, .count = 7, .endpoint = 0x02, .u = { @@ -236,6 +229,15 @@ static struct dvb_usb_properties vp7045_properties = { } } }, + } + }, + .power_ctrl = vp7045_power_ctrl, + .read_mac_address = vp7045_read_mac_addr, + + .rc_interval = 400, + .rc_key_map = vp7045_rc_keys, + .rc_key_map_size = ARRAY_SIZE(vp7045_rc_keys), + .rc_query = vp7045_rc_query, .num_device_descs = 2, .devices = { |