V4L/DVB (9737): sms1xxx: enable LNA control on Hauppauge WinTV MiniCard
authorMichael Krufky <mkrufky@linuxtv.org>
Sat, 22 Nov 2008 17:33:00 +0000 (14:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 30 Dec 2008 11:38:14 +0000 (09:38 -0200)
Power the LNA while the frontend is in use.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/siano/sms-cards.c
drivers/media/dvb/siano/sms-cards.h

index f4eb46a7c90593183f675d1ceb0740e23e6f1e65..fd62e0b856213d15029262c293f05a63cb1a9ee7 100644 (file)
@@ -41,7 +41,7 @@ struct usb_device_id smsusb_id_table[] = {
        { USB_DEVICE(0x2040, 0x2000),
                .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
        { USB_DEVICE(0x2040, 0x2009),
-               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
+               .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 },
        { USB_DEVICE(0x2040, 0x200a),
                .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD },
        { USB_DEVICE(0x2040, 0x2010),
@@ -165,6 +165,11 @@ int sms_board_setup(struct smscore_device_t *coredev)
                sms_set_gpio(coredev, board->led_hi, 0);
                sms_set_gpio(coredev, board->led_lo, 0);
                break;
+       case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2:
+       case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD:
+               /* turn off LNA */
+               sms_set_gpio(coredev, board->lna_ctrl, 0);
+               break;
        }
        return 0;
 }
@@ -180,6 +185,12 @@ int sms_board_power(struct smscore_device_t *coredev, int onoff)
                sms_set_gpio(coredev,
                             board->led_power, onoff ? 1 : 0);
                break;
+       case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2:
+       case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD:
+               /* LNA */
+               sms_set_gpio(coredev,
+                            board->lna_ctrl, onoff ? 1 : 0);
+               break;
        }
        return 0;
 }
index 5c013c4390d71ed5e6603391c909138f90da11c9..8e0fe9fd261011bafc91e1d265b99797aab6cef0 100644 (file)
 #define SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B 7
 #define SMS1XXX_BOARD_HAUPPAUGE_WINDHAM 8
 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD 9
+#define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 10
 
 struct sms_board {
        enum sms_device_type_st type;
        char *name, *fw[DEVICE_MODE_MAX];
 
        /* gpios */
-       int led_power, led_hi, led_lo;
+       int led_power, led_hi, led_lo, lna_ctrl;
 };
 
 struct sms_board *sms_get_board(int id);