summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2009-08-27 17:08:21 -0400
committerSteven Toth <stoth@kernellabs.com>2009-08-27 17:08:21 -0400
commite6d837f4a64a734f61339d030bc2da2459b636d7 (patch)
tree24fd4183a35ee9b888bd631c0a532fe2e234805a
parent17d632aaee846151f796a1c8f02f58df54f47fea (diff)
downloadmediapointer-dvb-s2-e6d837f4a64a734f61339d030bc2da2459b636d7.tar.gz
mediapointer-dvb-s2-e6d837f4a64a734f61339d030bc2da2459b636d7.tar.bz2
SAA7164: HVR2250 changes related to attach time tuner configuration
From: Steven Toth <stoth@kernellabs.com> 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. Priority: normal Signed-off-by: Steven Toth <stoth@kernellabs.com>
-rw-r--r--linux/drivers/media/video/saa7164/saa7164-dvb.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/linux/drivers/media/video/saa7164/saa7164-dvb.c b/linux/drivers/media/video/saa7164/saa7164-dvb.c
index f3198146c..a3c654dd1 100644
--- a/linux/drivers/media/video/saa7164/saa7164-dvb.c
+++ b/linux/drivers/media/video/saa7164/saa7164-dvb.c
@@ -61,6 +61,14 @@ static struct tda18271_std_map hauppauge_tda18271_std_map = {
static struct tda18271_config hauppauge_hvr22x0_tuner_config = {
.std_map = &hauppauge_tda18271_std_map,
.gate = TDA18271_GATE_ANALOG,
+ .role = TDA18271_MASTER,
+};
+
+static struct tda18271_config hauppauge_hvr22x0s_tuner_config = {
+ .std_map = &hauppauge_tda18271_std_map,
+ .gate = TDA18271_GATE_ANALOG,
+ .role = TDA18271_SLAVE,
+ .rf_cal_on_startup = 1
};
static struct s5h1411_config hauppauge_s5h1411_config = {
@@ -566,10 +574,18 @@ int saa7164_dvb_register(struct saa7164_tsport *port)
&i2c_bus->i2c_adap);
if (port->dvb.frontend != NULL) {
- /* TODO: addr is in the card struct */
- dvb_attach(tda18271_attach, port->dvb.frontend,
- 0xc0 >> 1, &i2c_bus->i2c_adap,
- &hauppauge_hvr22x0_tuner_config);
+ if (port->nr == 0) {
+ /* Master TDA18271 */
+ /* TODO: addr is in the card struct */
+ dvb_attach(tda18271_attach, port->dvb.frontend,
+ 0xc0 >> 1, &i2c_bus->i2c_adap,
+ &hauppauge_hvr22x0_tuner_config);
+ } else {
+ /* Slave TDA18271 */
+ dvb_attach(tda18271_attach, port->dvb.frontend,
+ 0xc0 >> 1, &i2c_bus->i2c_adap,
+ &hauppauge_hvr22x0s_tuner_config);
+ }
}
break;