diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/au0828/au0828-cards.c | 2 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-dvb.c | 3 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828.h | 3 | ||||
-rw-r--r-- | drivers/media/video/cx18/cx18-gpio.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx18/cx18-gpio.h | 2 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 12 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885.h | 2 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 24 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 40 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 2 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 2 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 3 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-gpio.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-gpio.h | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 7 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 2 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 10 |
20 files changed, 47 insertions, 79 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c index ed48908a9034..5f07a8a072b6 100644 --- a/drivers/media/video/au0828/au0828-cards.c +++ b/drivers/media/video/au0828/au0828-cards.c | |||
@@ -46,7 +46,7 @@ struct au0828_board au0828_boards[] = { | |||
46 | /* Tuner callback function for au0828 boards. Currently only needed | 46 | /* Tuner callback function for au0828 boards. Currently only needed |
47 | * for HVR1500Q, which has an xc5000 tuner. | 47 | * for HVR1500Q, which has an xc5000 tuner. |
48 | */ | 48 | */ |
49 | int au0828_tuner_callback(void *priv, int command, int arg) | 49 | int au0828_tuner_callback(void *priv, int component, int command, int arg) |
50 | { | 50 | { |
51 | struct au0828_dev *dev = priv; | 51 | struct au0828_dev *dev = priv; |
52 | 52 | ||
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index 96246959dce1..a52abce16e1a 100644 --- a/drivers/media/video/au0828/au0828-dvb.c +++ b/drivers/media/video/au0828/au0828-dvb.c | |||
@@ -53,7 +53,6 @@ static struct au8522_config hauppauge_woodbury_config = { | |||
53 | static struct xc5000_config hauppauge_hvr950q_tunerconfig = { | 53 | static struct xc5000_config hauppauge_hvr950q_tunerconfig = { |
54 | .i2c_address = 0x61, | 54 | .i2c_address = 0x61, |
55 | .if_khz = 6000, | 55 | .if_khz = 6000, |
56 | .tuner_callback = au0828_tuner_callback | ||
57 | }; | 56 | }; |
58 | 57 | ||
59 | static struct mxl5007t_config mxl5007t_hvr950q_config = { | 58 | static struct mxl5007t_config mxl5007t_hvr950q_config = { |
@@ -389,6 +388,8 @@ int au0828_dvb_register(struct au0828_dev *dev) | |||
389 | __func__); | 388 | __func__); |
390 | return -1; | 389 | return -1; |
391 | } | 390 | } |
391 | /* define general-purpose callback pointer */ | ||
392 | dvb->frontend->callback = au0828_tuner_callback; | ||
392 | 393 | ||
393 | /* register everything */ | 394 | /* register everything */ |
394 | ret = dvb_register(dev); | 395 | ret = dvb_register(dev); |
diff --git a/drivers/media/video/au0828/au0828.h b/drivers/media/video/au0828/au0828.h index 4f10ff300135..9d6a1161dc98 100644 --- a/drivers/media/video/au0828/au0828.h +++ b/drivers/media/video/au0828/au0828.h | |||
@@ -103,7 +103,8 @@ extern int au0828_debug; | |||
103 | extern struct au0828_board au0828_boards[]; | 103 | extern struct au0828_board au0828_boards[]; |
104 | extern struct usb_device_id au0828_usb_id_table[]; | 104 | extern struct usb_device_id au0828_usb_id_table[]; |
105 | extern void au0828_gpio_setup(struct au0828_dev *dev); | 105 | extern void au0828_gpio_setup(struct au0828_dev *dev); |
106 | extern int au0828_tuner_callback(void *priv, int command, int arg); | 106 | extern int au0828_tuner_callback(void *priv, int component, |
107 | int command, int arg); | ||
107 | extern void au0828_card_setup(struct au0828_dev *dev); | 108 | extern void au0828_card_setup(struct au0828_dev *dev); |
108 | 109 | ||
109 | /* ----------------------------------------------------------- */ | 110 | /* ----------------------------------------------------------- */ |
diff --git a/drivers/media/video/cx18/cx18-gpio.c b/drivers/media/video/cx18/cx18-gpio.c index 3bdffbf7a96d..0e560421989e 100644 --- a/drivers/media/video/cx18/cx18-gpio.c +++ b/drivers/media/video/cx18/cx18-gpio.c | |||
@@ -152,7 +152,7 @@ void cx18_gpio_init(struct cx18 *cx) | |||
152 | } | 152 | } |
153 | 153 | ||
154 | /* Xceive tuner reset function */ | 154 | /* Xceive tuner reset function */ |
155 | int cx18_reset_tuner_gpio(void *dev, int cmd, int value) | 155 | int cx18_reset_tuner_gpio(void *dev, int component, int cmd, int value) |
156 | { | 156 | { |
157 | struct i2c_algo_bit_data *algo = dev; | 157 | struct i2c_algo_bit_data *algo = dev; |
158 | struct cx18_i2c_algo_callback_data *cb_data = algo->data; | 158 | struct cx18_i2c_algo_callback_data *cb_data = algo->data; |
diff --git a/drivers/media/video/cx18/cx18-gpio.h b/drivers/media/video/cx18/cx18-gpio.h index 22cd7ddf8554..beb7424b9944 100644 --- a/drivers/media/video/cx18/cx18-gpio.h +++ b/drivers/media/video/cx18/cx18-gpio.h | |||
@@ -23,5 +23,5 @@ | |||
23 | void cx18_gpio_init(struct cx18 *cx); | 23 | void cx18_gpio_init(struct cx18 *cx); |
24 | void cx18_reset_i2c_slaves_gpio(struct cx18 *cx); | 24 | void cx18_reset_i2c_slaves_gpio(struct cx18 *cx); |
25 | void cx18_reset_ir_gpio(void *data); | 25 | void cx18_reset_ir_gpio(void *data); |
26 | int cx18_reset_tuner_gpio(void *dev, int cmd, int value); | 26 | int cx18_reset_tuner_gpio(void *dev, int component, int cmd, int value); |
27 | int cx18_gpio(struct cx18 *cx, unsigned int command, void *arg); | 27 | int cx18_gpio(struct cx18 *cx, unsigned int command, void *arg); |
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index ccea8de7c7dc..2cda15f829fd 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -337,7 +337,7 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
337 | dev->name, tv.model); | 337 | dev->name, tv.model); |
338 | } | 338 | } |
339 | 339 | ||
340 | int cx23885_tuner_callback(void *priv, int command, int arg) | 340 | int cx23885_tuner_callback(void *priv, int component, int command, int arg) |
341 | { | 341 | { |
342 | struct cx23885_tsport *port = priv; | 342 | struct cx23885_tsport *port = priv; |
343 | struct cx23885_dev *dev = port->dev; | 343 | struct cx23885_dev *dev = port->dev; |
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index 3b54f1391803..6c5475d7d321 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -189,13 +189,11 @@ static struct s5h1411_config dvico_s5h1411_config = { | |||
189 | static struct xc5000_config hauppauge_hvr1500q_tunerconfig = { | 189 | static struct xc5000_config hauppauge_hvr1500q_tunerconfig = { |
190 | .i2c_address = 0x61, | 190 | .i2c_address = 0x61, |
191 | .if_khz = 5380, | 191 | .if_khz = 5380, |
192 | .tuner_callback = cx23885_tuner_callback, | ||
193 | }; | 192 | }; |
194 | 193 | ||
195 | static struct xc5000_config dvico_xc5000_tunerconfig = { | 194 | static struct xc5000_config dvico_xc5000_tunerconfig = { |
196 | .i2c_address = 0x64, | 195 | .i2c_address = 0x64, |
197 | .if_khz = 5380, | 196 | .if_khz = 5380, |
198 | .tuner_callback = cx23885_tuner_callback, | ||
199 | }; | 197 | }; |
200 | 198 | ||
201 | static struct tda829x_config tda829x_no_probe = { | 199 | static struct tda829x_config tda829x_no_probe = { |
@@ -403,8 +401,6 @@ static int dvb_register(struct cx23885_tsport *port) | |||
403 | struct xc2028_config cfg = { | 401 | struct xc2028_config cfg = { |
404 | .i2c_adap = &i2c_bus->i2c_adap, | 402 | .i2c_adap = &i2c_bus->i2c_adap, |
405 | .i2c_addr = 0x61, | 403 | .i2c_addr = 0x61, |
406 | .video_dev = port, | ||
407 | .callback = cx23885_tuner_callback, | ||
408 | }; | 404 | }; |
409 | static struct xc2028_ctrl ctl = { | 405 | static struct xc2028_ctrl ctl = { |
410 | .fname = XC2028_DEFAULT_FIRMWARE, | 406 | .fname = XC2028_DEFAULT_FIRMWARE, |
@@ -443,8 +439,6 @@ static int dvb_register(struct cx23885_tsport *port) | |||
443 | struct xc2028_config cfg = { | 439 | struct xc2028_config cfg = { |
444 | .i2c_adap = &dev->i2c_bus[1].i2c_adap, | 440 | .i2c_adap = &dev->i2c_bus[1].i2c_adap, |
445 | .i2c_addr = 0x64, | 441 | .i2c_addr = 0x64, |
446 | .video_dev = port, | ||
447 | .callback = cx23885_tuner_callback, | ||
448 | }; | 442 | }; |
449 | static struct xc2028_ctrl ctl = { | 443 | static struct xc2028_ctrl ctl = { |
450 | .fname = XC3028L_DEFAULT_FIRMWARE, | 444 | .fname = XC3028L_DEFAULT_FIRMWARE, |
@@ -485,8 +479,6 @@ static int dvb_register(struct cx23885_tsport *port) | |||
485 | struct xc2028_config cfg = { | 479 | struct xc2028_config cfg = { |
486 | .i2c_adap = &i2c_bus->i2c_adap, | 480 | .i2c_adap = &i2c_bus->i2c_adap, |
487 | .i2c_addr = 0x61, | 481 | .i2c_addr = 0x61, |
488 | .video_dev = port, | ||
489 | .callback = cx23885_tuner_callback, | ||
490 | }; | 482 | }; |
491 | static struct xc2028_ctrl ctl = { | 483 | static struct xc2028_ctrl ctl = { |
492 | .fname = XC2028_DEFAULT_FIRMWARE, | 484 | .fname = XC2028_DEFAULT_FIRMWARE, |
@@ -512,8 +504,6 @@ static int dvb_register(struct cx23885_tsport *port) | |||
512 | struct xc2028_config cfg = { | 504 | struct xc2028_config cfg = { |
513 | .i2c_adap = &dev->i2c_bus[1].i2c_adap, | 505 | .i2c_adap = &dev->i2c_bus[1].i2c_adap, |
514 | .i2c_addr = 0x61, | 506 | .i2c_addr = 0x61, |
515 | .video_dev = port, | ||
516 | .callback = cx23885_tuner_callback, | ||
517 | }; | 507 | }; |
518 | static struct xc2028_ctrl ctl = { | 508 | static struct xc2028_ctrl ctl = { |
519 | .fname = XC2028_DEFAULT_FIRMWARE, | 509 | .fname = XC2028_DEFAULT_FIRMWARE, |
@@ -536,6 +526,8 @@ static int dvb_register(struct cx23885_tsport *port) | |||
536 | printk("%s: frontend initialization failed\n", dev->name); | 526 | printk("%s: frontend initialization failed\n", dev->name); |
537 | return -1; | 527 | return -1; |
538 | } | 528 | } |
529 | /* define general-purpose callback pointer */ | ||
530 | port->dvb.frontend->callback = cx23885_tuner_callback; | ||
539 | 531 | ||
540 | /* Put the analog decoder in standby to keep it quiet */ | 532 | /* Put the analog decoder in standby to keep it quiet */ |
541 | cx23885_call_i2c_clients(i2c_bus, TUNER_SET_STANDBY, NULL); | 533 | cx23885_call_i2c_clients(i2c_bus, TUNER_SET_STANDBY, NULL); |
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 4e0fcb3f7fcb..ba4e0aaed463 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
@@ -411,7 +411,7 @@ extern const unsigned int cx23885_bcount; | |||
411 | extern struct cx23885_subid cx23885_subids[]; | 411 | extern struct cx23885_subid cx23885_subids[]; |
412 | extern const unsigned int cx23885_idcount; | 412 | extern const unsigned int cx23885_idcount; |
413 | 413 | ||
414 | extern int cx23885_tuner_callback(void *priv, int command, int arg); | 414 | extern int cx23885_tuner_callback(void *priv, int component, int command, int arg); |
415 | extern void cx23885_card_list(struct cx23885_dev *dev); | 415 | extern void cx23885_card_list(struct cx23885_dev *dev); |
416 | extern int cx23885_ir_init(struct cx23885_dev *dev); | 416 | extern int cx23885_ir_init(struct cx23885_dev *dev); |
417 | extern void cx23885_gpio_setup(struct cx23885_dev *dev); | 417 | extern void cx23885_gpio_setup(struct cx23885_dev *dev); |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 16bb9c35fc76..b5a25094c9e5 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -2308,9 +2308,21 @@ static int cx88_dvico_xc2028_callback(struct cx88_core *core, | |||
2308 | { | 2308 | { |
2309 | switch (command) { | 2309 | switch (command) { |
2310 | case XC2028_TUNER_RESET: | 2310 | case XC2028_TUNER_RESET: |
2311 | cx_write(MO_GP0_IO, 0x101000); | 2311 | switch (core->boardnr) { |
2312 | mdelay(5); | 2312 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: |
2313 | cx_set(MO_GP0_IO, 0x101010); | 2313 | /* GPIO-4 xc3028 tuner */ |
2314 | |||
2315 | cx_set(MO_GP0_IO, 0x00001000); | ||
2316 | cx_clear(MO_GP0_IO, 0x00000010); | ||
2317 | msleep(100); | ||
2318 | cx_set(MO_GP0_IO, 0x00000010); | ||
2319 | msleep(100); | ||
2320 | break; | ||
2321 | default: | ||
2322 | cx_write(MO_GP0_IO, 0x101000); | ||
2323 | mdelay(5); | ||
2324 | cx_set(MO_GP0_IO, 0x101010); | ||
2325 | } | ||
2314 | break; | 2326 | break; |
2315 | default: | 2327 | default: |
2316 | return -EINVAL; | 2328 | return -EINVAL; |
@@ -2419,6 +2431,7 @@ static int cx88_xc2028_tuner_callback(struct cx88_core *core, | |||
2419 | case CX88_BOARD_PROLINK_PV_8000GT: | 2431 | case CX88_BOARD_PROLINK_PV_8000GT: |
2420 | return cx88_pv_8000gt_callback(core, command, arg); | 2432 | return cx88_pv_8000gt_callback(core, command, arg); |
2421 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: | 2433 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: |
2434 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: | ||
2422 | return cx88_dvico_xc2028_callback(core, command, arg); | 2435 | return cx88_dvico_xc2028_callback(core, command, arg); |
2423 | } | 2436 | } |
2424 | 2437 | ||
@@ -2486,7 +2499,7 @@ static int cx88_xc5000_tuner_callback(struct cx88_core *core, | |||
2486 | return 0; /* Should never be here */ | 2499 | return 0; /* Should never be here */ |
2487 | } | 2500 | } |
2488 | 2501 | ||
2489 | int cx88_tuner_callback(void *priv, int command, int arg) | 2502 | int cx88_tuner_callback(void *priv, int component, int command, int arg) |
2490 | { | 2503 | { |
2491 | struct i2c_algo_bit_data *i2c_algo = priv; | 2504 | struct i2c_algo_bit_data *i2c_algo = priv; |
2492 | struct cx88_core *core; | 2505 | struct cx88_core *core; |
@@ -2503,6 +2516,9 @@ int cx88_tuner_callback(void *priv, int command, int arg) | |||
2503 | return -EINVAL; | 2516 | return -EINVAL; |
2504 | } | 2517 | } |
2505 | 2518 | ||
2519 | if (component != DVB_FRONTEND_COMPONENT_TUNER) | ||
2520 | return -EINVAL; | ||
2521 | |||
2506 | switch (core->board.tuner_type) { | 2522 | switch (core->board.tuner_type) { |
2507 | case TUNER_XC2028: | 2523 | case TUNER_XC2028: |
2508 | info_printk(core, "Calling XC2028/3028 callback\n"); | 2524 | info_printk(core, "Calling XC2028/3028 callback\n"); |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index cd368b512d1f..6751f36e061e 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -405,40 +405,6 @@ static int tevii_dvbs_set_voltage(struct dvb_frontend *fe, | |||
405 | return 0; | 405 | return 0; |
406 | } | 406 | } |
407 | 407 | ||
408 | static int cx88_pci_nano_callback(void *ptr, int command, int arg) | ||
409 | { | ||
410 | struct cx88_core *core = ptr; | ||
411 | |||
412 | switch (command) { | ||
413 | case XC2028_TUNER_RESET: | ||
414 | /* Send the tuner in then out of reset */ | ||
415 | dprintk(1, "%s: XC2028_TUNER_RESET %d\n", __func__, arg); | ||
416 | |||
417 | switch (core->boardnr) { | ||
418 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: | ||
419 | /* GPIO-4 xc3028 tuner */ | ||
420 | |||
421 | cx_set(MO_GP0_IO, 0x00001000); | ||
422 | cx_clear(MO_GP0_IO, 0x00000010); | ||
423 | msleep(100); | ||
424 | cx_set(MO_GP0_IO, 0x00000010); | ||
425 | msleep(100); | ||
426 | break; | ||
427 | } | ||
428 | |||
429 | break; | ||
430 | case XC2028_RESET_CLK: | ||
431 | dprintk(1, "%s: XC2028_RESET_CLK %d\n", __func__, arg); | ||
432 | break; | ||
433 | default: | ||
434 | dprintk(1, "%s: unknown command %d, arg %d\n", __func__, | ||
435 | command, arg); | ||
436 | return -EINVAL; | ||
437 | } | ||
438 | |||
439 | return 0; | ||
440 | } | ||
441 | |||
442 | static struct cx24123_config geniatech_dvbs_config = { | 408 | static struct cx24123_config geniatech_dvbs_config = { |
443 | .demod_address = 0x55, | 409 | .demod_address = 0x55, |
444 | .set_ts_params = cx24123_set_ts_param, | 410 | .set_ts_params = cx24123_set_ts_param, |
@@ -486,7 +452,6 @@ static struct s5h1409_config kworld_atsc_120_config = { | |||
486 | static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = { | 452 | static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = { |
487 | .i2c_address = 0x64, | 453 | .i2c_address = 0x64, |
488 | .if_khz = 5380, | 454 | .if_khz = 5380, |
489 | .tuner_callback = cx88_tuner_callback, | ||
490 | }; | 455 | }; |
491 | 456 | ||
492 | static struct zl10353_config cx88_geniatech_x8000_mt = { | 457 | static struct zl10353_config cx88_geniatech_x8000_mt = { |
@@ -507,7 +472,6 @@ static struct s5h1411_config dvico_fusionhdtv7_config = { | |||
507 | static struct xc5000_config dvico_fusionhdtv7_tuner_config = { | 472 | static struct xc5000_config dvico_fusionhdtv7_tuner_config = { |
508 | .i2c_address = 0xc2 >> 1, | 473 | .i2c_address = 0xc2 >> 1, |
509 | .if_khz = 5380, | 474 | .if_khz = 5380, |
510 | .tuner_callback = cx88_tuner_callback, | ||
511 | }; | 475 | }; |
512 | 476 | ||
513 | static int attach_xc3028(u8 addr, struct cx8802_dev *dev) | 477 | static int attach_xc3028(u8 addr, struct cx8802_dev *dev) |
@@ -518,7 +482,6 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev) | |||
518 | .i2c_adap = &dev->core->i2c_adap, | 482 | .i2c_adap = &dev->core->i2c_adap, |
519 | .i2c_addr = addr, | 483 | .i2c_addr = addr, |
520 | .ctrl = &ctl, | 484 | .ctrl = &ctl, |
521 | .callback = cx88_tuner_callback, | ||
522 | }; | 485 | }; |
523 | 486 | ||
524 | if (!dev->dvb.frontend) { | 487 | if (!dev->dvb.frontend) { |
@@ -912,7 +875,6 @@ static int dvb_register(struct cx8802_dev *dev) | |||
912 | struct xc2028_config cfg = { | 875 | struct xc2028_config cfg = { |
913 | .i2c_adap = &core->i2c_adap, | 876 | .i2c_adap = &core->i2c_adap, |
914 | .i2c_addr = 0x61, | 877 | .i2c_addr = 0x61, |
915 | .callback = cx88_pci_nano_callback, | ||
916 | }; | 878 | }; |
917 | static struct xc2028_ctrl ctl = { | 879 | static struct xc2028_ctrl ctl = { |
918 | .fname = XC2028_DEFAULT_FIRMWARE, | 880 | .fname = XC2028_DEFAULT_FIRMWARE, |
@@ -1035,6 +997,8 @@ static int dvb_register(struct cx8802_dev *dev) | |||
1035 | core->name); | 997 | core->name); |
1036 | return -EINVAL; | 998 | return -EINVAL; |
1037 | } | 999 | } |
1000 | /* define general-purpose callback pointer */ | ||
1001 | dev->dvb.frontend->callback = cx88_tuner_callback; | ||
1038 | 1002 | ||
1039 | /* Ensure all frontends negotiate bus access */ | 1003 | /* Ensure all frontends negotiate bus access */ |
1040 | dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; | 1004 | dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index e17bd513b584..30b750ee8564 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -607,7 +607,7 @@ extern void cx88_call_i2c_clients(struct cx88_core *core, | |||
607 | /* ----------------------------------------------------------- */ | 607 | /* ----------------------------------------------------------- */ |
608 | /* cx88-cards.c */ | 608 | /* cx88-cards.c */ |
609 | 609 | ||
610 | extern int cx88_tuner_callback(void *dev, int command, int arg); | 610 | extern int cx88_tuner_callback(void *dev, int component, int command, int arg); |
611 | extern int cx88_get_resources(const struct cx88_core *core, | 611 | extern int cx88_get_resources(const struct cx88_core *core, |
612 | struct pci_dev *pci); | 612 | struct pci_dev *pci); |
613 | extern struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr); | 613 | extern struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr); |
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 01804fac6aa6..d65d0572403b 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -1271,7 +1271,7 @@ static struct em28xx_hash_table em28xx_i2c_hash[] = { | |||
1271 | {0x1ba50080, EM2860_BOARD_POINTNIX_INTRAORAL_CAMERA, TUNER_ABSENT}, | 1271 | {0x1ba50080, EM2860_BOARD_POINTNIX_INTRAORAL_CAMERA, TUNER_ABSENT}, |
1272 | }; | 1272 | }; |
1273 | 1273 | ||
1274 | int em28xx_tuner_callback(void *ptr, int command, int arg) | 1274 | int em28xx_tuner_callback(void *ptr, int component, int command, int arg) |
1275 | { | 1275 | { |
1276 | int rc = 0; | 1276 | int rc = 0; |
1277 | struct em28xx *dev = ptr; | 1277 | struct em28xx *dev = ptr; |
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index ea4f2a97bd2d..855ad3940b29 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -249,7 +249,6 @@ static int attach_xc3028(u8 addr, struct em28xx *dev) | |||
249 | memset(&cfg, 0, sizeof(cfg)); | 249 | memset(&cfg, 0, sizeof(cfg)); |
250 | cfg.i2c_adap = &dev->i2c_adap; | 250 | cfg.i2c_adap = &dev->i2c_adap; |
251 | cfg.i2c_addr = addr; | 251 | cfg.i2c_addr = addr; |
252 | cfg.callback = em28xx_tuner_callback; | ||
253 | 252 | ||
254 | if (!dev->dvb->frontend) { | 253 | if (!dev->dvb->frontend) { |
255 | printk(KERN_ERR "%s/2: dvb frontend not attached. " | 254 | printk(KERN_ERR "%s/2: dvb frontend not attached. " |
@@ -474,6 +473,8 @@ static int dvb_init(struct em28xx *dev) | |||
474 | result = -EINVAL; | 473 | result = -EINVAL; |
475 | goto out_free; | 474 | goto out_free; |
476 | } | 475 | } |
476 | /* define general-purpose callback pointer */ | ||
477 | dvb->frontend->callback = em28xx_tuner_callback; | ||
477 | 478 | ||
478 | /* register everything */ | 479 | /* register everything */ |
479 | result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); | 480 | result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index d992280613b2..82781178e0a3 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -528,7 +528,7 @@ extern struct em28xx_board em28xx_boards[]; | |||
528 | extern struct usb_device_id em28xx_id_table[]; | 528 | extern struct usb_device_id em28xx_id_table[]; |
529 | extern const unsigned int em28xx_bcount; | 529 | extern const unsigned int em28xx_bcount; |
530 | void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir); | 530 | void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir); |
531 | int em28xx_tuner_callback(void *ptr, int command, int arg); | 531 | int em28xx_tuner_callback(void *ptr, int component, int command, int arg); |
532 | 532 | ||
533 | /* Provided by em28xx-input.c */ | 533 | /* Provided by em28xx-input.c */ |
534 | /* TODO: Check if the standard get_key handlers on ir-common can be used */ | 534 | /* TODO: Check if the standard get_key handlers on ir-common can be used */ |
diff --git a/drivers/media/video/ivtv/ivtv-gpio.c b/drivers/media/video/ivtv/ivtv-gpio.c index bc22905ea20f..74a44844ccaf 100644 --- a/drivers/media/video/ivtv/ivtv-gpio.c +++ b/drivers/media/video/ivtv/ivtv-gpio.c | |||
@@ -124,7 +124,7 @@ void ivtv_reset_ir_gpio(struct ivtv *itv) | |||
124 | } | 124 | } |
125 | 125 | ||
126 | /* Xceive tuner reset function */ | 126 | /* Xceive tuner reset function */ |
127 | int ivtv_reset_tuner_gpio(void *dev, int cmd, int value) | 127 | int ivtv_reset_tuner_gpio(void *dev, int component, int cmd, int value) |
128 | { | 128 | { |
129 | struct i2c_algo_bit_data *algo = dev; | 129 | struct i2c_algo_bit_data *algo = dev; |
130 | struct ivtv *itv = algo->data; | 130 | struct ivtv *itv = algo->data; |
diff --git a/drivers/media/video/ivtv/ivtv-gpio.h b/drivers/media/video/ivtv/ivtv-gpio.h index 964a265d91a9..48b6291613a2 100644 --- a/drivers/media/video/ivtv/ivtv-gpio.h +++ b/drivers/media/video/ivtv/ivtv-gpio.h | |||
@@ -24,7 +24,7 @@ | |||
24 | /* GPIO stuff */ | 24 | /* GPIO stuff */ |
25 | void ivtv_gpio_init(struct ivtv *itv); | 25 | void ivtv_gpio_init(struct ivtv *itv); |
26 | void ivtv_reset_ir_gpio(struct ivtv *itv); | 26 | void ivtv_reset_ir_gpio(struct ivtv *itv); |
27 | int ivtv_reset_tuner_gpio(void *dev, int cmd, int value); | 27 | int ivtv_reset_tuner_gpio(void *dev, int component, int cmd, int value); |
28 | int ivtv_gpio(struct ivtv *itv, unsigned int command, void *arg); | 28 | int ivtv_gpio(struct ivtv *itv, unsigned int command, void *arg); |
29 | 29 | ||
30 | #endif | 30 | #endif |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 3c2f09fb0446..622d3ba5a1ec 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -5576,7 +5576,7 @@ static int saa7134_tda8290_callback(struct saa7134_dev *dev, | |||
5576 | return 0; | 5576 | return 0; |
5577 | } | 5577 | } |
5578 | 5578 | ||
5579 | int saa7134_tuner_callback(void *priv, int command, int arg) | 5579 | int saa7134_tuner_callback(void *priv, int component, int command, int arg) |
5580 | { | 5580 | { |
5581 | struct saa7134_dev *dev = priv; | 5581 | struct saa7134_dev *dev = priv; |
5582 | if (dev != NULL) { | 5582 | if (dev != NULL) { |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 7fa6ce76642b..0dd6b988820f 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -553,7 +553,6 @@ static int configure_tda827x_fe(struct saa7134_dev *dev, | |||
553 | /* ------------------------------------------------------------------ */ | 553 | /* ------------------------------------------------------------------ */ |
554 | 554 | ||
555 | static struct tda827x_config tda827x_cfg_0 = { | 555 | static struct tda827x_config tda827x_cfg_0 = { |
556 | .tuner_callback = saa7134_tuner_callback, | ||
557 | .init = philips_tda827x_tuner_init, | 556 | .init = philips_tda827x_tuner_init, |
558 | .sleep = philips_tda827x_tuner_sleep, | 557 | .sleep = philips_tda827x_tuner_sleep, |
559 | .config = 0, | 558 | .config = 0, |
@@ -561,7 +560,6 @@ static struct tda827x_config tda827x_cfg_0 = { | |||
561 | }; | 560 | }; |
562 | 561 | ||
563 | static struct tda827x_config tda827x_cfg_1 = { | 562 | static struct tda827x_config tda827x_cfg_1 = { |
564 | .tuner_callback = saa7134_tuner_callback, | ||
565 | .init = philips_tda827x_tuner_init, | 563 | .init = philips_tda827x_tuner_init, |
566 | .sleep = philips_tda827x_tuner_sleep, | 564 | .sleep = philips_tda827x_tuner_sleep, |
567 | .config = 1, | 565 | .config = 1, |
@@ -569,7 +567,6 @@ static struct tda827x_config tda827x_cfg_1 = { | |||
569 | }; | 567 | }; |
570 | 568 | ||
571 | static struct tda827x_config tda827x_cfg_2 = { | 569 | static struct tda827x_config tda827x_cfg_2 = { |
572 | .tuner_callback = saa7134_tuner_callback, | ||
573 | .init = philips_tda827x_tuner_init, | 570 | .init = philips_tda827x_tuner_init, |
574 | .sleep = philips_tda827x_tuner_sleep, | 571 | .sleep = philips_tda827x_tuner_sleep, |
575 | .config = 2, | 572 | .config = 2, |
@@ -577,7 +574,6 @@ static struct tda827x_config tda827x_cfg_2 = { | |||
577 | }; | 574 | }; |
578 | 575 | ||
579 | static struct tda827x_config tda827x_cfg_2_sw42 = { | 576 | static struct tda827x_config tda827x_cfg_2_sw42 = { |
580 | .tuner_callback = saa7134_tuner_callback, | ||
581 | .init = philips_tda827x_tuner_init, | 577 | .init = philips_tda827x_tuner_init, |
582 | .sleep = philips_tda827x_tuner_sleep, | 578 | .sleep = philips_tda827x_tuner_sleep, |
583 | .config = 2, | 579 | .config = 2, |
@@ -836,7 +832,6 @@ static int ads_duo_tuner_sleep(struct dvb_frontend *fe) | |||
836 | } | 832 | } |
837 | 833 | ||
838 | static struct tda827x_config ads_duo_cfg = { | 834 | static struct tda827x_config ads_duo_cfg = { |
839 | .tuner_callback = saa7134_tuner_callback, | ||
840 | .init = ads_duo_tuner_init, | 835 | .init = ads_duo_tuner_init, |
841 | .sleep = ads_duo_tuner_sleep, | 836 | .sleep = ads_duo_tuner_sleep, |
842 | .config = 0 | 837 | .config = 0 |
@@ -1366,6 +1361,8 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1366 | printk(KERN_ERR "%s/dvb: frontend initialization failed\n", dev->name); | 1361 | printk(KERN_ERR "%s/dvb: frontend initialization failed\n", dev->name); |
1367 | return -1; | 1362 | return -1; |
1368 | } | 1363 | } |
1364 | /* define general-purpose callback pointer */ | ||
1365 | dev->dvb.frontend->callback = saa7134_tuner_callback; | ||
1369 | 1366 | ||
1370 | /* register everything else */ | 1367 | /* register everything else */ |
1371 | ret = videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev, | 1368 | ret = videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev, |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index cbfdac27b69e..4005335c4f55 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -653,7 +653,7 @@ extern struct pci_device_id __devinitdata saa7134_pci_tbl[]; | |||
653 | 653 | ||
654 | extern int saa7134_board_init1(struct saa7134_dev *dev); | 654 | extern int saa7134_board_init1(struct saa7134_dev *dev); |
655 | extern int saa7134_board_init2(struct saa7134_dev *dev); | 655 | extern int saa7134_board_init2(struct saa7134_dev *dev); |
656 | int saa7134_tuner_callback(void *priv, int command, int arg); | 656 | int saa7134_tuner_callback(void *priv, int component, int command, int arg); |
657 | 657 | ||
658 | 658 | ||
659 | /* ----------------------------------------------------------- */ | 659 | /* ----------------------------------------------------------- */ |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 39c7b9b835a3..4a7735c6c1a6 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -92,7 +92,6 @@ struct tuner { | |||
92 | 92 | ||
93 | unsigned int type; /* chip type id */ | 93 | unsigned int type; /* chip type id */ |
94 | unsigned int config; | 94 | unsigned int config; |
95 | int (*tuner_callback) (void *dev, int command, int arg); | ||
96 | const char *name; | 95 | const char *name; |
97 | }; | 96 | }; |
98 | 97 | ||
@@ -346,7 +345,7 @@ static struct xc5000_config xc5000_cfg; | |||
346 | 345 | ||
347 | static void set_type(struct i2c_client *c, unsigned int type, | 346 | static void set_type(struct i2c_client *c, unsigned int type, |
348 | unsigned int new_mode_mask, unsigned int new_config, | 347 | unsigned int new_mode_mask, unsigned int new_config, |
349 | int (*tuner_callback) (void *dev, int command,int arg)) | 348 | int (*tuner_callback) (void *dev, int component, int cmd, int arg)) |
350 | { | 349 | { |
351 | struct tuner *t = i2c_get_clientdata(c); | 350 | struct tuner *t = i2c_get_clientdata(c); |
352 | struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; | 351 | struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; |
@@ -362,7 +361,7 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
362 | t->config = new_config; | 361 | t->config = new_config; |
363 | if (tuner_callback != NULL) { | 362 | if (tuner_callback != NULL) { |
364 | tuner_dbg("defining GPIO callback\n"); | 363 | tuner_dbg("defining GPIO callback\n"); |
365 | t->tuner_callback = tuner_callback; | 364 | t->fe.callback = tuner_callback; |
366 | } | 365 | } |
367 | 366 | ||
368 | if (t->mode == T_UNINITIALIZED) { | 367 | if (t->mode == T_UNINITIALIZED) { |
@@ -385,7 +384,6 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
385 | { | 384 | { |
386 | struct tda829x_config cfg = { | 385 | struct tda829x_config cfg = { |
387 | .lna_cfg = t->config, | 386 | .lna_cfg = t->config, |
388 | .tuner_callback = t->tuner_callback, | ||
389 | }; | 387 | }; |
390 | if (!dvb_attach(tda829x_attach, &t->fe, t->i2c->adapter, | 388 | if (!dvb_attach(tda829x_attach, &t->fe, t->i2c->adapter, |
391 | t->i2c->addr, &cfg)) | 389 | t->i2c->addr, &cfg)) |
@@ -433,7 +431,6 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
433 | struct xc2028_config cfg = { | 431 | struct xc2028_config cfg = { |
434 | .i2c_adap = t->i2c->adapter, | 432 | .i2c_adap = t->i2c->adapter, |
435 | .i2c_addr = t->i2c->addr, | 433 | .i2c_addr = t->i2c->addr, |
436 | .callback = t->tuner_callback, | ||
437 | }; | 434 | }; |
438 | if (!dvb_attach(xc2028_attach, &t->fe, &cfg)) | 435 | if (!dvb_attach(xc2028_attach, &t->fe, &cfg)) |
439 | goto attach_failed; | 436 | goto attach_failed; |
@@ -450,7 +447,6 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
450 | 447 | ||
451 | xc5000_cfg.i2c_address = t->i2c->addr; | 448 | xc5000_cfg.i2c_address = t->i2c->addr; |
452 | xc5000_cfg.if_khz = 5380; | 449 | xc5000_cfg.if_khz = 5380; |
453 | xc5000_cfg.tuner_callback = t->tuner_callback; | ||
454 | if (!dvb_attach(xc5000_attach, | 450 | if (!dvb_attach(xc5000_attach, |
455 | &t->fe, t->i2c->adapter, &xc5000_cfg)) | 451 | &t->fe, t->i2c->adapter, &xc5000_cfg)) |
456 | goto attach_failed; | 452 | goto attach_failed; |
@@ -1224,7 +1220,7 @@ register_client: | |||
1224 | } else { | 1220 | } else { |
1225 | t->mode = V4L2_TUNER_DIGITAL_TV; | 1221 | t->mode = V4L2_TUNER_DIGITAL_TV; |
1226 | } | 1222 | } |
1227 | set_type(client, t->type, t->mode_mask, t->config, t->tuner_callback); | 1223 | set_type(client, t->type, t->mode_mask, t->config, t->fe.callback); |
1228 | list_add_tail(&t->list, &tuner_list); | 1224 | list_add_tail(&t->list, &tuner_list); |
1229 | return 0; | 1225 | return 0; |
1230 | } | 1226 | } |