]> err.no Git - linux-2.6/commitdiff
V4L/DVB (5015): Add support for more Encore TV cards
authorJuan Pablo Sormani <sorman@gmail.com>
Wed, 27 Dec 2006 15:46:36 +0000 (12:46 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 21 Feb 2007 15:34:16 +0000 (13:34 -0200)
Signed-off-by: Juan Pablo Sormani <sorman@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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 1a53513c6250c9b8e70cfda8de736850857752dc..bcba180194e896916b61e36fa9860b935ab8f07a 100644 (file)
 103 -> Compro Videomate DVB-T200A
 104 -> Hauppauge WinTV-HVR1110 DVB-T/Hybrid     [0070:6701]
 105 -> Terratec Cinergy HT PCMCIA               [153b:1172]
-106 -> Encore ENLTV                             [1131:2342]
+106 -> Encore ENLTV                             [1131:2342,1131:2341,3016:2344]
+107 -> Encore ENLTV-FM                          [1131:230f]
index 4a54a559d81cbdf302c045ddbd70d2954f377165..8b290204ff6c612896272457fc88f84588ed81f4 100644 (file)
@@ -1660,3 +1660,81 @@ IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE] = {
 };
 
 EXPORT_SYMBOL_GPL(ir_codes_asus_pc39);
+
+
+/* Encore ENLTV-FM  - black plastic, white front cover with white glowing buttons
+    Juan Pablo Sormani <sorman@gmail.com> */
+IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE] = {
+
+       /* Power button does nothing, neither in Windows app,
+        although it sends data (used for BIOS wakeup?) */
+       [ 0x0d ] = KEY_MUTE,
+
+       [ 0x1e ] = KEY_TV,
+       [ 0x00 ] = KEY_VIDEO,
+       [ 0x01 ] = KEY_AUDIO,           /* music */
+       [ 0x02 ] = KEY_MHP,             /* picture */
+
+       [ 0x1f ] = KEY_1,
+       [ 0x03 ] = KEY_2,
+       [ 0x04 ] = KEY_3,
+       [ 0x05 ] = KEY_4,
+       [ 0x1c ] = KEY_5,
+       [ 0x06 ] = KEY_6,
+       [ 0x07 ] = KEY_7,
+       [ 0x08 ] = KEY_8,
+       [ 0x1d ] = KEY_9,
+       [ 0x0a ] = KEY_0,
+
+       [ 0x09 ] = KEY_LIST,        /* -/-- */
+       [ 0x0b ] = KEY_LAST,        /* recall */
+
+       [ 0x14 ] = KEY_HOME,            /* win start menu */
+       [ 0x15 ] = KEY_EXIT,            /* exit */
+       [ 0x16 ] = KEY_UP,
+       [ 0x12 ] = KEY_DOWN,
+       [ 0x0c ] = KEY_RIGHT,
+       [ 0x17 ] = KEY_LEFT,
+
+       [ 0x18 ] = KEY_ENTER,           /* OK */
+
+       [ 0x0e ] = KEY_ESC,
+       [ 0x13 ] = KEY_D,               /* desktop */
+       [ 0x11 ] = KEY_TAB,
+       [ 0x19 ] = KEY_SWITCHVIDEOMODE, /* switch */
+
+       [ 0x1a ] = KEY_MENU,
+       [ 0x1b ] = KEY_ZOOM,            /* fullscreen */
+       [ 0x44 ] = KEY_TIME,            /* time shift */
+       [ 0x40 ] = KEY_MODE,            /* source */
+
+       [ 0x5a ] = KEY_RECORD,
+       [ 0x42 ] = KEY_PLAY,            /* play/pause */
+       [ 0x45 ] = KEY_STOP,
+       [ 0x43 ] = KEY_CAMERA,          /* camera icon */
+
+       [ 0x48 ] = KEY_REWIND,
+       [ 0x4a ] = KEY_FASTFORWARD,
+       [ 0x49 ] = KEY_PREVIOUS,
+       [ 0x4b ] = KEY_NEXT,
+
+       [ 0x4c ] = KEY_FAVORITES,       /* tv wall */
+       [ 0x4d ] = KEY_SOUND,           /* DVD sound */
+       [ 0x4e ] = KEY_LANGUAGE,        /* DVD lang */
+       [ 0x4f ] = KEY_TEXT,            /* DVD text */
+
+       [ 0x50 ] = KEY_SLEEP,           /* shutdown */
+       [ 0x51 ] = KEY_MODE,            /* stereo > main */
+       [ 0x52 ] = KEY_SELECT,          /* stereo > sap */
+       [ 0x53 ] = KEY_PROG1,           /* teletext */
+
+
+       [ 0x59 ] = KEY_RED,             /* AP1 */
+       [ 0x41 ] = KEY_GREEN,           /* AP2 */
+       [ 0x47 ] = KEY_YELLOW,          /* AP3 */
+       [ 0x57 ] = KEY_BLUE,            /* AP4 */
+
+
+};
+
+EXPORT_SYMBOL_GPL(ir_codes_encore_enltv);
index 9d26ab48edd4f39531ce4f07b8a33e7f1bfc6d9f..0403ae9e5b8a287692cec179d5a020ba03d77d27 100644 (file)
@@ -3189,8 +3189,10 @@ struct saa7134_board saa7134_boards[] = {
                }},
        },
        [SAA7134_BOARD_ENCORE_ENLTV] = {
-               /* Steven Walter <stevenrwalter@gmail.com> */
+       /* Steven Walter <stevenrwalter@gmail.com>
+          Juan Pablo Sormani <sorman@gmail.com> */
                .name           = "Encore ENLTV",
+               .audio_clock    = 0x00200000,
                .tuner_type     = TUNER_TNF_5335MF,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
@@ -3198,13 +3200,71 @@ struct saa7134_board saa7134_boards[] = {
                .inputs         = {{
                        .name = name_tv,
                        .vmux = 1,
+                       .amux = 3,
+                       .tv   = 1,
+               },{
+                       .name = name_tv_mono,
+                       .vmux = 7,
+                       .amux = 4,
+                       .tv   = 1,
+               },{
+                       .name = name_comp1,
+                       .vmux = 3,
+                       .amux = 2,
+               },{
+                       .name = name_svideo,
+                       .vmux = 0,
+                       .amux = 2,
+               }},
+               .radio = {
+                       .name = name_radio,
                        .amux = LINE2,
+/*                     .gpio = 0x00300001,*/
+                       .gpio = 0x20000,
+
+               },
+               .mute = {
+                       .name = name_mute,
+                       .amux = 0,
+               },
+       },
+       [SAA7134_BOARD_ENCORE_ENLTV_FM] = {
+  /*   Juan Pablo Sormani <sorman@gmail.com> */
+               .name           = "Encore ENLTV-FM",
+               .audio_clock    = 0x00200000,
+               .tuner_type     = TUNER_PHILIPS_ATSC,
+               .radio_type     = UNSET,
+               .tuner_addr     = ADDR_UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .inputs         = {{
+                       .name = name_tv,
+                       .vmux = 1,
+                       .amux = 3,
                        .tv   = 1,
+               },{
+                       .name = name_tv_mono,
+                       .vmux = 7,
+                       .amux = 4,
+                       .tv   = 1,
+               },{
+                       .name = name_comp1,
+                       .vmux = 3,
+                       .amux = 2,
                },{
                        .name = name_svideo,
-                       .vmux = 6,
-                       .amux = LINE1,
+                       .vmux = 0,
+                       .amux = 2,
                }},
+               .radio = {
+                       .name = name_radio,
+                       .amux = LINE2,
+                       .gpio = 0x20000,
+
+               },
+               .mute = {
+                       .name = name_mute,
+                       .amux = 0,
+               },
        },
 };
 
