V4L/DVB (9059): saa7134: Add support for Encore version 5.3 board
Mauro Carvalho Chehab [Thu, 26 Jun 2008 20:03:00 +0000 (17:03 -0300)]
Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) for sponsoring
this development.

Signed-off-by: Gilberto <gilberto@sistemafenix.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Documentation/video4linux/CARDLIST.saa7134
drivers/media/common/ir-keymaps.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-input.c
drivers/media/video/saa7134/saa7134.h
include/media/ir-common.h

index c121f44..1438364 100644 (file)
 145 -> AVerMedia MiniPCI DVB-T Hybrid M103      [1461:f636]
 146 -> ASUSTeK P7131 Analog
 147 -> Asus Tiger 3in1                          [1043:4878]
+148 -> Encore ENLTV-FM v5.3                     [1a7f:2008]
index aedfabd..891f3b3 100644 (file)
@@ -2288,3 +2288,46 @@ IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE] = {
        [0x2a] = KEY_MENU,
 };
 EXPORT_SYMBOL_GPL(ir_codes_avermedia_a16d);
+
+/* Encore ENLTV-FM v5.3
+   Mauro Carvalho Chehab <mchehab@infradead.org>
+ */
+IR_KEYTAB_TYPE ir_codes_encore_enltv_fm53[IR_KEYTAB_SIZE] = {
+       [0x10] = KEY_POWER2,
+       [0x06] = KEY_MUTE,
+
+       [0x09] = KEY_1,
+       [0x1d] = KEY_2,
+       [0x1f] = KEY_3,
+       [0x19] = KEY_4,
+       [0x1b] = KEY_5,
+       [0x11] = KEY_6,
+       [0x17] = KEY_7,
+       [0x12] = KEY_8,
+       [0x16] = KEY_9,
+       [0x48] = KEY_0,
+
+       [0x04] = KEY_LIST,              /* -/-- */
+       [0x40] = KEY_LAST,              /* recall */
+
+       [0x02] = KEY_MODE,              /* TV/AV */
+       [0x05] = KEY_SHUFFLE,           /* SNAPSHOT */
+
+       [0x4c] = KEY_CHANNELUP,         /* UP */
+       [0x00] = KEY_CHANNELDOWN,       /* DOWN */
+       [0x0d] = KEY_VOLUMEUP,          /* RIGHT */
+       [0x15] = KEY_VOLUMEDOWN,        /* LEFT */
+       [0x49] = KEY_ENTER,             /* OK */
+
+       [0x54] = KEY_RECORD,
+       [0x4d] = KEY_PLAY,              /* pause */
+
+       [0x1e] = KEY_UP,                /* video setting */
+       [0x0e] = KEY_RIGHT,             /* <- */
+       [0x1a] = KEY_LEFT,              /* -> */
+
+       [0x0a] = KEY_DOWN,              /* video default */
+       [0x0c] = KEY_ZOOM,              /* hide pannel */
+       [0x47] = KEY_SLEEP,             /* shutdown */
+};
+EXPORT_SYMBOL_GPL(ir_codes_encore_enltv_fm53);
index 4f32486..3ad5b94 100644 (file)
@@ -3392,6 +3392,42 @@ struct saa7134_board saa7134_boards[] = {
                        .amux = 0,
                },
        },
+       [SAA7134_BOARD_ENCORE_ENLTV_FM53] = {
+               .name           = "Encore ENLTV-FM v5.3",
+               .audio_clock    = 0x00200000,
+               .tuner_type     = TUNER_TNF_5335MF,
+               .radio_type     = UNSET,
+               .tuner_addr     = ADDR_UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .gpiomask       = 0x7000,
+               .inputs         = { {
+                       .name = name_tv,
+                       .vmux = 1,
+                       .amux = 1,
+                       .tv   = 1,
+                       .gpio = 0x50000,
+               }, {
+                       .name = name_comp1,
+                       .vmux = 3,
+                       .amux = 2,
+                       .gpio = 0x2000,
+               }, {
+                       .name = name_svideo,
+                       .vmux = 8,
+                       .amux = 2,
+                       .gpio = 0x2000,
+               } },
+               .radio = {
+                       .name = name_radio,
+                       .vmux = 1,
+                       .amux = 1,
+               },
+               .mute = {
+                       .name = name_mute,
+                       .gpio = 0xf000,
+                       .amux = 0,
+               },
+       },
        [SAA7134_BOARD_CINERGY_HT_PCI] = {
                .name           = "Terratec Cinergy HT PCI",
                .audio_clock    = 0x00187de7,
@@ -5191,6 +5227,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
                .driver_data  = SAA7134_BOARD_ENCORE_ENLTV_FM,
        },{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
+               .subvendor    = 0x1a7f,
+               .subdevice    = 0x2008,
+               .driver_data  = SAA7134_BOARD_ENCORE_ENLTV_FM53,
+       }, {
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
                .subvendor    = 0x153b,
                .subdevice    = 0x1175,
@@ -5684,6 +5726,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
        case SAA7134_BOARD_AVERMEDIA_A16AR:
        case SAA7134_BOARD_ENCORE_ENLTV:
        case SAA7134_BOARD_ENCORE_ENLTV_FM:
+       case SAA7134_BOARD_ENCORE_ENLTV_FM53:
        case SAA7134_BOARD_10MOONSTVMASTER3:
        case SAA7134_BOARD_BEHOLD_401:
        case SAA7134_BOARD_BEHOLD_403:
index ac6beb2..f176730 100644 (file)
@@ -509,6 +509,12 @@ int saa7134_input_init1(struct saa7134_dev *dev)
                mask_keyup   = 0x040000;
                polling      = 50; // ms
                break;
+       case SAA7134_BOARD_ENCORE_ENLTV_FM53:
+               ir_codes     = ir_codes_encore_enltv_fm53;
+               mask_keydown = 0x0040000;
+               mask_keycode = 0x00007f;
+               nec_gpio = 1;
+               break;
        case SAA7134_BOARD_10MOONSTVMASTER3:
                ir_codes     = ir_codes_encore_enltv;
                mask_keycode = 0x5f80000;
index 4005335..982003d 100644 (file)
@@ -270,6 +270,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_AVERMEDIA_M103    145
 #define SAA7134_BOARD_ASUSTeK_P7131_ANALOG 146
 #define SAA7134_BOARD_ASUSTeK_TIGER_3IN1   147
+#define SAA7134_BOARD_ENCORE_ENLTV_FM53 148
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
index 6f8ef35..b029987 100644 (file)
@@ -153,6 +153,7 @@ extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_encore_enltv_fm53[IR_KEYTAB_SIZE];
 
 #endif