diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-18 18:56:47 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:00:54 -0500 |
commit | 7f1711234e6a21c153e892758d9d82c333ab37ac (patch) | |
tree | 19281fdae9f51a25c119dccf54515192614b242f /drivers/media/video/saa7134/saa7134-dvb.c | |
parent | 2d94dfc8c38edf63e91e48fd55c3a8822b6a9ced (diff) |
V4L/DVB (6384): Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIG
Currently, the only tuner-specific device that allows special
configurations is tda9887. However, tea5767 also may require some
special configurations (for example, to specify a different Xtal freq).
This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl
(TUNER_SET_CONFIG). The newer one allows specifying what tuner is
appliable to a configuration set, and allows an arbitrary configuration
struct.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-dvb.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index e1ab099ec4c6..a9ca5730826f 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -1073,14 +1073,21 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1073 | 1073 | ||
1074 | static int dvb_fini(struct saa7134_dev *dev) | 1074 | static int dvb_fini(struct saa7134_dev *dev) |
1075 | { | 1075 | { |
1076 | static int on = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE; | 1076 | /* FIXME: I suspect that this code is bogus, since the entry for |
1077 | Pinnacle 300I DVB-T PAL already defines the proper init to allow | ||
1078 | the detection of mt2032 (TDA9887_PORT2_INACTIVE) | ||
1079 | */ | ||
1080 | if (dev->board == SAA7134_BOARD_PINNACLE_300I_DVBT_PAL) { | ||
1081 | struct v4l2_priv_tun_config tda9887_cfg; | ||
1082 | static int on = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE; | ||
1083 | |||
1084 | tda9887_cfg.tuner = TUNER_TDA9887; | ||
1085 | tda9887_cfg.priv = &on; | ||
1077 | 1086 | ||
1078 | switch (dev->board) { | ||
1079 | case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL: | ||
1080 | /* otherwise we don't detect the tuner on next insmod */ | 1087 | /* otherwise we don't detect the tuner on next insmod */ |
1081 | saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&on); | 1088 | saa7134_i2c_call_clients(dev, TUNER_SET_CONFIG, &tda9887_cfg); |
1082 | break; | 1089 | } |
1083 | }; | 1090 | |
1084 | videobuf_dvb_unregister(&dev->dvb); | 1091 | videobuf_dvb_unregister(&dev->dvb); |
1085 | return 0; | 1092 | return 0; |
1086 | } | 1093 | } |