diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-08-24 00:07:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:08:27 -0400 |
commit | 3c44358c49ee4142d0f868509b5b3b02759fa16a (patch) | |
tree | a08d654b2069e39d44784f17466e960636397d8f | |
parent | d54d6980916d5521ad47fa61e5b6ff8733221714 (diff) |
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: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/common/ir-keymaps.c | 32 | ||||
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 12 | ||||
-rw-r--r-- | include/media/ir-common.h | 2 |
3 files changed, 18 insertions, 28 deletions
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c index 1879c304ae6d..aefcf28da1ca 100644 --- a/drivers/media/common/ir-keymaps.c +++ b/drivers/media/common/ir-keymaps.c | |||
@@ -1783,8 +1783,8 @@ IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE] = { | |||
1783 | 1783 | ||
1784 | EXPORT_SYMBOL_GPL(ir_codes_tt_1500); | 1784 | EXPORT_SYMBOL_GPL(ir_codes_tt_1500); |
1785 | 1785 | ||
1786 | /* DViCO FUSION HDTV 5 RT GOLD remote */ | 1786 | /* DViCO FUSION HDTV MCE remote */ |
1787 | IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { | 1787 | IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE] = { |
1788 | 1788 | ||
1789 | [ 0x0b ] = KEY_1, | 1789 | [ 0x0b ] = KEY_1, |
1790 | [ 0x17 ] = KEY_2, | 1790 | [ 0x17 ] = KEY_2, |
@@ -1806,7 +1806,7 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { | |||
1806 | [ 0x02 ] = KEY_TV, /* Labeled DTV on remote */ | 1806 | [ 0x02 ] = KEY_TV, /* Labeled DTV on remote */ |
1807 | [ 0x0e ] = KEY_MP3, | 1807 | [ 0x0e ] = KEY_MP3, |
1808 | [ 0x1a ] = KEY_DVD, | 1808 | [ 0x1a ] = KEY_DVD, |
1809 | [ 0x1e ] = KEY_RESERVED, /* Labeled CPF on remote */ | 1809 | [ 0x1e ] = KEY_FAVORITES, /* Labeled CPF on remote */ |
1810 | [ 0x16 ] = KEY_SETUP, | 1810 | [ 0x16 ] = KEY_SETUP, |
1811 | [ 0x46 ] = KEY_POWER2, /* TV On/Off button on remote */ | 1811 | [ 0x46 ] = KEY_POWER2, /* TV On/Off button on remote */ |
1812 | [ 0x0a ] = KEY_EPG, /* Labeled Guide on remote */ | 1812 | [ 0x0a ] = KEY_EPG, /* Labeled Guide on remote */ |
@@ -1815,9 +1815,10 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { | |||
1815 | [ 0x59 ] = KEY_INFO, /* Labeled MORE on remote */ | 1815 | [ 0x59 ] = KEY_INFO, /* Labeled MORE on remote */ |
1816 | [ 0x4d ] = KEY_MENU, /* Labeled DVDMENU on remote */ | 1816 | [ 0x4d ] = KEY_MENU, /* Labeled DVDMENU on remote */ |
1817 | [ 0x55 ] = KEY_CYCLEWINDOWS, /* Labeled ALT-TAB on remote */ | 1817 | [ 0x55 ] = KEY_CYCLEWINDOWS, /* Labeled ALT-TAB on remote */ |
1818 | [ 0x0f ] = KEY_REDO, /* Labeled |<< REPLAY on remote */ | 1818 | |
1819 | [ 0x12 ] = KEY_END, /* Labeled >>| SKIP on remote */ | 1819 | [ 0x0f ] = KEY_PREVIOUSSONG, /* Labeled |<< REPLAY on remote */ |
1820 | [ 0x42 ] = KEY_GREEN, /* Labeled START with a green | 1820 | [ 0x12 ] = KEY_NEXTSONG, /* Labeled >>| SKIP on remote */ |
1821 | [ 0x42 ] = KEY_ENTER, /* Labeled START with a green | ||
1821 | * MS windows logo on remote */ | 1822 | * MS windows logo on remote */ |
1822 | 1823 | ||
1823 | [ 0x15 ] = KEY_VOLUMEUP, | 1824 | [ 0x15 ] = KEY_VOLUMEUP, |
@@ -1825,29 +1826,20 @@ IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { | |||
1825 | [ 0x11 ] = KEY_CHANNELUP, | 1826 | [ 0x11 ] = KEY_CHANNELUP, |
1826 | [ 0x09 ] = KEY_CHANNELDOWN, | 1827 | [ 0x09 ] = KEY_CHANNELDOWN, |
1827 | 1828 | ||
1828 | /* The following are not defined in kernel 2.6 and | 1829 | [ 0x52 ] = KEY_CAMERA, |
1829 | * I cannot find suitable substitute key definitions. | 1830 | [ 0x5a ] = KEY_TUNER, |
1830 | 1831 | [ 0x19 ] = KEY_OPEN, | |
1831 | [ 0x52 ] = KEY_PHOTO, | ||
1832 | [ 0x5a ] = KEY_LIVE, | ||
1833 | [ 0x19 ] = KEY_FOLDER, | ||
1834 | |||
1835 | */ | ||
1836 | |||
1837 | [ 0x52 ] = KEY_RESERVED, | ||
1838 | [ 0x5a ] = KEY_RESERVED, | ||
1839 | [ 0x19 ] = KEY_RESERVED, | ||
1840 | 1832 | ||
1841 | [ 0x13 ] = KEY_MODE, /* 4:3 16:9 select */ | 1833 | [ 0x13 ] = KEY_MODE, /* 4:3 16:9 select */ |
1842 | [ 0x1f ] = KEY_ZOOM, | 1834 | [ 0x1f ] = KEY_ZOOM, |
1843 | 1835 | ||
1844 | [ 0x43 ] = KEY_REWIND, | 1836 | [ 0x43 ] = KEY_REWIND, |
1845 | [ 0x47 ] = KEY_PLAYPAUSE, | 1837 | [ 0x47 ] = KEY_PLAYPAUSE, |
1846 | [ 0x4f ] = KEY_FORWARD, | 1838 | [ 0x4f ] = KEY_FASTFORWARD, |
1847 | [ 0x57 ] = KEY_MUTE, | 1839 | [ 0x57 ] = KEY_MUTE, |
1848 | [ 0x0d ] = KEY_STOP, | 1840 | [ 0x0d ] = KEY_STOP, |
1849 | [ 0x01 ] = KEY_RECORD, | 1841 | [ 0x01 ] = KEY_RECORD, |
1850 | [ 0x4e ] = KEY_POWER, | 1842 | [ 0x4e ] = KEY_POWER, |
1851 | }; | 1843 | }; |
1852 | 1844 | ||
1853 | EXPORT_SYMBOL_GPL(ir_codes_fusion_gold); | 1845 | EXPORT_SYMBOL_GPL(ir_codes_fusionhdtv_mce); |
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 3d5a28c2c929..04f6eb5ea292 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -143,7 +143,7 @@ static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
143 | return 1; | 143 | return 1; |
144 | } | 144 | } |
145 | 145 | ||
146 | static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 146 | static int get_key_fusionhdtv(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) |
147 | { | 147 | { |
148 | unsigned char buf[4]; | 148 | unsigned char buf[4]; |
149 | 149 | ||
@@ -154,7 +154,7 @@ static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
154 | } | 154 | } |
155 | 155 | ||
156 | if(buf[0] !=0 || buf[1] !=0 || buf[2] !=0 || buf[3] != 0) | 156 | if(buf[0] !=0 || buf[1] !=0 || buf[2] !=0 || buf[3] != 0) |
157 | dprintk(2, "ir fusion gold: 0x%2x 0x%2x 0x%2x 0x%2x\n", | 157 | dprintk(2, "%s: 0x%2x 0x%2x 0x%2x 0x%2x\n", __FUNCTION__, |
158 | buf[0], buf[1], buf[2], buf[3]); | 158 | buf[0], buf[1], buf[2], buf[3]); |
159 | 159 | ||
160 | /* no key pressed or signal from other ir remote */ | 160 | /* 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 | *ir_raw = (buf[2] << 8) | buf[3]; | 165 | *ir_raw = (buf[2] << 8) | buf[3]; |
166 | 166 | ||
167 | return 1; | 167 | return 1; |
168 | |||
169 | } | 168 | } |
170 | 169 | ||
171 | |||
172 | static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 170 | static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) |
173 | { | 171 | { |
174 | unsigned char b; | 172 | unsigned char b; |
@@ -392,10 +390,10 @@ static int ir_attach(struct i2c_adapter *adap, int addr, | |||
392 | ir_codes = ir_codes_empty; | 390 | ir_codes = ir_codes_empty; |
393 | break; | 391 | break; |
394 | case 0x6b: | 392 | case 0x6b: |
395 | name = "FusionGold"; | 393 | name = "FusionHDTV"; |
396 | ir->get_key = get_key_fusion_gold; | 394 | ir->get_key = get_key_fusionhdtv; |
397 | ir_type = IR_TYPE_RC5; | 395 | ir_type = IR_TYPE_RC5; |
398 | ir_codes = ir_codes_fusion_gold; | 396 | ir_codes = ir_codes_fusionhdtv_mce; |
399 | break; | 397 | break; |
400 | case 0x7a: | 398 | case 0x7a: |
401 | case 0x47: | 399 | case 0x47: |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index dfae84038e2d..7a785fa77212 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -140,7 +140,7 @@ extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; | |||
140 | extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE]; | 140 | extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE]; |
141 | extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; | 141 | extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; |
142 | extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; | 142 | extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; |
143 | extern IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE]; | 143 | extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; |
144 | 144 | ||
145 | #endif | 145 | #endif |
146 | 146 | ||