Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (12942): SAA7164: HVR2250 changes related to attach time tuner configuration

Ensure that by default all tuners are set correctly to master/slave mode.
For all HVR2250's, ensure slave based tuners are caliberated during attach
to avoid locking problems on tuner# above channel 91.

HVR2200 tuner attach time to be reviewed in a future patch.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Steven Toth and committed by
Mauro Carvalho Chehab
90e801ac c64b2f78

+20 -4
+20 -4
drivers/media/video/saa7164/saa7164-dvb.c
··· 61 61 static struct tda18271_config hauppauge_hvr22x0_tuner_config = { 62 62 .std_map = &hauppauge_tda18271_std_map, 63 63 .gate = TDA18271_GATE_ANALOG, 64 + .role = TDA18271_MASTER, 65 + }; 66 + 67 + static struct tda18271_config hauppauge_hvr22x0s_tuner_config = { 68 + .std_map = &hauppauge_tda18271_std_map, 69 + .gate = TDA18271_GATE_ANALOG, 70 + .role = TDA18271_SLAVE, 71 + .rf_cal_on_startup = 1 64 72 }; 65 73 66 74 static struct s5h1411_config hauppauge_s5h1411_config = { ··· 562 554 &i2c_bus->i2c_adap); 563 555 564 556 if (port->dvb.frontend != NULL) { 565 - /* TODO: addr is in the card struct */ 566 - dvb_attach(tda18271_attach, port->dvb.frontend, 567 - 0xc0 >> 1, &i2c_bus->i2c_adap, 568 - &hauppauge_hvr22x0_tuner_config); 557 + if (port->nr == 0) { 558 + /* Master TDA18271 */ 559 + /* TODO: addr is in the card struct */ 560 + dvb_attach(tda18271_attach, port->dvb.frontend, 561 + 0xc0 >> 1, &i2c_bus->i2c_adap, 562 + &hauppauge_hvr22x0_tuner_config); 563 + } else { 564 + /* Slave TDA18271 */ 565 + dvb_attach(tda18271_attach, port->dvb.frontend, 566 + 0xc0 >> 1, &i2c_bus->i2c_adap, 567 + &hauppauge_hvr22x0s_tuner_config); 568 + } 569 569 } 570 570 571 571 break;