aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMartin Dauskardt <martin.dauskardt@gmx.de>2008-10-18 13:59:09 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 12:31:31 -0400
commit323a491a29d0bb1e91263ca347cb42c4de28adfc (patch)
tree5ca8eb4fc03973d1fce09840f78ffcebd5a0f077 /drivers/media
parent09882f0044b7cf6e506c82a5182ad768ebb660f2 (diff)
V4L/DVB (9326): ivtv: avoid green flashing when loading ivtv
When loading ivtv the TV-out of the PVR-350 will flash green since the saa712x is activated before the MPEG decoder has been initialized. Deactivate the saa712x until the MPEG decoder has been initialized. Signed-off-by: Martin Dauskardt <martin.dauskardt@gmx.de> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index aeaa13f6cb36..d36485023b68 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -1211,6 +1211,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
1211 1211
1212 if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { 1212 if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) {
1213 ivtv_call_i2c_clients(itv, VIDIOC_INT_S_STD_OUTPUT, &itv->std); 1213 ivtv_call_i2c_clients(itv, VIDIOC_INT_S_STD_OUTPUT, &itv->std);
1214 /* Turn off the output signal. The mpeg decoder is not yet
1215 active so without this you would get a green image until the
1216 mpeg decoder becomes active. */
1217 ivtv_saa7127(itv, VIDIOC_STREAMOFF, NULL);
1214 } 1218 }
1215 1219
1216 /* clear interrupt mask, effectively disabling interrupts */ 1220 /* clear interrupt mask, effectively disabling interrupts */
@@ -1330,6 +1334,10 @@ int ivtv_init_on_first_open(struct ivtv *itv)
1330 ivtv_s_frequency(NULL, &fh, &vf); 1334 ivtv_s_frequency(NULL, &fh, &vf);
1331 1335
1332 if (itv->card->v4l2_capabilities & V4L2_CAP_VIDEO_OUTPUT) { 1336 if (itv->card->v4l2_capabilities & V4L2_CAP_VIDEO_OUTPUT) {
1337 /* Turn on the TV-out: ivtv_init_mpeg_decoder() initializes
1338 the mpeg decoder so now the saa7127 receives a proper
1339 signal. */
1340 ivtv_saa7127(itv, VIDIOC_STREAMON, NULL);
1333 ivtv_init_mpeg_decoder(itv); 1341 ivtv_init_mpeg_decoder(itv);
1334 } 1342 }
1335 ivtv_s_std(NULL, &fh, &itv->tuner_std); 1343 ivtv_s_std(NULL, &fh, &itv->tuner_std);
@@ -1366,6 +1374,10 @@ static void ivtv_remove(struct pci_dev *pci_dev)
1366 1374
1367 /* Stop all decoding */ 1375 /* Stop all decoding */
1368 IVTV_DEBUG_INFO("Stopping decoding\n"); 1376 IVTV_DEBUG_INFO("Stopping decoding\n");
1377
1378 /* Turn off the TV-out */
1379 if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)
1380 ivtv_saa7127(itv, VIDIOC_STREAMOFF, NULL);
1369 if (atomic_read(&itv->decoding) > 0) { 1381 if (atomic_read(&itv->decoding) > 0) {
1370 int type; 1382 int type;
1371 1383