aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2012-08-06 21:47:12 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-09 19:58:31 -0400
commite58071f024aa337b7ce41682578b33895b024f8b (patch)
tree70d16932ae887e3fee563fe61fbe88aef97ea02b /drivers/media/video
parentca60a45dd4a85151068f24148dac38eca6ec2d1c (diff)
[media] au0828: fix a couple of missed edge cases for i2c gate with analog
This patch addresses a couple of cases where I forgot to pop open the gate when in analog mode (a correlary to fix the change made in patch 1c58d5b4a5fca42dce5428bd79b9405878017735). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/au0828/au0828-video.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c
index 4d5b670973ad..fa0fa9ae91c7 100644
--- a/drivers/media/video/au0828/au0828-video.c
+++ b/drivers/media/video/au0828/au0828-video.c
@@ -1325,12 +1325,19 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id * norm)
1325 struct au0828_fh *fh = priv; 1325 struct au0828_fh *fh = priv;
1326 struct au0828_dev *dev = fh->dev; 1326 struct au0828_dev *dev = fh->dev;
1327 1327
1328 if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
1329 dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1);
1330
1328 /* FIXME: when we support something other than NTSC, we are going to 1331 /* FIXME: when we support something other than NTSC, we are going to
1329 have to make the au0828 bridge adjust the size of its capture 1332 have to make the au0828 bridge adjust the size of its capture
1330 buffer, which is currently hardcoded at 720x480 */ 1333 buffer, which is currently hardcoded at 720x480 */
1331 1334
1332 v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, *norm); 1335 v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, *norm);
1333 dev->std_set_in_tuner_core = 1; 1336 dev->std_set_in_tuner_core = 1;
1337
1338 if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
1339 dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 0);
1340
1334 return 0; 1341 return 0;
1335} 1342}
1336 1343
@@ -1510,9 +1517,18 @@ static int vidioc_s_tuner(struct file *file, void *priv,
1510 return -EINVAL; 1517 return -EINVAL;
1511 1518
1512 t->type = V4L2_TUNER_ANALOG_TV; 1519 t->type = V4L2_TUNER_ANALOG_TV;
1520
1521 if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
1522 dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1);
1523
1513 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t); 1524 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t);
1525
1526 if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
1527 dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 0);
1528
1514 dprintk(1, "VIDIOC_S_TUNER: signal = %x, afc = %x\n", t->signal, 1529 dprintk(1, "VIDIOC_S_TUNER: signal = %x, afc = %x\n", t->signal,
1515 t->afc); 1530 t->afc);
1531
1516 return 0; 1532 return 0;
1517 1533
1518} 1534}