aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2012-08-06 21:46:59 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-09 19:35:26 -0400
commitc98bc032c52b088fa7baa27adbc2a4deed9acea7 (patch)
treec43ba628c6aa0d16951e636e1fe985ae6103f144
parent549ee4df1951c8a1a123e81a073d73c2e1c26588 (diff)
[media] au0828: make sure video standard is setup in tuner-core
If the user performs a tuning attempt without explicitly calling the s_std ioctl(), a value of zero is sent from tuner-core to xc5000. This causes the xc5000 driver to leave the standard unchanged. The problem was masked by the fact that the xc5000 driver defaulted to NTSC, but if you happened to perform an ATSC/ClearQAM tuning attempt and then do an analog tune, the net effect is an analog tune with the standard still set to DTV6. Keep track of whether the standard has ever been sent to tuner-core. We don't make an s_std subdev call explicitly during probe because that will cause a firmware load (which is very time consuming on the 950q). With the logic in this patch, the s_std call will occur automatically on the s_freq call if it hasn't already been set. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/au0828/au0828-video.c10
-rw-r--r--drivers/media/video/au0828/au0828.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c
index b1f8d1856eec..f3e6e3f4dfd4 100644
--- a/drivers/media/video/au0828/au0828-video.c
+++ b/drivers/media/video/au0828/au0828-video.c
@@ -1330,6 +1330,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id * norm)
1330 buffer, which is currently hardcoded at 720x480 */ 1330 buffer, which is currently hardcoded at 720x480 */
1331 1331
1332 v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, *norm); 1332 v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, *norm);
1333 dev->std_set_in_tuner_core = 1;
1333 return 0; 1334 return 0;
1334} 1335}
1335 1336
@@ -1540,6 +1541,15 @@ static int vidioc_s_frequency(struct file *file, void *priv,
1540 1541
1541 dev->ctrl_freq = freq->frequency; 1542 dev->ctrl_freq = freq->frequency;
1542 1543
1544 if (dev->std_set_in_tuner_core == 0) {
1545 /* 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
1547 the cost of a firmware load */
1548 v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std,
1549 dev->vdev->tvnorms);
1550 dev->std_set_in_tuner_core = 1;
1551 }
1552
1543 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, freq); 1553 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, freq);
1544 1554
1545 au0828_analog_stream_reset(dev); 1555 au0828_analog_stream_reset(dev);
diff --git a/drivers/media/video/au0828/au0828.h b/drivers/media/video/au0828/au0828.h
index 61cd63e2bc63..66a56ef7bbe4 100644
--- a/drivers/media/video/au0828/au0828.h
+++ b/drivers/media/video/au0828/au0828.h
@@ -225,6 +225,7 @@ struct au0828_dev {
225 unsigned int frame_count; 225 unsigned int frame_count;
226 int ctrl_freq; 226 int ctrl_freq;
227 int input_type; 227 int input_type;
228 int std_set_in_tuner_core;
228 unsigned int ctrl_input; 229 unsigned int ctrl_input;
229 enum au0828_dev_state dev_state; 230 enum au0828_dev_state dev_state;
230 enum au0828_stream_state stream_state; 231 enum au0828_stream_state stream_state;