aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-10-18 18:56:47 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:00:54 -0500
commit7f1711234e6a21c153e892758d9d82c333ab37ac (patch)
tree19281fdae9f51a25c119dccf54515192614b242f /drivers/media/video/saa7134/saa7134-video.c
parent2d94dfc8c38edf63e91e48fd55c3a8822b6a9ced (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-video.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 6396d9b5c063..2c1d56ab2f2a 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -1236,16 +1236,24 @@ static int set_control(struct saa7134_dev *dev, struct saa7134_fh *fh,
1236 restart_overlay = 1; 1236 restart_overlay = 1;
1237 break; 1237 break;
1238 case V4L2_CID_PRIVATE_AUTOMUTE: 1238 case V4L2_CID_PRIVATE_AUTOMUTE:
1239 {
1240 struct v4l2_priv_tun_config tda9887_cfg;
1241
1242 tda9887_cfg.tuner = TUNER_TDA9887;
1243 tda9887_cfg.priv = &dev->tda9887_conf;
1244
1239 dev->ctl_automute = c->value; 1245 dev->ctl_automute = c->value;
1240 if (dev->tda9887_conf) { 1246 if (dev->tda9887_conf) {
1241 if (dev->ctl_automute) 1247 if (dev->ctl_automute)
1242 dev->tda9887_conf |= TDA9887_AUTOMUTE; 1248 dev->tda9887_conf |= TDA9887_AUTOMUTE;
1243 else 1249 else
1244 dev->tda9887_conf &= ~TDA9887_AUTOMUTE; 1250 dev->tda9887_conf &= ~TDA9887_AUTOMUTE;
1245 saa7134_i2c_call_clients(dev, TDA9887_SET_CONFIG, 1251
1246 &dev->tda9887_conf); 1252 saa7134_i2c_call_clients(dev, TUNER_SET_CONFIG,
1253 &tda9887_cfg);
1247 } 1254 }
1248 break; 1255 break;
1256 }
1249 default: 1257 default:
1250 return -EINVAL; 1258 return -EINVAL;
1251 } 1259 }