aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/au0828
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2012-08-06 21:47:02 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-09 19:37:56 -0400
commit4a03dafc7b0a347854bc0a8652ffa314150fd1e5 (patch)
tree590e3ffbb5b9b42cacb3321e4a84066243510b14 /drivers/media/video/au0828
parentfc7a74bad1ae1d68a1a9999634baeb4bae277a92 (diff)
[media] au0828: prevent i2c gate from being kept open while in analog mode
The original implementation of the analog support would use an i2c_gate_ctrl function when using the digital side of the au8522, but on the analog side we would always just force the gate open and leave it open all the time. This can have adverse effects on the xc5000 given the tuner is receiving all the spurious i2c traffic (a problem which can be exaggerated due to bugs in the au0828 i2c hardware implementation). Rework the existing hack to only open/close the gate when actually talking to the tuner. This logic might need to be reworked a bit if anybody ever tries to add support for a board that has the au0828/au8522 but doesn't have digital support implemented (because the i2c_gate_ctrl callback is being set in the DVB attach). However given how few different models are in circulation, this can be deferred until such a situation arises (if ever). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/au0828')
-rw-r--r--drivers/media/video/au0828/au0828-video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c
index f3e6e3f4dfd4..df9232281d64 100644
--- a/drivers/media/video/au0828/au0828-video.c
+++ b/drivers/media/video/au0828/au0828-video.c
@@ -1541,6 +1541,9 @@ static int vidioc_s_frequency(struct file *file, void *priv,
1541 1541
1542 dev->ctrl_freq = freq->frequency; 1542 dev->ctrl_freq = freq->frequency;
1543 1543
1544 if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
1545 dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1);
1546
1544 if (dev->std_set_in_tuner_core == 0) { 1547 if (dev->std_set_in_tuner_core == 0) {
1545 /* If we've never sent the standard in tuner core, do so now. We 1548 /* If we've never sent the standard in tuner core, do so now. We
1546 don't do this at device probe because we don't want to incur 1549 don't do this at device probe because we don't want to incur
@@ -1552,6 +1555,9 @@ static int vidioc_s_frequency(struct file *file, void *priv,
1552 1555
1553 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, freq); 1556 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, freq);
1554 1557
1558 if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
1559 dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 0);
1560
1555 au0828_analog_stream_reset(dev); 1561 au0828_analog_stream_reset(dev);
1556 1562
1557 return 0; 1563 return 0;