提交 3c44358c 编写于 作者: M Michael Krufky 提交者: Mauro Carvalho Chehab

V4L/DVB (6179): Clean up FusionHDTV ir code

- fixed missing buttons in keymap.

- make function names & descriptions more generic,
  since this same ir receiver and remote is used in
  many FusionHDTV products.

- miscellaneous cleanups.
Signed-off-by: NMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 d54d6980
...@@ -1783,8 +1783,8 @@ IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE] = { ...@@ -1783,8 +1783,8 @@ IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE] = {
EXPORT_SYMBOL_GPL(ir_codes_tt_1500); EXPORT_SYMBOL_GPL(ir_codes_tt_1500);
/* DViCO FUSION HDTV 5 RT GOLD remote */ /* DViCO FUSION HDTV MCE remote */
IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE] = {
[ 0x0b ] = KEY_1, [ 0x0b ] = KEY_1,
[ 0x17 ] = KEY_2, [ 0x17 ] = KEY_2,
...@@ -1806,7 +1806,7 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { ...@@ -1806,7 +1806,7 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = {
[ 0x02 ] = KEY_TV, /* Labeled DTV on remote */ [ 0x02 ] = KEY_TV, /* Labeled DTV on remote */
[ 0x0e ] = KEY_MP3, [ 0x0e ] = KEY_MP3,
[ 0x1a ] = KEY_DVD, [ 0x1a ] = KEY_DVD,
[ 0x1e ] = KEY_RESERVED, /* Labeled CPF on remote */ [ 0x1e ] = KEY_FAVORITES, /* Labeled CPF on remote */
[ 0x16 ] = KEY_SETUP, [ 0x16 ] = KEY_SETUP,
[ 0x46 ] = KEY_POWER2, /* TV On/Off button on remote */ [ 0x46 ] = KEY_POWER2, /* TV On/Off button on remote */
[ 0x0a ] = KEY_EPG, /* Labeled Guide on remote */ [ 0x0a ] = KEY_EPG, /* Labeled Guide on remote */
...@@ -1815,9 +1815,10 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { ...@@ -1815,9 +1815,10 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = {
[ 0x59 ] = KEY_INFO, /* Labeled MORE on remote */ [ 0x59 ] = KEY_INFO, /* Labeled MORE on remote */
[ 0x4d ] = KEY_MENU, /* Labeled DVDMENU on remote */ [ 0x4d ] = KEY_MENU, /* Labeled DVDMENU on remote */
[ 0x55 ] = KEY_CYCLEWINDOWS, /* Labeled ALT-TAB on remote */ [ 0x55 ] = KEY_CYCLEWINDOWS, /* Labeled ALT-TAB on remote */
[ 0x0f ] = KEY_REDO, /* Labeled |<< REPLAY on remote */
[ 0x12 ] = KEY_END, /* Labeled >>| SKIP on remote */ [ 0x0f ] = KEY_PREVIOUSSONG, /* Labeled |<< REPLAY on remote */
[ 0x42 ] = KEY_GREEN, /* Labeled START with a green [ 0x12 ] = KEY_NEXTSONG, /* Labeled >>| SKIP on remote */
[ 0x42 ] = KEY_ENTER, /* Labeled START with a green
* MS windows logo on remote */ * MS windows logo on remote */
[ 0x15 ] = KEY_VOLUMEUP, [ 0x15 ] = KEY_VOLUMEUP,
...@@ -1825,29 +1826,20 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { ...@@ -1825,29 +1826,20 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = {
[ 0x11 ] = KEY_CHANNELUP, [ 0x11 ] = KEY_CHANNELUP,
[ 0x09 ] = KEY_CHANNELDOWN, [ 0x09 ] = KEY_CHANNELDOWN,
/* The following are not defined in kernel 2.6 and [ 0x52 ] = KEY_CAMERA,
* I cannot find suitable substitute key definitions. [ 0x5a ] = KEY_TUNER,
[ 0x19 ] = KEY_OPEN,
[ 0x52 ] = KEY_PHOTO,
[ 0x5a ] = KEY_LIVE,
[ 0x19 ] = KEY_FOLDER,
*/
[ 0x52 ] = KEY_RESERVED,
[ 0x5a ] = KEY_RESERVED,
[ 0x19 ] = KEY_RESERVED,
[ 0x13 ] = KEY_MODE, /* 4:3 16:9 select */ [ 0x13 ] = KEY_MODE, /* 4:3 16:9 select */
[ 0x1f ] = KEY_ZOOM, [ 0x1f ] = KEY_ZOOM,
[ 0x43 ] = KEY_REWIND, [ 0x43 ] = KEY_REWIND,
[ 0x47 ] = KEY_PLAYPAUSE, [ 0x47 ] = KEY_PLAYPAUSE,
[ 0x4f ] = KEY_FORWARD, [ 0x4f ] = KEY_FASTFORWARD,
[ 0x57 ] = KEY_MUTE, [ 0x57 ] = KEY_MUTE,
[ 0x0d ] = KEY_STOP, [ 0x0d ] = KEY_STOP,
[ 0x01 ] = KEY_RECORD, [ 0x01 ] = KEY_RECORD,
[ 0x4e ] = KEY_POWER, [ 0x4e ] = KEY_POWER,
}; };
EXPORT_SYMBOL_GPL(ir_codes_fusion_gold); EXPORT_SYMBOL_GPL(ir_codes_fusionhdtv_mce);
...@@ -143,7 +143,7 @@ static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) ...@@ -143,7 +143,7 @@ static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
return 1; return 1;
} }
static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) static int get_key_fusionhdtv(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
{ {
unsigned char buf[4]; unsigned char buf[4];
...@@ -154,7 +154,7 @@ static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) ...@@ -154,7 +154,7 @@ static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
} }
if(buf[0] !=0 || buf[1] !=0 || buf[2] !=0 || buf[3] != 0) if(buf[0] !=0 || buf[1] !=0 || buf[2] !=0 || buf[3] != 0)
dprintk(2, "ir fusion gold: 0x%2x 0x%2x 0x%2x 0x%2x\n", dprintk(2, "%s: 0x%2x 0x%2x 0x%2x 0x%2x\n", __FUNCTION__,
buf[0], buf[1], buf[2], buf[3]); buf[0], buf[1], buf[2], buf[3]);
/* no key pressed or signal from other ir remote */ /* no key pressed or signal from other ir remote */
...@@ -165,10 +165,8 @@ static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) ...@@ -165,10 +165,8 @@ static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
*ir_raw = (buf[2] << 8) | buf[3]; *ir_raw = (buf[2] << 8) | buf[3];
return 1; return 1;
} }
static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
{ {
unsigned char b; unsigned char b;
...@@ -392,10 +390,10 @@ static int ir_attach(struct i2c_adapter *adap, int addr, ...@@ -392,10 +390,10 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
ir_codes = ir_codes_empty; ir_codes = ir_codes_empty;
break; break;
case 0x6b: case 0x6b:
name = "FusionGold"; name = "FusionHDTV";
ir->get_key = get_key_fusion_gold; ir->get_key = get_key_fusionhdtv;
ir_type = IR_TYPE_RC5; ir_type = IR_TYPE_RC5;
ir_codes = ir_codes_fusion_gold; ir_codes = ir_codes_fusionhdtv_mce;
break; break;
case 0x7a: case 0x7a:
case 0x47: case 0x47:
......
...@@ -140,7 +140,7 @@ extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; ...@@ -140,7 +140,7 @@ extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE];
extern IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE];
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册