aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/zoran_device.c')
-rw-r--r--drivers/media/video/zoran_device.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c
index d9640ec4b9b0..ba2f4ed29483 100644
--- a/drivers/media/video/zoran_device.c
+++ b/drivers/media/video/zoran_device.c
@@ -620,11 +620,17 @@ zr36057_set_memgrab (struct zoran *zr,
620 int mode) 620 int mode)
621{ 621{
622 if (mode) { 622 if (mode) {
623 if (btread(ZR36057_VSSFGR) & 623 /* We only check SnapShot and not FrameGrab here. SnapShot==1
624 (ZR36057_VSSFGR_SnapShot | ZR36057_VSSFGR_FrameGrab)) 624 * means a capture is already in progress, but FrameGrab==1
625 * doesn't necessary mean that. It's more correct to say a 1
626 * to 0 transition indicates a capture completed. If a
627 * capture is pending when capturing is tuned off, FrameGrab
628 * will be stuck at 1 until capturing is turned back on.
629 */
630 if (btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SnapShot)
625 dprintk(1, 631 dprintk(1,
626 KERN_WARNING 632 KERN_WARNING
627 "%s: zr36057_set_memgrab(1) with SnapShot or FrameGrab on!?\n", 633 "%s: zr36057_set_memgrab(1) with SnapShot on!?\n",
628 ZR_DEVNAME(zr)); 634 ZR_DEVNAME(zr));
629 635
630 /* switch on VSync interrupts */ 636 /* switch on VSync interrupts */
@@ -641,11 +647,12 @@ zr36057_set_memgrab (struct zoran *zr,
641 647
642 zr->v4l_memgrab_active = 1; 648 zr->v4l_memgrab_active = 1;
643 } else { 649 } else {
644 zr->v4l_memgrab_active = 0;
645
646 /* switch off VSync interrupts */ 650 /* switch off VSync interrupts */
647 btand(~zr->card.vsync_int, ZR36057_ICR); // SW 651 btand(~zr->card.vsync_int, ZR36057_ICR); // SW
648 652
653 zr->v4l_memgrab_active = 0;
654 zr->v4l_grab_frame = NO_GRAB_ACTIVE;
655
649 /* reenable grabbing to screen if it was running */ 656 /* reenable grabbing to screen if it was running */
650 if (zr->v4l_overlay_active) { 657 if (zr->v4l_overlay_active) {
651 zr36057_overlay(zr, 1); 658 zr36057_overlay(zr, 1);