diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-09-30 05:53:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-03 14:10:54 -0400 |
commit | 4d43e13f723e12734257277cc38497fab1efc605 (patch) | |
tree | 7debc4f9b7997f7d768dcf387210436b532198f4 /drivers/media/dvb/dvb-usb/vp7045.c | |
parent | 8ccb3dcd1f8e80e8702642e1de26541b52f6bb7c (diff) |
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 <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/vp7045.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/vp7045.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c index 8ea3834a6cf8..b4cf002703a7 100644 --- a/drivers/media/dvb/dvb-usb/vp7045.c +++ b/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]) | |||
169 | return vp7045_read_eeprom(d,mac, 6, MAC_0_ADDR); | 169 | return vp7045_read_eeprom(d,mac, 6, MAC_0_ADDR); |
170 | } | 170 | } |
171 | 171 | ||
172 | static int vp7045_frontend_attach(struct dvb_usb_device *d) | 172 | static int vp7045_frontend_attach(struct dvb_usb_adapter *adap) |
173 | { | 173 | { |
174 | u8 buf[255] = { 0 }; | 174 | u8 buf[255] = { 0 }; |
175 | 175 | ||
176 | vp7045_usb_op(d,VENDOR_STRING_READ,NULL,0,buf,20,0); | 176 | vp7045_usb_op(adap->dev,VENDOR_STRING_READ,NULL,0,buf,20,0); |
177 | buf[10] = '\0'; | 177 | buf[10] = '\0'; |
178 | deb_info("firmware says: %s ",buf); | 178 | deb_info("firmware says: %s ",buf); |
179 | 179 | ||
180 | vp7045_usb_op(d,PRODUCT_STRING_READ,NULL,0,buf,20,0); | 180 | vp7045_usb_op(adap->dev,PRODUCT_STRING_READ,NULL,0,buf,20,0); |
181 | buf[10] = '\0'; | 181 | buf[10] = '\0'; |
182 | deb_info("%s ",buf); | 182 | deb_info("%s ",buf); |
183 | 183 | ||
184 | vp7045_usb_op(d,FW_VERSION_READ,NULL,0,buf,20,0); | 184 | vp7045_usb_op(adap->dev,FW_VERSION_READ,NULL,0,buf,20,0); |
185 | buf[10] = '\0'; | 185 | buf[10] = '\0'; |
186 | deb_info("v%s\n",buf); | 186 | deb_info("v%s\n",buf); |
187 | 187 | ||
188 | /* Dump the EEPROM */ | 188 | /* Dump the EEPROM */ |
189 | /* vp7045_read_eeprom(d,buf, 255, FX2_ID_ADDR); */ | 189 | /* vp7045_read_eeprom(d,buf, 255, FX2_ID_ADDR); */ |
190 | 190 | ||
191 | d->fe = vp7045_fe_attach(d); | 191 | adap->fe = vp7045_fe_attach(adap->dev); |
192 | 192 | ||
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | static struct dvb_usb_properties vp7045_properties; | 196 | static struct dvb_usb_device_properties vp7045_properties; |
197 | 197 | ||
198 | static int vp7045_usb_probe(struct usb_interface *intf, | 198 | static int vp7045_usb_probe(struct usb_interface *intf, |
199 | const struct usb_device_id *id) | 199 | const struct usb_device_id *id) |
@@ -210,24 +210,17 @@ static struct usb_device_id vp7045_usb_table [] = { | |||
210 | }; | 210 | }; |
211 | MODULE_DEVICE_TABLE(usb, vp7045_usb_table); | 211 | MODULE_DEVICE_TABLE(usb, vp7045_usb_table); |
212 | 212 | ||
213 | static struct dvb_usb_properties vp7045_properties = { | 213 | static struct dvb_usb_device_properties vp7045_properties = { |
214 | .caps = 0, | ||
215 | |||
216 | .usb_ctrl = CYPRESS_FX2, | 214 | .usb_ctrl = CYPRESS_FX2, |
217 | .firmware = "dvb-usb-vp7045-01.fw", | 215 | .firmware = "dvb-usb-vp7045-01.fw", |
218 | 216 | ||
219 | .power_ctrl = vp7045_power_ctrl, | 217 | .num_adapters = 1, |
218 | .adapter = { | ||
219 | { | ||
220 | .frontend_attach = vp7045_frontend_attach, | 220 | .frontend_attach = vp7045_frontend_attach, |
221 | .read_mac_address = vp7045_read_mac_addr, | ||
222 | |||
223 | .rc_interval = 400, | ||
224 | .rc_key_map = vp7045_rc_keys, | ||
225 | .rc_key_map_size = ARRAY_SIZE(vp7045_rc_keys), | ||
226 | .rc_query = vp7045_rc_query, | ||
227 | |||
228 | /* parameter for the MPEG2-data transfer */ | 221 | /* parameter for the MPEG2-data transfer */ |
229 | .urb = { | 222 | .stream = { |
230 | .type = DVB_USB_BULK, | 223 | .type = USB_BULK, |
231 | .count = 7, | 224 | .count = 7, |
232 | .endpoint = 0x02, | 225 | .endpoint = 0x02, |
233 | .u = { | 226 | .u = { |
@@ -236,6 +229,15 @@ static struct dvb_usb_properties vp7045_properties = { | |||
236 | } | 229 | } |
237 | } | 230 | } |
238 | }, | 231 | }, |
232 | } | ||
233 | }, | ||
234 | .power_ctrl = vp7045_power_ctrl, | ||
235 | .read_mac_address = vp7045_read_mac_addr, | ||
236 | |||
237 | .rc_interval = 400, | ||
238 | .rc_key_map = vp7045_rc_keys, | ||
239 | .rc_key_map_size = ARRAY_SIZE(vp7045_rc_keys), | ||
240 | .rc_query = vp7045_rc_query, | ||
239 | 241 | ||
240 | .num_device_descs = 2, | 242 | .num_device_descs = 2, |
241 | .devices = { | 243 | .devices = { |