V4L/DVB (6348): ivtv: undo video mute when closing the radio
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 14 Oct 2007 20:27:56 +0000 (17:27 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 22 Oct 2007 14:01:49 +0000 (12:01 -0200)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ivtv/ivtv-fileops.c

index 24fcbb88e52912df18425e3322b1c9b6231e631d..a200a8a95a2dc2ee125e6b32a94ab69b96727973 100644 (file)
@@ -822,6 +822,11 @@ int ivtv_v4l2_close(struct inode *inode, struct file *filp)
                        crystal_freq.flags = 0;
                        ivtv_saa7115(itv, VIDIOC_INT_S_CRYSTAL_FREQ, &crystal_freq);
                }
+               if (atomic_read(&itv->capturing) > 0) {
+                       /* Undo video mute */
+                       ivtv_vapi(itv, CX2341X_ENC_MUTE_VIDEO, 1,
+                               itv->params.video_mute | (itv->params.video_mute_yuv << 8));
+               }
                /* Done! Unmute and continue. */
                ivtv_unmute(itv);
                ivtv_release_stream(s);