1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2006 Jonathan Gordon
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ****************************************************************************/
25 #include "pluginlib_actions.h"
27 #if defined(HAVE_REMOTE_LCD)
28 const struct button_mapping remote_directions
[] =
30 #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
31 (CONFIG_KEYPAD == IRIVER_H300_PAD)
32 { PLA_UP
, BUTTON_RC_BITRATE
, BUTTON_NONE
},
33 { PLA_DOWN
, BUTTON_RC_SOURCE
, BUTTON_NONE
},
34 { PLA_LEFT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
35 { PLA_RIGHT
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
36 { PLA_UP_REPEAT
, BUTTON_RC_BITRATE
|BUTTON_REPEAT
, BUTTON_NONE
},
37 { PLA_DOWN_REPEAT
, BUTTON_RC_SOURCE
|BUTTON_REPEAT
, BUTTON_NONE
},
38 { PLA_LEFT_REPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
39 { PLA_RIGHT_REPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
40 #elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) || \
41 (CONFIG_KEYPAD == IRIVER_H10_PAD) || \
42 (CONFIG_KEYPAD == GIGABEAT_PAD) || \
43 (CONFIG_KEYPAD == GIGABEAT_S_PAD)
44 { PLA_UP
, BUTTON_RC_FF
, BUTTON_NONE
},
45 { PLA_DOWN
, BUTTON_RC_REW
, BUTTON_NONE
},
46 { PLA_LEFT
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
47 { PLA_RIGHT
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
48 { PLA_UP_REPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
49 { PLA_DOWN_REPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
50 { PLA_LEFT_REPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
51 { PLA_RIGHT_REPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
52 #elif (CONFIG_KEYPAD == PLAYER_PAD) || \
53 (CONFIG_KEYPAD == RECORDER_PAD)
54 { PLA_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
55 { PLA_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
56 { PLA_LEFT
, BUTTON_RC_LEFT
, BUTTON_NONE
},
57 { PLA_RIGHT
, BUTTON_RC_RIGHT
, BUTTON_NONE
},
58 { PLA_UP_REPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
59 { PLA_DOWN_REPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
60 { PLA_LEFT_REPEAT
, BUTTON_RC_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
61 { PLA_RIGHT_REPEAT
, BUTTON_RC_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
62 #elif (CONFIG_REMOTE_KEYPAD == MROBE_REMOTE)
63 { PLA_UP
, BUTTON_RC_PLAY
, BUTTON_NONE
},
64 { PLA_DOWN
, BUTTON_RC_DOWN
, BUTTON_NONE
},
65 { PLA_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
66 { PLA_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
67 { PLA_UP_REPEAT
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
68 { PLA_DOWN_REPEAT
, BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
69 { PLA_LEFT_REPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
70 { PLA_RIGHT_REPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
71 #elif (CONFIG_KEYPAD == SAMSUNG_YH_PAD)
72 { PLA_UP
, BUTTON_UP
, BUTTON_NONE
},
73 { PLA_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
74 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
75 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
76 { PLA_UP_REPEAT
, BUTTON_UP
|BUTTON_REW
, BUTTON_NONE
},
77 { PLA_DOWN_REPEAT
, BUTTON_DOWN
|BUTTON_REW
, BUTTON_NONE
},
78 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REW
, BUTTON_NONE
},
79 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REW
, BUTTON_NONE
},
81 #error pluginlib_actions: Unsupported remote keypad
83 {CONTEXT_PLUGIN
,BUTTON_NONE
,BUTTON_NONE
}
85 #endif /* HAVE_REMOTE_LCD */
87 const struct button_mapping generic_directions
[] =
89 #ifdef HAVE_TOUCHSCREEN
90 { PLA_UP
, BUTTON_TOPMIDDLE
, BUTTON_NONE
},
91 { PLA_DOWN
, BUTTON_BOTTOMMIDDLE
, BUTTON_NONE
},
92 { PLA_LEFT
, BUTTON_MIDLEFT
, BUTTON_NONE
},
93 { PLA_RIGHT
, BUTTON_MIDRIGHT
, BUTTON_NONE
},
94 { PLA_UP_REPEAT
, BUTTON_TOPMIDDLE
|BUTTON_REPEAT
, BUTTON_NONE
},
95 { PLA_DOWN_REPEAT
, BUTTON_BOTTOMMIDDLE
|BUTTON_REPEAT
, BUTTON_NONE
},
96 { PLA_LEFT_REPEAT
, BUTTON_MIDLEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
97 { PLA_RIGHT_REPEAT
, BUTTON_MIDRIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
99 #if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
100 || (CONFIG_KEYPAD == IRIVER_H300_PAD) \
101 || (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
102 || (CONFIG_KEYPAD == GIGABEAT_PAD) \
103 || (CONFIG_KEYPAD == RECORDER_PAD) \
104 || (CONFIG_KEYPAD == ARCHOS_AV300_PAD) \
105 || (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD) \
106 || (CONFIG_KEYPAD == ONDIO_PAD) \
107 || (CONFIG_KEYPAD == SANSA_C200_PAD) \
108 || (CONFIG_KEYPAD == GIGABEAT_S_PAD) \
109 || (CONFIG_KEYPAD == MROBE100_PAD) \
110 || (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) \
111 || (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) \
112 || (CONFIG_KEYPAD == SANSA_CLIP_PAD) \
113 || (CONFIG_KEYPAD == CREATIVEZVM_PAD) \
114 || (CONFIG_KEYPAD == SANSA_M200_PAD)
115 { PLA_UP
, BUTTON_UP
, BUTTON_NONE
},
116 { PLA_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
117 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
118 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
119 { PLA_UP_REPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
120 { PLA_DOWN_REPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
121 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
122 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
123 #elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
124 || (CONFIG_KEYPAD == IPOD_3G_PAD) \
125 || (CONFIG_KEYPAD == IPOD_4G_PAD) \
126 || (CONFIG_KEYPAD == SANSA_E200_PAD) \
127 || (CONFIG_KEYPAD == SANSA_FUZE_PAD)
128 { PLA_UP
, BUTTON_SCROLL_BACK
, BUTTON_NONE
},
129 { PLA_DOWN
, BUTTON_SCROLL_FWD
, BUTTON_NONE
},
130 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
131 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
132 { PLA_UP_REPEAT
, BUTTON_SCROLL_BACK
|BUTTON_REPEAT
, BUTTON_NONE
},
133 { PLA_DOWN_REPEAT
, BUTTON_SCROLL_FWD
|BUTTON_REPEAT
, BUTTON_NONE
},
134 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
135 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
136 #elif CONFIG_KEYPAD == PLAYER_PAD
137 {PLA_UP
, BUTTON_STOP
, BUTTON_NONE
},
138 {PLA_DOWN
, BUTTON_PLAY
, BUTTON_NONE
},
139 {PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
140 {PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
141 {PLA_UP_REPEAT
, BUTTON_STOP
|BUTTON_REPEAT
, BUTTON_NONE
},
142 {PLA_DOWN_REPEAT
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
143 {PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
144 {PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
145 #elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
146 { PLA_UP
, BUTTON_SCROLL_UP
, BUTTON_NONE
},
147 { PLA_DOWN
, BUTTON_SCROLL_DOWN
, BUTTON_NONE
},
148 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
149 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
150 { PLA_UP_REPEAT
, BUTTON_SCROLL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
151 { PLA_DOWN_REPEAT
, BUTTON_SCROLL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
152 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
153 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
154 #elif (CONFIG_KEYPAD == MROBE500_PAD)
155 #elif (CONFIG_KEYPAD == COWOND2_PAD)
156 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
157 { PLA_UP
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
158 { PLA_DOWN
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
159 { PLA_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
160 { PLA_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
161 { PLA_UP_REPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
162 { PLA_DOWN_REPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
163 { PLA_LEFT_REPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
164 { PLA_RIGHT_REPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
165 #elif (CONFIG_KEYPAD == IAUDIO67_PAD)
166 { PLA_UP
, BUTTON_STOP
, BUTTON_NONE
},
167 { PLA_DOWN
, BUTTON_PLAY
, BUTTON_NONE
},
168 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
169 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
170 { PLA_UP_REPEAT
, BUTTON_STOP
|BUTTON_REPEAT
, BUTTON_NONE
},
171 { PLA_DOWN_REPEAT
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
172 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
173 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
174 #elif (CONFIG_KEYPAD == ONDAVX747_PAD) /* Touchscreen target */
175 #elif (CONFIG_KEYPAD == SAMSUNG_YH_PAD)
176 { PLA_UP
, BUTTON_UP
, BUTTON_NONE
},
177 { PLA_DOWN
, BUTTON_DOWN
, BUTTON_NONE
},
178 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
179 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
180 { PLA_UP_REPEAT
, BUTTON_UP
|BUTTON_REW
, BUTTON_NONE
},
181 { PLA_DOWN_REPEAT
, BUTTON_DOWN
|BUTTON_REW
, BUTTON_NONE
},
182 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REW
, BUTTON_NONE
},
183 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REW
, BUTTON_NONE
},
185 #error pluginlib_actions: Unsupported keypad
187 {CONTEXT_PLUGIN
,BUTTON_NONE
,BUTTON_NONE
}
190 const struct button_mapping generic_left_right_fire
[] =
192 #ifdef HAVE_TOUCHSCREEN
193 { PLA_LEFT
, BUTTON_MIDLEFT
, BUTTON_NONE
},
194 { PLA_LEFT_REPEAT
, BUTTON_MIDLEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
195 { PLA_RIGHT
, BUTTON_MIDRIGHT
, BUTTON_NONE
},
196 { PLA_RIGHT_REPEAT
, BUTTON_MIDRIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
197 { PLA_FIRE
, BUTTON_CENTER
, BUTTON_NONE
},
198 { PLA_FIRE_REPEAT
, BUTTON_CENTER
|BUTTON_REPEAT
, BUTTON_NONE
},
200 #if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
201 || (CONFIG_KEYPAD == IRIVER_H300_PAD) \
202 || (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
203 || (CONFIG_KEYPAD == GIGABEAT_PAD) \
204 || (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD) \
205 || (CONFIG_KEYPAD == GIGABEAT_S_PAD) \
206 || (CONFIG_KEYPAD == MROBE100_PAD) \
207 || (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) \
208 || (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) \
209 || (CONFIG_KEYPAD == SANSA_CLIP_PAD) \
210 || (CONFIG_KEYPAD == SANSA_M200_PAD)
211 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
212 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
213 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
214 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
215 { PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
216 { PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
,BUTTON_NONE
},
217 #elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
218 || (CONFIG_KEYPAD == IPOD_3G_PAD) \
219 || (CONFIG_KEYPAD == IPOD_4G_PAD)
220 { PLA_LEFT
, BUTTON_SCROLL_BACK
, BUTTON_NONE
},
221 { PLA_RIGHT
, BUTTON_SCROLL_FWD
, BUTTON_NONE
},
222 { PLA_LEFT_REPEAT
, BUTTON_SCROLL_BACK
|BUTTON_REPEAT
, BUTTON_NONE
},
223 { PLA_RIGHT_REPEAT
, BUTTON_SCROLL_FWD
|BUTTON_REPEAT
, BUTTON_NONE
},
224 { PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
225 { PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
,BUTTON_NONE
},
226 #elif CONFIG_KEYPAD == ONDIO_PAD
227 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
228 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
229 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
230 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
231 { PLA_FIRE
, BUTTON_UP
, BUTTON_NONE
},
232 { PLA_FIRE_REPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
233 #elif CONFIG_KEYPAD == PLAYER_PAD
234 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
235 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
236 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
237 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
238 { PLA_FIRE
, BUTTON_ON
, BUTTON_NONE
},
239 { PLA_FIRE_REPEAT
, BUTTON_ON
|BUTTON_REPEAT
, BUTTON_NONE
},
240 #elif CONFIG_KEYPAD == RECORDER_PAD
241 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
242 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
243 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
244 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
245 { PLA_FIRE
, BUTTON_PLAY
, BUTTON_NONE
},
246 { PLA_FIRE_REPEAT
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
247 #elif (CONFIG_KEYPAD == SANSA_C200_PAD) \
248 || (CONFIG_KEYPAD == ARCHOS_AV300_PAD)
249 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
250 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
251 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
252 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
253 { PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
254 { PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
,BUTTON_NONE
},
255 #elif (CONFIG_KEYPAD == SANSA_E200_PAD) \
256 || (CONFIG_KEYPAD == SANSA_FUZE_PAD)
257 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
258 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
259 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
260 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
261 { PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
262 { PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
,BUTTON_NONE
},
263 #elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
264 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
265 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
266 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
267 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
268 { PLA_FIRE
, BUTTON_REW
, BUTTON_NONE
},
269 { PLA_FIRE_REPEAT
, BUTTON_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
270 #elif (CONFIG_KEYPAD == MROBE500_PAD)
271 { PLA_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
272 { PLA_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
273 { PLA_LEFT_REPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
274 { PLA_RIGHT_REPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
275 { PLA_FIRE
, BUTTON_RC_HEART
, BUTTON_NONE
},
276 { PLA_FIRE_REPEAT
, BUTTON_RC_HEART
|BUTTON_REPEAT
, BUTTON_NONE
},
277 #elif (CONFIG_KEYPAD == COWOND2_PAD)
278 { PLA_LEFT
, BUTTON_MINUS
, BUTTON_NONE
},
279 { PLA_LEFT_REPEAT
, BUTTON_MINUS
|BUTTON_REPEAT
, BUTTON_NONE
},
280 { PLA_RIGHT
, BUTTON_PLUS
, BUTTON_NONE
},
281 { PLA_RIGHT_REPEAT
, BUTTON_PLUS
|BUTTON_REPEAT
, BUTTON_NONE
},
282 { PLA_FIRE
, BUTTON_MENU
, BUTTON_NONE
},
283 { PLA_FIRE_REPEAT
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
284 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
285 { PLA_LEFT
, BUTTON_RC_REW
, BUTTON_NONE
},
286 { PLA_RIGHT
, BUTTON_RC_FF
, BUTTON_NONE
},
287 { PLA_LEFT_REPEAT
, BUTTON_RC_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
288 { PLA_RIGHT_REPEAT
, BUTTON_RC_FF
|BUTTON_REPEAT
, BUTTON_NONE
},
289 { PLA_FIRE
, BUTTON_RC_MODE
, BUTTON_NONE
},
290 { PLA_FIRE_REPEAT
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_NONE
},
291 #elif (CONFIG_KEYPAD == IAUDIO67_PAD)
292 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
293 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
294 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
295 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
296 { PLA_FIRE
, BUTTON_MENU
, BUTTON_NONE
},
297 { PLA_FIRE_REPEAT
, BUTTON_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
298 #elif (CONFIG_KEYPAD == CREATIVEZVM_PAD)
299 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
300 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
301 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REPEAT
, BUTTON_NONE
},
302 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REPEAT
, BUTTON_NONE
},
303 { PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
304 { PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
305 #elif (CONFIG_KEYPAD == ONDAVX747_PAD) /* Touchscreen target */
306 #elif (CONFIG_KEYPAD == SAMSUNG_YH_PAD)
307 { PLA_LEFT
, BUTTON_LEFT
, BUTTON_NONE
},
308 { PLA_RIGHT
, BUTTON_RIGHT
, BUTTON_NONE
},
309 { PLA_LEFT_REPEAT
, BUTTON_LEFT
|BUTTON_REW
, BUTTON_NONE
},
310 { PLA_RIGHT_REPEAT
, BUTTON_RIGHT
|BUTTON_REW
, BUTTON_NONE
},
311 { PLA_FIRE
, BUTTON_UP
, BUTTON_NONE
},
312 { PLA_FIRE_REPEAT
, BUTTON_UP
|BUTTON_REW
, BUTTON_NONE
},
314 #error pluginlib_actions: Unsupported keypad
316 {CONTEXT_PLUGIN
,BUTTON_NONE
,BUTTON_NONE
}
319 /* these were taken from the bubbles plugin, so may need tweaking */
320 const struct button_mapping generic_actions
[] =
322 #ifdef HAVE_TOUCHSCREEN
323 {PLA_QUIT
, BUTTON_BOTTOMRIGHT
, BUTTON_NONE
},
324 {PLA_START
, BUTTON_CENTER
, BUTTON_NONE
},
325 {PLA_MENU
, BUTTON_TOPLEFT
, BUTTON_NONE
},
326 {PLA_FIRE
, BUTTON_BOTTOMMIDDLE
, BUTTON_NONE
},
327 {PLA_FIRE_REPEAT
, BUTTON_BOTTOMMIDDLE
|BUTTON_REPEAT
, BUTTON_NONE
},
329 #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
330 {PLA_QUIT
, BUTTON_OFF
, BUTTON_NONE
},
331 {PLA_QUIT
, BUTTON_RC_STOP
, BUTTON_NONE
},
332 {PLA_START
, BUTTON_ON
, BUTTON_NONE
},
333 {PLA_START
, BUTTON_RC_ON
, BUTTON_NONE
},
334 {PLA_MENU
, BUTTON_MODE
, BUTTON_NONE
},
335 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
336 {PLA_FIRE
, BUTTON_RC_MENU
, BUTTON_NONE
},
337 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
338 {PLA_FIRE_REPEAT
, BUTTON_RC_MENU
|BUTTON_REPEAT
, BUTTON_NONE
},
339 #elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
340 || (CONFIG_KEYPAD == IPOD_3G_PAD) \
341 || (CONFIG_KEYPAD == IPOD_4G_PAD)
342 {PLA_QUIT
, BUTTON_MENU
|BUTTON_SELECT
, BUTTON_NONE
},
343 {PLA_START
, BUTTON_PLAY
|BUTTON_REL
, BUTTON_PLAY
},
344 {PLA_MENU
, BUTTON_MENU
|BUTTON_REL
, BUTTON_NONE
},
345 {PLA_FIRE
, BUTTON_SELECT
|BUTTON_REL
, BUTTON_SELECT
},
346 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
347 #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
348 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
349 {PLA_START
, BUTTON_PLAY
, BUTTON_NONE
},
350 {PLA_START
, BUTTON_RC_PLAY
, BUTTON_NONE
},
351 {PLA_MENU
, BUTTON_REC
, BUTTON_NONE
},
352 {PLA_MENU
, BUTTON_RC_MENU
, BUTTON_NONE
},
353 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
354 {PLA_FIRE
, BUTTON_RC_MODE
, BUTTON_NONE
},
355 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
356 {PLA_FIRE_REPEAT
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_NONE
},
357 #elif CONFIG_KEYPAD == GIGABEAT_PAD
358 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
359 {PLA_START
, BUTTON_A
, BUTTON_NONE
},
360 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
361 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
362 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
363 #elif CONFIG_KEYPAD == GIGABEAT_S_PAD
364 {PLA_QUIT
, BUTTON_BACK
, BUTTON_NONE
},
365 {PLA_START
, BUTTON_PLAY
, BUTTON_NONE
},
366 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
367 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
368 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
369 #elif CONFIG_KEYPAD == RECORDER_PAD
370 {PLA_QUIT
, BUTTON_OFF
, BUTTON_NONE
},
371 {PLA_START
, BUTTON_ON
, BUTTON_NONE
},
372 {PLA_MENU
, BUTTON_F1
, BUTTON_NONE
},
373 {PLA_FIRE
, BUTTON_PLAY
, BUTTON_NONE
},
374 {PLA_FIRE_REPEAT
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
375 #elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
376 {PLA_QUIT
, BUTTON_OFF
, BUTTON_NONE
},
377 {PLA_START
, BUTTON_ON
, BUTTON_NONE
},
378 {PLA_MENU
, BUTTON_F1
, BUTTON_NONE
},
379 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
380 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
381 #elif CONFIG_KEYPAD == ONDIO_PAD
382 {PLA_QUIT
, BUTTON_OFF
, BUTTON_NONE
},
383 {PLA_START
, BUTTON_MENU
, BUTTON_NONE
},
384 {PLA_MENU
, BUTTON_DOWN
, BUTTON_NONE
},
385 {PLA_FIRE
, BUTTON_UP
, BUTTON_NONE
},
386 {PLA_FIRE_REPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
387 #elif CONFIG_KEYPAD == PLAYER_PAD
388 {PLA_QUIT
, BUTTON_STOP
|BUTTON_REPEAT
, BUTTON_NONE
},
389 {PLA_START
, BUTTON_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
390 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
391 {PLA_FIRE
, BUTTON_ON
, BUTTON_NONE
},
392 {PLA_FIRE_REPEAT
, BUTTON_ON
|BUTTON_REPEAT
, BUTTON_NONE
},
393 #elif CONFIG_KEYPAD == SANSA_E200_PAD || \
394 CONFIG_KEYPAD == SANSA_C200_PAD || \
395 CONFIG_KEYPAD == SANSA_CLIP_PAD || \
396 CONFIG_KEYPAD == SANSA_M200_PAD
397 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
398 {PLA_START
, BUTTON_UP
, BUTTON_NONE
},
399 {PLA_MENU
, BUTTON_DOWN
, BUTTON_NONE
},
400 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
401 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
402 #elif CONFIG_KEYPAD == SANSA_FUZE_PAD
403 {PLA_QUIT
, (BUTTON_HOME
|BUTTON_REPEAT
), BUTTON_NONE
},
404 {PLA_START
, BUTTON_UP
, BUTTON_NONE
},
405 {PLA_MENU
, BUTTON_DOWN
, BUTTON_NONE
},
406 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
407 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
408 #elif CONFIG_KEYPAD == IRIVER_H10_PAD
409 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
410 {PLA_START
, BUTTON_PLAY
, BUTTON_NONE
},
411 {PLA_MENU
, BUTTON_FF
, BUTTON_NONE
},
412 {PLA_FIRE
, BUTTON_REW
, BUTTON_NONE
},
413 {PLA_FIRE_REPEAT
, BUTTON_REW
|BUTTON_REPEAT
, BUTTON_NONE
},
414 #elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
415 {PLA_QUIT
, BUTTON_EQ
, BUTTON_NONE
},
416 {PLA_START
, BUTTON_PLAY
, BUTTON_NONE
},
417 {PLA_MENU
, BUTTON_MODE
, BUTTON_NONE
},
418 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
419 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
420 #elif (CONFIG_KEYPAD == MROBE500_PAD)
421 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
422 {PLA_START
, BUTTON_RC_PLAY
, BUTTON_NONE
},
423 {PLA_MENU
, BUTTON_RC_MODE
, BUTTON_NONE
},
424 {PLA_FIRE
, BUTTON_RC_HEART
, BUTTON_NONE
},
425 {PLA_FIRE_REPEAT
, BUTTON_RC_HEART
|BUTTON_REPEAT
, BUTTON_NONE
},
426 #elif CONFIG_KEYPAD == MROBE100_PAD
427 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
428 {PLA_START
, BUTTON_PLAY
, BUTTON_NONE
},
429 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
430 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
431 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
432 #elif (CONFIG_KEYPAD == COWOND2_PAD)
433 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
434 {PLA_START
, BUTTON_MINUS
, BUTTON_NONE
},
435 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
436 {PLA_FIRE
, BUTTON_CENTER
, BUTTON_NONE
},
437 {PLA_FIRE_REPEAT
, BUTTON_CENTER
|BUTTON_REPEAT
, BUTTON_NONE
},
438 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
439 {PLA_QUIT
, BUTTON_RC_REC
, BUTTON_NONE
},
440 {PLA_START
, BUTTON_RC_PLAY
, BUTTON_NONE
},
441 {PLA_MENU
, BUTTON_RC_MENU
, BUTTON_NONE
},
442 {PLA_FIRE
, BUTTON_RC_MODE
, BUTTON_NONE
},
443 {PLA_FIRE_REPEAT
, BUTTON_RC_MODE
|BUTTON_REPEAT
, BUTTON_NONE
},
444 #elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD
445 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
446 {PLA_START
, BUTTON_RIGHT
, BUTTON_NONE
},
447 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
448 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
449 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
450 #elif (CONFIG_KEYPAD == IAUDIO67_PAD)
451 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
452 {PLA_START
, BUTTON_PLAY
, BUTTON_NONE
},
453 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
454 {PLA_FIRE
, BUTTON_VOLUP
, BUTTON_NONE
},
455 {PLA_FIRE_REPEAT
, BUTTON_VOLUP
|BUTTON_REPEAT
, BUTTON_NONE
},
456 #elif (CONFIG_KEYPAD == CREATIVEZVM_PAD)
457 {PLA_QUIT
, BUTTON_BACK
, BUTTON_NONE
},
458 {PLA_START
, BUTTON_PLAY
, BUTTON_NONE
},
459 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
460 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
461 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
462 #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
463 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
464 {PLA_START
, BUTTON_VIEW
, BUTTON_NONE
},
465 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
466 {PLA_FIRE
, BUTTON_SELECT
, BUTTON_NONE
},
467 {PLA_FIRE_REPEAT
, BUTTON_SELECT
|BUTTON_REPEAT
, BUTTON_NONE
},
468 #elif (CONFIG_KEYPAD == ONDAVX747_PAD)
469 {PLA_QUIT
, BUTTON_POWER
, BUTTON_NONE
},
470 {PLA_START
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
471 {PLA_MENU
, BUTTON_MENU
, BUTTON_NONE
},
472 {PLA_FIRE
, BUTTON_VOL_UP
, BUTTON_NONE
},
473 {PLA_FIRE_REPEAT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
474 #elif (CONFIG_KEYPAD == SAMSUNG_YH_PAD)
475 {PLA_QUIT
, BUTTON_REW
, BUTTON_NONE
},
476 {PLA_START
, BUTTON_FFWD
, BUTTON_NONE
},
477 {PLA_MENU
, BUTTON_PLAY
, BUTTON_NONE
},
478 {PLA_FIRE
, BUTTON_UP
, BUTTON_NONE
},
479 {PLA_FIRE_REPEAT
, BUTTON_UP
|BUTTON_REW
, BUTTON_NONE
},
481 #error pluginlib_actions: Unsupported keypad
483 {CONTEXT_PLUGIN
,BUTTON_NONE
,BUTTON_NONE
}
486 const struct button_mapping generic_increase_decrease
[] =
488 #ifdef HAVE_TOUCHSCREEN
489 {PLA_INC
, BUTTON_TOPMIDDLE
, BUTTON_NONE
},
490 {PLA_DEC
, BUTTON_BOTTOMMIDDLE
, BUTTON_NONE
},
491 {PLA_INC_REPEAT
, BUTTON_TOPMIDDLE
|BUTTON_REPEAT
, BUTTON_NONE
},
492 {PLA_DEC_REPEAT
, BUTTON_BOTTOMMIDDLE
|BUTTON_REPEAT
, BUTTON_NONE
},
494 #if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
495 || (CONFIG_KEYPAD == IRIVER_H300_PAD) \
496 || (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
497 || (CONFIG_KEYPAD == GIGABEAT_PAD) \
498 || (CONFIG_KEYPAD == RECORDER_PAD) \
499 || (CONFIG_KEYPAD == ARCHOS_AV300_PAD) \
500 || (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD) \
501 || (CONFIG_KEYPAD == ONDIO_PAD) \
502 || (CONFIG_KEYPAD == GIGABEAT_S_PAD) \
503 || (CONFIG_KEYPAD == MROBE100_PAD) \
504 || (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) \
505 || (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) \
506 || (CONFIG_KEYPAD == SANSA_CLIP_PAD) \
507 || (CONFIG_KEYPAD == CREATIVEZVM_PAD) \
508 || (CONFIG_KEYPAD == SANSA_M200_PAD)
509 {PLA_INC
, BUTTON_UP
, BUTTON_NONE
},
510 {PLA_DEC
, BUTTON_DOWN
, BUTTON_NONE
},
511 {PLA_INC_REPEAT
, BUTTON_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
512 {PLA_DEC_REPEAT
, BUTTON_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
513 #elif (CONFIG_KEYPAD == SANSA_C200_PAD)
514 {PLA_INC
, BUTTON_VOL_UP
, BUTTON_NONE
},
515 {PLA_DEC
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
516 {PLA_INC_REPEAT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
517 {PLA_DEC_REPEAT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
518 #elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
519 || (CONFIG_KEYPAD == IPOD_3G_PAD) \
520 || (CONFIG_KEYPAD == IPOD_4G_PAD) \
521 || (CONFIG_KEYPAD == SANSA_E200_PAD) \
522 || (CONFIG_KEYPAD == SANSA_FUZE_PAD)
523 {PLA_INC
, BUTTON_SCROLL_FWD
, BUTTON_NONE
},
524 {PLA_DEC
, BUTTON_SCROLL_BACK
, BUTTON_NONE
},
525 {PLA_INC_REPEAT
, BUTTON_SCROLL_FWD
|BUTTON_REPEAT
, BUTTON_NONE
},
526 {PLA_DEC_REPEAT
, BUTTON_SCROLL_BACK
|BUTTON_REPEAT
, BUTTON_NONE
},
527 #elif CONFIG_KEYPAD == PLAYER_PAD
528 {PLA_INC
, BUTTON_STOP
, BUTTON_NONE
},
529 {PLA_DEC
, BUTTON_PLAY
, BUTTON_NONE
},
530 #elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
531 {PLA_INC
, BUTTON_SCROLL_UP
, BUTTON_NONE
},
532 {PLA_DEC
, BUTTON_SCROLL_DOWN
, BUTTON_NONE
},
533 {PLA_INC_REPEAT
, BUTTON_SCROLL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
534 {PLA_DEC_REPEAT
, BUTTON_SCROLL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
535 #elif (CONFIG_KEYPAD == MROBE500_PAD)
536 {PLA_INC
, BUTTON_RC_PLAY
, BUTTON_NONE
},
537 {PLA_DEC
, BUTTON_RC_DOWN
, BUTTON_NONE
},
538 {PLA_INC_REPEAT
, BUTTON_RC_PLAY
|BUTTON_REPEAT
, BUTTON_NONE
},
539 {PLA_DEC_REPEAT
, BUTTON_RC_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
540 #elif CONFIG_KEYPAD == IAUDIO_M3_PAD
541 {PLA_INC
, BUTTON_RC_VOL_UP
, BUTTON_NONE
},
542 {PLA_DEC
, BUTTON_RC_VOL_DOWN
, BUTTON_NONE
},
543 {PLA_INC_REPEAT
, BUTTON_RC_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
544 {PLA_DEC_REPEAT
, BUTTON_RC_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
545 #elif CONFIG_KEYPAD == COWOND2_PAD
546 {PLA_INC
, BUTTON_PLUS
, BUTTON_NONE
},
547 {PLA_DEC
, BUTTON_MINUS
, BUTTON_NONE
},
548 {PLA_INC_REPEAT
, BUTTON_PLUS
|BUTTON_REPEAT
, BUTTON_NONE
},
549 {PLA_DEC_REPEAT
, BUTTON_MINUS
|BUTTON_REPEAT
, BUTTON_NONE
},
550 #elif CONFIG_KEYPAD == IAUDIO67_PAD
551 {PLA_INC
, BUTTON_VOLUP
, BUTTON_NONE
},
552 {PLA_DEC
, BUTTON_VOLDOWN
, BUTTON_NONE
},
553 {PLA_INC_REPEAT
, BUTTON_VOLUP
|BUTTON_REPEAT
, BUTTON_NONE
},
554 {PLA_DEC_REPEAT
, BUTTON_VOLDOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
555 #elif CONFIG_KEYPAD == ONDAVX747_PAD
556 {PLA_INC
, BUTTON_VOL_UP
, BUTTON_NONE
},
557 {PLA_DEC
, BUTTON_VOL_DOWN
, BUTTON_NONE
},
558 {PLA_INC_REPEAT
, BUTTON_VOL_UP
|BUTTON_REPEAT
, BUTTON_NONE
},
559 {PLA_DEC_REPEAT
, BUTTON_VOL_DOWN
|BUTTON_REPEAT
, BUTTON_NONE
},
560 #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD
561 {PLA_INC
, BUTTON_UP
, BUTTON_NONE
},
562 {PLA_DEC
, BUTTON_DOWN
, BUTTON_NONE
},
563 {PLA_INC_REPEAT
, BUTTON_UP
|BUTTON_REW
, BUTTON_NONE
},
564 {PLA_DEC_REPEAT
, BUTTON_DOWN
|BUTTON_REW
, BUTTON_NONE
},
566 #error pluginlib_actions: Unsupported keypad
568 {CONTEXT_PLUGIN
,BUTTON_NONE
,BUTTON_NONE
}
571 static struct button_mapping
**plugin_context_order
;
572 static int plugin_context_count
= 0;
573 static int last_context
= 0; /* index into plugin_context_order
574 of the last context returned */
576 static const struct button_mapping
* get_context_map(int context
)
579 if (last_context
<plugin_context_count
)
580 return plugin_context_order
[last_context
++];
584 int pluginlib_getaction(int timeout
,
585 const struct button_mapping
*plugin_contexts
[],
588 plugin_context_order
= (struct button_mapping
**)plugin_contexts
;
589 plugin_context_count
= count
;
591 return rb
->get_custom_action(CONTEXT_PLUGIN
,timeout
,get_context_map
);