]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/pvrusb2/pvrusb2-encoder.c
Merge branch 'pci-for-jesse' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6-omap-h63xx.git] / drivers / media / video / pvrusb2 / pvrusb2-encoder.c
index 64062879981e4297db9f8386c68306c15e61c616..a1252d673b411331e36811dac8cdea5d65e052f4 100644 (file)
@@ -1,6 +1,5 @@
 /*
  *
- *  $Id$
  *
  *  Copyright (C) 2005 Mike Isely <isely@pobox.com>
  *  Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
@@ -278,11 +277,20 @@ static int pvr2_encoder_cmd(void *ctxt,
                        ret = -EBUSY;
                }
                if (ret) {
+                       del_timer_sync(&hdw->encoder_run_timer);
                        hdw->state_encoder_ok = 0;
                        pvr2_trace(PVR2_TRACE_STBITS,
                                   "State bit %s <-- %s",
                                   "state_encoder_ok",
                                   (hdw->state_encoder_ok ? "true" : "false"));
+                       if (hdw->state_encoder_runok) {
+                               hdw->state_encoder_runok = 0;
+                               pvr2_trace(PVR2_TRACE_STBITS,
+                                  "State bit %s <-- %s",
+                                          "state_encoder_runok",
+                                          (hdw->state_encoder_runok ?
+                                           "true" : "false"));
+                       }
                        pvr2_trace(
                                PVR2_TRACE_ERROR_LEGS,
                                "Giving up on command."
@@ -480,10 +488,6 @@ int pvr2_encoder_start(struct pvr2_hdw *hdw)
        /* unmask some interrupts */
        pvr2_write_register(hdw, 0x0048, 0xbfffffff);
 
-       /* change some GPIO data */
-       pvr2_hdw_gpio_chg_dir(hdw,0xffffffff,0x00000481);
-       pvr2_hdw_gpio_chg_out(hdw,0xffffffff,0x00000000);
-
        pvr2_encoder_vcmd(hdw,CX2341X_ENC_MUTE_VIDEO,1,
                          hdw->input_val == PVR2_CVAL_INPUT_RADIO ? 1 : 0);
 
@@ -526,12 +530,6 @@ int pvr2_encoder_stop(struct pvr2_hdw *hdw)
                break;
        }
 
-       /* change some GPIO data */
-       /* Note: Bit d7 of dir appears to control the LED.  So we shut it
-          off here. */
-       pvr2_hdw_gpio_chg_dir(hdw,0xffffffff,0x00000401);
-       pvr2_hdw_gpio_chg_out(hdw,0xffffffff,0x00000000);
-
        return status;
 }