From 84bcc4129a123027b89ac4d15421c84e992913f7 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 4 Dec 2006 09:31:38 -0200 Subject: Added the capability of selecting fm gain by tuner From: Mauro Carvalho Chehab Some tuners require using cGainNormal instead of cGainLow for high sensibility on FM reception. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tuner-simple.c | 2 ++ linux/include/media/tuner-types.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index ccb591e07..16469d905 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -503,6 +503,8 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) config |= TDA9887_INTERCARRIER; /* if (params->port1_set_for_fm_mono) config &= ~TDA9887_PORT1_ACTIVE;*/ + if (params->fm_gain_normal) + config |= TDA9887_GAIN_NORMAL; i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config); } if (4 != (rc = i2c_master_send(c,buffer,4))) diff --git a/linux/include/media/tuner-types.h b/linux/include/media/tuner-types.h index 7432ba276..0998fb26b 100644 --- a/linux/include/media/tuner-types.h +++ b/linux/include/media/tuner-types.h @@ -57,6 +57,10 @@ struct tuner_params { sensitivity. If this setting is 1, then set PORT2 to 1 to get proper FM reception. */ unsigned int port2_fm_high_sensitivity:1; + /* Some Philips tuners use tda9887 cGainNormal to select the FM radio + sensitivity. If this setting is 1, e register will use cGainNormal + instead of cGainLow. */ + unsigned int fm_gain_normal:1; /* Most tuners with a tda9887 use QSS mode. Some (cheaper) tuners use Intercarrier mode. If this setting is 1, then the tuner needs to be set to intercarrier mode. */ -- cgit v1.2.3