Mailing List archive

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

[linux-dvb] [PATCH] WinTV NovaT remote control



Hi,
my NovaT (budget DVB-T card from Hauppauge) came with the remote control shown 
in this picture: http://213.221.87.83/images/prod/media_mvp_small.gif

So I wrote a patch for budget-ci.c (patch is against dvb-linux HEAD)
I couldn't resist to add a small comment to this file. (About the nonsense of 
hardcoding scancodes) :-)

cheers Malte Doersam
--- linux-2.6.6/drivers/media/dvb/ttpci/budget-ci.c.org	2004-05-28 23:24:04.000000000 +0200
+++ linux-2.6.6/drivers/media/dvb/ttpci/budget-ci.c	2004-05-28 23:24:01.000000000 +0200
@@ -129,58 +129,65 @@
 }
 
 
-/* from reading the following remotes:
-   Zenith Universal 7 / TV Mode 807 / VCR Mode 837
-   Hauppauge (from NOVA-CI-s box product)
-   i've taken a "middle of the road" approach and note the differences
+/* The Hauppauge Wintv Nova-T comes with a slightly different remote control.
+   See this image for the Nova-T remote control:
+     http://213.221.87.83/images/prod/media_mvp_small.gif 
+   I changed the numbers from KEY_[0-9] to BTN_[0-9] : 
+     see http://seclists.org/lists/linux-kernel/2003/Aug/3091.html
+   --
+   The whole concept of hardcoding these codes into the module is stupid,
+   because this is only an IR receiver and you might want to use a random
+   remote control. 
+   Replacing /dev/input/eventx with an /dev/dvb/adapter0/ir0 might be a good idea.
+   The scancodes should be evaluated in user space and not be hardcoded!
 */
-static	u16 key_map[64] = {
-	/* 0x0X */
-	KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8,
-	KEY_9,
-	KEY_ENTER,
-	KEY_RED,
-	KEY_POWER,		/* RADIO on Hauppauge */
-	KEY_MUTE,
-	0,
-	KEY_A,			/* TV on Hauppauge */
-	/* 0x1X */
-	KEY_VOLUMEUP, KEY_VOLUMEDOWN,
-	0, 0,
-	KEY_B,
-	0, 0, 0, 0, 0, 0, 0,
-	KEY_UP, KEY_DOWN,
-	KEY_OPTION,		/* RESERVED on Hauppauge */
-	KEY_BREAK,
-	/* 0x2X */
-	KEY_CHANNELUP, KEY_CHANNELDOWN,
-	KEY_PREVIOUS,		/* Prev. Ch on Zenith, SOURCE on Hauppauge */
-	0, KEY_RESTART, KEY_OK,
-	KEY_CYCLEWINDOWS,	/* MINIMIZE on Hauppauge */
-	0,
-	KEY_ENTER,		/* VCR mode on Zenith */
-	KEY_PAUSE,
-	0,
-	KEY_RIGHT, KEY_LEFT,
-	0,
-	KEY_MENU,		/* FULL SCREEN on Hauppauge */
+
+static u16 key_map[64] = {
+	BTN_0,			/* 0x00 -- 0 */
+	BTN_1,			/* 0x01 -- 1 */
+	BTN_2,			/* 0x02 -- 2 */
+	BTN_3,			/* 0x03 -- 3 */
+	BTN_4,			/* 0x04 -- 4 */
+	BTN_5,			/* 0x05 -- 5 */
+	BTN_6,			/* 0x06 -- 6 */
+	BTN_7,			/* 0x07 -- 7 */
+	BTN_8,			/* 0x08 -- 8 */
+	BTN_9,			/* 0x09 -- 9 */
 	0,
-	/* 0x3X */
-	KEY_SLOW,
-	KEY_PREVIOUS,		/* VCR mode on Zenith */
-	KEY_REWIND,
+	KEY_RED,		/* 0x0b -- Red */
+	BTN_MISC,		/* 0x0c -- Empty */
+	KEY_MENU,		/* 0x0d -- Menu */
 	0,
-	KEY_FASTFORWARD,
-	KEY_PLAY, KEY_STOP,
-	KEY_RECORD,
-	KEY_TUNER,		/* TV/VCR on Zenith */
+	KEY_AUDIO,		/* 0x0f -- Mute */
+	KEY_VOLUMEUP,		/* 0x10 -- Right */
+	KEY_VOLUMEDOWN,		/* 0x11 -- Left */
+	0,0,0,0,0,0,0,0,0,0,0,0,/* 0x12 to 0x1d */
+	KEY_NEXT,		/* 0x1e -- Skip */
+	KEY_BACK,		/* 0x1f -- Back */
+	KEY_CHANNELUP,		/* 0x20 -- Up */
+	KEY_CHANNELDOWN,	/* 0x21 -- Down */
+	0,0,
+	KEY_PREVIOUS,		/* 0x24 -- Replay */
+	KEY_OK,			/* 0x25 -- Ok */
+	0,0,0,
+	KEY_BLUE,		/* 0x29 -- Blue */
+	0,0,0,0,
+	KEY_GREEN,		/* 0x2e -- Green */
 	0,
-	KEY_C,
+	KEY_PAUSE,		/* 0x30 -- Pause */
 	0,
-	KEY_EXIT,
-	KEY_POWER2,
-	KEY_TUNER,		/* VCR mode on Zenith */
+	BTN_BACK,		/* 0x32 -- Back */
 	0,
+	BTN_FORWARD,		/* 0x34 -- Forward */
+	KEY_PLAY,		/* 0x35 -- Play */
+	KEY_STOP,		/* 0x36 -- Stop */
+	KEY_RECORD,		/* 0x37 -- Record */
+	KEY_YELLOW,		/* 0x38 -- Yellow */
+	0,0,
+	KEY_GOTO,		/* 0x3b -- Go */
+	KEY_SCREEN,		/* 0x3c -- Full */
+	KEY_POWER,		/* 0x3d -- Power */
+	0,0,
 };
 
 

Home | Main Index | Thread Index