Skip to contentSkip to conversation

saa7134 - ir remote for sinovideo 1300

PATCH New James Guo 1 participant 1 message Jul 18, 2009 Media (V4L/DVB)

lore
Share & tools
lore

James Guo

author
#0 lore raw

PATCH 1/1 saa7134 - ir remote for sinovideo 1300

Have a tv tuner believe to be sinovideo 1300, and the remote has h-338 in the back, the tuner is detected as saa7134 proteus 2309, and working fine, the patch is for the remote.

following buttons supposed to be working: all the number button, channel up and down, volumn up and down, off, mute, full screen, recall, snapshot, tv. Some buttons do not have valid entry for tvtime, so I did not map them(record, stop ...)

to apply, use command
modprobe saa7134 card=157
if it does not work, use
modprobe saa7134 card=157 ir_debug=1
and send me(yahoo.com) the output of dmesg(after modprobe and after a button is pressed)

include/media/ir-common.h 2009-07-16 01:37:41.000000000 -0400 renamed from include/media/ir-common.h 2009-07-08 19:28:50.000000000 -0400 +1 -0
@@ -162,6 +162,7 @@
 extern IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_kaiomy[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_sinovideo_1300[IR_KEYTAB_SIZE];
 #endif
 
 /*
drivers/media/common/ir-keymaps.c 2009-07-16 13:17:30.000000000 -0400 renamed from drivers/media/common/ir-keymaps.c 2009-07-08 19:28:49.000000000 -0400 +32 -0
@@ -62,6 +62,38 @@
 };
 
 EXPORT_SYMBOL_GPL(ir_codes_proteus_2309);
+
+IR_KEYTAB_TYPE ir_codes_sinovideo_1300[IR_KEYTAB_SIZE] = {
+    /* numeric */
+    [ 0x00 ] = KEY_0,
+    [ 0x01 ] = KEY_1,
+    [ 0x02 ] = KEY_2,
+    [ 0x03 ] = KEY_3,
+    [ 0x04 ] = KEY_4,
+    [ 0x05 ] = KEY_5,
+    [ 0x06 ] = KEY_6,
+    [ 0x07 ] = KEY_7,
+    [ 0x08 ] = KEY_8,
+    [ 0x09 ] = KEY_9,
+
+    [ 0x5c ] = KEY_POWER,     /* power       */
+    [ 0x20 ] = KEY_F,         /* full screen */
+    [ 0x0f ] = KEY_BACKSPACE, /* recall      */
+    [ 0x1b ] = KEY_M,         /* mute        */
+    [ 0x41 ] = KEY_RECORD,    /* record      */
+    [ 0x43 ] = KEY_STOP,      /* stop        */
+    [ 0x16 ] = KEY_S,         /* snapshot    */
+    [ 0x1a ] = KEY_Q,         /* off         */
+    [ 0x2e ] = KEY_RED,
+    [ 0x1f ] = KEY_DOWN,      /* channel -   */
+    [ 0x1c ] = KEY_UP,        /* channel +   */
+    [ 0x10 ] = KEY_LEFT,      /* volume -    */
+    [ 0x1e ] = KEY_RIGHT,     /* volume +    */
+    [ 0x14 ] = KEY_F1,
+    [ 0x15 ] = KEY_I,         /* tv          */
+};
+
+EXPORT_SYMBOL_GPL(ir_codes_sinovideo_1300);
 /* Matt Jesson <[email protected] */
 IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = {
     [ 0x28 ] = KEY_0,         //'0' / 'enter'
drivers/media/video/saa7134/saa7134-cards.c 2009-07-15 22:37:16.000000000 -0400 renamed from drivers/media/video/saa7134/saa7134-cards.c 2009-07-08 19:28:49.000000000 -0400 +38 -0
@@ -4744,6 +4744,37 @@
             .gpio = 0x01,
         },
     },
+    [SAA7134_BOARD_SINOVIDEO_1300] = {
+        .name           = "Sinovideo 1300",
+        .audio_clock    = 0x00187de7,
+        .tuner_type    = TUNER_PHILIPS_FM1216ME_MK3,
+        .radio_type     = UNSET,
+        .tuner_addr    = ADDR_UNSET,
+        .radio_addr    = ADDR_UNSET,
+        .tda9887_conf   = TDA9887_PRESENT,
+        .inputs         = {{
+            .name = name_tv,
+            .vmux = 1,
+            .amux = LINE2,
+            .tv   = 1,
+        },{
+            .name = name_comp1,
+            .vmux = 0,
+            .amux = LINE2,
+        },{
+            .name = name_comp2,
+            .vmux = 3,
+            .amux = LINE2,
+        },{
+            .name = name_svideo,
+            .vmux = 8,
+            .amux = LINE2,
+        }},
+        .mute = {
+            .name = name_mute,
+            .amux = LINE1,
+        },
+    },
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -5838,6 +5869,12 @@
         .subvendor    = 0x1461, /* Avermedia Technologies Inc */
         .subdevice    = 0xf31d,
         .driver_data  = SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS,
+    },{
+        .vendor       = PCI_VENDOR_ID_PHILIPS,
+        .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
+        .subvendor    = 0x0919,
+        .subdevice    = 0x2003,
+        .driver_data  = SAA7134_BOARD_SINOVIDEO_1300,
 
     }, {
         /* --- boards without eeprom + subsystem ID --- */
@@ -6133,6 +6170,7 @@
     case SAA7134_BOARD_REAL_ANGEL_220:
     case SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG:
     case SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS:
+    case SAA7134_BOARD_SINOVIDEO_1300:
         dev->has_remote = SAA7134_REMOTE_GPIO;
         break;
     case SAA7134_BOARD_FLYDVBS_LR300:
drivers/media/video/saa7134/saa7134.h 2009-07-16 15:31:54.000000000 -0400 renamed from drivers/media/video/saa7134/saa7134.h 2009-07-08 19:28:49.000000000 -0400 +1 -0
@@ -280,6 +280,7 @@
 #define SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS 154
 #define SAA7134_BOARD_HAUPPAUGE_HVR1120     155
 #define SAA7134_BOARD_HAUPPAUGE_HVR1110R3   156
+#define SAA7134_BOARD_SINOVIDEO_1300   157
 
 #define SAA7134_MAXBOARDS 32
 #define SAA7134_INPUT_MAX 8
drivers/media/video/saa7134/saa7134-input.c 2009-07-16 15:08:50.000000000 -0400 renamed from drivers/media/video/saa7134/saa7134-input.c 2009-03-23 19:12:14.000000000 -0400 +154 -2

189 lines not on this page · raw message