/* 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_led_ctrl(hdw, 1);
 
        pvr2_encoder_vcmd(hdw,CX2341X_ENC_MUTE_VIDEO,1,
                          hdw->input_val == PVR2_CVAL_INPUT_RADIO ? 1 : 0);
                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);
+       pvr2_led_ctrl(hdw, 0);
 
        return status;
 }
 
 }
 
 
+/* Toggle LED */
+int pvr2_led_ctrl(struct pvr2_hdw *hdw, int onoff)
+{
+       /* change some GPIO data
+        *
+        * note: bit d7 of dir appears to control the LED,
+        * so we shut it off here.
+        *
+        * FIXME: is this device-specific?
+        */
+       if (onoff)
+               pvr2_hdw_gpio_chg_dir(hdw, 0xffffffff, 0x00000481);
+       else
+               pvr2_hdw_gpio_chg_dir(hdw, 0xffffffff, 0x00000401);
+
+       pvr2_hdw_gpio_chg_out(hdw, 0xffffffff, 0x00000000);
+
+       return 0;
+}
+
+
 /* Stop / start video stream transport */
 static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl)
 {
 
 /* suspend */
 int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *);
 
+/* toggle LED */
+int pvr2_led_ctrl(struct pvr2_hdw *hdw, int onoff);
+
 /* Order decoder to reset */
 int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *);