aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/vp7045.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-08-29 14:19:31 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-12 11:19:48 -0400
commit2e3658836efad06662968bd6373c72df06c4b2f1 (patch)
tree50748b6a7a9cbcb2e0a7d44a59c65783a8fe6fa7 /drivers/media/dvb/dvb-usb/vp7045.c
parent715a223323c8c8bcbe7739e20f6c619f7343b595 (diff)
V4L/DVB (12598): dvb-usb: store rc5 custom and data at the same field
In order to be closer to V4L IR implementation, it is needed to replace u8 custom, data to: u16 scan This allows using non-rc5 mappings, like the 8 bit keycodes used on older protocols. It will also allow future implementations of rc6 keystrokes when needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/vp7045.c')
-rw-r--r--drivers/media/dvb/dvb-usb/vp7045.c102
1 files changed, 51 insertions, 51 deletions
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c
index acb345504e0d..a59faa27912a 100644
--- a/drivers/media/dvb/dvb-usb/vp7045.c
+++ b/drivers/media/dvb/dvb-usb/vp7045.c
@@ -100,56 +100,56 @@ static int vp7045_power_ctrl(struct dvb_usb_device *d, int onoff)
100/* The keymapping struct. Somehow this should be loaded to the driver, but 100/* The keymapping struct. Somehow this should be loaded to the driver, but
101 * currently it is hardcoded. */ 101 * currently it is hardcoded. */
102static struct dvb_usb_rc_key vp7045_rc_keys[] = { 102static struct dvb_usb_rc_key vp7045_rc_keys[] = {
103 { 0x00, 0x16, KEY_POWER }, 103 { 0x0016, KEY_POWER },
104 { 0x00, 0x10, KEY_MUTE }, 104 { 0x0010, KEY_MUTE },
105 { 0x00, 0x03, KEY_1 }, 105 { 0x0003, KEY_1 },
106 { 0x00, 0x01, KEY_2 }, 106 { 0x0001, KEY_2 },
107 { 0x00, 0x06, KEY_3 }, 107 { 0x0006, KEY_3 },
108 { 0x00, 0x09, KEY_4 }, 108 { 0x0009, KEY_4 },
109 { 0x00, 0x1d, KEY_5 }, 109 { 0x001d, KEY_5 },
110 { 0x00, 0x1f, KEY_6 }, 110 { 0x001f, KEY_6 },
111 { 0x00, 0x0d, KEY_7 }, 111 { 0x000d, KEY_7 },
112 { 0x00, 0x19, KEY_8 }, 112 { 0x0019, KEY_8 },
113 { 0x00, 0x1b, KEY_9 }, 113 { 0x001b, KEY_9 },
114 { 0x00, 0x15, KEY_0 }, 114 { 0x0015, KEY_0 },
115 { 0x00, 0x05, KEY_CHANNELUP }, 115 { 0x0005, KEY_CHANNELUP },
116 { 0x00, 0x02, KEY_CHANNELDOWN }, 116 { 0x0002, KEY_CHANNELDOWN },
117 { 0x00, 0x1e, KEY_VOLUMEUP }, 117 { 0x001e, KEY_VOLUMEUP },
118 { 0x00, 0x0a, KEY_VOLUMEDOWN }, 118 { 0x000a, KEY_VOLUMEDOWN },
119 { 0x00, 0x11, KEY_RECORD }, 119 { 0x0011, KEY_RECORD },
120 { 0x00, 0x17, KEY_FAVORITES }, /* Heart symbol - Channel list. */ 120 { 0x0017, KEY_FAVORITES }, /* Heart symbol - Channel list. */
121 { 0x00, 0x14, KEY_PLAY }, 121 { 0x0014, KEY_PLAY },
122 { 0x00, 0x1a, KEY_STOP }, 122 { 0x001a, KEY_STOP },
123 { 0x00, 0x40, KEY_REWIND }, 123 { 0x0040, KEY_REWIND },
124 { 0x00, 0x12, KEY_FASTFORWARD }, 124 { 0x0012, KEY_FASTFORWARD },
125 { 0x00, 0x0e, KEY_PREVIOUS }, /* Recall - Previous channel. */ 125 { 0x000e, KEY_PREVIOUS }, /* Recall - Previous channel. */
126 { 0x00, 0x4c, KEY_PAUSE }, 126 { 0x004c, KEY_PAUSE },
127 { 0x00, 0x4d, KEY_SCREEN }, /* Full screen mode. */ 127 { 0x004d, KEY_SCREEN }, /* Full screen mode. */
128 { 0x00, 0x54, KEY_AUDIO }, /* MTS - Switch to secondary audio. */ 128 { 0x0054, KEY_AUDIO }, /* MTS - Switch to secondary audio. */
129 { 0x00, 0x0c, KEY_CANCEL }, /* Cancel */ 129 { 0x000c, KEY_CANCEL }, /* Cancel */
130 { 0x00, 0x1c, KEY_EPG }, /* EPG */ 130 { 0x001c, KEY_EPG }, /* EPG */
131 { 0x00, 0x00, KEY_TAB }, /* Tab */ 131 { 0x0000, KEY_TAB }, /* Tab */
132 { 0x00, 0x48, KEY_INFO }, /* Preview */ 132 { 0x0048, KEY_INFO }, /* Preview */
133 { 0x00, 0x04, KEY_LIST }, /* RecordList */ 133 { 0x0004, KEY_LIST }, /* RecordList */
134 { 0x00, 0x0f, KEY_TEXT }, /* Teletext */ 134 { 0x000f, KEY_TEXT }, /* Teletext */
135 { 0x00, 0x41, KEY_PREVIOUSSONG }, 135 { 0x0041, KEY_PREVIOUSSONG },
136 { 0x00, 0x42, KEY_NEXTSONG }, 136 { 0x0042, KEY_NEXTSONG },
137 { 0x00, 0x4b, KEY_UP }, 137 { 0x004b, KEY_UP },
138 { 0x00, 0x51, KEY_DOWN }, 138 { 0x0051, KEY_DOWN },
139 { 0x00, 0x4e, KEY_LEFT }, 139 { 0x004e, KEY_LEFT },
140 { 0x00, 0x52, KEY_RIGHT }, 140 { 0x0052, KEY_RIGHT },
141 { 0x00, 0x4f, KEY_ENTER }, 141 { 0x004f, KEY_ENTER },
142 { 0x00, 0x13, KEY_CANCEL }, 142 { 0x0013, KEY_CANCEL },
143 { 0x00, 0x4a, KEY_CLEAR }, 143 { 0x004a, KEY_CLEAR },
144 { 0x00, 0x54, KEY_PRINT }, /* Capture */ 144 { 0x0054, KEY_PRINT }, /* Capture */
145 { 0x00, 0x43, KEY_SUBTITLE }, /* Subtitle/CC */ 145 { 0x0043, KEY_SUBTITLE }, /* Subtitle/CC */
146 { 0x00, 0x08, KEY_VIDEO }, /* A/V */ 146 { 0x0008, KEY_VIDEO }, /* A/V */
147 { 0x00, 0x07, KEY_SLEEP }, /* Hibernate */ 147 { 0x0007, KEY_SLEEP }, /* Hibernate */
148 { 0x00, 0x45, KEY_ZOOM }, /* Zoom+ */ 148 { 0x0045, KEY_ZOOM }, /* Zoom+ */
149 { 0x00, 0x18, KEY_RED}, 149 { 0x0018, KEY_RED},
150 { 0x00, 0x53, KEY_GREEN}, 150 { 0x0053, KEY_GREEN},
151 { 0x00, 0x5e, KEY_YELLOW}, 151 { 0x005e, KEY_YELLOW},
152 { 0x00, 0x5f, KEY_BLUE} 152 { 0x005f, KEY_BLUE}
153}; 153};
154 154
155static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 155static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
@@ -166,7 +166,7 @@ static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
166 } 166 }
167 167
168 for (i = 0; i < ARRAY_SIZE(vp7045_rc_keys); i++) 168 for (i = 0; i < ARRAY_SIZE(vp7045_rc_keys); i++)
169 if (vp7045_rc_keys[i].data == key) { 169 if (rc5_data(&vp7045_rc_keys[i]) == key) {
170 *state = REMOTE_KEY_PRESSED; 170 *state = REMOTE_KEY_PRESSED;
171 *event = vp7045_rc_keys[i].event; 171 *event = vp7045_rc_keys[i].event;
172 break; 172 break;