Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 250609
Collapse All | Expand All

(-)linux-2.6.26.8/drivers/media/video/cx88/cx88-cards.c (-44 / +6 lines)
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
(-)linux-2.6.26.8/drivers/media/video/cx88/cx88-i2c.c (+31 lines)
Lines 99-109 static int cx8800_bit_getsda(void *data) Link Here
99
99
100
static int attach_inform(struct i2c_client *client)
100
static int attach_inform(struct i2c_client *client)
101
{
101
{
102
	struct tuner_setup tun_setup;
102
	struct cx88_core *core = i2c_get_adapdata(client->adapter);
103
	struct cx88_core *core = i2c_get_adapdata(client->adapter);
103
104
104
	dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
105
	dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
105
		client->driver->driver.name, client->addr, client->name);
106
		client->driver->driver.name, client->addr, client->name);
107
	if (!client->driver->command)
108
		return 0;
106
109
110
	if (core->board.radio_type != UNSET) {
111
		if ((core->board.radio_addr==ADDR_UNSET)||(core->board.radio_addr==client->addr)) {
112
			tun_setup.mode_mask	 = T_RADIO;
113
			tun_setup.type		 = core->board.radio_type;
114
			tun_setup.addr		 = core->board.radio_addr;
115
			tun_setup.tuner_callback = cx88_tuner_callback;
116
			client->driver->command (client, TUNER_SET_TYPE_ADDR, &tun_setup);
117
		}
118
	}
119
	if (core->board.tuner_type != UNSET) {
120
		if ((core->board.tuner_addr==ADDR_UNSET)||(core->board.tuner_addr==client->addr)) {
121
122
			tun_setup.mode_mask	 = T_ANALOG_TV;
123
			tun_setup.type		 = core->board.tuner_type;
124
			tun_setup.addr		 = core->board.tuner_addr;
125
			tun_setup.tuner_callback = cx88_tuner_callback;
126
			client->driver->command (client,TUNER_SET_TYPE_ADDR, &tun_setup);
127
		}
128
	}
129
130
	if (core->board.tda9887_conf) {
131
		struct v4l2_priv_tun_config tda9887_cfg;
132
133
		tda9887_cfg.tuner = TUNER_TDA9887;
134
		tda9887_cfg.priv  = &core->board.tda9887_conf;
135
136
		client->driver->command(client, TUNER_SET_CONFIG, &tda9887_cfg);
137
	}
107
	return 0;
138
	return 0;
108
}
139
}
109
140

Return to bug 250609