diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/common/ir-keymaps.c | 69 | ||||
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 36 |
2 files changed, 104 insertions, 1 deletions
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c index 137f68bee39f..1879c304ae6d 100644 --- a/drivers/media/common/ir-keymaps.c +++ b/drivers/media/common/ir-keymaps.c | |||
@@ -1782,3 +1782,72 @@ IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE] = { | |||
1782 | }; | 1782 | }; |
1783 | 1783 | ||
1784 | EXPORT_SYMBOL_GPL(ir_codes_tt_1500); | 1784 | EXPORT_SYMBOL_GPL(ir_codes_tt_1500); |
1785 | |||
1786 | /* DViCO FUSION HDTV 5 RT GOLD remote */ | ||
1787 | IR_KEYTAB_TYPE ir_codes_fusion_gold[IR_KEYTAB_SIZE] = { | ||
1788 | |||
1789 | [ 0x0b ] = KEY_1, | ||
1790 | [ 0x17 ] = KEY_2, | ||
1791 | [ 0x1b ] = KEY_3, | ||
1792 | [ 0x07 ] = KEY_4, | ||
1793 | [ 0x50 ] = KEY_5, | ||
1794 | [ 0x54 ] = KEY_6, | ||
1795 | [ 0x48 ] = KEY_7, | ||
1796 | [ 0x4c ] = KEY_8, | ||
1797 | [ 0x58 ] = KEY_9, | ||
1798 | [ 0x03 ] = KEY_0, | ||
1799 | |||
1800 | [ 0x5e ] = KEY_OK, | ||
1801 | [ 0x51 ] = KEY_UP, | ||
1802 | [ 0x53 ] = KEY_DOWN, | ||
1803 | [ 0x5b ] = KEY_LEFT, | ||
1804 | [ 0x5f ] = KEY_RIGHT, | ||
1805 | |||
1806 | [ 0x02 ] = KEY_TV, /* Labeled DTV on remote */ | ||
1807 | [ 0x0e ] = KEY_MP3, | ||
1808 | [ 0x1a ] = KEY_DVD, | ||
1809 | [ 0x1e ] = KEY_RESERVED, /* Labeled CPF on remote */ | ||
1810 | [ 0x16 ] = KEY_SETUP, | ||
1811 | [ 0x46 ] = KEY_POWER2, /* TV On/Off button on remote */ | ||
1812 | [ 0x0a ] = KEY_EPG, /* Labeled Guide on remote */ | ||
1813 | |||
1814 | [ 0x49 ] = KEY_BACK, | ||
1815 | [ 0x59 ] = KEY_INFO, /* Labeled MORE on remote */ | ||
1816 | [ 0x4d ] = KEY_MENU, /* Labeled DVDMENU on remote */ | ||
1817 | [ 0x55 ] = KEY_CYCLEWINDOWS, /* Labeled ALT-TAB on remote */ | ||
1818 | [ 0x0f ] = KEY_REDO, /* Labeled |<< REPLAY on remote */ | ||
1819 | [ 0x12 ] = KEY_END, /* Labeled >>| SKIP on remote */ | ||
1820 | [ 0x42 ] = KEY_GREEN, /* Labeled START with a green | ||
1821 | * MS windows logo on remote */ | ||
1822 | |||
1823 | [ 0x15 ] = KEY_VOLUMEUP, | ||
1824 | [ 0x05 ] = KEY_VOLUMEDOWN, | ||
1825 | [ 0x11 ] = KEY_CHANNELUP, | ||
1826 | [ 0x09 ] = KEY_CHANNELDOWN, | ||
1827 | |||
1828 | /* The following are not defined in kernel 2.6 and | ||
1829 | * I cannot find suitable substitute key definitions. | ||
1830 | |||
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 | |||
1841 | [ 0x13 ] = KEY_MODE, /* 4:3 16:9 select */ | ||
1842 | [ 0x1f ] = KEY_ZOOM, | ||
1843 | |||
1844 | [ 0x43 ] = KEY_REWIND, | ||
1845 | [ 0x47 ] = KEY_PLAYPAUSE, | ||
1846 | [ 0x4f ] = KEY_FORWARD, | ||
1847 | [ 0x57 ] = KEY_MUTE, | ||
1848 | [ 0x0d ] = KEY_STOP, | ||
1849 | [ 0x01 ] = KEY_RECORD, | ||
1850 | [ 0x4e ] = KEY_POWER, | ||
1851 | }; | ||
1852 | |||
1853 | EXPORT_SYMBOL_GPL(ir_codes_fusion_gold); | ||
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index b3939a0bada0..3d5a28c2c929 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * Ulrich Mueller <ulrich.mueller42@web.de> | 10 | * Ulrich Mueller <ulrich.mueller42@web.de> |
11 | * modified for em2820 based USB TV tuners by | 11 | * modified for em2820 based USB TV tuners by |
12 | * Markus Rechberger <mrechberger@gmail.com> | 12 | * Markus Rechberger <mrechberger@gmail.com> |
13 | * modified for DViCO Fusion HDTV 5 RT GOLD by | ||
14 | * Chaogui Zhang <czhang1974@gmail.com> | ||
13 | * | 15 | * |
14 | * This program is free software; you can redistribute it and/or modify | 16 | * This program is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU General Public License as published by | 17 | * it under the terms of the GNU General Public License as published by |
@@ -141,6 +143,32 @@ static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
141 | return 1; | 143 | return 1; |
142 | } | 144 | } |
143 | 145 | ||
146 | static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | ||
147 | { | ||
148 | unsigned char buf[4]; | ||
149 | |||
150 | /* poll IR chip */ | ||
151 | if (4 != i2c_master_recv(&ir->c,buf,4)) { | ||
152 | dprintk(1,"read error\n"); | ||
153 | return -EIO; | ||
154 | } | ||
155 | |||
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", | ||
158 | buf[0], buf[1], buf[2], buf[3]); | ||
159 | |||
160 | /* no key pressed or signal from other ir remote */ | ||
161 | if(buf[0] != 0x1 || buf[1] != 0xfe) | ||
162 | return 0; | ||
163 | |||
164 | *ir_key = buf[2]; | ||
165 | *ir_raw = (buf[2] << 8) | buf[3]; | ||
166 | |||
167 | return 1; | ||
168 | |||
169 | } | ||
170 | |||
171 | |||
144 | static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 172 | static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) |
145 | { | 173 | { |
146 | unsigned char b; | 174 | unsigned char b; |
@@ -363,6 +391,12 @@ static int ir_attach(struct i2c_adapter *adap, int addr, | |||
363 | ir_type = IR_TYPE_OTHER; | 391 | ir_type = IR_TYPE_OTHER; |
364 | ir_codes = ir_codes_empty; | 392 | ir_codes = ir_codes_empty; |
365 | break; | 393 | break; |
394 | case 0x6b: | ||
395 | name = "FusionGold"; | ||
396 | ir->get_key = get_key_fusion_gold; | ||
397 | ir_type = IR_TYPE_RC5; | ||
398 | ir_codes = ir_codes_fusion_gold; | ||
399 | break; | ||
366 | case 0x7a: | 400 | case 0x7a: |
367 | case 0x47: | 401 | case 0x47: |
368 | case 0x71: | 402 | case 0x71: |
@@ -474,7 +508,7 @@ static int ir_probe(struct i2c_adapter *adap) | |||
474 | static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1}; | 508 | static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1}; |
475 | static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 }; | 509 | static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 }; |
476 | static const int probe_em28XX[] = { 0x30, 0x47, -1 }; | 510 | static const int probe_em28XX[] = { 0x30, 0x47, -1 }; |
477 | static const int probe_cx88[] = { 0x18, 0x71, -1 }; | 511 | static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 }; |
478 | const int *probe = NULL; | 512 | const int *probe = NULL; |
479 | struct i2c_client c; | 513 | struct i2c_client c; |
480 | unsigned char buf; | 514 | unsigned char buf; |