@@ -3850,6 +3910,24 @@ struct pci_device_id saa7134_pci_tbl[] = {
                .subvendor    = PCI_VENDOR_ID_PHILIPS,
                .subdevice    = 0x2342,
                .driver_data  = SAA7134_BOARD_ENCORE_ENLTV,
+       },{
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
+               .subvendor    = 0x1131,
+               .subdevice    = 0x2341,
+               .driver_data  = SAA7134_BOARD_ENCORE_ENLTV,
+       },{
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
+               .subvendor    = 0x3016,
+               .subdevice    = 0x2344,
+               .driver_data  = SAA7134_BOARD_ENCORE_ENLTV,
+       },{
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
+               .subvendor    = 0x1131,
+               .subdevice    = 0x230f,
+               .driver_data  = SAA7134_BOARD_ENCORE_ENLTV_FM,
        },{
                /* --- boards without eeprom + subsystem ID --- */
                .vendor       = PCI_VENDOR_ID_PHILIPS,
@@ -3959,6 +4037,8 @@ int saa7134_board_init1(struct saa7134_dev *dev)
        case SAA7134_BOARD_FLYDVBTDUO:
        case SAA7134_BOARD_PROTEUS_2309:
        case SAA7134_BOARD_AVERMEDIA_A16AR:
+       case SAA7134_BOARD_ENCORE_ENLTV:
+       case SAA7134_BOARD_ENCORE_ENLTV_FM:
                dev->has_remote = SAA7134_REMOTE_GPIO;
                break;
        case SAA7134_BOARD_FLYDVBS_LR300:
index 08848ebc682f7cf83ff5bdaa7a9b4ce228683a19..1d0dd7e12521b1ec88406ac0d16e6717f89b94d3 100644 (file)
@@ -325,6 +325,13 @@ int saa7134_input_init1(struct saa7134_dev *dev)
                mask_keydown = 0x0040000;
                rc5_gpio = 1;
                break;
+       case SAA7134_BOARD_ENCORE_ENLTV:
+       case SAA7134_BOARD_ENCORE_ENLTV_FM:
+               ir_codes     = ir_codes_encore_enltv;
+               mask_keycode = 0x00007f;
+               mask_keyup   = 0x040000;
+               polling      = 50; // ms
+               break;
        }
        if (NULL == ir_codes) {
                printk("%s: Oops: IR config error [card=%d]\n",
index 6e65fa6f2b3e40729cbd8e7b8ff4b42af3fb8212..ec08412b1c662e4054de992a25099a514926098a 100644 (file)
@@ -233,6 +233,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_HAUPPAUGE_HVR1110    104
 #define SAA7134_BOARD_CINERGY_HT_PCMCIA    105
 #define SAA7134_BOARD_ENCORE_ENLTV         106
+#define SAA7134_BOARD_ENCORE_ENLTV_FM      107
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
index c60a309979730be0043e0ab59dc7f08987f88db4..04201f77b85bd65f24a4dc8acf7edc75490a5f52 100644 (file)
@@ -141,6 +141,7 @@ extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE];
 
 #endif