Lines 57-65
MODULE_PARM_DESC(latency,"pci latency ti
Link Here
|
57 |
/* ------------------------------------------------------------------ */ |
57 |
/* ------------------------------------------------------------------ */ |
58 |
/* board config info */ |
58 |
/* board config info */ |
59 |
|
59 |
|
60 |
/* If radio_type !=UNSET, radio_addr should be specified |
|
|
61 |
*/ |
62 |
|
63 |
static const struct cx88_board cx88_boards[] = { |
60 |
static const struct cx88_board cx88_boards[] = { |
64 |
[CX88_BOARD_UNKNOWN] = { |
61 |
[CX88_BOARD_UNKNOWN] = { |
65 |
.name = "UNKNOWN/GENERIC", |
62 |
.name = "UNKNOWN/GENERIC", |
Lines 2456-2486
EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
Link Here
|
2456 |
static void cx88_card_setup(struct cx88_core *core) |
2453 |
static void cx88_card_setup(struct cx88_core *core) |
2457 |
{ |
2454 |
{ |
2458 |
static u8 eeprom[256]; |
2455 |
static u8 eeprom[256]; |
2459 |
struct tuner_setup tun_setup; |
|
|
2460 |
unsigned int mode_mask = T_RADIO | |
2461 |
T_ANALOG_TV | |
2462 |
T_DIGITAL_TV; |
2463 |
|
2464 |
memset(&tun_setup, 0, sizeof(tun_setup)); |
2465 |
|
2456 |
|
2466 |
if (0 == core->i2c_rc) { |
2457 |
if (0 == core->i2c_rc) { |
2467 |
core->i2c_client.addr = 0xa0 >> 1; |
2458 |
core->i2c_client.addr = 0xa0 >> 1; |
2468 |
tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom)); |
2459 |
tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom)); |
2469 |
} |
2460 |
} |
2470 |
|
2461 |
|
2471 |
switch (core->boardnr) { |
2462 |
switch (core->boardnr) { |
2472 |
case CX88_BOARD_HAUPPAUGE: |
2463 |
case CX88_BOARD_HAUPPAUGE: |
2473 |
case CX88_BOARD_HAUPPAUGE_ROSLYN: |
2464 |
case CX88_BOARD_HAUPPAUGE_ROSLYN: |
2474 |
if (0 == core->i2c_rc) |
2465 |
if (0 == core->i2c_rc) |
2475 |
hauppauge_eeprom(core, eeprom+8); |
2466 |
hauppauge_eeprom(core,eeprom+8); |
2476 |
break; |
2467 |
break; |
2477 |
case CX88_BOARD_GDI: |
2468 |
case CX88_BOARD_GDI: |
2478 |
if (0 == core->i2c_rc) |
2469 |
if (0 == core->i2c_rc) |
2479 |
gdi_eeprom(core, eeprom); |
2470 |
gdi_eeprom(core,eeprom); |
2480 |
break; |
2471 |
break; |
2481 |
case CX88_BOARD_WINFAST2000XP_EXPERT: |
2472 |
case CX88_BOARD_WINFAST2000XP_EXPERT: |
2482 |
if (0 == core->i2c_rc) |
2473 |
if (0 == core->i2c_rc) |
2483 |
leadtek_eeprom(core, eeprom); |
2474 |
leadtek_eeprom(core,eeprom); |
2484 |
break; |
2475 |
break; |
2485 |
case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: |
2476 |
case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: |
2486 |
case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: |
2477 |
case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: |
Lines 2490-2496
static void cx88_card_setup(struct cx88_
Link Here
|
2490 |
case CX88_BOARD_HAUPPAUGE_HVR3000: |
2481 |
case CX88_BOARD_HAUPPAUGE_HVR3000: |
2491 |
case CX88_BOARD_HAUPPAUGE_HVR1300: |
2482 |
case CX88_BOARD_HAUPPAUGE_HVR1300: |
2492 |
if (0 == core->i2c_rc) |
2483 |
if (0 == core->i2c_rc) |
2493 |
hauppauge_eeprom(core, eeprom); |
2484 |
hauppauge_eeprom(core,eeprom); |
2494 |
break; |
2485 |
break; |
2495 |
case CX88_BOARD_KWORLD_DVBS_100: |
2486 |
case CX88_BOARD_KWORLD_DVBS_100: |
2496 |
cx_write(MO_GP0_IO, 0x000007f8); |
2487 |
cx_write(MO_GP0_IO, 0x000007f8); |
Lines 2571-2605
static void cx88_card_setup(struct cx88_
Link Here
|
2571 |
|
2562 |
|
2572 |
cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg); |
2563 |
cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg); |
2573 |
} |
2564 |
} |
2574 |
} /*end switch() */ |
|
|
2575 |
|
2576 |
|
2577 |
/* Setup tuners */ |
2578 |
if ((core->board.radio_type != UNSET)) { |
2579 |
tun_setup.mode_mask = T_RADIO; |
2580 |
tun_setup.type = core->board.radio_type; |
2581 |
tun_setup.addr = core->board.radio_addr; |
2582 |
tun_setup.tuner_callback = cx88_tuner_callback; |
2583 |
cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup); |
2584 |
mode_mask &= ~T_RADIO; |
2585 |
} |
2586 |
|
2587 |
if (core->board.tuner_type != TUNER_ABSENT) { |
2588 |
tun_setup.mode_mask = mode_mask; |
2589 |
tun_setup.type = core->board.tuner_type; |
2590 |
tun_setup.addr = core->board.tuner_addr; |
2591 |
tun_setup.tuner_callback = cx88_tuner_callback; |
2592 |
|
2593 |
cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup); |
2594 |
} |
2595 |
|
2596 |
if (core->board.tda9887_conf) { |
2597 |
struct v4l2_priv_tun_config tda9887_cfg; |
2598 |
|
2599 |
tda9887_cfg.tuner = TUNER_TDA9887; |
2600 |
tda9887_cfg.priv = &core->board.tda9887_conf; |
2601 |
|
2602 |
cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tda9887_cfg); |
2603 |
} |
2565 |
} |
2604 |
|
2566 |
|
2605 |
if (core->board.tuner_type == TUNER_XC2028) { |
2567 |
if (core->board.tuner_type == TUNER_XC2028) { |
Lines 2617-2623
static void cx88_card_setup(struct cx88_
Link Here
|
2617 |
ctl.fname); |
2579 |
ctl.fname); |
2618 |
cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg); |
2580 |
cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg); |
2619 |
} |
2581 |
} |
2620 |
cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL); |
|
|
2621 |
} |
2582 |
} |
2622 |
|
2583 |
|
2623 |
/* ------------------------------------------------------------------ */ |
2584 |
/* ------------------------------------------------------------------ */ |
Lines 2756-2761
struct cx88_core *cx88_core_create(struc
Link Here
|
2756 |
if (TUNER_ABSENT != core->board.tuner_type) |
2717 |
if (TUNER_ABSENT != core->board.tuner_type) |
2757 |
request_module("tuner"); |
2718 |
request_module("tuner"); |
2758 |
|
2719 |
|
|
|
2720 |
cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL); |
2759 |
cx88_card_setup(core); |
2721 |
cx88_card_setup(core); |
2760 |
cx88_ir_init(core, pci); |
2722 |
cx88_ir_init(core, pci); |
2761 |
|
2723 |
|