All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/13] [media] rc/keymaps: use KEY_CAMERA for snapshots
       [not found] <cover.1295882104.git.mchehab@redhat.com>
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 02/13] [media] rc/keymaps: Use KEY_VIDEO for Video Source Mauro Carvalho Chehab
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

On a few places, KEY_MHP were used for snapshots. However, KEY_CAMERA
is used for it on all the other keyboards that have a snapshot/Picture
button.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c
index f2dbce7..f6344cd 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -176,7 +176,7 @@ static struct rc_map_table rc_map_digitv_table[] = {
 	{ 0xaf59, KEY_AUX },
 	{ 0x5f5a, KEY_DVD },
 	{ 0x6f5a, KEY_POWER },
-	{ 0x9f5a, KEY_MHP },     /* labelled 'Picture' */
+	{ 0x9f5a, KEY_CAMERA },     /* labelled 'Picture' */
 	{ 0xaf5a, KEY_AUDIO },
 	{ 0x5f65, KEY_INFO },
 	{ 0x6f65, KEY_F13 },     /* 16:9 */
diff --git a/drivers/media/rc/keymaps/rc-avermedia-m135a.c b/drivers/media/rc/keymaps/rc-avermedia-m135a.c
index 357fea5..3d2cbe4 100644
--- a/drivers/media/rc/keymaps/rc-avermedia-m135a.c
+++ b/drivers/media/rc/keymaps/rc-avermedia-m135a.c
@@ -108,7 +108,7 @@ static struct rc_map_table avermedia_m135a[] = {
 	{ 0x0414, KEY_TEXT },
 	{ 0x0415, KEY_EPG },
 	{ 0x041a, KEY_TV2 },      /* PIP */
-	{ 0x041b, KEY_MHP },      /* Snapshot */
+	{ 0x041b, KEY_CAMERA },      /* Snapshot */
 
 	{ 0x0417, KEY_RECORD },
 	{ 0x0416, KEY_PLAYPAUSE },
diff --git a/drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c b/drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c
index e694e6e..8cd7f28 100644
--- a/drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c
+++ b/drivers/media/rc/keymaps/rc-avermedia-m733a-rm-k6.c
@@ -56,7 +56,7 @@ static struct rc_map_table avermedia_m733a_rm_k6[] = {
 	{ 0x0414, KEY_TEXT },
 	{ 0x0415, KEY_EPG },
 	{ 0x041a, KEY_TV2 },      /* PIP */
-	{ 0x041b, KEY_MHP },      /* Snapshot */
+	{ 0x041b, KEY_CAMERA },      /* Snapshot */
 
 	{ 0x0417, KEY_RECORD },
 	{ 0x0416, KEY_PLAYPAUSE },
diff --git a/drivers/media/rc/keymaps/rc-budget-ci-old.c b/drivers/media/rc/keymaps/rc-budget-ci-old.c
index 97fc386..2f66e43 100644
--- a/drivers/media/rc/keymaps/rc-budget-ci-old.c
+++ b/drivers/media/rc/keymaps/rc-budget-ci-old.c
@@ -12,7 +12,8 @@
 
 #include <media/rc-map.h>
 
-/* From reading the following remotes:
+/*
+ * From reading the following remotes:
  * Zenith Universal 7 / TV Mode 807 / VCR Mode 837
  * Hauppauge (from NOVA-CI-s box product)
  * This is a "middle of the road" approach, differences are noted
diff --git a/drivers/media/rc/keymaps/rc-encore-enltv.c b/drivers/media/rc/keymaps/rc-encore-enltv.c
index afa4e92..1a0e590 100644
--- a/drivers/media/rc/keymaps/rc-encore-enltv.c
+++ b/drivers/media/rc/keymaps/rc-encore-enltv.c
@@ -24,7 +24,7 @@ static struct rc_map_table encore_enltv[] = {
 	{ 0x1e, KEY_TV },
 	{ 0x00, KEY_VIDEO },
 	{ 0x01, KEY_AUDIO },		/* music */
-	{ 0x02, KEY_MHP },		/* picture */
+	{ 0x02, KEY_CAMERA },		/* picture */
 
 	{ 0x1f, KEY_1 },
 	{ 0x03, KEY_2 },
diff --git a/drivers/media/rc/keymaps/rc-hauppauge-new.c b/drivers/media/rc/keymaps/rc-hauppauge-new.c
index bd11da4..b6a12fe 100644
--- a/drivers/media/rc/keymaps/rc-hauppauge-new.c
+++ b/drivers/media/rc/keymaps/rc-hauppauge-new.c
@@ -48,7 +48,7 @@ static struct rc_map_table hauppauge_new[] = {
 	   "Multimedia Home Platform" -
 	   no "PICTURES" key in input.h
 	 */
-	{ 0x1a, KEY_MHP },
+	{ 0x1a, KEY_CAMERA },
 
 	{ 0x1b, KEY_EPG },		/* Guide */
 	{ 0x1c, KEY_TV },
diff --git a/drivers/media/rc/keymaps/rc-nebula.c b/drivers/media/rc/keymaps/rc-nebula.c
index 3e6f077..ddae20e 100644
--- a/drivers/media/rc/keymaps/rc-nebula.c
+++ b/drivers/media/rc/keymaps/rc-nebula.c
@@ -27,7 +27,7 @@ static struct rc_map_table nebula[] = {
 	{ 0x0b, KEY_AUX },
 	{ 0x0c, KEY_DVD },
 	{ 0x0d, KEY_POWER },
-	{ 0x0e, KEY_MHP },	/* labelled 'Picture' */
+	{ 0x0e, KEY_CAMERA },	/* labelled 'Picture' */
 	{ 0x0f, KEY_AUDIO },
 	{ 0x10, KEY_INFO },
 	{ 0x11, KEY_F13 },	/* 16:9 */
diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
index dfc9b15..2ca825b 100644
--- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
+++ b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
@@ -51,7 +51,7 @@ static struct rc_map_table rc5_hauppauge_new[] = {
 	   "Multimedia Home Platform" -
 	   no "PICTURES" key in input.h
 	 */
-	{ 0x1e1a, KEY_MHP },
+	{ 0x1e1a, KEY_CAMERA },
 
 	{ 0x1e1b, KEY_EPG },		/* Guide */
 	{ 0x1e1c, KEY_TV },
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 02/13] [media] rc/keymaps: Use KEY_VIDEO for Video Source
       [not found] <cover.1295882104.git.mchehab@redhat.com>
  2011-01-24 15:18 ` [PATCH 01/13] [media] rc/keymaps: use KEY_CAMERA for snapshots Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 03/13] [media] rc/keymaps: Fix most KEY_PROG[n] keycodes Mauro Carvalho Chehab
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

Each keyboard map were using a different definition for
the Source/Video Source key.
Behold Columbus were the only one using KEY_PROPS.

As we want to standardize those keys at X11 and at
userspace applications, we need to use just one code
for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/rc/keymaps/rc-avermedia-dvbt.c b/drivers/media/rc/keymaps/rc-avermedia-dvbt.c
index 3ddb41b..c25809d 100644
--- a/drivers/media/rc/keymaps/rc-avermedia-dvbt.c
+++ b/drivers/media/rc/keymaps/rc-avermedia-dvbt.c
@@ -26,12 +26,12 @@ static struct rc_map_table avermedia_dvbt[] = {
 	{ 0x16, KEY_8 },		/* '8' / 'down arrow' */
 	{ 0x36, KEY_9 },		/* '9' */
 
-	{ 0x20, KEY_LIST },		/* 'source' */
+	{ 0x20, KEY_VIDEO },		/* 'source' */
 	{ 0x10, KEY_TEXT },		/* 'teletext' */
 	{ 0x00, KEY_POWER },		/* 'power' */
 	{ 0x04, KEY_AUDIO },		/* 'audio' */
 	{ 0x06, KEY_ZOOM },		/* 'full screen' */
-	{ 0x18, KEY_VIDEO },		/* 'display' */
+	{ 0x18, KEY_SWITCHVIDEOMODE },	/* 'display' */
 	{ 0x38, KEY_SEARCH },		/* 'loop' */
 	{ 0x08, KEY_INFO },		/* 'preview' */
 	{ 0x2a, KEY_REWIND },		/* 'backward <<' */
diff --git a/drivers/media/rc/keymaps/rc-behold-columbus.c b/drivers/media/rc/keymaps/rc-behold-columbus.c
index 4b787fa..8bf058f 100644
--- a/drivers/media/rc/keymaps/rc-behold-columbus.c
+++ b/drivers/media/rc/keymaps/rc-behold-columbus.c
@@ -28,7 +28,7 @@ static struct rc_map_table behold_columbus[] = {
 	 *                             */
 
 	{ 0x13, KEY_MUTE },
-	{ 0x11, KEY_PROPS },
+	{ 0x11, KEY_VIDEO },
 	{ 0x1C, KEY_TUNER },	/* KEY_TV/KEY_RADIO	*/
 	{ 0x12, KEY_POWER },
 
diff --git a/drivers/media/rc/keymaps/rc-behold.c b/drivers/media/rc/keymaps/rc-behold.c
index 0ee1f14..c909a23 100644
--- a/drivers/media/rc/keymaps/rc-behold.c
+++ b/drivers/media/rc/keymaps/rc-behold.c
@@ -97,7 +97,7 @@ static struct rc_map_table behold[] = {
 	{ 0x6b861a, KEY_STOP },
 	{ 0x6b860e, KEY_TEXT },
 	{ 0x6b861f, KEY_RED },	/*XXX KEY_AUDIO	*/
-	{ 0x6b861e, KEY_YELLOW },	/*XXX KEY_SOURCE	*/
+	{ 0x6b861e, KEY_VIDEO },
 
 	/*  0x1d   0x13     0x19  *
 	 * SLEEP  PREVIEW   DVB   *
diff --git a/drivers/media/rc/keymaps/rc-dntv-live-dvb-t.c b/drivers/media/rc/keymaps/rc-dntv-live-dvb-t.c
index 43912bd..82c0200 100644
--- a/drivers/media/rc/keymaps/rc-dntv-live-dvb-t.c
+++ b/drivers/media/rc/keymaps/rc-dntv-live-dvb-t.c
@@ -32,7 +32,7 @@ static struct rc_map_table dntv_live_dvb_t[] = {
 	{ 0x0c, KEY_SEARCH },		/* scan */
 	{ 0x0d, KEY_STOP },
 	{ 0x0e, KEY_PAUSE },
-	{ 0x0f, KEY_LIST },		/* source */
+	{ 0x0f, KEY_VIDEO },		/* source */
 
 	{ 0x10, KEY_MUTE },
 	{ 0x11, KEY_REWIND },		/* backward << */
diff --git a/drivers/media/rc/keymaps/rc-encore-enltv2.c b/drivers/media/rc/keymaps/rc-encore-enltv2.c
index 7d5b00e..b6264f1 100644
--- a/drivers/media/rc/keymaps/rc-encore-enltv2.c
+++ b/drivers/media/rc/keymaps/rc-encore-enltv2.c
@@ -32,7 +32,7 @@ static struct rc_map_table encore_enltv2[] = {
 	{ 0x64, KEY_LAST },		/* +100 */
 	{ 0x4e, KEY_AGAIN },		/* Recall */
 
-	{ 0x6c, KEY_SWITCHVIDEOMODE },	/* Video Source */
+	{ 0x6c, KEY_VIDEO },		/* Video Source */
 	{ 0x5e, KEY_MENU },
 	{ 0x56, KEY_SCREEN },
 	{ 0x7a, KEY_SETUP },
diff --git a/drivers/media/rc/keymaps/rc-flydvb.c b/drivers/media/rc/keymaps/rc-flydvb.c
index aea2f4a..a8b0f66 100644
--- a/drivers/media/rc/keymaps/rc-flydvb.c
+++ b/drivers/media/rc/keymaps/rc-flydvb.c
@@ -37,8 +37,8 @@ static struct rc_map_table flydvb[] = {
 	{ 0x13, KEY_CHANNELDOWN },	/* CH- */
 	{ 0x1d, KEY_ENTER },		/* Enter */
 
-	{ 0x1a, KEY_MODE },		/* PIP */
-	{ 0x18, KEY_TUNER },		/* Source */
+	{ 0x1a, KEY_TV2 },		/* PIP */
+	{ 0x18, KEY_VIDEO },		/* Source */
 
 	{ 0x1e, KEY_RECORD },		/* Record/Pause */
 	{ 0x15, KEY_ANGLE },		/* Swap (no label on key) */
diff --git a/drivers/media/rc/keymaps/rc-hauppauge-new.c b/drivers/media/rc/keymaps/rc-hauppauge-new.c
index b6a12fe..44f3283 100644
--- a/drivers/media/rc/keymaps/rc-hauppauge-new.c
+++ b/drivers/media/rc/keymaps/rc-hauppauge-new.c
@@ -42,7 +42,7 @@ static struct rc_map_table hauppauge_new[] = {
 	{ 0x15, KEY_DOWN },
 	{ 0x16, KEY_LEFT },
 	{ 0x17, KEY_RIGHT },
-	{ 0x18, KEY_VIDEO },		/* Videos */
+	{ 0x18, KEY_VCR },		/* Videos */
 	{ 0x19, KEY_AUDIO },		/* Music */
 	/* 0x1a: Pictures - presume this means
 	   "Multimedia Home Platform" -
@@ -56,7 +56,7 @@ static struct rc_map_table hauppauge_new[] = {
 	{ 0x1f, KEY_EXIT },		/* back/exit */
 	{ 0x20, KEY_CHANNELUP },	/* channel / program + */
 	{ 0x21, KEY_CHANNELDOWN },	/* channel / program - */
-	{ 0x22, KEY_CHANNEL },		/* source (old black remote) */
+	{ 0x22, KEY_VIDEO },		/* source (old black remote) */
 	{ 0x24, KEY_PREVIOUSSONG },	/* replay |< */
 	{ 0x25, KEY_ENTER },		/* OK */
 	{ 0x26, KEY_SLEEP },		/* minimize (old black remote) */
diff --git a/drivers/media/rc/keymaps/rc-kworld-315u.c b/drivers/media/rc/keymaps/rc-kworld-315u.c
index 3ce6ef7..7f33edb 100644
--- a/drivers/media/rc/keymaps/rc-kworld-315u.c
+++ b/drivers/media/rc/keymaps/rc-kworld-315u.c
@@ -17,7 +17,7 @@
 
 static struct rc_map_table kworld_315u[] = {
 	{ 0x6143, KEY_POWER },
-	{ 0x6101, KEY_TUNER },		/* source */
+	{ 0x6101, KEY_VIDEO },		/* source */
 	{ 0x610b, KEY_ZOOM },
 	{ 0x6103, KEY_POWER2 },		/* shutdown */
 
diff --git a/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c b/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c
index fa8fd0a..8e9969d 100644
--- a/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c
+++ b/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c
@@ -62,7 +62,7 @@ static struct rc_map_table msi_tvanywhere_plus[] = {
 	{ 0x13, KEY_AGAIN },		/* Recall */
 
 	{ 0x1e, KEY_POWER },		/* Power */
-	{ 0x07, KEY_TUNER },		/* Source */
+	{ 0x07, KEY_VIDEO },		/* Source */
 	{ 0x1c, KEY_SEARCH },		/* Scan */
 	{ 0x18, KEY_MUTE },		/* Mute */
 
diff --git a/drivers/media/rc/keymaps/rc-norwood.c b/drivers/media/rc/keymaps/rc-norwood.c
index 629ee9d..f1c1281 100644
--- a/drivers/media/rc/keymaps/rc-norwood.c
+++ b/drivers/media/rc/keymaps/rc-norwood.c
@@ -29,7 +29,7 @@ static struct rc_map_table norwood[] = {
 	{ 0x28, KEY_8 },
 	{ 0x29, KEY_9 },
 
-	{ 0x78, KEY_TUNER },		/* Video Source        */
+	{ 0x78, KEY_VIDEO },		/* Video Source        */
 	{ 0x2c, KEY_EXIT },		/* Open/Close software */
 	{ 0x2a, KEY_SELECT },		/* 2 Digit Select      */
 	{ 0x69, KEY_AGAIN },		/* Recall              */
diff --git a/drivers/media/rc/keymaps/rc-pctv-sedna.c b/drivers/media/rc/keymaps/rc-pctv-sedna.c
index fa5ae59..7cdef6e 100644
--- a/drivers/media/rc/keymaps/rc-pctv-sedna.c
+++ b/drivers/media/rc/keymaps/rc-pctv-sedna.c
@@ -36,7 +36,7 @@ static struct rc_map_table pctv_sedna[] = {
 	{ 0x0e, KEY_STOP },
 	{ 0x0f, KEY_PREVIOUSSONG },
 	{ 0x10, KEY_ZOOM },
-	{ 0x11, KEY_TUNER },	/* Source */
+	{ 0x11, KEY_VIDEO },	/* Source */
 	{ 0x12, KEY_POWER },
 	{ 0x13, KEY_MUTE },
 	{ 0x15, KEY_CHANNELDOWN },
diff --git a/drivers/media/rc/keymaps/rc-pixelview-mk12.c b/drivers/media/rc/keymaps/rc-pixelview-mk12.c
index 8d9f664..125fc39 100644
--- a/drivers/media/rc/keymaps/rc-pixelview-mk12.c
+++ b/drivers/media/rc/keymaps/rc-pixelview-mk12.c
@@ -34,7 +34,7 @@ static struct rc_map_table pixelview_mk12[] = {
 	{ 0x866b13, KEY_AGAIN },	/* loop */
 	{ 0x866b10, KEY_DIGITS },	/* +100 */
 
-	{ 0x866b00, KEY_MEDIA },	/* source */
+	{ 0x866b00, KEY_VIDEO },		/* source */
 	{ 0x866b18, KEY_MUTE },		/* mute */
 	{ 0x866b19, KEY_CAMERA },	/* snapshot */
 	{ 0x866b1a, KEY_SEARCH },	/* scan */
diff --git a/drivers/media/rc/keymaps/rc-pixelview-new.c b/drivers/media/rc/keymaps/rc-pixelview-new.c
index 777a700..bd78d6a 100644
--- a/drivers/media/rc/keymaps/rc-pixelview-new.c
+++ b/drivers/media/rc/keymaps/rc-pixelview-new.c
@@ -33,7 +33,7 @@ static struct rc_map_table pixelview_new[] = {
 	{ 0x3e, KEY_0 },
 
 	{ 0x1c, KEY_AGAIN },		/* LOOP	*/
-	{ 0x3f, KEY_MEDIA },		/* Source */
+	{ 0x3f, KEY_VIDEO },		/* Source */
 	{ 0x1f, KEY_LAST },		/* +100 */
 	{ 0x1b, KEY_MUTE },
 
diff --git a/drivers/media/rc/keymaps/rc-pixelview.c b/drivers/media/rc/keymaps/rc-pixelview.c
index 0ec5988..06187e7 100644
--- a/drivers/media/rc/keymaps/rc-pixelview.c
+++ b/drivers/media/rc/keymaps/rc-pixelview.c
@@ -15,7 +15,7 @@
 static struct rc_map_table pixelview[] = {
 
 	{ 0x1e, KEY_POWER },	/* power */
-	{ 0x07, KEY_MEDIA },	/* source */
+	{ 0x07, KEY_VIDEO },	/* source */
 	{ 0x1c, KEY_SEARCH },	/* scan */
 
 
diff --git a/drivers/media/rc/keymaps/rc-pv951.c b/drivers/media/rc/keymaps/rc-pv951.c
index 83a418d..5e8beee 100644
--- a/drivers/media/rc/keymaps/rc-pv951.c
+++ b/drivers/media/rc/keymaps/rc-pv951.c
@@ -46,10 +46,10 @@ static struct rc_map_table pv951[] = {
 	{ 0x0c, KEY_SEARCH },		/* AUTOSCAN */
 
 	/* Not sure what to do with these ones! */
-	{ 0x0f, KEY_SELECT },		/* SOURCE */
+	{ 0x0f, KEY_VIDEO },		/* SOURCE */
 	{ 0x0a, KEY_KPPLUS },		/* +100 */
 	{ 0x14, KEY_EQUAL },		/* SYNC */
-	{ 0x1c, KEY_MEDIA },		/* PC/TV */
+	{ 0x1c, KEY_TV },		/* PC/TV */
 };
 
 static struct rc_map_list pv951_map = {
diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
index 2ca825b..a581c86 100644
--- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
+++ b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
@@ -45,7 +45,7 @@ static struct rc_map_table rc5_hauppauge_new[] = {
 	{ 0x1e15, KEY_DOWN },
 	{ 0x1e16, KEY_LEFT },
 	{ 0x1e17, KEY_RIGHT },
-	{ 0x1e18, KEY_VIDEO },		/* Videos */
+	{ 0x1e18, KEY_VCR },		/* Videos */
 	{ 0x1e19, KEY_AUDIO },		/* Music */
 	/* 0x1e1a: Pictures - presume this means
 	   "Multimedia Home Platform" -
@@ -59,7 +59,7 @@ static struct rc_map_table rc5_hauppauge_new[] = {
 	{ 0x1e1f, KEY_EXIT },		/* back/exit */
 	{ 0x1e20, KEY_CHANNELUP },	/* channel / program + */
 	{ 0x1e21, KEY_CHANNELDOWN },	/* channel / program - */
-	{ 0x1e22, KEY_CHANNEL },		/* source (old black remote) */
+	{ 0x1e22, KEY_VIDEO },		/* source (old black remote) */
 	{ 0x1e24, KEY_PREVIOUSSONG },	/* replay |< */
 	{ 0x1e25, KEY_ENTER },		/* OK */
 	{ 0x1e26, KEY_SLEEP },		/* minimize (old black remote) */
diff --git a/drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c b/drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c
index 2d14598..6813d11 100644
--- a/drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c
+++ b/drivers/media/rc/keymaps/rc-real-audio-220-32-keys.c
@@ -35,7 +35,7 @@ static struct rc_map_table real_audio_220_32_keys[] = {
 	{ 0x15, KEY_CHANNELDOWN},
 	{ 0x16, KEY_ENTER},
 
-	{ 0x11, KEY_LIST},		/* Source */
+	{ 0x11, KEY_VIDEO},		/* Source */
 	{ 0x0d, KEY_AUDIO},		/* stereo */
 
 	{ 0x0f, KEY_PREVIOUS},		/* Prev */
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 03/13] [media] rc/keymaps: Fix most KEY_PROG[n] keycodes
       [not found] <cover.1295882104.git.mchehab@redhat.com>
  2011-01-24 15:18 ` [PATCH 01/13] [media] rc/keymaps: use KEY_CAMERA for snapshots Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 02/13] [media] rc/keymaps: Use KEY_VIDEO for Video Source Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent Mauro Carvalho Chehab
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

Those KEY_PROG[n] keys were used on places where the developer
didn't know for sure what key should be used. On several cases,
using KEY_RED, KEY_GREEN, KEY_YELLOW would be enough. On others,
there are specific keys for that already.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c b/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c
index 136d395..9a8752f 100644
--- a/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c
+++ b/drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c
@@ -50,9 +50,9 @@ static struct rc_map_table adstech_dvb_t_pci[] = {
 	{ 0x13, KEY_TUNER },		/* Live */
 	{ 0x0a, KEY_A },
 	{ 0x12, KEY_B },
-	{ 0x03, KEY_PROG1 },		/* 1 */
-	{ 0x01, KEY_PROG2 },		/* 2 */
-	{ 0x00, KEY_PROG3 },		/* 3 */
+	{ 0x03, KEY_RED },		/* 1 */
+	{ 0x01, KEY_GREEN },		/* 2 */
+	{ 0x00, KEY_YELLOW },		/* 3 */
 	{ 0x06, KEY_DVD },
 	{ 0x48, KEY_AUX },		/* Photo */
 	{ 0x40, KEY_VIDEO },
diff --git a/drivers/media/rc/keymaps/rc-avermedia-rm-ks.c b/drivers/media/rc/keymaps/rc-avermedia-rm-ks.c
index f4ca1ff..9d68af2 100644
--- a/drivers/media/rc/keymaps/rc-avermedia-rm-ks.c
+++ b/drivers/media/rc/keymaps/rc-avermedia-rm-ks.c
@@ -31,7 +31,7 @@ static struct rc_map_table avermedia_rm_ks[] = {
 	{ 0x0505, KEY_VOLUMEDOWN },
 	{ 0x0506, KEY_MUTE },
 	{ 0x0507, KEY_RIGHT },
-	{ 0x0508, KEY_PROG1 },
+	{ 0x0508, KEY_RED },
 	{ 0x0509, KEY_1 },
 	{ 0x050a, KEY_2 },
 	{ 0x050b, KEY_3 },
diff --git a/drivers/media/rc/keymaps/rc-cinergy.c b/drivers/media/rc/keymaps/rc-cinergy.c
index 99520ff..cf3a6bf 100644
--- a/drivers/media/rc/keymaps/rc-cinergy.c
+++ b/drivers/media/rc/keymaps/rc-cinergy.c
@@ -25,7 +25,7 @@ static struct rc_map_table cinergy[] = {
 	{ 0x09, KEY_9 },
 
 	{ 0x0a, KEY_POWER },
-	{ 0x0b, KEY_PROG1 },		/* app */
+	{ 0x0b, KEY_MEDIA },		/* app */
 	{ 0x0c, KEY_ZOOM },		/* zoom/fullscreen */
 	{ 0x0d, KEY_CHANNELUP },	/* channel */
 	{ 0x0e, KEY_CHANNELDOWN },	/* channel- */
diff --git a/drivers/media/rc/keymaps/rc-encore-enltv.c b/drivers/media/rc/keymaps/rc-encore-enltv.c
index 1a0e590..e56ac6e 100644
--- a/drivers/media/rc/keymaps/rc-encore-enltv.c
+++ b/drivers/media/rc/keymaps/rc-encore-enltv.c
@@ -77,7 +77,7 @@ static struct rc_map_table encore_enltv[] = {
 	{ 0x50, KEY_SLEEP },		/* shutdown */
 	{ 0x51, KEY_MODE },		/* stereo > main */
 	{ 0x52, KEY_SELECT },		/* stereo > sap */
-	{ 0x53, KEY_PROG1 },		/* teletext */
+	{ 0x53, KEY_TEXT },		/* teletext */
 
 
 	{ 0x59, KEY_RED },		/* AP1 */
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (2 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 03/13] [media] rc/keymaps: Fix most KEY_PROG[n] keycodes Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:45   ` Jarod Wilson
  2011-01-24 15:18 ` [PATCH 05/13] [media] dw2102: Use multimedia keys instead of an app-specific mapping Mauro Carvalho Chehab
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

Using xev and testing the "Windows" key on a normal keyboard, it
is mapped as KEY_LEFTMETA. So, as this is the standard code for
it, use it, instead of a generic, meaningless KEY_PROG1.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/rc/keymaps/rc-imon-mce.c b/drivers/media/rc/keymaps/rc-imon-mce.c
index cb67184..937a819 100644
--- a/drivers/media/rc/keymaps/rc-imon-mce.c
+++ b/drivers/media/rc/keymaps/rc-imon-mce.c
@@ -111,7 +111,7 @@ static struct rc_map_table imon_mce[] = {
 	{ 0x800ff44d, KEY_TITLE },
 
 	{ 0x800ff40c, KEY_POWER },
-	{ 0x800ff40d, KEY_PROG1 }, /* Windows MCE button */
+	{ 0x800ff40d, KEY_LEFTMETA }, /* Windows MCE button */
 
 };
 
diff --git a/drivers/media/rc/keymaps/rc-imon-pad.c b/drivers/media/rc/keymaps/rc-imon-pad.c
index eef46b7..63d42bd 100644
--- a/drivers/media/rc/keymaps/rc-imon-pad.c
+++ b/drivers/media/rc/keymaps/rc-imon-pad.c
@@ -125,7 +125,7 @@ static struct rc_map_table imon_pad[] = {
 	{ 0x2b8195b7, KEY_CONTEXT_MENU }, /* Left Menu*/
 	{ 0x02000065, KEY_COMPOSE }, /* RightMenu */
 	{ 0x28b715b7, KEY_COMPOSE }, /* RightMenu */
-	{ 0x2ab195b7, KEY_PROG1 }, /* Go or MultiMon */
+	{ 0x2ab195b7, KEY_LEFTMETA }, /* Go or MultiMon */
 	{ 0x29b715b7, KEY_DASHBOARD }, /* AppLauncher */
 };
 
diff --git a/drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c b/drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c
index e45f0b8..08d1831 100644
--- a/drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c
+++ b/drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c
@@ -17,7 +17,7 @@
  */
 
 static struct rc_map_table kworld_plus_tv_analog[] = {
-	{ 0x0c, KEY_PROG1 },		/* Kworld key */
+	{ 0x0c, KEY_LEFTMETA },		/* Kworld key */
 	{ 0x16, KEY_CLOSECD },		/* -> ) */
 	{ 0x1d, KEY_POWER2 },
 
diff --git a/drivers/media/rc/keymaps/rc-rc6-mce.c b/drivers/media/rc/keymaps/rc-rc6-mce.c
index 3bf3337..eb90ad7 100644
--- a/drivers/media/rc/keymaps/rc-rc6-mce.c
+++ b/drivers/media/rc/keymaps/rc-rc6-mce.c
@@ -27,7 +27,7 @@ static struct rc_map_table rc6_mce[] = {
 	{ 0x800f040a, KEY_DELETE },
 	{ 0x800f040b, KEY_ENTER },
 	{ 0x800f040c, KEY_POWER },		/* PC Power */
-	{ 0x800f040d, KEY_PROG1 },		/* Windows MCE button */
+	{ 0x800f040d, KEY_LEFTMETA },		/* Windows MCE button */
 	{ 0x800f040e, KEY_MUTE },
 	{ 0x800f040f, KEY_INFO },
 
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 05/13] [media] dw2102: Use multimedia keys instead of an app-specific mapping
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (3 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 06/13] [media] opera1: " Mauro Carvalho Chehab
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

This driver uses an app-specific keymap for one of the tables. This
is wrong. Instead, use the standard keycodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c
index 2c307ba..3544dff 100644
--- a/drivers/media/dvb/dvb-usb/dw2102.c
+++ b/drivers/media/dvb/dvb-usb/dw2102.c
@@ -949,8 +949,8 @@ static int dw3101_tuner_attach(struct dvb_usb_adapter *adap)
 }
 
 static struct rc_map_table rc_map_dw210x_table[] = {
-	{ 0xf80a, KEY_Q },		/*power*/
-	{ 0xf80c, KEY_M },		/*mute*/
+	{ 0xf80a, KEY_POWER2 },		/*power*/
+	{ 0xf80c, KEY_MUTE },		/*mute*/
 	{ 0xf811, KEY_1 },
 	{ 0xf812, KEY_2 },
 	{ 0xf813, KEY_3 },
@@ -961,25 +961,25 @@ static struct rc_map_table rc_map_dw210x_table[] = {
 	{ 0xf818, KEY_8 },
 	{ 0xf819, KEY_9 },
 	{ 0xf810, KEY_0 },
-	{ 0xf81c, KEY_PAGEUP },	/*ch+*/
-	{ 0xf80f, KEY_PAGEDOWN },	/*ch-*/
-	{ 0xf81a, KEY_O },		/*vol+*/
-	{ 0xf80e, KEY_Z },		/*vol-*/
-	{ 0xf804, KEY_R },		/*rec*/
-	{ 0xf809, KEY_D },		/*fav*/
-	{ 0xf808, KEY_BACKSPACE },	/*rewind*/
-	{ 0xf807, KEY_A },		/*fast*/
-	{ 0xf80b, KEY_P },		/*pause*/
-	{ 0xf802, KEY_ESC },	/*cancel*/
-	{ 0xf803, KEY_G },		/*tab*/
+	{ 0xf81c, KEY_CHANNELUP },	/*ch+*/
+	{ 0xf80f, KEY_CHANNELDOWN },	/*ch-*/
+	{ 0xf81a, KEY_VOLUMEUP },	/*vol+*/
+	{ 0xf80e, KEY_VOLUMEDOWN },	/*vol-*/
+	{ 0xf804, KEY_RECORD },		/*rec*/
+	{ 0xf809, KEY_FAVORITES },	/*fav*/
+	{ 0xf808, KEY_REWIND },		/*rewind*/
+	{ 0xf807, KEY_FASTFORWARD },	/*fast*/
+	{ 0xf80b, KEY_PAUSE },		/*pause*/
+	{ 0xf802, KEY_ESC },		/*cancel*/
+	{ 0xf803, KEY_TAB },		/*tab*/
 	{ 0xf800, KEY_UP },		/*up*/
-	{ 0xf81f, KEY_ENTER },	/*ok*/
-	{ 0xf801, KEY_DOWN },	/*down*/
-	{ 0xf805, KEY_C },		/*cap*/
-	{ 0xf806, KEY_S },		/*stop*/
-	{ 0xf840, KEY_F },		/*full*/
-	{ 0xf81e, KEY_W },		/*tvmode*/
-	{ 0xf81b, KEY_B },		/*recall*/
+	{ 0xf81f, KEY_OK },		/*ok*/
+	{ 0xf801, KEY_DOWN },		/*down*/
+	{ 0xf805, KEY_CAMERA },		/*cap*/
+	{ 0xf806, KEY_STOP },		/*stop*/
+	{ 0xf840, KEY_ZOOM },		/*full*/
+	{ 0xf81e, KEY_TV },		/*tvmode*/
+	{ 0xf81b, KEY_LAST },		/*recall*/
 };
 
 static struct rc_map_table rc_map_tevii_table[] = {
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 06/13] [media] opera1: Use multimedia keys instead of an app-specific mapping
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (4 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 05/13] [media] dw2102: Use multimedia keys instead of an app-specific mapping Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 07/13] [media] a800: Fix a few wrong IR key assignments Mauro Carvalho Chehab
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

This driver uses an app-specific keymap for one of the tables. This
is wrong. Instead, use the standard keycodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c
index 1f1b7d6..7e569f4 100644
--- a/drivers/media/dvb/dvb-usb/opera1.c
+++ b/drivers/media/dvb/dvb-usb/opera1.c
@@ -342,23 +342,22 @@ static struct rc_map_table rc_map_opera1_table[] = {
 	{0x49b6, KEY_8},
 	{0x05fa, KEY_9},
 	{0x45ba, KEY_0},
-	{0x09f6, KEY_UP},	/*chanup */
-	{0x1be5, KEY_DOWN},	/*chandown */
-	{0x5da3, KEY_LEFT},	/*voldown */
-	{0x5fa1, KEY_RIGHT},	/*volup */
-	{0x07f8, KEY_SPACE},	/*tab */
-	{0x1fe1, KEY_ENTER},	/*play ok */
-	{0x1be4, KEY_Z},	/*zoom */
-	{0x59a6, KEY_M},	/*mute */
-	{0x5ba5, KEY_F},	/*tv/f */
-	{0x19e7, KEY_R},	/*rec */
-	{0x01fe, KEY_S},	/*Stop */
-	{0x03fd, KEY_P},	/*pause */
-	{0x03fc, KEY_W},	/*<- -> */
-	{0x07f9, KEY_C},	/*capture */
-	{0x47b9, KEY_Q},	/*exit */
-	{0x43bc, KEY_O},	/*power */
-
+	{0x09f6, KEY_CHANNELUP},	/*chanup */
+	{0x1be5, KEY_CHANNELDOWN},	/*chandown */
+	{0x5da3, KEY_VOLUMEDOWN},	/*voldown */
+	{0x5fa1, KEY_VOLUMEUP},		/*volup */
+	{0x07f8, KEY_SPACE},		/*tab */
+	{0x1fe1, KEY_OK},		/*play ok */
+	{0x1be4, KEY_ZOOM},		/*zoom */
+	{0x59a6, KEY_MUTE},		/*mute */
+	{0x5ba5, KEY_RADIO},		/*tv/f */
+	{0x19e7, KEY_RECORD},		/*rec */
+	{0x01fe, KEY_STOP},		/*Stop */
+	{0x03fd, KEY_PAUSE},		/*pause */
+	{0x03fc, KEY_SCREEN},		/*<- -> */
+	{0x07f9, KEY_CAMERA},		/*capture */
+	{0x47b9, KEY_ESC},		/*exit */
+	{0x43bc, KEY_POWER2},		/*power */
 };
 
 static int opera1_rc_query(struct dvb_usb_device *dev, u32 * event, int *state)
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 07/13] [media] a800: Fix a few wrong IR key assignments
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (5 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 06/13] [media] opera1: " Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 09/13] [media] rc-rc5-hauppauge-new: Add the old control to the table Mauro Carvalho Chehab
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c
index 53b93a4..f8e9bf1 100644
--- a/drivers/media/dvb/dvb-usb/a800.c
+++ b/drivers/media/dvb/dvb-usb/a800.c
@@ -38,8 +38,8 @@ static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_pr
 }
 
 static struct rc_map_table rc_map_a800_table[] = {
-	{ 0x0201, KEY_PROG1 },       /* SOURCE */
-	{ 0x0200, KEY_POWER },       /* POWER */
+	{ 0x0201, KEY_MODE },      /* SOURCE */
+	{ 0x0200, KEY_POWER2 },      /* POWER */
 	{ 0x0205, KEY_1 },           /* 1 */
 	{ 0x0206, KEY_2 },           /* 2 */
 	{ 0x0207, KEY_3 },           /* 3 */
@@ -52,8 +52,8 @@ static struct rc_map_table rc_map_a800_table[] = {
 	{ 0x0212, KEY_LEFT },        /* L / DISPLAY */
 	{ 0x0211, KEY_0 },           /* 0 */
 	{ 0x0213, KEY_RIGHT },       /* R / CH RTN */
-	{ 0x0217, KEY_PROG2 },       /* SNAP SHOT */
-	{ 0x0210, KEY_PROG3 },       /* 16-CH PREV */
+	{ 0x0217, KEY_CAMERA },      /* SNAP SHOT */
+	{ 0x0210, KEY_LAST },        /* 16-CH PREV */
 	{ 0x021e, KEY_VOLUMEDOWN },  /* VOL DOWN */
 	{ 0x020c, KEY_ZOOM },        /* FULL SCREEN */
 	{ 0x021f, KEY_VOLUMEUP },    /* VOL UP */
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 09/13] [media] rc-rc5-hauppauge-new: Add the old control to the table
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (6 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 07/13] [media] a800: Fix a few wrong IR key assignments Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 08/13] [media] rc-winfast: Fix the keycode tables Mauro Carvalho Chehab
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

Adds the old grey remote controller to Hauppauge table.

Hans borrowed me an old gray Hauppauge RC. Thanks to that, we
can fix the RC5 table for Hauppauge.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
index a581c86..dcbf3bd 100644
--- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
+++ b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
@@ -20,6 +20,10 @@
  */
 
 static struct rc_map_table rc5_hauppauge_new[] = {
+	/*
+	 * Remote Controller Hauppauge Gray found on modern devices
+	 * Keycodes start with address = 0x1e
+	 */
 	/* Keys 0 to 9 */
 	{ 0x1e00, KEY_0 },
 	{ 0x1e01, KEY_1 },
@@ -76,7 +80,57 @@ static struct rc_map_table rc5_hauppauge_new[] = {
 	{ 0x1e3c, KEY_ZOOM },		/* full */
 	{ 0x1e3d, KEY_POWER },		/* system power (green button) */
 
-	/* Keycodes for DSR-0112 remote bundled with Haupauge MiniStick */
+	/*
+	 * Old Remote Controller Hauppauge Gray with a golden screen
+	 * Keycodes start with address = 0x1d
+	 */
+	{ 0x1f3d, KEY_POWER2 },		/* system power (green button) */
+	{ 0x1f3b, KEY_SELECT },		/* GO */
+
+	/* Keys 0 to 9 */
+	{ 0x1f00, KEY_0 },
+	{ 0x1f01, KEY_1 },
+	{ 0x1f02, KEY_2 },
+	{ 0x1f03, KEY_3 },
+	{ 0x1f04, KEY_4 },
+	{ 0x1f05, KEY_5 },
+	{ 0x1f06, KEY_6 },
+	{ 0x1f07, KEY_7 },
+	{ 0x1f08, KEY_8 },
+	{ 0x1f09, KEY_9 },
+
+	{ 0x1f1f, KEY_EXIT },		/* back/exit */
+	{ 0x1f0d, KEY_MENU },
+
+	{ 0x1f10, KEY_VOLUMEUP },
+	{ 0x1f11, KEY_VOLUMEDOWN },
+	{ 0x1f20, KEY_CHANNELUP },	/* channel / program + */
+	{ 0x1f21, KEY_CHANNELDOWN },	/* channel / program - */
+	{ 0x1f25, KEY_ENTER },		/* OK */
+
+	{ 0x1f0b, KEY_RED },		/* red button */
+	{ 0x1f2e, KEY_GREEN },		/* green button */
+	{ 0x1f38, KEY_YELLOW },		/* yellow key */
+	{ 0x1f29, KEY_BLUE },		/* blue key */
+
+	{ 0x1f0f, KEY_MUTE },
+	{ 0x1f0c, KEY_RADIO },		/* There's no indicator on this key */
+	{ 0x1f3c, KEY_ZOOM },		/* full */
+
+	{ 0x1f32, KEY_REWIND },		/* backward << */
+	{ 0x1f35, KEY_PLAY },
+	{ 0x1f34, KEY_FASTFORWARD },	/* forward >> */
+
+	{ 0x1f37, KEY_RECORD },		/* recording */
+	{ 0x1f36, KEY_STOP },
+	{ 0x1f30, KEY_PAUSE },		/* pause */
+
+	{ 0x1f24, KEY_PREVIOUSSONG },	/* replay |< */
+	{ 0x1f1e, KEY_NEXTSONG },	/* skip >| */
+
+	/*
+	 * Keycodes for DSR-0112 remote bundled with Haupauge MiniStick
+	 */
 	{ 0x1d00, KEY_0 },
 	{ 0x1d01, KEY_1 },
 	{ 0x1d02, KEY_2 },
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 08/13] [media] rc-winfast: Fix the keycode tables
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (7 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 09/13] [media] rc-rc5-hauppauge-new: Add the old control to the table Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-05-22  0:19   ` Balint Marton
  2011-01-24 15:18 ` [PATCH 10/13] [media] rc-rc5-hauppauge-new: Add support for the old Black RC Mauro Carvalho Chehab
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

One of the remotes has a picture available at:
	http://lirc.sourceforge.net/remotes/leadtek/Y04G0004.jpg

As there's one variant with a set direction keys plus vol/chann
keys, and the same table is used for both models, change it to
represent all keys, avoiding the usage of weird function keys.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/rc/keymaps/rc-winfast.c b/drivers/media/rc/keymaps/rc-winfast.c
index 2747db4..0062ca2 100644
--- a/drivers/media/rc/keymaps/rc-winfast.c
+++ b/drivers/media/rc/keymaps/rc-winfast.c
@@ -27,15 +27,15 @@ static struct rc_map_table winfast[] = {
 	{ 0x0e, KEY_8 },
 	{ 0x0f, KEY_9 },
 
-	{ 0x00, KEY_POWER },
+	{ 0x00, KEY_POWER2 },
 	{ 0x1b, KEY_AUDIO },		/* Audio Source */
 	{ 0x02, KEY_TUNER },		/* TV/FM, not on Y0400052 */
 	{ 0x1e, KEY_VIDEO },		/* Video Source */
 	{ 0x16, KEY_INFO },		/* Display information */
-	{ 0x04, KEY_VOLUMEUP },
-	{ 0x08, KEY_VOLUMEDOWN },
-	{ 0x0c, KEY_CHANNELUP },
-	{ 0x10, KEY_CHANNELDOWN },
+	{ 0x04, KEY_LEFT },
+	{ 0x08, KEY_RIGHT },
+	{ 0x0c, KEY_UP },
+	{ 0x10, KEY_DOWN },
 	{ 0x03, KEY_ZOOM },		/* fullscreen */
 	{ 0x1f, KEY_TEXT },		/* closed caption/teletext */
 	{ 0x20, KEY_SLEEP },
@@ -47,7 +47,7 @@ static struct rc_map_table winfast[] = {
 	{ 0x2e, KEY_BLUE },
 	{ 0x18, KEY_KPPLUS },		/* fine tune + , not on Y040052 */
 	{ 0x19, KEY_KPMINUS },		/* fine tune - , not on Y040052 */
-	{ 0x2a, KEY_MEDIA },		/* PIP (Picture in picture */
+	{ 0x2a, KEY_TV2 },		/* PIP (Picture in picture */
 	{ 0x21, KEY_DOT },
 	{ 0x13, KEY_ENTER },
 	{ 0x11, KEY_LAST },		/* Recall (last channel */
@@ -57,7 +57,7 @@ static struct rc_map_table winfast[] = {
 	{ 0x25, KEY_TIME },		/* Time Shifting */
 	{ 0x26, KEY_STOP },
 	{ 0x27, KEY_RECORD },
-	{ 0x28, KEY_SAVE },		/* Screenshot */
+	{ 0x28, KEY_CAMERA },		/* Screenshot */
 	{ 0x2f, KEY_MENU },
 	{ 0x30, KEY_CANCEL },
 	{ 0x31, KEY_CHANNEL },		/* Channel Surf */
@@ -70,10 +70,10 @@ static struct rc_map_table winfast[] = {
 	{ 0x38, KEY_DVD },
 
 	{ 0x1a, KEY_MODE},		/* change to MCE mode on Y04G0051 */
-	{ 0x3e, KEY_F21 },		/* MCE +VOL, on Y04G0033 */
-	{ 0x3a, KEY_F22 },		/* MCE -VOL, on Y04G0033 */
-	{ 0x3b, KEY_F23 },		/* MCE +CH,  on Y04G0033 */
-	{ 0x3f, KEY_F24 }		/* MCE -CH,  on Y04G0033 */
+	{ 0x3e, KEY_VOLUMEUP },		/* MCE +VOL, on Y04G0033 */
+	{ 0x3a, KEY_VOLUMEDOWN },	/* MCE -VOL, on Y04G0033 */
+	{ 0x3b, KEY_CHANNELUP },	/* MCE +CH,  on Y04G0033 */
+	{ 0x3f, KEY_CHANNELDOWN }	/* MCE -CH,  on Y04G0033 */
 };
 
 static struct rc_map_list winfast_map = {
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 10/13] [media] rc-rc5-hauppauge-new: Add support for the old Black RC
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (8 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 08/13] [media] rc-winfast: Fix the keycode tables Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 11/13] [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping Mauro Carvalho Chehab
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

Hans borrowed me an old Black Hauppauge RC. Thanks to that, we
can fix the RC5 table for Hauppauge.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
index dcbf3bd..4106008 100644
--- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
+++ b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
@@ -82,7 +82,7 @@ static struct rc_map_table rc5_hauppauge_new[] = {
 
 	/*
 	 * Old Remote Controller Hauppauge Gray with a golden screen
-	 * Keycodes start with address = 0x1d
+	 * Keycodes start with address = 0x1f
 	 */
 	{ 0x1f3d, KEY_POWER2 },		/* system power (green button) */
 	{ 0x1f3b, KEY_SELECT },		/* GO */
@@ -130,6 +130,7 @@ static struct rc_map_table rc5_hauppauge_new[] = {
 
 	/*
 	 * Keycodes for DSR-0112 remote bundled with Haupauge MiniStick
+	 * Keycodes start with address = 0x1d
 	 */
 	{ 0x1d00, KEY_0 },
 	{ 0x1d01, KEY_1 },
@@ -167,6 +168,39 @@ static struct rc_map_table rc5_hauppauge_new[] = {
 	{ 0x1d3b, KEY_GOTO },
 	{ 0x1d3d, KEY_POWER },
 	{ 0x1d3f, KEY_HOME },
+
+	/*
+	 * Keycodes for the old Black Remote Controller
+	 * This one also uses RC-5 protocol
+	 * Keycodes start with address = 0x00
+	 */
+	{ 0x001f, KEY_TV },
+	{ 0x0020, KEY_CHANNELUP },
+	{ 0x000c, KEY_RADIO },
+
+	{ 0x0011, KEY_VOLUMEDOWN },
+	{ 0x002e, KEY_ZOOM },		/* full screen */
+	{ 0x0010, KEY_VOLUMEUP },
+
+	{ 0x000d, KEY_MUTE },
+	{ 0x0021, KEY_CHANNELDOWN },
+	{ 0x0022, KEY_VIDEO },		/* source */
+
+	{ 0x0001, KEY_1 },
+	{ 0x0002, KEY_2 },
+	{ 0x0003, KEY_3 },
+
+	{ 0x0004, KEY_4 },
+	{ 0x0005, KEY_5 },
+	{ 0x0006, KEY_6 },
+
+	{ 0x0007, KEY_7 },
+	{ 0x0008, KEY_8 },
+	{ 0x0009, KEY_9 },
+
+	{ 0x001e, KEY_RED },	/* Reserved */
+	{ 0x0000, KEY_0 },
+	{ 0x0026, KEY_SLEEP },	/* Minimize */
 };
 
 static struct rc_map_list rc5_hauppauge_new_map = {
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 11/13] [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (9 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 10/13] [media] rc-rc5-hauppauge-new: Add support for the old Black RC Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 12/13] [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge Mauro Carvalho Chehab
  2011-01-24 15:18 ` [PATCH 13/13] [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map Mauro Carvalho Chehab
  12 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

The keys for the old black were messed with the ones for the
hauppauge grey. Fix it.

Also, fixes some keycodes and order the keys according with
the way they appear inside the remote controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
index 4106008..cb312da 100644
--- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
+++ b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
@@ -24,61 +24,67 @@ static struct rc_map_table rc5_hauppauge_new[] = {
 	 * Remote Controller Hauppauge Gray found on modern devices
 	 * Keycodes start with address = 0x1e
 	 */
-	/* Keys 0 to 9 */
-	{ 0x1e00, KEY_0 },
+
+	{ 0x1e3b, KEY_SELECT },		/* GO / house symbol */
+	{ 0x1e3d, KEY_POWER2 },		/* system power (green button) */
+
+	{ 0x1e1c, KEY_TV },
+	{ 0x1e18, KEY_VIDEO },		/* Videos */
+	{ 0x1e19, KEY_AUDIO },		/* Music */
+	{ 0x1e1a, KEY_CAMERA },		/* Pictures */
+
+	{ 0x1e1b, KEY_EPG },		/* Guide */
+	{ 0x1e0c, KEY_RADIO },
+
+	{ 0x1e14, KEY_UP },
+	{ 0x1e15, KEY_DOWN },
+	{ 0x1e16, KEY_LEFT },
+	{ 0x1e17, KEY_RIGHT },
+	{ 0x1e25, KEY_OK },		/* OK */
+
+	{ 0x1e1f, KEY_EXIT },		/* back/exit */
+	{ 0x1e0d, KEY_MENU },
+
+	{ 0x1e10, KEY_VOLUMEUP },
+	{ 0x1e11, KEY_VOLUMEDOWN },
+
+	{ 0x1e12, KEY_PREVIOUS },	/* previous channel */
+	{ 0x1e0f, KEY_MUTE },
+
+	{ 0x1e20, KEY_CHANNELUP },	/* channel / program + */
+	{ 0x1e21, KEY_CHANNELDOWN },	/* channel / program - */
+
+	{ 0x1e37, KEY_RECORD },		/* recording */
+	{ 0x1e36, KEY_STOP },
+
+	{ 0x1e32, KEY_REWIND },		/* backward << */
+	{ 0x1e35, KEY_PLAY },
+	{ 0x1e34, KEY_FASTFORWARD },	/* forward >> */
+
+	{ 0x1e24, KEY_PREVIOUSSONG },	/* replay |< */
+	{ 0x1e30, KEY_PAUSE },		/* pause */
+	{ 0x1e1e, KEY_NEXTSONG },	/* skip >| */
+
 	{ 0x1e01, KEY_1 },
 	{ 0x1e02, KEY_2 },
 	{ 0x1e03, KEY_3 },
+
 	{ 0x1e04, KEY_4 },
 	{ 0x1e05, KEY_5 },
 	{ 0x1e06, KEY_6 },
+
 	{ 0x1e07, KEY_7 },
 	{ 0x1e08, KEY_8 },
 	{ 0x1e09, KEY_9 },
 
 	{ 0x1e0a, KEY_TEXT },		/* keypad asterisk as well */
+	{ 0x1e00, KEY_0 },
+	{ 0x1e0e, KEY_SUBTITLE },	/* also the Pound key (#) */
+
 	{ 0x1e0b, KEY_RED },		/* red button */
-	{ 0x1e0c, KEY_RADIO },
-	{ 0x1e0d, KEY_MENU },
-	{ 0x1e0e, KEY_SUBTITLE },		/* also the # key */
-	{ 0x1e0f, KEY_MUTE },
-	{ 0x1e10, KEY_VOLUMEUP },
-	{ 0x1e11, KEY_VOLUMEDOWN },
-	{ 0x1e12, KEY_PREVIOUS },		/* previous channel */
-	{ 0x1e14, KEY_UP },
-	{ 0x1e15, KEY_DOWN },
-	{ 0x1e16, KEY_LEFT },
-	{ 0x1e17, KEY_RIGHT },
-	{ 0x1e18, KEY_VCR },		/* Videos */
-	{ 0x1e19, KEY_AUDIO },		/* Music */
-	/* 0x1e1a: Pictures - presume this means
-	   "Multimedia Home Platform" -
-	   no "PICTURES" key in input.h
-	 */
-	{ 0x1e1a, KEY_CAMERA },
-
-	{ 0x1e1b, KEY_EPG },		/* Guide */
-	{ 0x1e1c, KEY_TV },
-	{ 0x1e1e, KEY_NEXTSONG },		/* skip >| */
-	{ 0x1e1f, KEY_EXIT },		/* back/exit */
-	{ 0x1e20, KEY_CHANNELUP },	/* channel / program + */
-	{ 0x1e21, KEY_CHANNELDOWN },	/* channel / program - */
-	{ 0x1e22, KEY_VIDEO },		/* source (old black remote) */
-	{ 0x1e24, KEY_PREVIOUSSONG },	/* replay |< */
-	{ 0x1e25, KEY_ENTER },		/* OK */
-	{ 0x1e26, KEY_SLEEP },		/* minimize (old black remote) */
-	{ 0x1e29, KEY_BLUE },		/* blue key */
 	{ 0x1e2e, KEY_GREEN },		/* green button */
-	{ 0x1e30, KEY_PAUSE },		/* pause */
-	{ 0x1e32, KEY_REWIND },		/* backward << */
-	{ 0x1e34, KEY_FASTFORWARD },	/* forward >> */
-	{ 0x1e35, KEY_PLAY },
-	{ 0x1e36, KEY_STOP },
-	{ 0x1e37, KEY_RECORD },		/* recording */
 	{ 0x1e38, KEY_YELLOW },		/* yellow key */
-	{ 0x1e3b, KEY_SELECT },		/* top right button */
-	{ 0x1e3c, KEY_ZOOM },		/* full */
-	{ 0x1e3d, KEY_POWER },		/* system power (green button) */
+	{ 0x1e29, KEY_BLUE },		/* blue key */
 
 	/*
 	 * Old Remote Controller Hauppauge Gray with a golden screen
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 12/13] [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (10 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 11/13] [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-25  0:22   ` Andy Walls
  2011-01-24 15:18 ` [PATCH 13/13] [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map Mauro Carvalho Chehab
  12 siblings, 1 reply; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

There are two "hauppauge-new" keymaps, one with protocol
unknown, and the other with the protocol marked accordingly.
However, both tables are miss-named.

Also, the old rc-hauppauge-new is broken, as it mixes
three different controllers as if they were just one.

This patch solves half of the problem by renaming the
correct keycode table as just rc-hauppauge. This table
contains the codes for the four different types of
remote controllers found on Hauppauge cards, properly
mapped with their different addresses.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

 create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c
 delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c

diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
index 25b43e5..af121db 100644
--- a/drivers/media/dvb/siano/sms-cards.c
+++ b/drivers/media/dvb/siano/sms-cards.c
@@ -64,7 +64,7 @@ static struct sms_board sms_boards[] = {
 		.type	= SMS_NOVA_B0,
 		.fw[DEVICE_MODE_ISDBT_BDA] = "sms1xxx-hcw-55xxx-isdbt-02.fw",
 		.fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
-		.rc_codes = RC_MAP_RC5_HAUPPAUGE_NEW,
+		.rc_codes = RC_MAP_HAUPPAUGE,
 		.board_cfg.leds_power = 26,
 		.board_cfg.led0 = 27,
 		.board_cfg.led1 = 28,
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index f0c8055..c79e192 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -68,7 +68,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
 			rc-proteus-2309.o \
 			rc-purpletv.o \
 			rc-pv951.o \
-			rc-rc5-hauppauge-new.o \
+			rc-hauppauge.o \
 			rc-rc5-tv.o \
 			rc-rc6-mce.o \
 			rc-real-audio-220-32-keys.o \
diff --git a/drivers/media/rc/keymaps/rc-hauppauge.c b/drivers/media/rc/keymaps/rc-hauppauge.c
new file mode 100644
index 0000000..66e0498
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-hauppauge.c
@@ -0,0 +1,241 @@
+/* rc-hauppauge.h - Keytable for Hauppauge Remote Controllers
+ *
+ * keymap imported from ir-keymaps.c
+ *
+ * This map currently contains the code for four different RCs:
+ *	- New Hauppauge Gray;
+ *	- Old Hauppauge Gray (with a golden screen for media keys);
+ *	- Hauppauge Black;
+ *	- DSR-0112 remote bundled with Haupauge MiniStick.
+ *
+ * Copyright (c) 2010-2011 by Mauro Carvalho Chehab <mchehab@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <media/rc-map.h>
+
+/*
+ * Hauppauge:the newer, gray remotes (seems there are multiple
+ * slightly different versions), shipped with cx88+ivtv cards.
+ *
+ * This table contains the complete RC5 code, instead of just the data part
+ */
+
+static struct rc_map_table rc5_hauppauge_new[] = {
+	/*
+	 * Remote Controller Hauppauge Gray found on modern devices
+	 * Keycodes start with address = 0x1e
+	 */
+
+	{ 0x1e3b, KEY_SELECT },		/* GO / house symbol */
+	{ 0x1e3d, KEY_POWER2 },		/* system power (green button) */
+
+	{ 0x1e1c, KEY_TV },
+	{ 0x1e18, KEY_VIDEO },		/* Videos */
+	{ 0x1e19, KEY_AUDIO },		/* Music */
+	{ 0x1e1a, KEY_CAMERA },		/* Pictures */
+
+	{ 0x1e1b, KEY_EPG },		/* Guide */
+	{ 0x1e0c, KEY_RADIO },
+
+	{ 0x1e14, KEY_UP },
+	{ 0x1e15, KEY_DOWN },
+	{ 0x1e16, KEY_LEFT },
+	{ 0x1e17, KEY_RIGHT },
+	{ 0x1e25, KEY_OK },		/* OK */
+
+	{ 0x1e1f, KEY_EXIT },		/* back/exit */
+	{ 0x1e0d, KEY_MENU },
+
+	{ 0x1e10, KEY_VOLUMEUP },
+	{ 0x1e11, KEY_VOLUMEDOWN },
+
+	{ 0x1e12, KEY_PREVIOUS },	/* previous channel */
+	{ 0x1e0f, KEY_MUTE },
+
+	{ 0x1e20, KEY_CHANNELUP },	/* channel / program + */
+	{ 0x1e21, KEY_CHANNELDOWN },	/* channel / program - */
+
+	{ 0x1e37, KEY_RECORD },		/* recording */
+	{ 0x1e36, KEY_STOP },
+
+	{ 0x1e32, KEY_REWIND },		/* backward << */
+	{ 0x1e35, KEY_PLAY },
+	{ 0x1e34, KEY_FASTFORWARD },	/* forward >> */
+
+	{ 0x1e24, KEY_PREVIOUSSONG },	/* replay |< */
+	{ 0x1e30, KEY_PAUSE },		/* pause */
+	{ 0x1e1e, KEY_NEXTSONG },	/* skip >| */
+
+	{ 0x1e01, KEY_1 },
+	{ 0x1e02, KEY_2 },
+	{ 0x1e03, KEY_3 },
+
+	{ 0x1e04, KEY_4 },
+	{ 0x1e05, KEY_5 },
+	{ 0x1e06, KEY_6 },
+
+	{ 0x1e07, KEY_7 },
+	{ 0x1e08, KEY_8 },
+	{ 0x1e09, KEY_9 },
+
+	{ 0x1e0a, KEY_TEXT },		/* keypad asterisk as well */
+	{ 0x1e00, KEY_0 },
+	{ 0x1e0e, KEY_SUBTITLE },	/* also the Pound key (#) */
+
+	{ 0x1e0b, KEY_RED },		/* red button */
+	{ 0x1e2e, KEY_GREEN },		/* green button */
+	{ 0x1e38, KEY_YELLOW },		/* yellow key */
+	{ 0x1e29, KEY_BLUE },		/* blue key */
+
+	/*
+	 * Old Remote Controller Hauppauge Gray with a golden screen
+	 * Keycodes start with address = 0x1f
+	 */
+	{ 0x1f3d, KEY_POWER2 },		/* system power (green button) */
+	{ 0x1f3b, KEY_SELECT },		/* GO */
+
+	/* Keys 0 to 9 */
+	{ 0x1f00, KEY_0 },
+	{ 0x1f01, KEY_1 },
+	{ 0x1f02, KEY_2 },
+	{ 0x1f03, KEY_3 },
+	{ 0x1f04, KEY_4 },
+	{ 0x1f05, KEY_5 },
+	{ 0x1f06, KEY_6 },
+	{ 0x1f07, KEY_7 },
+	{ 0x1f08, KEY_8 },
+	{ 0x1f09, KEY_9 },
+
+	{ 0x1f1f, KEY_EXIT },		/* back/exit */
+	{ 0x1f0d, KEY_MENU },
+
+	{ 0x1f10, KEY_VOLUMEUP },
+	{ 0x1f11, KEY_VOLUMEDOWN },
+	{ 0x1f20, KEY_CHANNELUP },	/* channel / program + */
+	{ 0x1f21, KEY_CHANNELDOWN },	/* channel / program - */
+	{ 0x1f25, KEY_ENTER },		/* OK */
+
+	{ 0x1f0b, KEY_RED },		/* red button */
+	{ 0x1f2e, KEY_GREEN },		/* green button */
+	{ 0x1f38, KEY_YELLOW },		/* yellow key */
+	{ 0x1f29, KEY_BLUE },		/* blue key */
+
+	{ 0x1f0f, KEY_MUTE },
+	{ 0x1f0c, KEY_RADIO },		/* There's no indicator on this key */
+	{ 0x1f3c, KEY_ZOOM },		/* full */
+
+	{ 0x1f32, KEY_REWIND },		/* backward << */
+	{ 0x1f35, KEY_PLAY },
+	{ 0x1f34, KEY_FASTFORWARD },	/* forward >> */
+
+	{ 0x1f37, KEY_RECORD },		/* recording */
+	{ 0x1f36, KEY_STOP },
+	{ 0x1f30, KEY_PAUSE },		/* pause */
+
+	{ 0x1f24, KEY_PREVIOUSSONG },	/* replay |< */
+	{ 0x1f1e, KEY_NEXTSONG },	/* skip >| */
+
+	/*
+	 * Keycodes for DSR-0112 remote bundled with Haupauge MiniStick
+	 * Keycodes start with address = 0x1d
+	 */
+	{ 0x1d00, KEY_0 },
+	{ 0x1d01, KEY_1 },
+	{ 0x1d02, KEY_2 },
+	{ 0x1d03, KEY_3 },
+	{ 0x1d04, KEY_4 },
+	{ 0x1d05, KEY_5 },
+	{ 0x1d06, KEY_6 },
+	{ 0x1d07, KEY_7 },
+	{ 0x1d08, KEY_8 },
+	{ 0x1d09, KEY_9 },
+	{ 0x1d0a, KEY_TEXT },
+	{ 0x1d0d, KEY_MENU },
+	{ 0x1d0f, KEY_MUTE },
+	{ 0x1d10, KEY_VOLUMEUP },
+	{ 0x1d11, KEY_VOLUMEDOWN },
+	{ 0x1d12, KEY_PREVIOUS },        /* Prev.Ch .. ??? */
+	{ 0x1d14, KEY_UP },
+	{ 0x1d15, KEY_DOWN },
+	{ 0x1d16, KEY_LEFT },
+	{ 0x1d17, KEY_RIGHT },
+	{ 0x1d1c, KEY_TV },
+	{ 0x1d1e, KEY_NEXT },           /* >|             */
+	{ 0x1d1f, KEY_EXIT },
+	{ 0x1d20, KEY_CHANNELUP },
+	{ 0x1d21, KEY_CHANNELDOWN },
+	{ 0x1d24, KEY_LAST },           /* <|             */
+	{ 0x1d25, KEY_OK },
+	{ 0x1d30, KEY_PAUSE },
+	{ 0x1d32, KEY_REWIND },
+	{ 0x1d34, KEY_FASTFORWARD },
+	{ 0x1d35, KEY_PLAY },
+	{ 0x1d36, KEY_STOP },
+	{ 0x1d37, KEY_RECORD },
+	{ 0x1d3b, KEY_GOTO },
+	{ 0x1d3d, KEY_POWER },
+	{ 0x1d3f, KEY_HOME },
+
+	/*
+	 * Keycodes for the old Black Remote Controller
+	 * This one also uses RC-5 protocol
+	 * Keycodes start with address = 0x00
+	 */
+	{ 0x001f, KEY_TV },
+	{ 0x0020, KEY_CHANNELUP },
+	{ 0x000c, KEY_RADIO },
+
+	{ 0x0011, KEY_VOLUMEDOWN },
+	{ 0x002e, KEY_ZOOM },		/* full screen */
+	{ 0x0010, KEY_VOLUMEUP },
+
+	{ 0x000d, KEY_MUTE },
+	{ 0x0021, KEY_CHANNELDOWN },
+	{ 0x0022, KEY_VIDEO },		/* source */
+
+	{ 0x0001, KEY_1 },
+	{ 0x0002, KEY_2 },
+	{ 0x0003, KEY_3 },
+
+	{ 0x0004, KEY_4 },
+	{ 0x0005, KEY_5 },
+	{ 0x0006, KEY_6 },
+
+	{ 0x0007, KEY_7 },
+	{ 0x0008, KEY_8 },
+	{ 0x0009, KEY_9 },
+
+	{ 0x001e, KEY_RED },	/* Reserved */
+	{ 0x0000, KEY_0 },
+	{ 0x0026, KEY_SLEEP },	/* Minimize */
+};
+
+static struct rc_map_list rc5_hauppauge_new_map = {
+	.map = {
+		.scan    = rc5_hauppauge_new,
+		.size    = ARRAY_SIZE(rc5_hauppauge_new),
+		.rc_type = RC_TYPE_RC5,
+		.name    = RC_MAP_HAUPPAUGE,
+	}
+};
+
+static int __init init_rc_map_rc5_hauppauge_new(void)
+{
+	return rc_map_register(&rc5_hauppauge_new_map);
+}
+
+static void __exit exit_rc_map_rc5_hauppauge_new(void)
+{
+	rc_map_unregister(&rc5_hauppauge_new_map);
+}
+
+module_init(init_rc_map_rc5_hauppauge_new)
+module_exit(exit_rc_map_rc5_hauppauge_new)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
deleted file mode 100644
index cb312da..0000000
--- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/* rc5-hauppauge-new.h - Keytable for rc5_hauppauge_new Remote Controller
- *
- * keymap imported from ir-keymaps.c
- *
- * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#include <media/rc-map.h>
-
-/*
- * Hauppauge:the newer, gray remotes (seems there are multiple
- * slightly different versions), shipped with cx88+ivtv cards.
- *
- * This table contains the complete RC5 code, instead of just the data part
- */
-
-static struct rc_map_table rc5_hauppauge_new[] = {
-	/*
-	 * Remote Controller Hauppauge Gray found on modern devices
-	 * Keycodes start with address = 0x1e
-	 */
-
-	{ 0x1e3b, KEY_SELECT },		/* GO / house symbol */
-	{ 0x1e3d, KEY_POWER2 },		/* system power (green button) */
-
-	{ 0x1e1c, KEY_TV },
-	{ 0x1e18, KEY_VIDEO },		/* Videos */
-	{ 0x1e19, KEY_AUDIO },		/* Music */
-	{ 0x1e1a, KEY_CAMERA },		/* Pictures */
-
-	{ 0x1e1b, KEY_EPG },		/* Guide */
-	{ 0x1e0c, KEY_RADIO },
-
-	{ 0x1e14, KEY_UP },
-	{ 0x1e15, KEY_DOWN },
-	{ 0x1e16, KEY_LEFT },
-	{ 0x1e17, KEY_RIGHT },
-	{ 0x1e25, KEY_OK },		/* OK */
-
-	{ 0x1e1f, KEY_EXIT },		/* back/exit */
-	{ 0x1e0d, KEY_MENU },
-
-	{ 0x1e10, KEY_VOLUMEUP },
-	{ 0x1e11, KEY_VOLUMEDOWN },
-
-	{ 0x1e12, KEY_PREVIOUS },	/* previous channel */
-	{ 0x1e0f, KEY_MUTE },
-
-	{ 0x1e20, KEY_CHANNELUP },	/* channel / program + */
-	{ 0x1e21, KEY_CHANNELDOWN },	/* channel / program - */
-
-	{ 0x1e37, KEY_RECORD },		/* recording */
-	{ 0x1e36, KEY_STOP },
-
-	{ 0x1e32, KEY_REWIND },		/* backward << */
-	{ 0x1e35, KEY_PLAY },
-	{ 0x1e34, KEY_FASTFORWARD },	/* forward >> */
-
-	{ 0x1e24, KEY_PREVIOUSSONG },	/* replay |< */
-	{ 0x1e30, KEY_PAUSE },		/* pause */
-	{ 0x1e1e, KEY_NEXTSONG },	/* skip >| */
-
-	{ 0x1e01, KEY_1 },
-	{ 0x1e02, KEY_2 },
-	{ 0x1e03, KEY_3 },
-
-	{ 0x1e04, KEY_4 },
-	{ 0x1e05, KEY_5 },
-	{ 0x1e06, KEY_6 },
-
-	{ 0x1e07, KEY_7 },
-	{ 0x1e08, KEY_8 },
-	{ 0x1e09, KEY_9 },
-
-	{ 0x1e0a, KEY_TEXT },		/* keypad asterisk as well */
-	{ 0x1e00, KEY_0 },
-	{ 0x1e0e, KEY_SUBTITLE },	/* also the Pound key (#) */
-
-	{ 0x1e0b, KEY_RED },		/* red button */
-	{ 0x1e2e, KEY_GREEN },		/* green button */
-	{ 0x1e38, KEY_YELLOW },		/* yellow key */
-	{ 0x1e29, KEY_BLUE },		/* blue key */
-
-	/*
-	 * Old Remote Controller Hauppauge Gray with a golden screen
-	 * Keycodes start with address = 0x1f
-	 */
-	{ 0x1f3d, KEY_POWER2 },		/* system power (green button) */
-	{ 0x1f3b, KEY_SELECT },		/* GO */
-
-	/* Keys 0 to 9 */
-	{ 0x1f00, KEY_0 },
-	{ 0x1f01, KEY_1 },
-	{ 0x1f02, KEY_2 },
-	{ 0x1f03, KEY_3 },
-	{ 0x1f04, KEY_4 },
-	{ 0x1f05, KEY_5 },
-	{ 0x1f06, KEY_6 },
-	{ 0x1f07, KEY_7 },
-	{ 0x1f08, KEY_8 },
-	{ 0x1f09, KEY_9 },
-
-	{ 0x1f1f, KEY_EXIT },		/* back/exit */
-	{ 0x1f0d, KEY_MENU },
-
-	{ 0x1f10, KEY_VOLUMEUP },
-	{ 0x1f11, KEY_VOLUMEDOWN },
-	{ 0x1f20, KEY_CHANNELUP },	/* channel / program + */
-	{ 0x1f21, KEY_CHANNELDOWN },	/* channel / program - */
-	{ 0x1f25, KEY_ENTER },		/* OK */
-
-	{ 0x1f0b, KEY_RED },		/* red button */
-	{ 0x1f2e, KEY_GREEN },		/* green button */
-	{ 0x1f38, KEY_YELLOW },		/* yellow key */
-	{ 0x1f29, KEY_BLUE },		/* blue key */
-
-	{ 0x1f0f, KEY_MUTE },
-	{ 0x1f0c, KEY_RADIO },		/* There's no indicator on this key */
-	{ 0x1f3c, KEY_ZOOM },		/* full */
-
-	{ 0x1f32, KEY_REWIND },		/* backward << */
-	{ 0x1f35, KEY_PLAY },
-	{ 0x1f34, KEY_FASTFORWARD },	/* forward >> */
-
-	{ 0x1f37, KEY_RECORD },		/* recording */
-	{ 0x1f36, KEY_STOP },
-	{ 0x1f30, KEY_PAUSE },		/* pause */
-
-	{ 0x1f24, KEY_PREVIOUSSONG },	/* replay |< */
-	{ 0x1f1e, KEY_NEXTSONG },	/* skip >| */
-
-	/*
-	 * Keycodes for DSR-0112 remote bundled with Haupauge MiniStick
-	 * Keycodes start with address = 0x1d
-	 */
-	{ 0x1d00, KEY_0 },
-	{ 0x1d01, KEY_1 },
-	{ 0x1d02, KEY_2 },
-	{ 0x1d03, KEY_3 },
-	{ 0x1d04, KEY_4 },
-	{ 0x1d05, KEY_5 },
-	{ 0x1d06, KEY_6 },
-	{ 0x1d07, KEY_7 },
-	{ 0x1d08, KEY_8 },
-	{ 0x1d09, KEY_9 },
-	{ 0x1d0a, KEY_TEXT },
-	{ 0x1d0d, KEY_MENU },
-	{ 0x1d0f, KEY_MUTE },
-	{ 0x1d10, KEY_VOLUMEUP },
-	{ 0x1d11, KEY_VOLUMEDOWN },
-	{ 0x1d12, KEY_PREVIOUS },        /* Prev.Ch .. ??? */
-	{ 0x1d14, KEY_UP },
-	{ 0x1d15, KEY_DOWN },
-	{ 0x1d16, KEY_LEFT },
-	{ 0x1d17, KEY_RIGHT },
-	{ 0x1d1c, KEY_TV },
-	{ 0x1d1e, KEY_NEXT },           /* >|             */
-	{ 0x1d1f, KEY_EXIT },
-	{ 0x1d20, KEY_CHANNELUP },
-	{ 0x1d21, KEY_CHANNELDOWN },
-	{ 0x1d24, KEY_LAST },           /* <|             */
-	{ 0x1d25, KEY_OK },
-	{ 0x1d30, KEY_PAUSE },
-	{ 0x1d32, KEY_REWIND },
-	{ 0x1d34, KEY_FASTFORWARD },
-	{ 0x1d35, KEY_PLAY },
-	{ 0x1d36, KEY_STOP },
-	{ 0x1d37, KEY_RECORD },
-	{ 0x1d3b, KEY_GOTO },
-	{ 0x1d3d, KEY_POWER },
-	{ 0x1d3f, KEY_HOME },
-
-	/*
-	 * Keycodes for the old Black Remote Controller
-	 * This one also uses RC-5 protocol
-	 * Keycodes start with address = 0x00
-	 */
-	{ 0x001f, KEY_TV },
-	{ 0x0020, KEY_CHANNELUP },
-	{ 0x000c, KEY_RADIO },
-
-	{ 0x0011, KEY_VOLUMEDOWN },
-	{ 0x002e, KEY_ZOOM },		/* full screen */
-	{ 0x0010, KEY_VOLUMEUP },
-
-	{ 0x000d, KEY_MUTE },
-	{ 0x0021, KEY_CHANNELDOWN },
-	{ 0x0022, KEY_VIDEO },		/* source */
-
-	{ 0x0001, KEY_1 },
-	{ 0x0002, KEY_2 },
-	{ 0x0003, KEY_3 },
-
-	{ 0x0004, KEY_4 },
-	{ 0x0005, KEY_5 },
-	{ 0x0006, KEY_6 },
-
-	{ 0x0007, KEY_7 },
-	{ 0x0008, KEY_8 },
-	{ 0x0009, KEY_9 },
-
-	{ 0x001e, KEY_RED },	/* Reserved */
-	{ 0x0000, KEY_0 },
-	{ 0x0026, KEY_SLEEP },	/* Minimize */
-};
-
-static struct rc_map_list rc5_hauppauge_new_map = {
-	.map = {
-		.scan    = rc5_hauppauge_new,
-		.size    = ARRAY_SIZE(rc5_hauppauge_new),
-		.rc_type = RC_TYPE_RC5,
-		.name    = RC_MAP_RC5_HAUPPAUGE_NEW,
-	}
-};
-
-static int __init init_rc_map_rc5_hauppauge_new(void)
-{
-	return rc_map_register(&rc5_hauppauge_new_map);
-}
-
-static void __exit exit_rc_map_rc5_hauppauge_new(void)
-{
-	rc_map_unregister(&rc5_hauppauge_new_map);
-}
-
-module_init(init_rc_map_rc5_hauppauge_new)
-module_exit(exit_rc_map_rc5_hauppauge_new)
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 079353e..55827b0 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -185,7 +185,7 @@ static const struct mceusb_model mceusb_model[] = {
 		 * remotes, but we should have something handy,
 		 * to allow testing it
 		 */
-		.rc_map = RC_MAP_RC5_HAUPPAUGE_NEW,
+		.rc_map = RC_MAP_HAUPPAUGE,
 		.name = "Conexant Hybrid TV (cx231xx) MCE IR",
 	},
 	[CX_HYBRID_TV] = {
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c
index 199b996..e97cafd 100644
--- a/drivers/media/video/cx23885/cx23885-input.c
+++ b/drivers/media/video/cx23885/cx23885-input.c
@@ -264,7 +264,7 @@ int cx23885_input_init(struct cx23885_dev *dev)
 		driver_type = RC_DRIVER_IR_RAW;
 		allowed_protos = RC_TYPE_ALL;
 		/* The grey Hauppauge RC-5 remote */
-		rc_map = RC_MAP_RC5_HAUPPAUGE_NEW;
+		rc_map = RC_MAP_HAUPPAUGE;
 		break;
 	case CX23885_BOARD_TEVII_S470:
 		/* Integrated CX23885 IR controller */
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 87f77a3..aa4f45e 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -911,7 +911,7 @@ struct em28xx_board em28xx_boards[] = {
 		.mts_firmware   = 1,
 		.has_dvb        = 1,
 		.dvb_gpio       = hauppauge_wintv_hvr_900_digital,
-		.ir_codes       = RC_MAP_RC5_HAUPPAUGE_NEW,
+		.ir_codes       = RC_MAP_HAUPPAUGE,
 		.decoder        = EM28XX_TVP5150,
 		.input          = { {
 			.type     = EM28XX_VMUX_TELEVISION,
@@ -2430,7 +2430,7 @@ void em28xx_register_i2c_ir(struct em28xx *dev)
 		dev->init_data.name = "i2c IR (EM28XX Pinnacle PCTV)";
 		break;
 	case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
-		dev->init_data.ir_codes = RC_MAP_RC5_HAUPPAUGE_NEW;
+		dev->init_data.ir_codes = RC_MAP_HAUPPAUGE;
 		dev->init_data.get_key = em28xx_get_key_em_haup;
 		dev->init_data.name = "i2c IR (EM2840 Hauppauge)";
 		break;
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index 4617117..9df0e90 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -125,7 +125,7 @@ void rc_map_init(void);
 #define RC_MAP_PROTEUS_2309              "rc-proteus-2309"
 #define RC_MAP_PURPLETV                  "rc-purpletv"
 #define RC_MAP_PV951                     "rc-pv951"
-#define RC_MAP_RC5_HAUPPAUGE_NEW         "rc-rc5-hauppauge-new"
+#define RC_MAP_HAUPPAUGE                 "rc-rc5-hauppauge"
 #define RC_MAP_RC5_TV                    "rc-rc5-tv"
 #define RC_MAP_RC6_MCE                   "rc-rc6-mce"
 #define RC_MAP_REAL_AUDIO_220_32_KEYS    "rc-real-audio-220-32-keys"
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 13/13] [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
       [not found] <cover.1295882104.git.mchehab@redhat.com>
                   ` (11 preceding siblings ...)
  2011-01-24 15:18 ` [PATCH 12/13] [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge Mauro Carvalho Chehab
@ 2011-01-24 15:18 ` Mauro Carvalho Chehab
  2011-01-25  0:32   ` Andy Walls
  12 siblings, 1 reply; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 15:18 UTC (permalink / raw)
  Cc: Linux Media Mailing List

The rc-hauppauge-new map is a messy thing, as it bundles 3
different remote controllers as if they were just one,
discarding the address byte. Also, some key maps are wrong.

With the conversion to the new rc-core, it is likely that
most of the devices won't be working properly, as the i2c
driver and the raw decoders are now providing 16 bits for
the remote, instead of just 8.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

 delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c

diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index b82756d..1d79ada 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -26,7 +26,7 @@
  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
  *
  *
- * the project's page is at http://www.linuxtv.org/ 
+ * the project's page is at http://www.linuxtv.org/
  */
 
 #include <linux/module.h>
@@ -102,6 +102,7 @@ struct budget_ci_ir {
 	int rc5_device;
 	u32 ir_key;
 	bool have_command;
+	bool full_rc5;		/* Outputs a full RC5 code */
 };
 
 struct budget_ci {
@@ -154,11 +155,18 @@ static void msp430_ir_interrupt(unsigned long data)
 		return;
 	budget_ci->ir.have_command = false;
 
-	/* FIXME: We should generate complete scancodes with device info */
 	if (budget_ci->ir.rc5_device != IR_DEVICE_ANY &&
 	    budget_ci->ir.rc5_device != (command & 0x1f))
 		return;
 
+	if (budget_ci->ir.full_rc5) {
+		rc_keydown(dev,
+			   budget_ci->ir.rc5_device <<8 | budget_ci->ir.ir_key,
+			   (command & 0x20) ? 1 : 0);
+		return;
+	}
+
+	/* FIXME: We should generate complete scancodes for all devices */
 	rc_keydown(dev, budget_ci->ir.ir_key, (command & 0x20) ? 1 : 0);
 }
 
@@ -206,7 +214,8 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
 	case 0x1011:
 	case 0x1012:
 		/* The hauppauge keymap is a superset of these remotes */
-		dev->map_name = RC_MAP_HAUPPAUGE_NEW;
+		dev->map_name = RC_MAP_HAUPPAUGE;
+		budget_ci->ir.full_rc5 = true;
 
 		if (rc5_device < 0)
 			budget_ci->ir.rc5_device = 0x1f;
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index c79e192..e6bd958 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -37,7 +37,6 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
 			rc-gadmei-rm008z.o \
 			rc-genius-tvgo-a11mce.o \
 			rc-gotview7135.o \
-			rc-hauppauge-new.o \
 			rc-imon-mce.o \
 			rc-imon-pad.o \
 			rc-iodata-bctv7e.o \
diff --git a/drivers/media/rc/keymaps/rc-hauppauge-new.c b/drivers/media/rc/keymaps/rc-hauppauge-new.c
deleted file mode 100644
index 44f3283..0000000
--- a/drivers/media/rc/keymaps/rc-hauppauge-new.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/* hauppauge-new.h - Keytable for hauppauge_new Remote Controller
- *
- * keymap imported from ir-keymaps.c
- *
- * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#include <media/rc-map.h>
-
-/* 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 */
-
-static struct rc_map_table hauppauge_new[] = {
-	/* Keys 0 to 9 */
-	{ 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 },
-
-	{ 0x0a, KEY_TEXT },		/* keypad asterisk as well */
-	{ 0x0b, KEY_RED },		/* red button */
-	{ 0x0c, KEY_RADIO },
-	{ 0x0d, KEY_MENU },
-	{ 0x0e, KEY_SUBTITLE },		/* also the # key */
-	{ 0x0f, KEY_MUTE },
-	{ 0x10, KEY_VOLUMEUP },
-	{ 0x11, KEY_VOLUMEDOWN },
-	{ 0x12, KEY_PREVIOUS },		/* previous channel */
-	{ 0x14, KEY_UP },
-	{ 0x15, KEY_DOWN },
-	{ 0x16, KEY_LEFT },
-	{ 0x17, KEY_RIGHT },
-	{ 0x18, KEY_VCR },		/* Videos */
-	{ 0x19, KEY_AUDIO },		/* Music */
-	/* 0x1a: Pictures - presume this means
-	   "Multimedia Home Platform" -
-	   no "PICTURES" key in input.h
-	 */
-	{ 0x1a, KEY_CAMERA },
-
-	{ 0x1b, KEY_EPG },		/* Guide */
-	{ 0x1c, KEY_TV },
-	{ 0x1e, KEY_NEXTSONG },		/* skip >| */
-	{ 0x1f, KEY_EXIT },		/* back/exit */
-	{ 0x20, KEY_CHANNELUP },	/* channel / program + */
-	{ 0x21, KEY_CHANNELDOWN },	/* channel / program - */
-	{ 0x22, KEY_VIDEO },		/* source (old black remote) */
-	{ 0x24, KEY_PREVIOUSSONG },	/* replay |< */
-	{ 0x25, KEY_ENTER },		/* OK */
-	{ 0x26, KEY_SLEEP },		/* minimize (old black remote) */
-	{ 0x29, KEY_BLUE },		/* blue key */
-	{ 0x2e, KEY_GREEN },		/* green button */
-	{ 0x30, KEY_PAUSE },		/* pause */
-	{ 0x32, KEY_REWIND },		/* backward << */
-	{ 0x34, KEY_FASTFORWARD },	/* forward >> */
-	{ 0x35, KEY_PLAY },
-	{ 0x36, KEY_STOP },
-	{ 0x37, KEY_RECORD },		/* recording */
-	{ 0x38, KEY_YELLOW },		/* yellow key */
-	{ 0x3b, KEY_SELECT },		/* top right button */
-	{ 0x3c, KEY_ZOOM },		/* full */
-	{ 0x3d, KEY_POWER },		/* system power (green button) */
-};
-
-static struct rc_map_list hauppauge_new_map = {
-	.map = {
-		.scan    = hauppauge_new,
-		.size    = ARRAY_SIZE(hauppauge_new),
-		.rc_type = RC_TYPE_UNKNOWN,	/* Legacy IR type */
-		.name    = RC_MAP_HAUPPAUGE_NEW,
-	}
-};
-
-static int __init init_rc_map_hauppauge_new(void)
-{
-	return rc_map_register(&hauppauge_new_map);
-}
-
-static void __exit exit_rc_map_hauppauge_new(void)
-{
-	rc_map_unregister(&hauppauge_new_map);
-}
-
-module_init(init_rc_map_hauppauge_new)
-module_exit(exit_rc_map_hauppauge_new)
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c
index c330fb9..040aaa8 100644
--- a/drivers/media/video/cx18/cx18-i2c.c
+++ b/drivers/media/video/cx18/cx18-i2c.c
@@ -96,7 +96,7 @@ static int cx18_i2c_new_ir(struct cx18 *cx, struct i2c_adapter *adap, u32 hw,
 	/* Our default information for ir-kbd-i2c.c to use */
 	switch (hw) {
 	case CX18_HW_Z8F0811_IR_RX_HAUP:
-		init_data->ir_codes = RC_MAP_HAUPPAUGE_NEW;
+		init_data->ir_codes = RC_MAP_HAUPPAUGE;
 		init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
 		init_data->type = RC_TYPE_RC5;
 		init_data->name = cx->card_name;
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index 06f7d1d..9171775 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -283,7 +283,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
 	case CX88_BOARD_PCHDTV_HD3000:
 	case CX88_BOARD_PCHDTV_HD5500:
 	case CX88_BOARD_HAUPPAUGE_IRONLY:
-		ir_codes = RC_MAP_HAUPPAUGE_NEW;
+		ir_codes = RC_MAP_HAUPPAUGE;
 		ir->sampling = 1;
 		break;
 	case CX88_BOARD_WINFAST_DTV2000H:
@@ -603,7 +603,7 @@ void cx88_i2c_init_ir(struct cx88_core *core)
 		if (*addrp == 0x71) {
 			/* Hauppauge XVR */
 			core->init_data.name = "cx88 Hauppauge XVR remote";
-			core->init_data.ir_codes = RC_MAP_HAUPPAUGE_NEW;
+			core->init_data.ir_codes = RC_MAP_HAUPPAUGE;
 			core->init_data.type = RC_TYPE_RC5;
 			core->init_data.internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
 
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index aa4f45e..69fcea8 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -834,7 +834,7 @@ struct em28xx_board em28xx_boards[] = {
 		.mts_firmware = 1,
 		.has_dvb      = 1,
 		.dvb_gpio     = hauppauge_wintv_hvr_900_digital,
-		.ir_codes     = RC_MAP_HAUPPAUGE_NEW,
+		.ir_codes     = RC_MAP_HAUPPAUGE,
 		.decoder      = EM28XX_TVP5150,
 		.input        = { {
 			.type     = EM28XX_VMUX_TELEVISION,
@@ -859,7 +859,7 @@ struct em28xx_board em28xx_boards[] = {
 		.tuner_type   = TUNER_XC2028,
 		.tuner_gpio   = default_tuner_gpio,
 		.mts_firmware = 1,
-		.ir_codes     = RC_MAP_HAUPPAUGE_NEW,
+		.ir_codes     = RC_MAP_HAUPPAUGE,
 		.decoder      = EM28XX_TVP5150,
 		.input        = { {
 			.type     = EM28XX_VMUX_TELEVISION,
@@ -885,7 +885,7 @@ struct em28xx_board em28xx_boards[] = {
 		.mts_firmware   = 1,
 		.has_dvb        = 1,
 		.dvb_gpio       = hauppauge_wintv_hvr_900_digital,
-		.ir_codes       = RC_MAP_HAUPPAUGE_NEW,
+		.ir_codes       = RC_MAP_HAUPPAUGE,
 		.decoder        = EM28XX_TVP5150,
 		.input          = { {
 			.type     = EM28XX_VMUX_TELEVISION,
diff --git a/drivers/media/video/hdpvr/hdpvr-i2c.c b/drivers/media/video/hdpvr/hdpvr-i2c.c
index 89b71fa..ca2c85d 100644
--- a/drivers/media/video/hdpvr/hdpvr-i2c.c
+++ b/drivers/media/video/hdpvr/hdpvr-i2c.c
@@ -42,7 +42,7 @@ int hdpvr_register_i2c_ir(struct hdpvr_device *dev)
 	struct IR_i2c_init_data *init_data = &dev->ir_i2c_init_data;
 
 	/* Our default information for ir-kbd-i2c.c to use */
-	init_data->ir_codes = RC_MAP_HAUPPAUGE_NEW;
+	init_data->ir_codes = RC_MAP_HAUPPAUGE;
 	init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
 	init_data->type = RC_TYPE_RC5;
 	init_data->name = "HD PVR";
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index d2b20ad..b18373a 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -300,7 +300,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		ir->get_key = get_key_haup;
 		rc_type     = RC_TYPE_RC5;
 		if (hauppauge == 1) {
-			ir_codes    = RC_MAP_HAUPPAUGE_NEW;
+			ir_codes    = RC_MAP_HAUPPAUGE;
 		} else {
 			ir_codes    = RC_MAP_RC5_TV;
 		}
@@ -327,7 +327,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		name        = "Hauppauge/Zilog Z8";
 		ir->get_key = get_key_haup_xvr;
 		rc_type     = RC_TYPE_RC5;
-		ir_codes    = hauppauge ? RC_MAP_HAUPPAUGE_NEW : RC_MAP_RC5_TV;
+		ir_codes    = hauppauge ? RC_MAP_HAUPPAUGE : RC_MAP_RC5_TV;
 		break;
 	}
 
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c
index 9fb86a0..3c89d6f 100644
--- a/drivers/media/video/ivtv/ivtv-i2c.c
+++ b/drivers/media/video/ivtv/ivtv-i2c.c
@@ -213,7 +213,7 @@ static int ivtv_i2c_new_ir(struct ivtv *itv, u32 hw, const char *type, u8 addr)
 		break;
 	case IVTV_HW_Z8F0811_IR_RX_HAUP:
 		/* Default to grey remote */
-		init_data->ir_codes = RC_MAP_HAUPPAUGE_NEW;
+		init_data->ir_codes = RC_MAP_HAUPPAUGE;
 		init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
 		init_data->type = RC_TYPE_RC5;
 		init_data->name = itv->card_name;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index ccc8849..1a529ef 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -578,7 +578,7 @@ static void pvr2_i2c_register_ir(struct pvr2_hdw *hdw)
 	switch (hdw->ir_scheme_active) {
 	case PVR2_IR_SCHEME_24XXX: /* FX2-controlled IR */
 	case PVR2_IR_SCHEME_29XXX: /* Original 29xxx device */
-		init_data->ir_codes              = RC_MAP_HAUPPAUGE_NEW;
+		init_data->ir_codes              = RC_MAP_HAUPPAUGE;
 		init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP;
 		init_data->type                  = RC_TYPE_RC5;
 		init_data->name                  = hdw->hdw_desc->description;
@@ -593,7 +593,7 @@ static void pvr2_i2c_register_ir(struct pvr2_hdw *hdw)
 		break;
 	case PVR2_IR_SCHEME_ZILOG:     /* HVR-1950 style */
 	case PVR2_IR_SCHEME_24XXX_MCE: /* 24xxx MCE device */
-		init_data->ir_codes              = RC_MAP_HAUPPAUGE_NEW;
+		init_data->ir_codes              = RC_MAP_HAUPPAUGE;
 		init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
 		init_data->type                  = RC_TYPE_RC5;
 		init_data->name                  = hdw->hdw_desc->description;
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index c9eff03..c504c30 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -864,7 +864,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
 	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
 		dev->init_data.name = "HVR 1110";
 		dev->init_data.get_key = get_key_hvr1110;
-		dev->init_data.ir_codes = RC_MAP_HAUPPAUGE_NEW;
+		dev->init_data.ir_codes = RC_MAP_HAUPPAUGE;
 		info.addr = 0x71;
 		break;
 	case SAA7134_BOARD_BEHOLD_607FM_MK3:
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent
  2011-01-24 15:18 ` [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent Mauro Carvalho Chehab
@ 2011-01-24 15:45   ` Jarod Wilson
  2011-01-24 16:08     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 22+ messages in thread
From: Jarod Wilson @ 2011-01-24 15:45 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On Jan 24, 2011, at 10:18 AM, Mauro Carvalho Chehab wrote:

> Using xev and testing the "Windows" key on a normal keyboard, it
> is mapped as KEY_LEFTMETA. So, as this is the standard code for
> it, use it, instead of a generic, meaningless KEY_PROG1.

Not sure I agree with this change, or at least, not with using
KEY_LEFTMETA. The Window MCE key isn't quite analogous to the Windows
key on a keyboard. Under Windows, I'm pretty sure its a program
launcher key, that launches (or switches you to) the Windows Media
Center UI.

-- 
Jarod Wilson
jarod@wilsonet.com




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent
  2011-01-24 15:45   ` Jarod Wilson
@ 2011-01-24 16:08     ` Mauro Carvalho Chehab
  2011-01-24 19:11       ` Jarod Wilson
  0 siblings, 1 reply; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-24 16:08 UTC (permalink / raw)
  To: Jarod Wilson; +Cc: Linux Media Mailing List

Em 24-01-2011 13:45, Jarod Wilson escreveu:
> On Jan 24, 2011, at 10:18 AM, Mauro Carvalho Chehab wrote:
> 
>> Using xev and testing the "Windows" key on a normal keyboard, it
>> is mapped as KEY_LEFTMETA. So, as this is the standard code for
>> it, use it, instead of a generic, meaningless KEY_PROG1.
> 
> Not sure I agree with this change, or at least, not with using
> KEY_LEFTMETA. The Window MCE key isn't quite analogous to the Windows
> key on a keyboard. Under Windows, I'm pretty sure its a program
> launcher key, that launches (or switches you to) the Windows Media
> Center UI.

If you look from userspace perspective, an application that will use
the media keycodes need to have a proper behaviour for each of the
received keys.

The idea is that each media key should be translated into a X key.
My idea is to add something like:

#define XK_10channelsdown    0xfc00	/* KEY_10CHANNELSDOWN */
#define XK_10channelsup      0xfc01	/* KEY_10CHANNELSUP */
#define XK_Ab                0xfc02	/* KEY_AB */
#define XK_Again             0xfc03	/* KEY_AGAIN */
#define XK_Angle             0xfc04	/* KEY_ANGLE */
#define XK_Audio             0xfc05	/* KEY_AUDIO */
#define XK_Aux               0xfc06	/* KEY_AUX */
...

to /usr/include/X11/keysymdef.h and use those new symbol internals
inside the media userspace applications.

However, for this to work, for each of the used codes, an specific
behavior should be used by the media applications.

If we look on the places that use KEY_PROG1, we have (before this patch series):

$ git grep KEY_PROG1 drivers/media/
drivers/media/dvb/dvb-usb/a800.c: { 0x0201, KEY_PROG1 },       /* SOURCE */
drivers/media/rc/imon.c:  { 0x000000000f00ffeell, KEY_PROG1 }, /* Go */
drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c:  { 0x03, KEY_PROG1 },            /* 1 */
drivers/media/rc/keymaps/rc-avermedia-rm-ks.c:    { 0x0508, KEY_PROG1 },
drivers/media/rc/keymaps/rc-cinergy.c:    { 0x0b, KEY_PROG1 },            /* app */
drivers/media/rc/keymaps/rc-encore-enltv.c:       { 0x53, KEY_PROG1 },            /* teletext */
drivers/media/rc/keymaps/rc-imon-mce.c:   { 0x800ff40d, KEY_PROG1 }, /* Windows MCE button */
drivers/media/rc/keymaps/rc-imon-pad.c:   { 0x2ab195b7, KEY_PROG1 }, /* Go or MultiMon */
drivers/media/rc/keymaps/rc-kworld-plus-tv-analog.c:      { 0x0c, KEY_PROG1 },            /* Kworld key */
drivers/media/rc/keymaps/rc-rc6-mce.c:    { 0x800f040d, KEY_PROG1 },              /* Windows MCE button */

By just looking into each comment, is is clear that KEY_PROG1 can
mean different things: Source, Go, function 1, app, teletext, Windows MCE,
"Kworld key".

So, a code like KEY_PROG1 can't be translated into anything useful,
and, even if we create a "XK_Prog1", the translation for Xorg, its
translation inside the applications is not obvious at all. So, we
should really avoid things like that inside the keymaps.

Perhaps using KEY_LEFTMETA is not a good idea to map the Windows MCE
key, but, in this case, we should create another keycode inside evdev
and export it to userspace.

Cheers,
Mauro


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent
  2011-01-24 16:08     ` Mauro Carvalho Chehab
@ 2011-01-24 19:11       ` Jarod Wilson
  0 siblings, 0 replies; 22+ messages in thread
From: Jarod Wilson @ 2011-01-24 19:11 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On Jan 24, 2011, at 11:08 AM, Mauro Carvalho Chehab wrote:

> Em 24-01-2011 13:45, Jarod Wilson escreveu:
>> On Jan 24, 2011, at 10:18 AM, Mauro Carvalho Chehab wrote:
>> 
>>> Using xev and testing the "Windows" key on a normal keyboard, it
>>> is mapped as KEY_LEFTMETA. So, as this is the standard code for
>>> it, use it, instead of a generic, meaningless KEY_PROG1.
>> 
>> Not sure I agree with this change, or at least, not with using
>> KEY_LEFTMETA. The Window MCE key isn't quite analogous to the Windows
>> key on a keyboard. Under Windows, I'm pretty sure its a program
>> launcher key, that launches (or switches you to) the Windows Media
>> Center UI.
> 
> If you look from userspace perspective, an application that will use
> the media keycodes need to have a proper behaviour for each of the
> received keys.
> 
> The idea is that each media key should be translated into a X key.
> My idea is to add something like:
> 
> #define XK_10channelsdown    0xfc00	/* KEY_10CHANNELSDOWN */
> #define XK_10channelsup      0xfc01	/* KEY_10CHANNELSUP */
> #define XK_Ab                0xfc02	/* KEY_AB */
> #define XK_Again             0xfc03	/* KEY_AGAIN */
> #define XK_Angle             0xfc04	/* KEY_ANGLE */
> #define XK_Audio             0xfc05	/* KEY_AUDIO */
> #define XK_Aux               0xfc06	/* KEY_AUX */
> ...
> 
> to /usr/include/X11/keysymdef.h and use those new symbol internals
> inside the media userspace applications.
> 
> However, for this to work, for each of the used codes, an specific
> behavior should be used by the media applications.
> 
> If we look on the places that use KEY_PROG1, we have (before this patch series):
...
> So, a code like KEY_PROG1 can't be translated into anything useful,
> and, even if we create a "XK_Prog1", the translation for Xorg, its
> translation inside the applications is not obvious at all. So, we
> should really avoid things like that inside the keymaps.
> 
> Perhaps using KEY_LEFTMETA is not a good idea to map the Windows MCE
> key, but, in this case, we should create another keycode inside evdev
> and export it to userspace.

As discussed on irc, KEY_MEDIA seems like the best answer. There's
something in the mce keymap already mapped to KEY_MEDIA, but I don't
seem to have that key on either of the mce remotes I have handy at
the moment, so its probably on one of the less common remotes... We
can change that key's mapping at a later date, if someone wants to
use that button for something different than the green button.

-- 
Jarod Wilson
jarod@wilsonet.com




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 12/13] [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
  2011-01-24 15:18 ` [PATCH 12/13] [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge Mauro Carvalho Chehab
@ 2011-01-25  0:22   ` Andy Walls
  2011-01-25  1:14     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 22+ messages in thread
From: Andy Walls @ 2011-01-25  0:22 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On Mon, 2011-01-24 at 13:18 -0200, Mauro Carvalho Chehab wrote:
> There are two "hauppauge-new" keymaps, one with protocol
> unknown, and the other with the protocol marked accordingly.
> However, both tables are miss-named.
> 
> Also, the old rc-hauppauge-new is broken, as it mixes
> three different controllers as if they were just one.
> 
> This patch solves half of the problem by renaming the
> correct keycode table as just rc-hauppauge. This table
> contains the codes for the four different types of
> remote controllers found on Hauppauge cards, properly
> mapped with their different addresses.

Are you sure about doing this?

The problem is that the old black Hauppauge remote is using the same
RC-5 address as a common RC-5 TV remote: address 0x00.

See the table at the bottom of:
	http://www.sbprojects.com/knowledge/ir/rc5.htm

IMO, RC-5 address 0x00 is not an address that every Hauppauge card
should be responding to by default.

I'm not too concerned with addresses 0x1d, 0x1e, and 0x1f colliding with
other consumer electronics remotes.

Regards,
Andy

> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> 
>  create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c
>  delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
> 
> diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
> index 25b43e5..af121db 100644
> --- a/drivers/media/dvb/siano/sms-cards.c
> +++ b/drivers/media/dvb/siano/sms-cards.c
> @@ -64,7 +64,7 @@ static struct sms_board sms_boards[] = {
>  		.type	= SMS_NOVA_B0,
>  		.fw[DEVICE_MODE_ISDBT_BDA] = "sms1xxx-hcw-55xxx-isdbt-02.fw",
>  		.fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
> -		.rc_codes = RC_MAP_RC5_HAUPPAUGE_NEW,
> +		.rc_codes = RC_MAP_HAUPPAUGE,
>  		.board_cfg.leds_power = 26,
>  		.board_cfg.led0 = 27,
>  		.board_cfg.led1 = 28,
> diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
> index f0c8055..c79e192 100644
> --- a/drivers/media/rc/keymaps/Makefile
> +++ b/drivers/media/rc/keymaps/Makefile
> @@ -68,7 +68,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
>  			rc-proteus-2309.o \
>  			rc-purpletv.o \
>  			rc-pv951.o \
> -			rc-rc5-hauppauge-new.o \
> +			rc-hauppauge.o \
>  			rc-rc5-tv.o \
>  			rc-rc6-mce.o \
>  			rc-real-audio-220-32-keys.o \
> diff --git a/drivers/media/rc/keymaps/rc-hauppauge.c b/drivers/media/rc/keymaps/rc-hauppauge.c
> new file mode 100644
> index 0000000..66e0498
> --- /dev/null
> +++ b/drivers/media/rc/keymaps/rc-hauppauge.c
> @@ -0,0 +1,241 @@
> +/* rc-hauppauge.h - Keytable for Hauppauge Remote Controllers
> + *
> + * keymap imported from ir-keymaps.c
> + *
> + * This map currently contains the code for four different RCs:
> + *	- New Hauppauge Gray;
> + *	- Old Hauppauge Gray (with a golden screen for media keys);
> + *	- Hauppauge Black;
> + *	- DSR-0112 remote bundled with Haupauge MiniStick.
> + *
> + * Copyright (c) 2010-2011 by Mauro Carvalho Chehab <mchehab@redhat.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include <media/rc-map.h>
> +
> +/*
> + * Hauppauge:the newer, gray remotes (seems there are multiple
> + * slightly different versions), shipped with cx88+ivtv cards.
> + *
> + * This table contains the complete RC5 code, instead of just the data part
> + */
> +
> +static struct rc_map_table rc5_hauppauge_new[] = {
> +	/*
> +	 * Remote Controller Hauppauge Gray found on modern devices
> +	 * Keycodes start with address = 0x1e
> +	 */
> +
> +	{ 0x1e3b, KEY_SELECT },		/* GO / house symbol */
> +	{ 0x1e3d, KEY_POWER2 },		/* system power (green button) */
> +
> +	{ 0x1e1c, KEY_TV },
> +	{ 0x1e18, KEY_VIDEO },		/* Videos */
> +	{ 0x1e19, KEY_AUDIO },		/* Music */
> +	{ 0x1e1a, KEY_CAMERA },		/* Pictures */
> +
> +	{ 0x1e1b, KEY_EPG },		/* Guide */
> +	{ 0x1e0c, KEY_RADIO },
> +
> +	{ 0x1e14, KEY_UP },
> +	{ 0x1e15, KEY_DOWN },
> +	{ 0x1e16, KEY_LEFT },
> +	{ 0x1e17, KEY_RIGHT },
> +	{ 0x1e25, KEY_OK },		/* OK */
> +
> +	{ 0x1e1f, KEY_EXIT },		/* back/exit */
> +	{ 0x1e0d, KEY_MENU },
> +
> +	{ 0x1e10, KEY_VOLUMEUP },
> +	{ 0x1e11, KEY_VOLUMEDOWN },
> +
> +	{ 0x1e12, KEY_PREVIOUS },	/* previous channel */
> +	{ 0x1e0f, KEY_MUTE },
> +
> +	{ 0x1e20, KEY_CHANNELUP },	/* channel / program + */
> +	{ 0x1e21, KEY_CHANNELDOWN },	/* channel / program - */
> +
> +	{ 0x1e37, KEY_RECORD },		/* recording */
> +	{ 0x1e36, KEY_STOP },
> +
> +	{ 0x1e32, KEY_REWIND },		/* backward << */
> +	{ 0x1e35, KEY_PLAY },
> +	{ 0x1e34, KEY_FASTFORWARD },	/* forward >> */
> +
> +	{ 0x1e24, KEY_PREVIOUSSONG },	/* replay |< */
> +	{ 0x1e30, KEY_PAUSE },		/* pause */
> +	{ 0x1e1e, KEY_NEXTSONG },	/* skip >| */
> +
> +	{ 0x1e01, KEY_1 },
> +	{ 0x1e02, KEY_2 },
> +	{ 0x1e03, KEY_3 },
> +
> +	{ 0x1e04, KEY_4 },
> +	{ 0x1e05, KEY_5 },
> +	{ 0x1e06, KEY_6 },
> +
> +	{ 0x1e07, KEY_7 },
> +	{ 0x1e08, KEY_8 },
> +	{ 0x1e09, KEY_9 },
> +
> +	{ 0x1e0a, KEY_TEXT },		/* keypad asterisk as well */
> +	{ 0x1e00, KEY_0 },
> +	{ 0x1e0e, KEY_SUBTITLE },	/* also the Pound key (#) */
> +
> +	{ 0x1e0b, KEY_RED },		/* red button */
> +	{ 0x1e2e, KEY_GREEN },		/* green button */
> +	{ 0x1e38, KEY_YELLOW },		/* yellow key */
> +	{ 0x1e29, KEY_BLUE },		/* blue key */
> +
> +	/*
> +	 * Old Remote Controller Hauppauge Gray with a golden screen
> +	 * Keycodes start with address = 0x1f
> +	 */
> +	{ 0x1f3d, KEY_POWER2 },		/* system power (green button) */
> +	{ 0x1f3b, KEY_SELECT },		/* GO */
> +
> +	/* Keys 0 to 9 */
> +	{ 0x1f00, KEY_0 },
> +	{ 0x1f01, KEY_1 },
> +	{ 0x1f02, KEY_2 },
> +	{ 0x1f03, KEY_3 },
> +	{ 0x1f04, KEY_4 },
> +	{ 0x1f05, KEY_5 },
> +	{ 0x1f06, KEY_6 },
> +	{ 0x1f07, KEY_7 },
> +	{ 0x1f08, KEY_8 },
> +	{ 0x1f09, KEY_9 },
> +
> +	{ 0x1f1f, KEY_EXIT },		/* back/exit */
> +	{ 0x1f0d, KEY_MENU },
> +
> +	{ 0x1f10, KEY_VOLUMEUP },
> +	{ 0x1f11, KEY_VOLUMEDOWN },
> +	{ 0x1f20, KEY_CHANNELUP },	/* channel / program + */
> +	{ 0x1f21, KEY_CHANNELDOWN },	/* channel / program - */
> +	{ 0x1f25, KEY_ENTER },		/* OK */
> +
> +	{ 0x1f0b, KEY_RED },		/* red button */
> +	{ 0x1f2e, KEY_GREEN },		/* green button */
> +	{ 0x1f38, KEY_YELLOW },		/* yellow key */
> +	{ 0x1f29, KEY_BLUE },		/* blue key */
> +
> +	{ 0x1f0f, KEY_MUTE },
> +	{ 0x1f0c, KEY_RADIO },		/* There's no indicator on this key */
> +	{ 0x1f3c, KEY_ZOOM },		/* full */
> +
> +	{ 0x1f32, KEY_REWIND },		/* backward << */
> +	{ 0x1f35, KEY_PLAY },
> +	{ 0x1f34, KEY_FASTFORWARD },	/* forward >> */
> +
> +	{ 0x1f37, KEY_RECORD },		/* recording */
> +	{ 0x1f36, KEY_STOP },
> +	{ 0x1f30, KEY_PAUSE },		/* pause */
> +
> +	{ 0x1f24, KEY_PREVIOUSSONG },	/* replay |< */
> +	{ 0x1f1e, KEY_NEXTSONG },	/* skip >| */
> +
> +	/*
> +	 * Keycodes for DSR-0112 remote bundled with Haupauge MiniStick
> +	 * Keycodes start with address = 0x1d
> +	 */
> +	{ 0x1d00, KEY_0 },
> +	{ 0x1d01, KEY_1 },
> +	{ 0x1d02, KEY_2 },
> +	{ 0x1d03, KEY_3 },
> +	{ 0x1d04, KEY_4 },
> +	{ 0x1d05, KEY_5 },
> +	{ 0x1d06, KEY_6 },
> +	{ 0x1d07, KEY_7 },
> +	{ 0x1d08, KEY_8 },
> +	{ 0x1d09, KEY_9 },
> +	{ 0x1d0a, KEY_TEXT },
> +	{ 0x1d0d, KEY_MENU },
> +	{ 0x1d0f, KEY_MUTE },
> +	{ 0x1d10, KEY_VOLUMEUP },
> +	{ 0x1d11, KEY_VOLUMEDOWN },
> +	{ 0x1d12, KEY_PREVIOUS },        /* Prev.Ch .. ??? */
> +	{ 0x1d14, KEY_UP },
> +	{ 0x1d15, KEY_DOWN },
> +	{ 0x1d16, KEY_LEFT },
> +	{ 0x1d17, KEY_RIGHT },
> +	{ 0x1d1c, KEY_TV },
> +	{ 0x1d1e, KEY_NEXT },           /* >|             */
> +	{ 0x1d1f, KEY_EXIT },
> +	{ 0x1d20, KEY_CHANNELUP },
> +	{ 0x1d21, KEY_CHANNELDOWN },
> +	{ 0x1d24, KEY_LAST },           /* <|             */
> +	{ 0x1d25, KEY_OK },
> +	{ 0x1d30, KEY_PAUSE },
> +	{ 0x1d32, KEY_REWIND },
> +	{ 0x1d34, KEY_FASTFORWARD },
> +	{ 0x1d35, KEY_PLAY },
> +	{ 0x1d36, KEY_STOP },
> +	{ 0x1d37, KEY_RECORD },
> +	{ 0x1d3b, KEY_GOTO },
> +	{ 0x1d3d, KEY_POWER },
> +	{ 0x1d3f, KEY_HOME },
> +
> +	/*
> +	 * Keycodes for the old Black Remote Controller
> +	 * This one also uses RC-5 protocol
> +	 * Keycodes start with address = 0x00
> +	 */
> +	{ 0x001f, KEY_TV },
> +	{ 0x0020, KEY_CHANNELUP },
> +	{ 0x000c, KEY_RADIO },
> +
> +	{ 0x0011, KEY_VOLUMEDOWN },
> +	{ 0x002e, KEY_ZOOM },		/* full screen */
> +	{ 0x0010, KEY_VOLUMEUP },
> +
> +	{ 0x000d, KEY_MUTE },
> +	{ 0x0021, KEY_CHANNELDOWN },
> +	{ 0x0022, KEY_VIDEO },		/* source */
> +
> +	{ 0x0001, KEY_1 },
> +	{ 0x0002, KEY_2 },
> +	{ 0x0003, KEY_3 },
> +
> +	{ 0x0004, KEY_4 },
> +	{ 0x0005, KEY_5 },
> +	{ 0x0006, KEY_6 },
> +
> +	{ 0x0007, KEY_7 },
> +	{ 0x0008, KEY_8 },
> +	{ 0x0009, KEY_9 },
> +
> +	{ 0x001e, KEY_RED },	/* Reserved */
> +	{ 0x0000, KEY_0 },
> +	{ 0x0026, KEY_SLEEP },	/* Minimize */
> +};
> +
> +static struct rc_map_list rc5_hauppauge_new_map = {
> +	.map = {
> +		.scan    = rc5_hauppauge_new,
> +		.size    = ARRAY_SIZE(rc5_hauppauge_new),
> +		.rc_type = RC_TYPE_RC5,
> +		.name    = RC_MAP_HAUPPAUGE,
> +	}
> +};
> +
> +static int __init init_rc_map_rc5_hauppauge_new(void)
> +{
> +	return rc_map_register(&rc5_hauppauge_new_map);
> +}
> +
> +static void __exit exit_rc_map_rc5_hauppauge_new(void)
> +{
> +	rc_map_unregister(&rc5_hauppauge_new_map);
> +}
> +
> +module_init(init_rc_map_rc5_hauppauge_new)
> +module_exit(exit_rc_map_rc5_hauppauge_new)
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
> diff --git a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c b/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
> deleted file mode 100644
> index cb312da..0000000
> --- a/drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
> +++ /dev/null
> @@ -1,235 +0,0 @@
> -/* rc5-hauppauge-new.h - Keytable for rc5_hauppauge_new Remote Controller
> - *
> - * keymap imported from ir-keymaps.c
> - *
> - * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - */
> -
> -#include <media/rc-map.h>
> -
> -/*
> - * Hauppauge:the newer, gray remotes (seems there are multiple
> - * slightly different versions), shipped with cx88+ivtv cards.
> - *
> - * This table contains the complete RC5 code, instead of just the data part
> - */
> -
> -static struct rc_map_table rc5_hauppauge_new[] = {
> -	/*
> -	 * Remote Controller Hauppauge Gray found on modern devices
> -	 * Keycodes start with address = 0x1e
> -	 */
> -
> -	{ 0x1e3b, KEY_SELECT },		/* GO / house symbol */
> -	{ 0x1e3d, KEY_POWER2 },		/* system power (green button) */
> -
> -	{ 0x1e1c, KEY_TV },
> -	{ 0x1e18, KEY_VIDEO },		/* Videos */
> -	{ 0x1e19, KEY_AUDIO },		/* Music */
> -	{ 0x1e1a, KEY_CAMERA },		/* Pictures */
> -
> -	{ 0x1e1b, KEY_EPG },		/* Guide */
> -	{ 0x1e0c, KEY_RADIO },
> -
> -	{ 0x1e14, KEY_UP },
> -	{ 0x1e15, KEY_DOWN },
> -	{ 0x1e16, KEY_LEFT },
> -	{ 0x1e17, KEY_RIGHT },
> -	{ 0x1e25, KEY_OK },		/* OK */
> -
> -	{ 0x1e1f, KEY_EXIT },		/* back/exit */
> -	{ 0x1e0d, KEY_MENU },
> -
> -	{ 0x1e10, KEY_VOLUMEUP },
> -	{ 0x1e11, KEY_VOLUMEDOWN },
> -
> -	{ 0x1e12, KEY_PREVIOUS },	/* previous channel */
> -	{ 0x1e0f, KEY_MUTE },
> -
> -	{ 0x1e20, KEY_CHANNELUP },	/* channel / program + */
> -	{ 0x1e21, KEY_CHANNELDOWN },	/* channel / program - */
> -
> -	{ 0x1e37, KEY_RECORD },		/* recording */
> -	{ 0x1e36, KEY_STOP },
> -
> -	{ 0x1e32, KEY_REWIND },		/* backward << */
> -	{ 0x1e35, KEY_PLAY },
> -	{ 0x1e34, KEY_FASTFORWARD },	/* forward >> */
> -
> -	{ 0x1e24, KEY_PREVIOUSSONG },	/* replay |< */
> -	{ 0x1e30, KEY_PAUSE },		/* pause */
> -	{ 0x1e1e, KEY_NEXTSONG },	/* skip >| */
> -
> -	{ 0x1e01, KEY_1 },
> -	{ 0x1e02, KEY_2 },
> -	{ 0x1e03, KEY_3 },
> -
> -	{ 0x1e04, KEY_4 },
> -	{ 0x1e05, KEY_5 },
> -	{ 0x1e06, KEY_6 },
> -
> -	{ 0x1e07, KEY_7 },
> -	{ 0x1e08, KEY_8 },
> -	{ 0x1e09, KEY_9 },
> -
> -	{ 0x1e0a, KEY_TEXT },		/* keypad asterisk as well */
> -	{ 0x1e00, KEY_0 },
> -	{ 0x1e0e, KEY_SUBTITLE },	/* also the Pound key (#) */
> -
> -	{ 0x1e0b, KEY_RED },		/* red button */
> -	{ 0x1e2e, KEY_GREEN },		/* green button */
> -	{ 0x1e38, KEY_YELLOW },		/* yellow key */
> -	{ 0x1e29, KEY_BLUE },		/* blue key */
> -
> -	/*
> -	 * Old Remote Controller Hauppauge Gray with a golden screen
> -	 * Keycodes start with address = 0x1f
> -	 */
> -	{ 0x1f3d, KEY_POWER2 },		/* system power (green button) */
> -	{ 0x1f3b, KEY_SELECT },		/* GO */
> -
> -	/* Keys 0 to 9 */
> -	{ 0x1f00, KEY_0 },
> -	{ 0x1f01, KEY_1 },
> -	{ 0x1f02, KEY_2 },
> -	{ 0x1f03, KEY_3 },
> -	{ 0x1f04, KEY_4 },
> -	{ 0x1f05, KEY_5 },
> -	{ 0x1f06, KEY_6 },
> -	{ 0x1f07, KEY_7 },
> -	{ 0x1f08, KEY_8 },
> -	{ 0x1f09, KEY_9 },
> -
> -	{ 0x1f1f, KEY_EXIT },		/* back/exit */
> -	{ 0x1f0d, KEY_MENU },
> -
> -	{ 0x1f10, KEY_VOLUMEUP },
> -	{ 0x1f11, KEY_VOLUMEDOWN },
> -	{ 0x1f20, KEY_CHANNELUP },	/* channel / program + */
> -	{ 0x1f21, KEY_CHANNELDOWN },	/* channel / program - */
> -	{ 0x1f25, KEY_ENTER },		/* OK */
> -
> -	{ 0x1f0b, KEY_RED },		/* red button */
> -	{ 0x1f2e, KEY_GREEN },		/* green button */
> -	{ 0x1f38, KEY_YELLOW },		/* yellow key */
> -	{ 0x1f29, KEY_BLUE },		/* blue key */
> -
> -	{ 0x1f0f, KEY_MUTE },
> -	{ 0x1f0c, KEY_RADIO },		/* There's no indicator on this key */
> -	{ 0x1f3c, KEY_ZOOM },		/* full */
> -
> -	{ 0x1f32, KEY_REWIND },		/* backward << */
> -	{ 0x1f35, KEY_PLAY },
> -	{ 0x1f34, KEY_FASTFORWARD },	/* forward >> */
> -
> -	{ 0x1f37, KEY_RECORD },		/* recording */
> -	{ 0x1f36, KEY_STOP },
> -	{ 0x1f30, KEY_PAUSE },		/* pause */
> -
> -	{ 0x1f24, KEY_PREVIOUSSONG },	/* replay |< */
> -	{ 0x1f1e, KEY_NEXTSONG },	/* skip >| */
> -
> -	/*
> -	 * Keycodes for DSR-0112 remote bundled with Haupauge MiniStick
> -	 * Keycodes start with address = 0x1d
> -	 */
> -	{ 0x1d00, KEY_0 },
> -	{ 0x1d01, KEY_1 },
> -	{ 0x1d02, KEY_2 },
> -	{ 0x1d03, KEY_3 },
> -	{ 0x1d04, KEY_4 },
> -	{ 0x1d05, KEY_5 },
> -	{ 0x1d06, KEY_6 },
> -	{ 0x1d07, KEY_7 },
> -	{ 0x1d08, KEY_8 },
> -	{ 0x1d09, KEY_9 },
> -	{ 0x1d0a, KEY_TEXT },
> -	{ 0x1d0d, KEY_MENU },
> -	{ 0x1d0f, KEY_MUTE },
> -	{ 0x1d10, KEY_VOLUMEUP },
> -	{ 0x1d11, KEY_VOLUMEDOWN },
> -	{ 0x1d12, KEY_PREVIOUS },        /* Prev.Ch .. ??? */
> -	{ 0x1d14, KEY_UP },
> -	{ 0x1d15, KEY_DOWN },
> -	{ 0x1d16, KEY_LEFT },
> -	{ 0x1d17, KEY_RIGHT },
> -	{ 0x1d1c, KEY_TV },
> -	{ 0x1d1e, KEY_NEXT },           /* >|             */
> -	{ 0x1d1f, KEY_EXIT },
> -	{ 0x1d20, KEY_CHANNELUP },
> -	{ 0x1d21, KEY_CHANNELDOWN },
> -	{ 0x1d24, KEY_LAST },           /* <|             */
> -	{ 0x1d25, KEY_OK },
> -	{ 0x1d30, KEY_PAUSE },
> -	{ 0x1d32, KEY_REWIND },
> -	{ 0x1d34, KEY_FASTFORWARD },
> -	{ 0x1d35, KEY_PLAY },
> -	{ 0x1d36, KEY_STOP },
> -	{ 0x1d37, KEY_RECORD },
> -	{ 0x1d3b, KEY_GOTO },
> -	{ 0x1d3d, KEY_POWER },
> -	{ 0x1d3f, KEY_HOME },
> -
> -	/*
> -	 * Keycodes for the old Black Remote Controller
> -	 * This one also uses RC-5 protocol
> -	 * Keycodes start with address = 0x00
> -	 */
> -	{ 0x001f, KEY_TV },
> -	{ 0x0020, KEY_CHANNELUP },
> -	{ 0x000c, KEY_RADIO },
> -
> -	{ 0x0011, KEY_VOLUMEDOWN },
> -	{ 0x002e, KEY_ZOOM },		/* full screen */
> -	{ 0x0010, KEY_VOLUMEUP },
> -
> -	{ 0x000d, KEY_MUTE },
> -	{ 0x0021, KEY_CHANNELDOWN },
> -	{ 0x0022, KEY_VIDEO },		/* source */
> -
> -	{ 0x0001, KEY_1 },
> -	{ 0x0002, KEY_2 },
> -	{ 0x0003, KEY_3 },
> -
> -	{ 0x0004, KEY_4 },
> -	{ 0x0005, KEY_5 },
> -	{ 0x0006, KEY_6 },
> -
> -	{ 0x0007, KEY_7 },
> -	{ 0x0008, KEY_8 },
> -	{ 0x0009, KEY_9 },
> -
> -	{ 0x001e, KEY_RED },	/* Reserved */
> -	{ 0x0000, KEY_0 },
> -	{ 0x0026, KEY_SLEEP },	/* Minimize */
> -};
> -
> -static struct rc_map_list rc5_hauppauge_new_map = {
> -	.map = {
> -		.scan    = rc5_hauppauge_new,
> -		.size    = ARRAY_SIZE(rc5_hauppauge_new),
> -		.rc_type = RC_TYPE_RC5,
> -		.name    = RC_MAP_RC5_HAUPPAUGE_NEW,
> -	}
> -};
> -
> -static int __init init_rc_map_rc5_hauppauge_new(void)
> -{
> -	return rc_map_register(&rc5_hauppauge_new_map);
> -}
> -
> -static void __exit exit_rc_map_rc5_hauppauge_new(void)
> -{
> -	rc_map_unregister(&rc5_hauppauge_new_map);
> -}
> -
> -module_init(init_rc_map_rc5_hauppauge_new)
> -module_exit(exit_rc_map_rc5_hauppauge_new)
> -
> -MODULE_LICENSE("GPL");
> -MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
> diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
> index 079353e..55827b0 100644
> --- a/drivers/media/rc/mceusb.c
> +++ b/drivers/media/rc/mceusb.c
> @@ -185,7 +185,7 @@ static const struct mceusb_model mceusb_model[] = {
>  		 * remotes, but we should have something handy,
>  		 * to allow testing it
>  		 */
> -		.rc_map = RC_MAP_RC5_HAUPPAUGE_NEW,
> +		.rc_map = RC_MAP_HAUPPAUGE,
>  		.name = "Conexant Hybrid TV (cx231xx) MCE IR",
>  	},
>  	[CX_HYBRID_TV] = {
> diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c
> index 199b996..e97cafd 100644
> --- a/drivers/media/video/cx23885/cx23885-input.c
> +++ b/drivers/media/video/cx23885/cx23885-input.c
> @@ -264,7 +264,7 @@ int cx23885_input_init(struct cx23885_dev *dev)
>  		driver_type = RC_DRIVER_IR_RAW;
>  		allowed_protos = RC_TYPE_ALL;
>  		/* The grey Hauppauge RC-5 remote */
> -		rc_map = RC_MAP_RC5_HAUPPAUGE_NEW;
> +		rc_map = RC_MAP_HAUPPAUGE;
>  		break;
>  	case CX23885_BOARD_TEVII_S470:
>  		/* Integrated CX23885 IR controller */
> diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
> index 87f77a3..aa4f45e 100644
> --- a/drivers/media/video/em28xx/em28xx-cards.c
> +++ b/drivers/media/video/em28xx/em28xx-cards.c
> @@ -911,7 +911,7 @@ struct em28xx_board em28xx_boards[] = {
>  		.mts_firmware   = 1,
>  		.has_dvb        = 1,
>  		.dvb_gpio       = hauppauge_wintv_hvr_900_digital,
> -		.ir_codes       = RC_MAP_RC5_HAUPPAUGE_NEW,
> +		.ir_codes       = RC_MAP_HAUPPAUGE,
>  		.decoder        = EM28XX_TVP5150,
>  		.input          = { {
>  			.type     = EM28XX_VMUX_TELEVISION,
> @@ -2430,7 +2430,7 @@ void em28xx_register_i2c_ir(struct em28xx *dev)
>  		dev->init_data.name = "i2c IR (EM28XX Pinnacle PCTV)";
>  		break;
>  	case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
> -		dev->init_data.ir_codes = RC_MAP_RC5_HAUPPAUGE_NEW;
> +		dev->init_data.ir_codes = RC_MAP_HAUPPAUGE;
>  		dev->init_data.get_key = em28xx_get_key_em_haup;
>  		dev->init_data.name = "i2c IR (EM2840 Hauppauge)";
>  		break;
> diff --git a/include/media/rc-map.h b/include/media/rc-map.h
> index 4617117..9df0e90 100644
> --- a/include/media/rc-map.h
> +++ b/include/media/rc-map.h
> @@ -125,7 +125,7 @@ void rc_map_init(void);
>  #define RC_MAP_PROTEUS_2309              "rc-proteus-2309"
>  #define RC_MAP_PURPLETV                  "rc-purpletv"
>  #define RC_MAP_PV951                     "rc-pv951"
> -#define RC_MAP_RC5_HAUPPAUGE_NEW         "rc-rc5-hauppauge-new"
> +#define RC_MAP_HAUPPAUGE                 "rc-rc5-hauppauge"
>  #define RC_MAP_RC5_TV                    "rc-rc5-tv"
>  #define RC_MAP_RC6_MCE                   "rc-rc6-mce"
>  #define RC_MAP_REAL_AUDIO_220_32_KEYS    "rc-real-audio-220-32-keys"



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 13/13] [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
  2011-01-24 15:18 ` [PATCH 13/13] [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map Mauro Carvalho Chehab
@ 2011-01-25  0:32   ` Andy Walls
  2011-01-25  1:23     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 22+ messages in thread
From: Andy Walls @ 2011-01-25  0:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

On Mon, 2011-01-24 at 13:18 -0200, Mauro Carvalho Chehab wrote:
> The rc-hauppauge-new map is a messy thing, as it bundles 3
> different remote controllers as if they were just one,
> discarding the address byte. Also, some key maps are wrong.
> 
> With the conversion to the new rc-core, it is likely that
> most of the devices won't be working properly, as the i2c
> driver and the raw decoders are now providing 16 bits for
> the remote, instead of just 8.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

All the patch emails didn't/haven't come through to me.

Did you miss cx23885-input.c, or is that using a map that isn't affected
by these changes?

Also one comment below:

>  delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c
[...]
> diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
> index d2b20ad..b18373a 100644
> --- a/drivers/media/video/ir-kbd-i2c.c
> +++ b/drivers/media/video/ir-kbd-i2c.c
> @@ -300,7 +300,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
>  		ir->get_key = get_key_haup;
>  		rc_type     = RC_TYPE_RC5;
>  		if (hauppauge == 1) {
> -			ir_codes    = RC_MAP_HAUPPAUGE_NEW;
> +			ir_codes    = RC_MAP_HAUPPAUGE;
>  		} else {
>  			ir_codes    = RC_MAP_RC5_TV;
>  		}
> @@ -327,7 +327,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
>  		name        = "Hauppauge/Zilog Z8";
>  		ir->get_key = get_key_haup_xvr;
>  		rc_type     = RC_TYPE_RC5;
> -		ir_codes    = hauppauge ? RC_MAP_HAUPPAUGE_NEW : RC_MAP_RC5_TV;
> +		ir_codes    = hauppauge ? RC_MAP_HAUPPAUGE : RC_MAP_RC5_TV;
>  		break;
>  	}

The "hauppauge" module parameter was to make ir-kbd-i2c to default to a
keymap for the old black remote.

If you have combined the black remote's keymap with the grey remote's
keymap, why keep the "hauppauge" module parameter?

Regards,
Andy




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 12/13] [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
  2011-01-25  0:22   ` Andy Walls
@ 2011-01-25  1:14     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-25  1:14 UTC (permalink / raw)
  To: Andy Walls; +Cc: Linux Media Mailing List

Em 24-01-2011 22:22, Andy Walls escreveu:
> On Mon, 2011-01-24 at 13:18 -0200, Mauro Carvalho Chehab wrote:
>> There are two "hauppauge-new" keymaps, one with protocol
>> unknown, and the other with the protocol marked accordingly.
>> However, both tables are miss-named.
>>
>> Also, the old rc-hauppauge-new is broken, as it mixes
>> three different controllers as if they were just one.
>>
>> This patch solves half of the problem by renaming the
>> correct keycode table as just rc-hauppauge. This table
>> contains the codes for the four different types of
>> remote controllers found on Hauppauge cards, properly
>> mapped with their different addresses.
> 
> Are you sure about doing this?
> 
> The problem is that the old black Hauppauge remote is using the same
> RC-5 address as a common RC-5 TV remote: address 0x00.
> 
> See the table at the bottom of:
> 	http://www.sbprojects.com/knowledge/ir/rc5.htm
> 
> IMO, RC-5 address 0x00 is not an address that every Hauppauge card
> should be responding to by default.
> 
> I'm not too concerned with addresses 0x1d, 0x1e, and 0x1f colliding with
> other consumer electronics remotes.

I understand your points. This is part of a major plan of cleaning
up the keyboard tables.

With respect to this change, there are some points to consider:

1) Both of the current Hauppauge-new tables are already "polluted"
   with the 4 remote controllers (see the comments about the
   Hauppauge black inside them);

2) Currently, for all drivers that use the old RC_HAUPPAUGE_NEW 
   (most drivers), will only only with the Hauppauge Black, as
   the get_key functions for Hauppauge will return the full scancode.
   As the table as just the command part, that means that remote
   controls with address <> 0 won't work anymore (ok, this is a
   regression);

3) The RC_RC5_HAUPPAUGE_NEW table is also broken, as it has the
   "Hauppauge Black" keycodes there, but all prefixed by 0x1e.

4) There are several hacks to enable/disable the Hauppauge black,
   on several drivers. I doubt that those modprobe parameters 
   are properly documented at the Kernel docs, so users will
   likely have some bad time to discover the issues and find some
   useful information for their device to work.

5) Not all TV sets will accept address=0. I did a quick test here with
   5 different TV sets. None accepted it. Ok, this is not a good statistics,
   but, any Universal keyboard has hundreds of different keycodes for
   different TV sets, so, the changes to actually having a TV that
   accepts RC5 is not that high;

6) Not all TV boards/sticks are used on places with a TV set;

7) From my POV, it is more important to make the devices hot-pluggable
   than to be concerned about any possible interferences with other
   devices;

8) Since the old "RC_HAUPPAUGE_NEW" supports the Hauppauge black,
   that means that old boards were shipped with that IR and that people
   didn't bother on that time to split because the same board type were 
   sold with different remote types. So, there's probably no safe
   way to uniquely associate the Old Black with the cards.

9) The people that needs to take care about interference between
   Remotes can/should customise their RC keycode tables. It is simple
   to remove the conflict keycodes from the /etc/rc_maps/rc-hauppauge
   and let udev load a table that won't cause any conflict. On VDR
   environments, this will likely be done anyway, as the users won't
   use the shipped remote but, instead, an universal one.

10) The idea is to remove the in-kernel maps from the kernel, in favor
    of just using the userspace tool. On this scenario, all those in-kernel
    hacks interfere at the keycode loads should disappear, otherwise,
    they'll cause problems. We'll likely remove it for .39 or .40,
    after having some feedback from users. My plan is to have v4l-utils
    0.8.2 with the udev-load mechanism (is is already there at git), and
    ship it on Fedora 15, to get such feedback. Other distros are welcome
    to do the same.

11) After having all keycodes shipped via userspace, I think we should
    break those keytables that support more than one different type into
    per-remote keytables, and having "grouped" keycodes for those that
    just want their device to support and don't want to spend some time
    to discover what's his specific remote type.

So, I think that, while it might cause some confusion at the beginning
for a few, this change is the right way for doing it in the long term.

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 13/13] [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
  2011-01-25  0:32   ` Andy Walls
@ 2011-01-25  1:23     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 22+ messages in thread
From: Mauro Carvalho Chehab @ 2011-01-25  1:23 UTC (permalink / raw)
  To: Andy Walls; +Cc: Linux Media Mailing List

Em 24-01-2011 22:32, Andy Walls escreveu:
> On Mon, 2011-01-24 at 13:18 -0200, Mauro Carvalho Chehab wrote:
>> The rc-hauppauge-new map is a messy thing, as it bundles 3
>> different remote controllers as if they were just one,
>> discarding the address byte. Also, some key maps are wrong.
>>
>> With the conversion to the new rc-core, it is likely that
>> most of the devices won't be working properly, as the i2c
>> driver and the raw decoders are now providing 16 bits for
>> the remote, instead of just 8.
>>
>> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> 
> All the patch emails didn't/haven't come through to me.
> 
> Did you miss cx23885-input.c, or is that using a map that isn't affected
> by these changes?
> 
> Also one comment below:
> 
>>  delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c
> [...]
>> diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
>> index d2b20ad..b18373a 100644
>> --- a/drivers/media/video/ir-kbd-i2c.c
>> +++ b/drivers/media/video/ir-kbd-i2c.c
>> @@ -300,7 +300,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
>>  		ir->get_key = get_key_haup;
>>  		rc_type     = RC_TYPE_RC5;
>>  		if (hauppauge == 1) {
>> -			ir_codes    = RC_MAP_HAUPPAUGE_NEW;
>> +			ir_codes    = RC_MAP_HAUPPAUGE;
>>  		} else {
>>  			ir_codes    = RC_MAP_RC5_TV;
>>  		}
>> @@ -327,7 +327,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
>>  		name        = "Hauppauge/Zilog Z8";
>>  		ir->get_key = get_key_haup_xvr;
>>  		rc_type     = RC_TYPE_RC5;
>> -		ir_codes    = hauppauge ? RC_MAP_HAUPPAUGE_NEW : RC_MAP_RC5_TV;
>> +		ir_codes    = hauppauge ? RC_MAP_HAUPPAUGE : RC_MAP_RC5_TV;
>>  		break;
>>  	}
> 
> The "hauppauge" module parameter was to make ir-kbd-i2c to default to a
> keymap for the old black remote.
> 
> If you have combined the black remote's keymap with the grey remote's
> keymap, why keep the "hauppauge" module parameter?

This is the next step. I wrote another patch cleaning it. I just didn't send to the ML yet.
See enclosed.

commit 2442b2539971c43aa51503b960735c4eb85b10ed
Author: Mauro Carvalho Chehab <mchehab@redhat.com>
Date:   Mon Jan 24 13:38:32 2011 -0200

    [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
    
    This keymap were used for the Hauppauge Black remote controller
    only. It also contains some keycodes not found there. As the
    Hauppauge Black is now part of the hauppauge keymap, just remove
    it.
    
    Also, remove the modprobe hacks to select between the Gray
    and the Black versions of the remote controller as:
    	- Both are supported by default by the keymap;
    	- If the user just wants one keyboard supported,
    	  it is just a matter of changing the keymap via
    	  the userspace tool (ir-keytable), removing
    	  the keys that he doesn't desire. As ir-keytable
    	  auto-loads the keys via udev, this is better than
    	  obscure modprobe parameters.
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index e6bd958..c5b3a23 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -68,7 +68,6 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
 			rc-purpletv.o \
 			rc-pv951.o \
 			rc-hauppauge.o \
-			rc-rc5-tv.o \
 			rc-rc6-mce.o \
 			rc-real-audio-220-32-keys.o \
 			rc-streamzap.o \
diff --git a/drivers/media/rc/keymaps/rc-rc5-tv.c b/drivers/media/rc/keymaps/rc-rc5-tv.c
deleted file mode 100644
index 4fcef9f..0000000
--- a/drivers/media/rc/keymaps/rc-rc5-tv.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* rc5-tv.h - Keytable for rc5_tv Remote Controller
- *
- * keymap imported from ir-keymaps.c
- *
- * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#include <media/rc-map.h>
-
-/* generic RC5 keytable                                          */
-/* see http://users.pandora.be/nenya/electronics/rc5/codes00.htm */
-/* used by old (black) Hauppauge remotes                         */
-
-static struct rc_map_table rc5_tv[] = {
-	/* Keys 0 to 9 */
-	{ 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 },
-
-	{ 0x0b, KEY_CHANNEL },		/* channel / program (japan: 11) */
-	{ 0x0c, KEY_POWER },		/* standby */
-	{ 0x0d, KEY_MUTE },		/* mute / demute */
-	{ 0x0f, KEY_TV },		/* display */
-	{ 0x10, KEY_VOLUMEUP },
-	{ 0x11, KEY_VOLUMEDOWN },
-	{ 0x12, KEY_BRIGHTNESSUP },
-	{ 0x13, KEY_BRIGHTNESSDOWN },
-	{ 0x1e, KEY_SEARCH },		/* search + */
-	{ 0x20, KEY_CHANNELUP },	/* channel / program + */
-	{ 0x21, KEY_CHANNELDOWN },	/* channel / program - */
-	{ 0x22, KEY_CHANNEL },		/* alt / channel */
-	{ 0x23, KEY_LANGUAGE },		/* 1st / 2nd language */
-	{ 0x26, KEY_SLEEP },		/* sleeptimer */
-	{ 0x2e, KEY_MENU },		/* 2nd controls (USA: menu) */
-	{ 0x30, KEY_PAUSE },
-	{ 0x32, KEY_REWIND },
-	{ 0x33, KEY_GOTO },
-	{ 0x35, KEY_PLAY },
-	{ 0x36, KEY_STOP },
-	{ 0x37, KEY_RECORD },		/* recording */
-	{ 0x3c, KEY_TEXT },		/* teletext submode (Japan: 12) */
-	{ 0x3d, KEY_SUSPEND },		/* system standby */
-
-};
-
-static struct rc_map_list rc5_tv_map = {
-	.map = {
-		.scan    = rc5_tv,
-		.size    = ARRAY_SIZE(rc5_tv),
-		.rc_type = RC_TYPE_UNKNOWN,	/* Legacy IR type */
-		.name    = RC_MAP_RC5_TV,
-	}
-};
-
-static int __init init_rc_map_rc5_tv(void)
-{
-	return rc_map_register(&rc5_tv_map);
-}
-
-static void __exit exit_rc_map_rc5_tv(void)
-{
-	rc_map_unregister(&rc5_tv_map);
-}
-
-module_init(init_rc_map_rc5_tv)
-module_exit(exit_rc_map_rc5_tv)
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index b18373a..baa3e47 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -55,10 +55,6 @@
 static int debug;
 module_param(debug, int, 0644);    /* debug level (0,1,2) */
 
-static int hauppauge;
-module_param(hauppauge, int, 0644);    /* Choose Hauppauge remote */
-MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults to 0)");
-
 
 #define MODULE_NAME "ir-kbd-i2c"
 #define dprintk(level, fmt, arg...)	if (debug >= level) \
@@ -105,10 +101,6 @@ static int get_key_haup_common(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw,
 		/* invalid key press */
 		return 0;
 
-	if (dev!=0x1e && dev!=0x1f)
-		/* not a hauppauge remote */
-		return 0;
-
 	if (!range)
 		code += 64;
 
@@ -299,11 +291,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		name        = "Hauppauge";
 		ir->get_key = get_key_haup;
 		rc_type     = RC_TYPE_RC5;
-		if (hauppauge == 1) {
-			ir_codes    = RC_MAP_HAUPPAUGE;
-		} else {
-			ir_codes    = RC_MAP_RC5_TV;
-		}
+		ir_codes    = RC_MAP_HAUPPAUGE;
 		break;
 	case 0x30:
 		name        = "KNC One";
@@ -327,7 +315,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		name        = "Hauppauge/Zilog Z8";
 		ir->get_key = get_key_haup_xvr;
 		rc_type     = RC_TYPE_RC5;
-		ir_codes    = hauppauge ? RC_MAP_HAUPPAUGE : RC_MAP_RC5_TV;
+		ir_codes    = RC_MAP_HAUPPAUGE;
 		break;
 	}
 
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c
index 3c89d6f..d47f41a 100644
--- a/drivers/media/video/ivtv/ivtv-i2c.c
+++ b/drivers/media/video/ivtv/ivtv-i2c.c
@@ -205,8 +205,7 @@ static int ivtv_i2c_new_ir(struct ivtv *itv, u32 hw, const char *type, u8 addr)
 		break;
 	case IVTV_HW_I2C_IR_RX_HAUP_EXT:
 	case IVTV_HW_I2C_IR_RX_HAUP_INT:
-		/* Default to old black remote */
-		init_data->ir_codes = RC_MAP_RC5_TV;
+		init_data->ir_codes = RC_MAP_HAUPPAUGE;
 		init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP;
 		init_data->type = RC_TYPE_RC5;
 		init_data->name = itv->card_name;

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/13] [media] rc-winfast: Fix the keycode tables
  2011-01-24 15:18 ` [PATCH 08/13] [media] rc-winfast: Fix the keycode tables Mauro Carvalho Chehab
@ 2011-05-22  0:19   ` Balint Marton
  2011-05-22  0:24     ` Balint Marton
  0 siblings, 1 reply; 22+ messages in thread
From: Balint Marton @ 2011-05-22  0:19 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

Hi,

> One of the remotes has a picture available at:
> 	http://lirc.sourceforge.net/remotes/leadtek/Y04G0004.jpg
>
> As there's one variant with a set direction keys plus vol/chann
> keys, and the same table is used for both models, change it to
> represent all keys, avoiding the usage of weird function keys.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> diff --git a/drivers/media/rc/keymaps/rc-winfast.c b/drivers/media/rc/keymaps/rc-winfast.c
> index 2747db4..0062ca2 100644
> --- a/drivers/media/rc/keymaps/rc-winfast.c
> +++ b/drivers/media/rc/keymaps/rc-winfast.c
> @@ -27,15 +27,15 @@ static struct rc_map_table winfast[] = {
> 	{ 0x0e, KEY_8 },
> 	{ 0x0f, KEY_9 },
>
> -	{ 0x00, KEY_POWER },
> +	{ 0x00, KEY_POWER2 },
> 	{ 0x1b, KEY_AUDIO },		/* Audio Source */
> 	{ 0x02, KEY_TUNER },		/* TV/FM, not on Y0400052 */
> 	{ 0x1e, KEY_VIDEO },		/* Video Source */
> 	{ 0x16, KEY_INFO },		/* Display information */
> -	{ 0x04, KEY_VOLUMEUP },
> -	{ 0x08, KEY_VOLUMEDOWN },
> -	{ 0x0c, KEY_CHANNELUP },
> -	{ 0x10, KEY_CHANNELDOWN },
> +	{ 0x04, KEY_LEFT },
> +	{ 0x08, KEY_RIGHT },
> +	{ 0x0c, KEY_UP },
> +	{ 0x10, KEY_DOWN },

Left and right key is now swapped on my remote. (Which is exactly the same 
model by the way that was shown in Y04G0004.jpg.) Could you please swap 
the two keys?

Regards,
   Marton

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 08/13] [media] rc-winfast: Fix the keycode tables
  2011-05-22  0:19   ` Balint Marton
@ 2011-05-22  0:24     ` Balint Marton
  0 siblings, 0 replies; 22+ messages in thread
From: Balint Marton @ 2011-05-22  0:24 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

> Hi,
>
>> One of the remotes has a picture available at:
>> 	http://lirc.sourceforge.net/remotes/leadtek/Y04G0004.jpg
>> 
>> As there's one variant with a set direction keys plus vol/chann
>> keys, and the same table is used for both models, change it to
>> represent all keys, avoiding the usage of weird function keys.
>> 
>> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>> 
>> diff --git a/drivers/media/rc/keymaps/rc-winfast.c 
>> b/drivers/media/rc/keymaps/rc-winfast.c
>> index 2747db4..0062ca2 100644
>> --- a/drivers/media/rc/keymaps/rc-winfast.c
>> +++ b/drivers/media/rc/keymaps/rc-winfast.c
>> @@ -27,15 +27,15 @@ static struct rc_map_table winfast[] = {
>> 	{ 0x0e, KEY_8 },
>> 	{ 0x0f, KEY_9 },
>> 
>> -	{ 0x00, KEY_POWER },
>> +	{ 0x00, KEY_POWER2 },
>> 	{ 0x1b, KEY_AUDIO },		/* Audio Source */
>> 	{ 0x02, KEY_TUNER },		/* TV/FM, not on Y0400052 */
>> 	{ 0x1e, KEY_VIDEO },		/* Video Source */
>> 	{ 0x16, KEY_INFO },		/* Display information */
>> -	{ 0x04, KEY_VOLUMEUP },
>> -	{ 0x08, KEY_VOLUMEDOWN },
>> -	{ 0x0c, KEY_CHANNELUP },
>> -	{ 0x10, KEY_CHANNELDOWN },
>> +	{ 0x04, KEY_LEFT },
>> +	{ 0x08, KEY_RIGHT },
>> +	{ 0x0c, KEY_UP },
>> +	{ 0x10, KEY_DOWN },
>
> Left and right key is now swapped on my remote. (Which is exactly the same 
> model by the way that was shown in Y04G0004.jpg.) Could you please swap the 
> two keys?
>
> Regards,
>  Marton
>

Sorry, just saw the fix commited to linux-next :)

Regards,
   Marton

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-05-22  0:35 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1295882104.git.mchehab@redhat.com>
2011-01-24 15:18 ` [PATCH 01/13] [media] rc/keymaps: use KEY_CAMERA for snapshots Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 02/13] [media] rc/keymaps: Use KEY_VIDEO for Video Source Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 03/13] [media] rc/keymaps: Fix most KEY_PROG[n] keycodes Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 04/13] [media] rc/keymaps: Use KEY_LEFTMETA were pertinent Mauro Carvalho Chehab
2011-01-24 15:45   ` Jarod Wilson
2011-01-24 16:08     ` Mauro Carvalho Chehab
2011-01-24 19:11       ` Jarod Wilson
2011-01-24 15:18 ` [PATCH 05/13] [media] dw2102: Use multimedia keys instead of an app-specific mapping Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 06/13] [media] opera1: " Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 07/13] [media] a800: Fix a few wrong IR key assignments Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 09/13] [media] rc-rc5-hauppauge-new: Add the old control to the table Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 08/13] [media] rc-winfast: Fix the keycode tables Mauro Carvalho Chehab
2011-05-22  0:19   ` Balint Marton
2011-05-22  0:24     ` Balint Marton
2011-01-24 15:18 ` [PATCH 10/13] [media] rc-rc5-hauppauge-new: Add support for the old Black RC Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 11/13] [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 12/13] [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge Mauro Carvalho Chehab
2011-01-25  0:22   ` Andy Walls
2011-01-25  1:14     ` Mauro Carvalho Chehab
2011-01-24 15:18 ` [PATCH 13/13] [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map Mauro Carvalho Chehab
2011-01-25  0:32   ` Andy Walls
2011-01-25  1:23     ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.