Re : Re : [PATCH]: TT-3200 remote patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/24/2008 10:52:42 PM, manu wrote:
> On 05/24/2008 10:28:49 PM, manu wrote:
> > 	Hi all,
> > here is a patch to enable TT-3200 remote. It works for me but:
> > - I dont know the RC device so I set it to RC_DEVICE_ANY;
> > - I get keys when I push buttons on the remote, but for some reason
> > one 
> > puts my computer on sleep. I already checked the ir keymap and I
> dont 
> > see the problem, if someone could give it a shot...
> > - I dont know how to test which remote is used, I based the
> detection 
> > on the product id (0x1019), but all other cases are handled the 
> same
> 
> > way so...
> > Anyway, any comments are more than welcome.
> > 
> 
> 
> OK new version with the bad keymap corrected (bad copy-paste :( ).
> 
> Signed-off-by: Emmanuel ALLAUD <eallaud@xxxxxxxx>
> 

Oh well I think I should have gotten more sleep before mail bombing 
with empty patches ;-)
Here it is.
Sorry
Bye
Manu
--- linux/drivers/media/common/ir-keymaps.c	2008-03-22 10:12:18.000000000 -0400
+++ ../multiproto-bis/multiproto/linux/drivers/media/common/ir-keymaps.c	2008-05-14 11:30:09.000000000 -0400
@@ -1507,6 +1507,55 @@
 
 EXPORT_SYMBOL_GPL(ir_codes_hauppauge_new);
 
+/* Hauppauge: the newer, gray remotes (seems there are multiple
+ * slightly different versions), shipped with cx88+ivtv cards.
+ * almost rc5 coding, but some non-standard keys */
+
+IR_KEYTAB_TYPE ir_codes_tt_3200[IR_KEYTAB_SIZE] = {
+  /* Keys 0 to 9 */
+  [ 0x03 ] = KEY_1,
+  [ 0x04 ] = KEY_2,
+  [ 0x05 ] = KEY_3,
+  [ 0x06 ] = KEY_4,
+  [ 0x07 ] = KEY_5,
+  [ 0x08 ] = KEY_6,
+  [ 0x09 ] = KEY_7,
+  [ 0x0a ] = KEY_8,
+  [ 0x0b ] = KEY_9,
+  [ 0x0c ] = KEY_0,
+
+  [ 0x19 ] = KEY_TEXT,            /* keypad asterisk as well */
+  [ 0x14 ] = KEY_RED,             /* red button */
+  [ 0x12 ] = KEY_MENU,            /* The "i" key */
+  [ 0x18 ] = KEY_MUTE,
+  [ 0x25 ] = KEY_VOLUMEUP,
+  [ 0x26 ] = KEY_VOLUMEDOWN,
+  [ 0x0d ] = KEY_UP,
+  [ 0x11 ] = KEY_DOWN,
+  [ 0x0e ] = KEY_LEFT,
+  [ 0x10 ] = KEY_RIGHT,
+
+  [ 0x22 ] = KEY_EPG,             /* Guide */
+  [ 0x1a ] = KEY_TV,
+  [ 0x1e ] = KEY_NEXTSONG,        /* skip >| */
+  [ 0x13 ] = KEY_EXIT,            /* back/exit */
+  [ 0x23 ] = KEY_CHANNELUP,       /* channel / program + */
+  [ 0x24 ] = KEY_CHANNELDOWN,     /* channel / program - */
+  [ 0x0f ] = KEY_ENTER,           /* OK */
+  [ 0x17 ] = KEY_BLUE,            /* blue button */
+  [ 0x15 ] = KEY_GREEN,           /* green button */
+  [ 0x3e ] = KEY_PAUSE,           /* pause */
+  [ 0x3d ] = KEY_REWIND,          /* backward << */
+  [ 0x3f ] = KEY_FASTFORWARD,     /* forward >> */
+  [ 0x3b ] = KEY_PLAY,
+  [ 0x3c ] = KEY_STOP,
+  [ 0x3a ] = KEY_RECORD,          /* recording */
+  [ 0x16 ] = KEY_YELLOW,          /* yellow key */
+  [ 0x01 ] = KEY_POWER,           /* system power */
+};
+
+EXPORT_SYMBOL_GPL(ir_codes_tt_3200);
+
 IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE] = {
 	[ 0x1d ] = KEY_SWITCHVIDEOMODE, /* switch inputs */
 	[ 0x2a ] = KEY_FRONT,
--- linux/drivers/media/dvb/ttpci/budget-ci.c	2008-03-22 12:31:19.000000000 -0400
+++ ../multiproto-bis/multiproto/linux/drivers/media/dvb/ttpci/budget-ci.c	2008-05-22 08:24:48.000000000 -0400
@@ -249,6 +249,17 @@
 		else
 			budget_ci->ir.rc5_device = rc5_device;
 		break;
+	case 0x1019:
+		/* For the TT 3200 bundled remote */
+		ir_input_init(input_dev, &budget_ci->ir.state,
+			      IR_TYPE_RC5, ir_codes_tt_3200);
+
+		if (rc5_device < 0)
+		  /* I don't know the device for now so...*/
+		  budget_ci->ir.rc5_device = IR_DEVICE_ANY;
+		else
+			budget_ci->ir.rc5_device = rc5_device;
+		break;
 	default:
 		/* unknown remote */
 		ir_input_init(input_dev, &budget_ci->ir.state,
--- linux/include/media/ir-common.h	2008-03-22 10:12:19.000000000 -0400
+++ ../multiproto-bis/multiproto/linux/include/media/ir-common.h	2008-05-14 11:34:18.000000000 -0400
@@ -139,6 +139,7 @@
 extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_tt_3200[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE];

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux