Commit 2e365883 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

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: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 715a2233
...@@ -38,41 +38,41 @@ static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_pr ...@@ -38,41 +38,41 @@ static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_pr
} }
static struct dvb_usb_rc_key a800_rc_keys[] = { static struct dvb_usb_rc_key a800_rc_keys[] = {
{ 0x02, 0x01, KEY_PROG1 }, /* SOURCE */ { 0x0201, KEY_PROG1 }, /* SOURCE */
{ 0x02, 0x00, KEY_POWER }, /* POWER */ { 0x0200, KEY_POWER }, /* POWER */
{ 0x02, 0x05, KEY_1 }, /* 1 */ { 0x0205, KEY_1 }, /* 1 */
{ 0x02, 0x06, KEY_2 }, /* 2 */ { 0x0206, KEY_2 }, /* 2 */
{ 0x02, 0x07, KEY_3 }, /* 3 */ { 0x0207, KEY_3 }, /* 3 */
{ 0x02, 0x09, KEY_4 }, /* 4 */ { 0x0209, KEY_4 }, /* 4 */
{ 0x02, 0x0a, KEY_5 }, /* 5 */ { 0x020a, KEY_5 }, /* 5 */
{ 0x02, 0x0b, KEY_6 }, /* 6 */ { 0x020b, KEY_6 }, /* 6 */
{ 0x02, 0x0d, KEY_7 }, /* 7 */ { 0x020d, KEY_7 }, /* 7 */
{ 0x02, 0x0e, KEY_8 }, /* 8 */ { 0x020e, KEY_8 }, /* 8 */
{ 0x02, 0x0f, KEY_9 }, /* 9 */ { 0x020f, KEY_9 }, /* 9 */
{ 0x02, 0x12, KEY_LEFT }, /* L / DISPLAY */ { 0x0212, KEY_LEFT }, /* L / DISPLAY */
{ 0x02, 0x11, KEY_0 }, /* 0 */ { 0x0211, KEY_0 }, /* 0 */
{ 0x02, 0x13, KEY_RIGHT }, /* R / CH RTN */ { 0x0213, KEY_RIGHT }, /* R / CH RTN */
{ 0x02, 0x17, KEY_PROG2 }, /* SNAP SHOT */ { 0x0217, KEY_PROG2 }, /* SNAP SHOT */
{ 0x02, 0x10, KEY_PROG3 }, /* 16-CH PREV */ { 0x0210, KEY_PROG3 }, /* 16-CH PREV */
{ 0x02, 0x1e, KEY_VOLUMEDOWN }, /* VOL DOWN */ { 0x021e, KEY_VOLUMEDOWN }, /* VOL DOWN */
{ 0x02, 0x0c, KEY_ZOOM }, /* FULL SCREEN */ { 0x020c, KEY_ZOOM }, /* FULL SCREEN */
{ 0x02, 0x1f, KEY_VOLUMEUP }, /* VOL UP */ { 0x021f, KEY_VOLUMEUP }, /* VOL UP */
{ 0x02, 0x14, KEY_MUTE }, /* MUTE */ { 0x0214, KEY_MUTE }, /* MUTE */
{ 0x02, 0x08, KEY_AUDIO }, /* AUDIO */ { 0x0208, KEY_AUDIO }, /* AUDIO */
{ 0x02, 0x19, KEY_RECORD }, /* RECORD */ { 0x0219, KEY_RECORD }, /* RECORD */
{ 0x02, 0x18, KEY_PLAY }, /* PLAY */ { 0x0218, KEY_PLAY }, /* PLAY */
{ 0x02, 0x1b, KEY_STOP }, /* STOP */ { 0x021b, KEY_STOP }, /* STOP */
{ 0x02, 0x1a, KEY_PLAYPAUSE }, /* TIMESHIFT / PAUSE */ { 0x021a, KEY_PLAYPAUSE }, /* TIMESHIFT / PAUSE */
{ 0x02, 0x1d, KEY_BACK }, /* << / RED */ { 0x021d, KEY_BACK }, /* << / RED */
{ 0x02, 0x1c, KEY_FORWARD }, /* >> / YELLOW */ { 0x021c, KEY_FORWARD }, /* >> / YELLOW */
{ 0x02, 0x03, KEY_TEXT }, /* TELETEXT */ { 0x0203, KEY_TEXT }, /* TELETEXT */
{ 0x02, 0x04, KEY_EPG }, /* EPG */ { 0x0204, KEY_EPG }, /* EPG */
{ 0x02, 0x15, KEY_MENU }, /* MENU */ { 0x0215, KEY_MENU }, /* MENU */
{ 0x03, 0x03, KEY_CHANNELUP }, /* CH UP */ { 0x0303, KEY_CHANNELUP }, /* CH UP */
{ 0x03, 0x02, KEY_CHANNELDOWN }, /* CH DOWN */ { 0x0302, KEY_CHANNELDOWN }, /* CH DOWN */
{ 0x03, 0x01, KEY_FIRST }, /* |<< / GREEN */ { 0x0301, KEY_FIRST }, /* |<< / GREEN */
{ 0x03, 0x00, KEY_LAST }, /* >>| / BLUE */ { 0x0300, KEY_LAST }, /* >>| / BLUE */
}; };
......
...@@ -35,43 +35,43 @@ MODULE_PARM_DESC(debug, ...@@ -35,43 +35,43 @@ MODULE_PARM_DESC(debug,
struct dvb_usb_rc_key af9005_rc_keys[] = { struct dvb_usb_rc_key af9005_rc_keys[] = {
{0x01, 0xb7, KEY_POWER}, {0x01b7, KEY_POWER},
{0x01, 0xa7, KEY_VOLUMEUP}, {0x01a7, KEY_VOLUMEUP},
{0x01, 0x87, KEY_CHANNELUP}, {0x0187, KEY_CHANNELUP},
{0x01, 0x7f, KEY_MUTE}, {0x017f, KEY_MUTE},
{0x01, 0xbf, KEY_VOLUMEDOWN}, {0x01bf, KEY_VOLUMEDOWN},
{0x01, 0x3f, KEY_CHANNELDOWN}, {0x013f, KEY_CHANNELDOWN},
{0x01, 0xdf, KEY_1}, {0x01df, KEY_1},
{0x01, 0x5f, KEY_2}, {0x015f, KEY_2},
{0x01, 0x9f, KEY_3}, {0x019f, KEY_3},
{0x01, 0x1f, KEY_4}, {0x011f, KEY_4},
{0x01, 0xef, KEY_5}, {0x01ef, KEY_5},
{0x01, 0x6f, KEY_6}, {0x016f, KEY_6},
{0x01, 0xaf, KEY_7}, {0x01af, KEY_7},
{0x01, 0x27, KEY_8}, {0x0127, KEY_8},
{0x01, 0x07, KEY_9}, {0x0107, KEY_9},
{0x01, 0xcf, KEY_ZOOM}, {0x01cf, KEY_ZOOM},
{0x01, 0x4f, KEY_0}, {0x014f, KEY_0},
{0x01, 0x8f, KEY_GOTO}, /* marked jump on the remote */ {0x018f, KEY_GOTO}, /* marked jump on the remote */
{0x00, 0xbd, KEY_POWER}, {0x00bd, KEY_POWER},
{0x00, 0x7d, KEY_VOLUMEUP}, {0x007d, KEY_VOLUMEUP},
{0x00, 0xfd, KEY_CHANNELUP}, {0x00fd, KEY_CHANNELUP},
{0x00, 0x9d, KEY_MUTE}, {0x009d, KEY_MUTE},
{0x00, 0x5d, KEY_VOLUMEDOWN}, {0x005d, KEY_VOLUMEDOWN},
{0x00, 0xdd, KEY_CHANNELDOWN}, {0x00dd, KEY_CHANNELDOWN},
{0x00, 0xad, KEY_1}, {0x00ad, KEY_1},
{0x00, 0x6d, KEY_2}, {0x006d, KEY_2},
{0x00, 0xed, KEY_3}, {0x00ed, KEY_3},
{0x00, 0x8d, KEY_4}, {0x008d, KEY_4},
{0x00, 0x4d, KEY_5}, {0x004d, KEY_5},
{0x00, 0xcd, KEY_6}, {0x00cd, KEY_6},
{0x00, 0xb5, KEY_7}, {0x00b5, KEY_7},
{0x00, 0x75, KEY_8}, {0x0075, KEY_8},
{0x00, 0xf5, KEY_9}, {0x00f5, KEY_9},
{0x00, 0x95, KEY_ZOOM}, {0x0095, KEY_ZOOM},
{0x00, 0x55, KEY_0}, {0x0055, KEY_0},
{0x00, 0xd5, KEY_GOTO}, /* marked jump on the remote */ {0x00d5, KEY_GOTO}, /* marked jump on the remote */
}; };
int af9005_rc_keys_size = ARRAY_SIZE(af9005_rc_keys); int af9005_rc_keys_size = ARRAY_SIZE(af9005_rc_keys);
...@@ -131,8 +131,8 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event, ...@@ -131,8 +131,8 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event,
return 0; return 0;
} }
for (i = 0; i < af9005_rc_keys_size; i++) { for (i = 0; i < af9005_rc_keys_size; i++) {
if (af9005_rc_keys[i].custom == cust if (rc5_custom(&af9005_rc_keys[i]) == cust
&& af9005_rc_keys[i].data == dat) { && rc5_data(&af9005_rc_keys[i]) == dat) {
*event = af9005_rc_keys[i].event; *event = af9005_rc_keys[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
deb_decode deb_decode
......
...@@ -1043,8 +1043,8 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -1043,8 +1043,8 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
*state = REMOTE_NO_KEY_PRESSED; *state = REMOTE_NO_KEY_PRESSED;
for (i = 0; i < d->props.rc_key_map_size; i++) { for (i = 0; i < d->props.rc_key_map_size; i++) {
if (!buf[1] && keymap[i].custom == buf[0] && if (!buf[1] && rc5_custom(&keymap[i]) == buf[0] &&
keymap[i].data == buf[2]) { rc5_data(&keymap[i]) == buf[2]) {
*event = keymap[i].event; *event = keymap[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
break; break;
......
This diff is collapsed.
...@@ -389,8 +389,8 @@ static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -389,8 +389,8 @@ static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
*state = REMOTE_NO_KEY_PRESSED; *state = REMOTE_NO_KEY_PRESSED;
for (i = 0; i < d->props.rc_key_map_size; i++) { for (i = 0; i < d->props.rc_key_map_size; i++) {
if (keymap[i].custom == ircode[0] && if (rc5_custom(&keymap[i]) == ircode[0] &&
keymap[i].data == ircode[1]) { rc5_data(&keymap[i]) == ircode[1]) {
*event = keymap[i].event; *event = keymap[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
return 0; return 0;
...@@ -400,50 +400,50 @@ static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -400,50 +400,50 @@ static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
} }
static struct dvb_usb_rc_key anysee_rc_keys[] = { static struct dvb_usb_rc_key anysee_rc_keys[] = {
{ 0x01, 0x00, KEY_0 }, { 0x0100, KEY_0 },
{ 0x01, 0x01, KEY_1 }, { 0x0101, KEY_1 },
{ 0x01, 0x02, KEY_2 }, { 0x0102, KEY_2 },
{ 0x01, 0x03, KEY_3 }, { 0x0103, KEY_3 },
{ 0x01, 0x04, KEY_4 }, { 0x0104, KEY_4 },
{ 0x01, 0x05, KEY_5 }, { 0x0105, KEY_5 },
{ 0x01, 0x06, KEY_6 }, { 0x0106, KEY_6 },
{ 0x01, 0x07, KEY_7 }, { 0x0107, KEY_7 },
{ 0x01, 0x08, KEY_8 }, { 0x0108, KEY_8 },
{ 0x01, 0x09, KEY_9 }, { 0x0109, KEY_9 },
{ 0x01, 0x0a, KEY_POWER }, { 0x010a, KEY_POWER },
{ 0x01, 0x0b, KEY_DOCUMENTS }, /* * */ { 0x010b, KEY_DOCUMENTS }, /* * */
{ 0x01, 0x19, KEY_FAVORITES }, { 0x0119, KEY_FAVORITES },
{ 0x01, 0x20, KEY_SLEEP }, { 0x0120, KEY_SLEEP },
{ 0x01, 0x21, KEY_MODE }, /* 4:3 / 16:9 select */ { 0x0121, KEY_MODE }, /* 4:3 / 16:9 select */
{ 0x01, 0x22, KEY_ZOOM }, { 0x0122, KEY_ZOOM },
{ 0x01, 0x47, KEY_TEXT }, { 0x0147, KEY_TEXT },
{ 0x01, 0x16, KEY_TV }, /* TV / radio select */ { 0x0116, KEY_TV }, /* TV / radio select */
{ 0x01, 0x1e, KEY_LANGUAGE }, /* Second Audio Program */ { 0x011e, KEY_LANGUAGE }, /* Second Audio Program */
{ 0x01, 0x1a, KEY_SUBTITLE }, { 0x011a, KEY_SUBTITLE },
{ 0x01, 0x1b, KEY_CAMERA }, /* screenshot */ { 0x011b, KEY_CAMERA }, /* screenshot */
{ 0x01, 0x42, KEY_MUTE }, { 0x0142, KEY_MUTE },
{ 0x01, 0x0e, KEY_MENU }, { 0x010e, KEY_MENU },
{ 0x01, 0x0f, KEY_EPG }, { 0x010f, KEY_EPG },
{ 0x01, 0x17, KEY_INFO }, { 0x0117, KEY_INFO },
{ 0x01, 0x10, KEY_EXIT }, { 0x0110, KEY_EXIT },
{ 0x01, 0x13, KEY_VOLUMEUP }, { 0x0113, KEY_VOLUMEUP },
{ 0x01, 0x12, KEY_VOLUMEDOWN }, { 0x0112, KEY_VOLUMEDOWN },
{ 0x01, 0x11, KEY_CHANNELUP }, { 0x0111, KEY_CHANNELUP },
{ 0x01, 0x14, KEY_CHANNELDOWN }, { 0x0114, KEY_CHANNELDOWN },
{ 0x01, 0x15, KEY_OK }, { 0x0115, KEY_OK },
{ 0x01, 0x1d, KEY_RED }, { 0x011d, KEY_RED },
{ 0x01, 0x1f, KEY_GREEN }, { 0x011f, KEY_GREEN },
{ 0x01, 0x1c, KEY_YELLOW }, { 0x011c, KEY_YELLOW },
{ 0x01, 0x44, KEY_BLUE }, { 0x0144, KEY_BLUE },
{ 0x01, 0x0c, KEY_SHUFFLE }, /* snapshot */ { 0x010c, KEY_SHUFFLE }, /* snapshot */
{ 0x01, 0x48, KEY_STOP }, { 0x0148, KEY_STOP },
{ 0x01, 0x50, KEY_PLAY }, { 0x0150, KEY_PLAY },
{ 0x01, 0x51, KEY_PAUSE }, { 0x0151, KEY_PAUSE },
{ 0x01, 0x49, KEY_RECORD }, { 0x0149, KEY_RECORD },
{ 0x01, 0x18, KEY_PREVIOUS }, /* |<< */ { 0x0118, KEY_PREVIOUS }, /* |<< */
{ 0x01, 0x0d, KEY_NEXT }, /* >>| */ { 0x010d, KEY_NEXT }, /* >>| */
{ 0x01, 0x24, KEY_PROG1 }, /* F1 */ { 0x0124, KEY_PROG1 }, /* F1 */
{ 0x01, 0x25, KEY_PROG2 }, /* F2 */ { 0x0125, KEY_PROG2 }, /* F2 */
}; };
/* DVB USB Driver stuff */ /* DVB USB Driver stuff */
......
...@@ -85,43 +85,43 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap) ...@@ -85,43 +85,43 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap)
} }
static struct dvb_usb_rc_key cinergyt2_rc_keys[] = { static struct dvb_usb_rc_key cinergyt2_rc_keys[] = {
{ 0x04, 0x01, KEY_POWER }, { 0x0401, KEY_POWER },
{ 0x04, 0x02, KEY_1 }, { 0x0402, KEY_1 },
{ 0x04, 0x03, KEY_2 }, { 0x0403, KEY_2 },
{ 0x04, 0x04, KEY_3 }, { 0x0404, KEY_3 },
{ 0x04, 0x05, KEY_4 }, { 0x0405, KEY_4 },
{ 0x04, 0x06, KEY_5 }, { 0x0406, KEY_5 },
{ 0x04, 0x07, KEY_6 }, { 0x0407, KEY_6 },
{ 0x04, 0x08, KEY_7 }, { 0x0408, KEY_7 },
{ 0x04, 0x09, KEY_8 }, { 0x0409, KEY_8 },
{ 0x04, 0x0a, KEY_9 }, { 0x040a, KEY_9 },
{ 0x04, 0x0c, KEY_0 }, { 0x040c, KEY_0 },
{ 0x04, 0x0b, KEY_VIDEO }, { 0x040b, KEY_VIDEO },
{ 0x04, 0x0d, KEY_REFRESH }, { 0x040d, KEY_REFRESH },
{ 0x04, 0x0e, KEY_SELECT }, { 0x040e, KEY_SELECT },
{ 0x04, 0x0f, KEY_EPG }, { 0x040f, KEY_EPG },
{ 0x04, 0x10, KEY_UP }, { 0x0410, KEY_UP },
{ 0x04, 0x14, KEY_DOWN }, { 0x0414, KEY_DOWN },
{ 0x04, 0x11, KEY_LEFT }, { 0x0411, KEY_LEFT },
{ 0x04, 0x13, KEY_RIGHT }, { 0x0413, KEY_RIGHT },
{ 0x04, 0x12, KEY_OK }, { 0x0412, KEY_OK },
{ 0x04, 0x15, KEY_TEXT }, { 0x0415, KEY_TEXT },
{ 0x04, 0x16, KEY_INFO }, { 0x0416, KEY_INFO },
{ 0x04, 0x17, KEY_RED }, { 0x0417, KEY_RED },
{ 0x04, 0x18, KEY_GREEN }, { 0x0418, KEY_GREEN },
{ 0x04, 0x19, KEY_YELLOW }, { 0x0419, KEY_YELLOW },
{ 0x04, 0x1a, KEY_BLUE }, { 0x041a, KEY_BLUE },
{ 0x04, 0x1c, KEY_VOLUMEUP }, { 0x041c, KEY_VOLUMEUP },
{ 0x04, 0x1e, KEY_VOLUMEDOWN }, { 0x041e, KEY_VOLUMEDOWN },
{ 0x04, 0x1d, KEY_MUTE }, { 0x041d, KEY_MUTE },
{ 0x04, 0x1b, KEY_CHANNELUP }, { 0x041b, KEY_CHANNELUP },
{ 0x04, 0x1f, KEY_CHANNELDOWN }, { 0x041f, KEY_CHANNELDOWN },
{ 0x04, 0x40, KEY_PAUSE }, { 0x0440, KEY_PAUSE },
{ 0x04, 0x4c, KEY_PLAY }, { 0x044c, KEY_PLAY },
{ 0x04, 0x58, KEY_RECORD }, { 0x0458, KEY_RECORD },
{ 0x04, 0x54, KEY_PREVIOUS }, { 0x0454, KEY_PREVIOUS },
{ 0x04, 0x48, KEY_STOP }, { 0x0448, KEY_STOP },
{ 0x04, 0x5c, KEY_NEXT } { 0x045c, KEY_NEXT }
}; };
/* Number of keypresses to ignore before detect repeating */ /* Number of keypresses to ignore before detect repeating */
......
...@@ -392,8 +392,8 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -392,8 +392,8 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
*state = REMOTE_NO_KEY_PRESSED; *state = REMOTE_NO_KEY_PRESSED;
for (i = 0; i < d->props.rc_key_map_size; i++) { for (i = 0; i < d->props.rc_key_map_size; i++) {
if (keymap[i].custom == ircode[2] && if (rc5_custom(&keymap[i]) == ircode[2] &&
keymap[i].data == ircode[3]) { rc5_data(&keymap[i]) == ircode[3]) {
*event = keymap[i].event; *event = keymap[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
...@@ -420,8 +420,8 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, ...@@ -420,8 +420,8 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
return 0; return 0;
for (i = 0; i < d->props.rc_key_map_size; i++) { for (i = 0; i < d->props.rc_key_map_size; i++) {
if (keymap[i].custom == ircode[1] && if (rc5_custom(&keymap[i]) == ircode[1] &&
keymap[i].data == ircode[2]) { rc5_data(&keymap[i]) == ircode[2]) {
*event = keymap[i].event; *event = keymap[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
...@@ -446,8 +446,8 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, ...@@ -446,8 +446,8 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
return 0; return 0;
for (i = 0; i < d->props.rc_key_map_size; i++) { for (i = 0; i < d->props.rc_key_map_size; i++) {
if (keymap[i].custom == ircode[0] && if (rc5_custom(&keymap[i]) == ircode[0] &&
keymap[i].data == ircode[1]) { rc5_data(&keymap[i]) == ircode[1]) {
*event = keymap[i].event; *event = keymap[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
...@@ -459,128 +459,128 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, ...@@ -459,128 +459,128 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
} }
static struct dvb_usb_rc_key dvico_mce_rc_keys[] = { static struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
{ 0xfe, 0x02, KEY_TV }, { 0xfe02, KEY_TV },
{ 0xfe, 0x0e, KEY_MP3 }, { 0xfe0e, KEY_MP3 },
{ 0xfe, 0x1a, KEY_DVD }, { 0xfe1a, KEY_DVD },
{ 0xfe, 0x1e, KEY_FAVORITES }, { 0xfe1e, KEY_FAVORITES },
{ 0xfe, 0x16, KEY_SETUP }, { 0xfe16, KEY_SETUP },
{ 0xfe, 0x46, KEY_POWER2 }, { 0xfe46, KEY_POWER2 },
{ 0xfe, 0x0a, KEY_EPG }, { 0xfe0a, KEY_EPG },
{ 0xfe, 0x49, KEY_BACK }, { 0xfe49, KEY_BACK },
{ 0xfe, 0x4d, KEY_MENU }, { 0xfe4d, KEY_MENU },
{ 0xfe, 0x51, KEY_UP }, { 0xfe51, KEY_UP },
{ 0xfe, 0x5b, KEY_LEFT }, { 0xfe5b, KEY_LEFT },
{ 0xfe, 0x5f, KEY_RIGHT }, { 0xfe5f, KEY_RIGHT },
{ 0xfe, 0x53, KEY_DOWN }, { 0xfe53, KEY_DOWN },
{ 0xfe, 0x5e, KEY_OK }, { 0xfe5e, KEY_OK },
{ 0xfe, 0x59, KEY_INFO }, { 0xfe59, KEY_INFO },
{ 0xfe, 0x55, KEY_TAB }, { 0xfe55, KEY_TAB },
{ 0xfe, 0x0f, KEY_PREVIOUSSONG },/* Replay */ { 0xfe0f, KEY_PREVIOUSSONG },/* Replay */
{ 0xfe, 0x12, KEY_NEXTSONG }, /* Skip */ { 0xfe12, KEY_NEXTSONG }, /* Skip */
{ 0xfe, 0x42, KEY_ENTER }, /* Windows/Start */ { 0xfe42, KEY_ENTER }, /* Windows/Start */
{ 0xfe, 0x15, KEY_VOLUMEUP }, { 0xfe15, KEY_VOLUMEUP },
{ 0xfe, 0x05, KEY_VOLUMEDOWN }, { 0xfe05, KEY_VOLUMEDOWN },
{ 0xfe, 0x11, KEY_CHANNELUP }, { 0xfe11, KEY_CHANNELUP },
{ 0xfe, 0x09, KEY_CHANNELDOWN }, { 0xfe09, KEY_CHANNELDOWN },
{ 0xfe, 0x52, KEY_CAMERA }, { 0xfe52, KEY_CAMERA },
{ 0xfe, 0x5a, KEY_TUNER }, /* Live */ { 0xfe5a, KEY_TUNER }, /* Live */
{ 0xfe, 0x19, KEY_OPEN }, { 0xfe19, KEY_OPEN },
{ 0xfe, 0x0b, KEY_1 }, { 0xfe0b, KEY_1 },
{ 0xfe, 0x17, KEY_2 }, { 0xfe17, KEY_2 },
{ 0xfe, 0x1b, KEY_3 }, { 0xfe1b, KEY_3 },
{ 0xfe, 0x07, KEY_4 }, { 0xfe07, KEY_4 },
{ 0xfe, 0x50, KEY_5 }, { 0xfe50, KEY_5 },
{ 0xfe, 0x54, KEY_6 }, { 0xfe54, KEY_6 },
{ 0xfe, 0x48, KEY_7 }, { 0xfe48, KEY_7 },
{ 0xfe, 0x4c, KEY_8 }, { 0xfe4c, KEY_8 },
{ 0xfe, 0x58, KEY_9 }, { 0xfe58, KEY_9 },
{ 0xfe, 0x13, KEY_ANGLE }, /* Aspect */ { 0xfe13, KEY_ANGLE }, /* Aspect */
{ 0xfe, 0x03, KEY_0 }, { 0xfe03, KEY_0 },
{ 0xfe, 0x1f, KEY_ZOOM }, { 0xfe1f, KEY_ZOOM },
{ 0xfe, 0x43, KEY_REWIND }, { 0xfe43, KEY_REWIND },
{ 0xfe, 0x47, KEY_PLAYPAUSE }, { 0xfe47, KEY_PLAYPAUSE },
{ 0xfe, 0x4f, KEY_FASTFORWARD }, { 0xfe4f, KEY_FASTFORWARD },
{ 0xfe, 0x57, KEY_MUTE }, { 0xfe57, KEY_MUTE },
{ 0xfe, 0x0d, KEY_STOP }, { 0xfe0d, KEY_STOP },
{ 0xfe, 0x01, KEY_RECORD }, { 0xfe01, KEY_RECORD },
{ 0xfe, 0x4e, KEY_POWER }, { 0xfe4e, KEY_POWER },
}; };
static struct dvb_usb_rc_key dvico_portable_rc_keys[] = { static struct dvb_usb_rc_key dvico_portable_rc_keys[] = {
{ 0xfc, 0x02, KEY_SETUP }, /* Profile */ { 0xfc02, KEY_SETUP }, /* Profile */
{ 0xfc, 0x43, KEY_POWER2 }, { 0xfc43, KEY_POWER2 },
{ 0xfc, 0x06, KEY_EPG }, { 0xfc06, KEY_EPG },
{ 0xfc, 0x5a, KEY_BACK }, { 0xfc5a, KEY_BACK },
{ 0xfc, 0x05, KEY_MENU }, { 0xfc05, KEY_MENU },
{ 0xfc, 0x47, KEY_INFO }, { 0xfc47, KEY_INFO },
{ 0xfc, 0x01, KEY_TAB }, { 0xfc01, KEY_TAB },
{ 0xfc, 0x42, KEY_PREVIOUSSONG },/* Replay */ { 0xfc42, KEY_PREVIOUSSONG },/* Replay */
{ 0xfc, 0x49, KEY_VOLUMEUP }, { 0xfc49, KEY_VOLUMEUP },
{ 0xfc, 0x09, KEY_VOLUMEDOWN }, { 0xfc09, KEY_VOLUMEDOWN },
{ 0xfc, 0x54, KEY_CHANNELUP }, { 0xfc54, KEY_CHANNELUP },
{ 0xfc, 0x0b, KEY_CHANNELDOWN }, { 0xfc0b, KEY_CHANNELDOWN },
{ 0xfc, 0x16, KEY_CAMERA }, { 0xfc16, KEY_CAMERA },
{ 0xfc, 0x40, KEY_TUNER }, /* ATV/DTV */ { 0xfc40, KEY_TUNER }, /* ATV/DTV */
{ 0xfc, 0x45, KEY_OPEN }, { 0xfc45, KEY_OPEN },
{ 0xfc, 0x19, KEY_1 }, { 0xfc19, KEY_1 },
{ 0xfc, 0x18, KEY_2 }, { 0xfc18, KEY_2 },
{ 0xfc, 0x1b, KEY_3 }, { 0xfc1b, KEY_3 },
{ 0xfc, 0x1a, KEY_4 }, { 0xfc1a, KEY_4 },
{ 0xfc, 0x58, KEY_5 }, { 0xfc58, KEY_5 },
{ 0xfc, 0x59, KEY_6 }, { 0xfc59, KEY_6 },
{ 0xfc, 0x15, KEY_7 }, { 0xfc15, KEY_7 },
{ 0xfc, 0x14, KEY_8 }, { 0xfc14, KEY_8 },
{ 0xfc, 0x17, KEY_9 }, { 0xfc17, KEY_9 },
{ 0xfc, 0x44, KEY_ANGLE }, /* Aspect */ { 0xfc44, KEY_ANGLE }, /* Aspect */
{ 0xfc, 0x55, KEY_0 }, { 0xfc55, KEY_0 },
{ 0xfc, 0x07, KEY_ZOOM }, { 0xfc07, KEY_ZOOM },
{ 0xfc, 0x0a, KEY_REWIND }, { 0xfc0a, KEY_REWIND },
{ 0xfc, 0x08, KEY_PLAYPAUSE }, { 0xfc08, KEY_PLAYPAUSE },
{ 0xfc, 0x4b, KEY_FASTFORWARD }, { 0xfc4b, KEY_FASTFORWARD },
{ 0xfc, 0x5b, KEY_MUTE }, { 0xfc5b, KEY_MUTE },
{ 0xfc, 0x04, KEY_STOP }, { 0xfc04, KEY_STOP },
{ 0xfc, 0x56, KEY_RECORD }, { 0xfc56, KEY_RECORD },
{ 0xfc, 0x57, KEY_POWER }, { 0xfc57, KEY_POWER },
{ 0xfc, 0x41, KEY_UNKNOWN }, /* INPUT */ { 0xfc41, KEY_UNKNOWN }, /* INPUT */
{ 0xfc, 0x00, KEY_UNKNOWN }, /* HD */ { 0xfc00, KEY_UNKNOWN }, /* HD */
}; };
static struct dvb_usb_rc_key d680_dmb_rc_keys[] = { static struct dvb_usb_rc_key d680_dmb_rc_keys[] = {
{ 0x00, 0x38, KEY_UNKNOWN }, /* TV/AV */ { 0x0038, KEY_UNKNOWN }, /* TV/AV */
{ 0x08, 0x0c, KEY_ZOOM }, { 0x080c, KEY_ZOOM },
{ 0x08, 0x00, KEY_0 }, { 0x0800, KEY_0 },
{ 0x00, 0x01, KEY_1 }, { 0x0001, KEY_1 },
{ 0x08, 0x02, KEY_2 }, { 0x0802, KEY_2 },
{ 0x00, 0x03, KEY_3 }, { 0x0003, KEY_3 },
{ 0x08, 0x04, KEY_4 }, { 0x0804, KEY_4 },
{ 0x00, 0x05, KEY_5 }, { 0x0005, KEY_5 },
{ 0x08, 0x06, KEY_6 }, { 0x0806, KEY_6 },
{ 0x00, 0x07, KEY_7 }, { 0x0007, KEY_7 },
{ 0x08, 0x08, KEY_8 }, { 0x0808, KEY_8 },
{ 0x00, 0x09, KEY_9 }, { 0x0009, KEY_9 },
{ 0x00, 0x0a, KEY_MUTE }, { 0x000a, KEY_MUTE },
{ 0x08, 0x29, KEY_BACK }, { 0x0829, KEY_BACK },
{ 0x00, 0x12, KEY_CHANNELUP }, { 0x0012, KEY_CHANNELUP },
{ 0x08, 0x13, KEY_CHANNELDOWN }, { 0x0813, KEY_CHANNELDOWN },
{ 0x00, 0x2b, KEY_VOLUMEUP }, { 0x002b, KEY_VOLUMEUP },
{ 0x08, 0x2c, KEY_VOLUMEDOWN }, { 0x082c, KEY_VOLUMEDOWN },
{ 0x00, 0x20, KEY_UP }, { 0x0020, KEY_UP },
{ 0x08, 0x21, KEY_DOWN }, { 0x0821, KEY_DOWN },
{ 0x00, 0x11, KEY_LEFT }, { 0x0011, KEY_LEFT },
{ 0x08, 0x10, KEY_RIGHT }, { 0x0810, KEY_RIGHT },
{ 0x00, 0x0d, KEY_OK }, { 0x000d, KEY_OK },
{ 0x08, 0x1f, KEY_RECORD }, { 0x081f, KEY_RECORD },
{ 0x00, 0x17, KEY_PLAYPAUSE }, { 0x0017, KEY_PLAYPAUSE },
{ 0x08, 0x16, KEY_PLAYPAUSE }, { 0x0816, KEY_PLAYPAUSE },
{ 0x00, 0x0b, KEY_STOP }, { 0x000b, KEY_STOP },
{ 0x08, 0x27, KEY_FASTFORWARD }, { 0x0827, KEY_FASTFORWARD },
{ 0x00, 0x26, KEY_REWIND }, { 0x0026, KEY_REWIND },
{ 0x08, 0x1e, KEY_UNKNOWN }, /* Time Shift */ { 0x081e, KEY_UNKNOWN }, /* Time Shift */
{ 0x00, 0x0e, KEY_UNKNOWN }, /* Snapshot */ { 0x000e, KEY_UNKNOWN }, /* Snapshot */
{ 0x08, 0x2d, KEY_UNKNOWN }, /* Mouse Cursor */ { 0x082d, KEY_UNKNOWN }, /* Mouse Cursor */
{ 0x00, 0x0f, KEY_UNKNOWN }, /* Minimize/Maximize */ { 0x000f, KEY_UNKNOWN }, /* Minimize/Maximize */
{ 0x08, 0x14, KEY_UNKNOWN }, /* Shuffle */ { 0x0814, KEY_UNKNOWN }, /* Shuffle */
{ 0x00, 0x25, KEY_POWER }, { 0x0025, KEY_POWER },
}; };
static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) static int cxusb_dee1601_demod_init(struct dvb_frontend* fe)
......
This diff is collapsed.
...@@ -318,132 +318,132 @@ EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach); ...@@ -318,132 +318,132 @@ EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach);
*/ */
struct dvb_usb_rc_key dibusb_rc_keys[] = { struct dvb_usb_rc_key dibusb_rc_keys[] = {
/* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */ /* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */
{ 0x00, 0x16, KEY_POWER }, { 0x0016, KEY_POWER },
{ 0x00, 0x10, KEY_MUTE }, { 0x0010, KEY_MUTE },
{ 0x00, 0x03, KEY_1 }, { 0x0003, KEY_1 },
{ 0x00, 0x01, KEY_2 }, { 0x0001, KEY_2 },
{ 0x00, 0x06, KEY_3 }, { 0x0006, KEY_3 },
{ 0x00, 0x09, KEY_4 }, { 0x0009, KEY_4 },
{ 0x00, 0x1d, KEY_5 }, { 0x001d, KEY_5 },
{ 0x00, 0x1f, KEY_6 }, { 0x001f, KEY_6 },
{ 0x00, 0x0d, KEY_7 }, { 0x000d, KEY_7 },
{ 0x00, 0x19, KEY_8 }, { 0x0019, KEY_8 },
{ 0x00, 0x1b, KEY_9 }, { 0x001b, KEY_9 },
{ 0x00, 0x15, KEY_0 }, { 0x0015, KEY_0 },
{ 0x00, 0x05, KEY_CHANNELUP }, { 0x0005, KEY_CHANNELUP },
{ 0x00, 0x02, KEY_CHANNELDOWN }, { 0x0002, KEY_CHANNELDOWN },
{ 0x00, 0x1e, KEY_VOLUMEUP }, { 0x001e, KEY_VOLUMEUP },
{ 0x00, 0x0a, KEY_VOLUMEDOWN }, { 0x000a, KEY_VOLUMEDOWN },
{ 0x00, 0x11, KEY_RECORD }, { 0x0011, KEY_RECORD },
{ 0x00, 0x17, KEY_FAVORITES }, /* Heart symbol - Channel list. */ { 0x0017, KEY_FAVORITES }, /* Heart symbol - Channel list. */
{ 0x00, 0x14, KEY_PLAY }, { 0x0014, KEY_PLAY },
{ 0x00, 0x1a, KEY_STOP }, { 0x001a, KEY_STOP },
{ 0x00, 0x40, KEY_REWIND }, { 0x0040, KEY_REWIND },
{ 0x00, 0x12, KEY_FASTFORWARD }, { 0x0012, KEY_FASTFORWARD },
{ 0x00, 0x0e, KEY_PREVIOUS }, /* Recall - Previous channel. */ { 0x000e, KEY_PREVIOUS }, /* Recall - Previous channel. */
{ 0x00, 0x4c, KEY_PAUSE }, { 0x004c, KEY_PAUSE },
{ 0x00, 0x4d, KEY_SCREEN }, /* Full screen mode. */ { 0x004d, KEY_SCREEN }, /* Full screen mode. */
{ 0x00, 0x54, KEY_AUDIO }, /* MTS - Switch to secondary audio. */ { 0x0054, KEY_AUDIO }, /* MTS - Switch to secondary audio. */
/* additional keys TwinHan VisionPlus, the Artec seemingly not have */ /* additional keys TwinHan VisionPlus, the Artec seemingly not have */
{ 0x00, 0x0c, KEY_CANCEL }, /* Cancel */ { 0x000c, KEY_CANCEL }, /* Cancel */
{ 0x00, 0x1c, KEY_EPG }, /* EPG */ { 0x001c, KEY_EPG }, /* EPG */
{ 0x00, 0x00, KEY_TAB }, /* Tab */ { 0x0000, KEY_TAB }, /* Tab */
{ 0x00, 0x48, KEY_INFO }, /* Preview */ { 0x0048, KEY_INFO }, /* Preview */
{ 0x00, 0x04, KEY_LIST }, /* RecordList */ { 0x0004, KEY_LIST }, /* RecordList */
{ 0x00, 0x0f, KEY_TEXT }, /* Teletext */ { 0x000f, KEY_TEXT }, /* Teletext */
/* Key codes for the KWorld/ADSTech/JetWay remote. */ /* Key codes for the KWorld/ADSTech/JetWay remote. */
{ 0x86, 0x12, KEY_POWER }, { 0x8612, KEY_POWER },
{ 0x86, 0x0f, KEY_SELECT }, /* source */ { 0x860f, KEY_SELECT }, /* source */
{ 0x86, 0x0c, KEY_UNKNOWN }, /* scan */ { 0x860c, KEY_UNKNOWN }, /* scan */
{ 0x86, 0x0b, KEY_EPG }, { 0x860b, KEY_EPG },
{ 0x86, 0x10, KEY_MUTE }, { 0x8610, KEY_MUTE },
{ 0x86, 0x01, KEY_1 }, { 0x8601, KEY_1 },
{ 0x86, 0x02, KEY_2 }, { 0x8602, KEY_2 },
{ 0x86, 0x03, KEY_3 }, { 0x8603, KEY_3 },
{ 0x86, 0x04, KEY_4 }, { 0x8604, KEY_4 },
{ 0x86, 0x05, KEY_5 }, { 0x8605, KEY_5 },
{ 0x86, 0x06, KEY_6 }, { 0x8606, KEY_6 },
{ 0x86, 0x07, KEY_7 }, { 0x8607, KEY_7 },
{ 0x86, 0x08, KEY_8 }, { 0x8608, KEY_8 },
{ 0x86, 0x09, KEY_9 }, { 0x8609, KEY_9 },
{ 0x86, 0x0a, KEY_0 }, { 0x860a, KEY_0 },
{ 0x86, 0x18, KEY_ZOOM }, { 0x8618, KEY_ZOOM },
{ 0x86, 0x1c, KEY_UNKNOWN }, /* preview */ { 0x861c, KEY_UNKNOWN }, /* preview */
{ 0x86, 0x13, KEY_UNKNOWN }, /* snap */ { 0x8613, KEY_UNKNOWN }, /* snap */
{ 0x86, 0x00, KEY_UNDO }, { 0x8600, KEY_UNDO },
{ 0x86, 0x1d, KEY_RECORD }, { 0x861d, KEY_RECORD },
{ 0x86, 0x0d, KEY_STOP }, { 0x860d, KEY_STOP },
{ 0x86, 0x0e, KEY_PAUSE }, { 0x860e, KEY_PAUSE },
{ 0x86, 0x16, KEY_PLAY }, { 0x8616, KEY_PLAY },
{ 0x86, 0x11, KEY_BACK }, { 0x8611, KEY_BACK },
{ 0x86, 0x19, KEY_FORWARD }, { 0x8619, KEY_FORWARD },
{ 0x86, 0x14, KEY_UNKNOWN }, /* pip */ { 0x8614, KEY_UNKNOWN }, /* pip */
{ 0x86, 0x15, KEY_ESC }, { 0x8615, KEY_ESC },
{ 0x86, 0x1a, KEY_UP }, { 0x861a, KEY_UP },
{ 0x86, 0x1e, KEY_DOWN }, { 0x861e, KEY_DOWN },
{ 0x86, 0x1f, KEY_LEFT }, { 0x861f, KEY_LEFT },
{ 0x86, 0x1b, KEY_RIGHT }, { 0x861b, KEY_RIGHT },
/* Key codes for the DiBcom MOD3000 remote. */ /* Key codes for the DiBcom MOD3000 remote. */
{ 0x80, 0x00, KEY_MUTE }, { 0x8000, KEY_MUTE },
{ 0x80, 0x01, KEY_TEXT }, { 0x8001, KEY_TEXT },
{ 0x80, 0x02, KEY_HOME }, { 0x8002, KEY_HOME },
{ 0x80, 0x03, KEY_POWER }, { 0x8003, KEY_POWER },
{ 0x80, 0x04, KEY_RED }, { 0x8004, KEY_RED },
{ 0x80, 0x05, KEY_GREEN }, { 0x8005, KEY_GREEN },
{ 0x80, 0x06, KEY_YELLOW }, { 0x8006, KEY_YELLOW },
{ 0x80, 0x07, KEY_BLUE }, { 0x8007, KEY_BLUE },
{ 0x80, 0x08, KEY_DVD }, { 0x8008, KEY_DVD },
{ 0x80, 0x09, KEY_AUDIO }, { 0x8009, KEY_AUDIO },
{ 0x80, 0x0a, KEY_MEDIA }, /* Pictures */ { 0x800a, KEY_MEDIA }, /* Pictures */
{ 0x80, 0x0b, KEY_VIDEO }, { 0x800b, KEY_VIDEO },
{ 0x80, 0x0c, KEY_BACK }, { 0x800c, KEY_BACK },
{ 0x80, 0x0d, KEY_UP }, { 0x800d, KEY_UP },
{ 0x80, 0x0e, KEY_RADIO }, { 0x800e, KEY_RADIO },
{ 0x80, 0x0f, KEY_EPG }, { 0x800f, KEY_EPG },
{ 0x80, 0x10, KEY_LEFT }, { 0x8010, KEY_LEFT },
{ 0x80, 0x11, KEY_OK }, { 0x8011, KEY_OK },
{ 0x80, 0x12, KEY_RIGHT }, { 0x8012, KEY_RIGHT },
{ 0x80, 0x13, KEY_UNKNOWN }, /* SAP */ { 0x8013, KEY_UNKNOWN }, /* SAP */
{ 0x80, 0x14, KEY_TV }, { 0x8014, KEY_TV },
{ 0x80, 0x15, KEY_DOWN }, { 0x8015, KEY_DOWN },
{ 0x80, 0x16, KEY_MENU }, /* DVD Menu */ { 0x8016, KEY_MENU }, /* DVD Menu */
{ 0x80, 0x17, KEY_LAST }, { 0x8017, KEY_LAST },
{ 0x80, 0x18, KEY_RECORD }, { 0x8018, KEY_RECORD },
{ 0x80, 0x19, KEY_STOP }, { 0x8019, KEY_STOP },
{ 0x80, 0x1a, KEY_PAUSE }, { 0x801a, KEY_PAUSE },
{ 0x80, 0x1b, KEY_PLAY }, { 0x801b, KEY_PLAY },
{ 0x80, 0x1c, KEY_PREVIOUS }, { 0x801c, KEY_PREVIOUS },
{ 0x80, 0x1d, KEY_REWIND }, { 0x801d, KEY_REWIND },
{ 0x80, 0x1e, KEY_FASTFORWARD }, { 0x801e, KEY_FASTFORWARD },
{ 0x80, 0x1f, KEY_NEXT}, { 0x801f, KEY_NEXT},
{ 0x80, 0x40, KEY_1 }, { 0x8040, KEY_1 },
{ 0x80, 0x41, KEY_2 }, { 0x8041, KEY_2 },
{ 0x80, 0x42, KEY_3 }, { 0x8042, KEY_3 },
{ 0x80, 0x43, KEY_CHANNELUP }, { 0x8043, KEY_CHANNELUP },
{ 0x80, 0x44, KEY_4 }, { 0x8044, KEY_4 },
{ 0x80, 0x45, KEY_5 }, { 0x8045, KEY_5 },
{ 0x80, 0x46, KEY_6 }, { 0x8046, KEY_6 },
{ 0x80, 0x47, KEY_CHANNELDOWN }, { 0x8047, KEY_CHANNELDOWN },
{ 0x80, 0x48, KEY_7 }, { 0x8048, KEY_7 },
{ 0x80, 0x49, KEY_8 }, { 0x8049, KEY_8 },
{ 0x80, 0x4a, KEY_9 }, { 0x804a, KEY_9 },
{ 0x80, 0x4b, KEY_VOLUMEUP }, { 0x804b, KEY_VOLUMEUP },
{ 0x80, 0x4c, KEY_CLEAR }, { 0x804c, KEY_CLEAR },
{ 0x80, 0x4d, KEY_0 }, { 0x804d, KEY_0 },
{ 0x80, 0x4e, KEY_ENTER }, { 0x804e, KEY_ENTER },
{ 0x80, 0x4f, KEY_VOLUMEDOWN }, { 0x804f, KEY_VOLUMEDOWN },
}; };
EXPORT_SYMBOL(dibusb_rc_keys); EXPORT_SYMBOL(dibusb_rc_keys);
......
...@@ -162,61 +162,61 @@ static int digitv_tuner_attach(struct dvb_usb_adapter *adap) ...@@ -162,61 +162,61 @@ static int digitv_tuner_attach(struct dvb_usb_adapter *adap)
} }
static struct dvb_usb_rc_key digitv_rc_keys[] = { static struct dvb_usb_rc_key digitv_rc_keys[] = {
{ 0x5f, 0x55, KEY_0 }, { 0x5f55, KEY_0 },
{ 0x6f, 0x55, KEY_1 }, { 0x6f55, KEY_1 },
{ 0x9f, 0x55, KEY_2 }, { 0x9f55, KEY_2 },
{ 0xaf, 0x55, KEY_3 }, { 0xaf55, KEY_3 },
{ 0x5f, 0x56, KEY_4 }, { 0x5f56, KEY_4 },
{ 0x6f, 0x56, KEY_5 }, { 0x6f56, KEY_5 },
{ 0x9f, 0x56, KEY_6 }, { 0x9f56, KEY_6 },
{ 0xaf, 0x56, KEY_7 }, { 0xaf56, KEY_7 },
{ 0x5f, 0x59, KEY_8 }, { 0x5f59, KEY_8 },
{ 0x6f, 0x59, KEY_9 }, { 0x6f59, KEY_9 },
{ 0x9f, 0x59, KEY_TV }, { 0x9f59, KEY_TV },
{ 0xaf, 0x59, KEY_AUX }, { 0xaf59, KEY_AUX },
{ 0x5f, 0x5a, KEY_DVD }, { 0x5f5a, KEY_DVD },
{ 0x6f, 0x5a, KEY_POWER }, { 0x6f5a, KEY_POWER },
{ 0x9f, 0x5a, KEY_MHP }, /* labelled 'Picture' */ { 0x9f5a, KEY_MHP }, /* labelled 'Picture' */
{ 0xaf, 0x5a, KEY_AUDIO }, { 0xaf5a, KEY_AUDIO },
{ 0x5f, 0x65, KEY_INFO }, { 0x5f65, KEY_INFO },
{ 0x6f, 0x65, KEY_F13 }, /* 16:9 */ { 0x6f65, KEY_F13 }, /* 16:9 */
{ 0x9f, 0x65, KEY_F14 }, /* 14:9 */ { 0x9f65, KEY_F14 }, /* 14:9 */
{ 0xaf, 0x65, KEY_EPG }, { 0xaf65, KEY_EPG },
{ 0x5f, 0x66, KEY_EXIT }, { 0x5f66, KEY_EXIT },
{ 0x6f, 0x66, KEY_MENU }, { 0x6f66, KEY_MENU },
{ 0x9f, 0x66, KEY_UP }, { 0x9f66, KEY_UP },
{ 0xaf, 0x66, KEY_DOWN }, { 0xaf66, KEY_DOWN },
{ 0x5f, 0x69, KEY_LEFT }, { 0x5f69, KEY_LEFT },
{ 0x6f, 0x69, KEY_RIGHT }, { 0x6f69, KEY_RIGHT },
{ 0x9f, 0x69, KEY_ENTER }, { 0x9f69, KEY_ENTER },
{ 0xaf, 0x69, KEY_CHANNELUP }, { 0xaf69, KEY_CHANNELUP },
{ 0x5f, 0x6a, KEY_CHANNELDOWN }, { 0x5f6a, KEY_CHANNELDOWN },
{ 0x6f, 0x6a, KEY_VOLUMEUP }, { 0x6f6a, KEY_VOLUMEUP },
{ 0x9f, 0x6a, KEY_VOLUMEDOWN }, { 0x9f6a, KEY_VOLUMEDOWN },
{ 0xaf, 0x6a, KEY_RED }, { 0xaf6a, KEY_RED },
{ 0x5f, 0x95, KEY_GREEN }, { 0x5f95, KEY_GREEN },
{ 0x6f, 0x95, KEY_YELLOW }, { 0x6f95, KEY_YELLOW },
{ 0x9f, 0x95, KEY_BLUE }, { 0x9f95, KEY_BLUE },
{ 0xaf, 0x95, KEY_SUBTITLE }, { 0xaf95, KEY_SUBTITLE },
{ 0x5f, 0x96, KEY_F15 }, /* AD */ { 0x5f96, KEY_F15 }, /* AD */
{ 0x6f, 0x96, KEY_TEXT }, { 0x6f96, KEY_TEXT },
{ 0x9f, 0x96, KEY_MUTE }, { 0x9f96, KEY_MUTE },
{ 0xaf, 0x96, KEY_REWIND }, { 0xaf96, KEY_REWIND },
{ 0x5f, 0x99, KEY_STOP }, { 0x5f99, KEY_STOP },
{ 0x6f, 0x99, KEY_PLAY }, { 0x6f99, KEY_PLAY },
{ 0x9f, 0x99, KEY_FASTFORWARD }, { 0x9f99, KEY_FASTFORWARD },
{ 0xaf, 0x99, KEY_F16 }, /* chapter */ { 0xaf99, KEY_F16 }, /* chapter */
{ 0x5f, 0x9a, KEY_PAUSE }, { 0x5f9a, KEY_PAUSE },
{ 0x6f, 0x9a, KEY_PLAY }, { 0x6f9a, KEY_PLAY },
{ 0x9f, 0x9a, KEY_RECORD }, { 0x9f9a, KEY_RECORD },
{ 0xaf, 0x9a, KEY_F17 }, /* picture in picture */ { 0xaf9a, KEY_F17 }, /* picture in picture */
{ 0x5f, 0xa5, KEY_KPPLUS }, /* zoom in */ { 0x5fa5, KEY_KPPLUS }, /* zoom in */
{ 0x6f, 0xa5, KEY_KPMINUS }, /* zoom out */ { 0x6fa5, KEY_KPMINUS }, /* zoom out */
{ 0x9f, 0xa5, KEY_F18 }, /* capture */ { 0x9fa5, KEY_F18 }, /* capture */
{ 0xaf, 0xa5, KEY_F19 }, /* web */ { 0xafa5, KEY_F19 }, /* web */
{ 0x5f, 0xa6, KEY_EMAIL }, { 0x5fa6, KEY_EMAIL },
{ 0x6f, 0xa6, KEY_PHONE }, { 0x6fa6, KEY_PHONE },
{ 0x9f, 0xa6, KEY_PC }, { 0x9fa6, KEY_PC },
}; };
static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state) static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
...@@ -238,8 +238,8 @@ static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -238,8 +238,8 @@ static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
if (key[1] != 0) if (key[1] != 0)
{ {
for (i = 0; i < d->props.rc_key_map_size; i++) { for (i = 0; i < d->props.rc_key_map_size; i++) {
if (d->props.rc_key_map[i].custom == key[1] && if (rc5_custom(&d->props.rc_key_map[i]) == key[1] &&
d->props.rc_key_map[i].data == key[2]) { rc5_data(&d->props.rc_key_map[i]) == key[2]) {
*event = d->props.rc_key_map[i].event; *event = d->props.rc_key_map[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
return 0; return 0;
......
...@@ -58,24 +58,24 @@ static int dtt200u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, ...@@ -58,24 +58,24 @@ static int dtt200u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid,
/* remote control */ /* remote control */
/* key list for the tiny remote control (Yakumo, don't know about the others) */ /* key list for the tiny remote control (Yakumo, don't know about the others) */
static struct dvb_usb_rc_key dtt200u_rc_keys[] = { static struct dvb_usb_rc_key dtt200u_rc_keys[] = {
{ 0x80, 0x01, KEY_MUTE }, { 0x8001, KEY_MUTE },
{ 0x80, 0x02, KEY_CHANNELDOWN }, { 0x8002, KEY_CHANNELDOWN },
{ 0x80, 0x03, KEY_VOLUMEDOWN }, { 0x8003, KEY_VOLUMEDOWN },
{ 0x80, 0x04, KEY_1 }, { 0x8004, KEY_1 },
{ 0x80, 0x05, KEY_2 }, { 0x8005, KEY_2 },
{ 0x80, 0x06, KEY_3 }, { 0x8006, KEY_3 },
{ 0x80, 0x07, KEY_4 }, { 0x8007, KEY_4 },
{ 0x80, 0x08, KEY_5 }, { 0x8008, KEY_5 },
{ 0x80, 0x09, KEY_6 }, { 0x8009, KEY_6 },
{ 0x80, 0x0a, KEY_7 }, { 0x800a, KEY_7 },
{ 0x80, 0x0c, KEY_ZOOM }, { 0x800c, KEY_ZOOM },
{ 0x80, 0x0d, KEY_0 }, { 0x800d, KEY_0 },
{ 0x80, 0x0e, KEY_SELECT }, { 0x800e, KEY_SELECT },
{ 0x80, 0x12, KEY_POWER }, { 0x8012, KEY_POWER },
{ 0x80, 0x1a, KEY_CHANNELUP }, { 0x801a, KEY_CHANNELUP },
{ 0x80, 0x1b, KEY_8 }, { 0x801b, KEY_8 },
{ 0x80, 0x1e, KEY_VOLUMEUP }, { 0x801e, KEY_VOLUMEUP },
{ 0x80, 0x1f, KEY_9 }, { 0x801f, KEY_9 },
}; };
static int dtt200u_rc_query(struct dvb_usb_device *d, u32 *event, int *state) static int dtt200u_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
......
...@@ -178,8 +178,8 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, ...@@ -178,8 +178,8 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
} }
/* See if we can match the raw key code. */ /* See if we can match the raw key code. */
for (i = 0; i < d->props.rc_key_map_size; i++) for (i = 0; i < d->props.rc_key_map_size; i++)
if (keymap[i].custom == keybuf[1] && if (rc5_custom(&keymap[i]) == keybuf[1] &&
keymap[i].data == keybuf[3]) { rc5_data(&keymap[i]) == keybuf[3]) {
*event = keymap[i].event; *event = keymap[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
return 0; return 0;
......
...@@ -81,10 +81,25 @@ struct dvb_usb_device_description { ...@@ -81,10 +81,25 @@ struct dvb_usb_device_description {
* @event: the input event assigned to key identified by custom and data * @event: the input event assigned to key identified by custom and data
*/ */
struct dvb_usb_rc_key { struct dvb_usb_rc_key {
u8 custom,data; u16 scan;
u32 event; u32 event;
}; };
static inline u8 rc5_custom(struct dvb_usb_rc_key *key)
{
return (key->scan >> 8) & 0xff;
}
static inline u8 rc5_data(struct dvb_usb_rc_key *key)
{
return key->scan & 0xff;
}
static inline u8 rc5_scan(struct dvb_usb_rc_key *key)
{
return key->scan & 0xffff;
}
struct dvb_usb_device; struct dvb_usb_device;
struct dvb_usb_adapter; struct dvb_usb_adapter;
struct usb_data_stream; struct usb_data_stream;
......
...@@ -749,122 +749,122 @@ static int s630_zl10039_tuner_attach(struct dvb_usb_adapter *adap) ...@@ -749,122 +749,122 @@ static int s630_zl10039_tuner_attach(struct dvb_usb_adapter *adap)
} }
static struct dvb_usb_rc_key dw210x_rc_keys[] = { static struct dvb_usb_rc_key dw210x_rc_keys[] = {
{ 0xf8, 0x0a, KEY_Q }, /*power*/ { 0xf80a, KEY_Q }, /*power*/
{ 0xf8, 0x0c, KEY_M }, /*mute*/ { 0xf80c, KEY_M }, /*mute*/
{ 0xf8, 0x11, KEY_1 }, { 0xf811, KEY_1 },
{ 0xf8, 0x12, KEY_2 }, { 0xf812, KEY_2 },
{ 0xf8, 0x13, KEY_3 }, { 0xf813, KEY_3 },
{ 0xf8, 0x14, KEY_4 }, { 0xf814, KEY_4 },
{ 0xf8, 0x15, KEY_5 }, { 0xf815, KEY_5 },
{ 0xf8, 0x16, KEY_6 }, { 0xf816, KEY_6 },
{ 0xf8, 0x17, KEY_7 }, { 0xf817, KEY_7 },
{ 0xf8, 0x18, KEY_8 }, { 0xf818, KEY_8 },
{ 0xf8, 0x19, KEY_9 }, { 0xf819, KEY_9 },
{ 0xf8, 0x10, KEY_0 }, { 0xf810, KEY_0 },
{ 0xf8, 0x1c, KEY_PAGEUP }, /*ch+*/ { 0xf81c, KEY_PAGEUP }, /*ch+*/
{ 0xf8, 0x0f, KEY_PAGEDOWN }, /*ch-*/ { 0xf80f, KEY_PAGEDOWN }, /*ch-*/
{ 0xf8, 0x1a, KEY_O }, /*vol+*/ { 0xf81a, KEY_O }, /*vol+*/
{ 0xf8, 0x0e, KEY_Z }, /*vol-*/ { 0xf80e, KEY_Z }, /*vol-*/
{ 0xf8, 0x04, KEY_R }, /*rec*/ { 0xf804, KEY_R }, /*rec*/
{ 0xf8, 0x09, KEY_D }, /*fav*/ { 0xf809, KEY_D }, /*fav*/
{ 0xf8, 0x08, KEY_BACKSPACE }, /*rewind*/ { 0xf808, KEY_BACKSPACE }, /*rewind*/
{ 0xf8, 0x07, KEY_A }, /*fast*/ { 0xf807, KEY_A }, /*fast*/
{ 0xf8, 0x0b, KEY_P }, /*pause*/ { 0xf80b, KEY_P }, /*pause*/
{ 0xf8, 0x02, KEY_ESC }, /*cancel*/ { 0xf802, KEY_ESC }, /*cancel*/
{ 0xf8, 0x03, KEY_G }, /*tab*/ { 0xf803, KEY_G }, /*tab*/
{ 0xf8, 0x00, KEY_UP }, /*up*/ { 0xf800, KEY_UP }, /*up*/
{ 0xf8, 0x1f, KEY_ENTER }, /*ok*/ { 0xf81f, KEY_ENTER }, /*ok*/
{ 0xf8, 0x01, KEY_DOWN }, /*down*/ { 0xf801, KEY_DOWN }, /*down*/
{ 0xf8, 0x05, KEY_C }, /*cap*/ { 0xf805, KEY_C }, /*cap*/
{ 0xf8, 0x06, KEY_S }, /*stop*/ { 0xf806, KEY_S }, /*stop*/
{ 0xf8, 0x40, KEY_F }, /*full*/ { 0xf840, KEY_F }, /*full*/
{ 0xf8, 0x1e, KEY_W }, /*tvmode*/ { 0xf81e, KEY_W }, /*tvmode*/
{ 0xf8, 0x1b, KEY_B }, /*recall*/ { 0xf81b, KEY_B }, /*recall*/
}; };
static struct dvb_usb_rc_key tevii_rc_keys[] = { static struct dvb_usb_rc_key tevii_rc_keys[] = {
{ 0xf8, 0x0a, KEY_POWER }, { 0xf80a, KEY_POWER },
{ 0xf8, 0x0c, KEY_MUTE }, { 0xf80c, KEY_MUTE },
{ 0xf8, 0x11, KEY_1 }, { 0xf811, KEY_1 },
{ 0xf8, 0x12, KEY_2 }, { 0xf812, KEY_2 },
{ 0xf8, 0x13, KEY_3 }, { 0xf813, KEY_3 },
{ 0xf8, 0x14, KEY_4 }, { 0xf814, KEY_4 },
{ 0xf8, 0x15, KEY_5 }, { 0xf815, KEY_5 },
{ 0xf8, 0x16, KEY_6 }, { 0xf816, KEY_6 },
{ 0xf8, 0x17, KEY_7 }, { 0xf817, KEY_7 },
{ 0xf8, 0x18, KEY_8 }, { 0xf818, KEY_8 },
{ 0xf8, 0x19, KEY_9 }, { 0xf819, KEY_9 },
{ 0xf8, 0x10, KEY_0 }, { 0xf810, KEY_0 },
{ 0xf8, 0x1c, KEY_MENU }, { 0xf81c, KEY_MENU },
{ 0xf8, 0x0f, KEY_VOLUMEDOWN }, { 0xf80f, KEY_VOLUMEDOWN },
{ 0xf8, 0x1a, KEY_LAST }, { 0xf81a, KEY_LAST },
{ 0xf8, 0x0e, KEY_OPEN }, { 0xf80e, KEY_OPEN },
{ 0xf8, 0x04, KEY_RECORD }, { 0xf804, KEY_RECORD },
{ 0xf8, 0x09, KEY_VOLUMEUP }, { 0xf809, KEY_VOLUMEUP },
{ 0xf8, 0x08, KEY_CHANNELUP }, { 0xf808, KEY_CHANNELUP },
{ 0xf8, 0x07, KEY_PVR }, { 0xf807, KEY_PVR },
{ 0xf8, 0x0b, KEY_TIME }, { 0xf80b, KEY_TIME },
{ 0xf8, 0x02, KEY_RIGHT }, { 0xf802, KEY_RIGHT },
{ 0xf8, 0x03, KEY_LEFT }, { 0xf803, KEY_LEFT },
{ 0xf8, 0x00, KEY_UP }, { 0xf800, KEY_UP },
{ 0xf8, 0x1f, KEY_OK }, { 0xf81f, KEY_OK },
{ 0xf8, 0x01, KEY_DOWN }, { 0xf801, KEY_DOWN },
{ 0xf8, 0x05, KEY_TUNER }, { 0xf805, KEY_TUNER },
{ 0xf8, 0x06, KEY_CHANNELDOWN }, { 0xf806, KEY_CHANNELDOWN },
{ 0xf8, 0x40, KEY_PLAYPAUSE }, { 0xf840, KEY_PLAYPAUSE },
{ 0xf8, 0x1e, KEY_REWIND }, { 0xf81e, KEY_REWIND },
{ 0xf8, 0x1b, KEY_FAVORITES }, { 0xf81b, KEY_FAVORITES },
{ 0xf8, 0x1d, KEY_BACK }, { 0xf81d, KEY_BACK },
{ 0xf8, 0x4d, KEY_FASTFORWARD }, { 0xf84d, KEY_FASTFORWARD },
{ 0xf8, 0x44, KEY_EPG }, { 0xf844, KEY_EPG },
{ 0xf8, 0x4c, KEY_INFO }, { 0xf84c, KEY_INFO },
{ 0xf8, 0x41, KEY_AB }, { 0xf841, KEY_AB },
{ 0xf8, 0x43, KEY_AUDIO }, { 0xf843, KEY_AUDIO },
{ 0xf8, 0x45, KEY_SUBTITLE }, { 0xf845, KEY_SUBTITLE },
{ 0xf8, 0x4a, KEY_LIST }, { 0xf84a, KEY_LIST },
{ 0xf8, 0x46, KEY_F1 }, { 0xf846, KEY_F1 },
{ 0xf8, 0x47, KEY_F2 }, { 0xf847, KEY_F2 },
{ 0xf8, 0x5e, KEY_F3 }, { 0xf85e, KEY_F3 },
{ 0xf8, 0x5c, KEY_F4 }, { 0xf85c, KEY_F4 },
{ 0xf8, 0x52, KEY_F5 }, { 0xf852, KEY_F5 },
{ 0xf8, 0x5a, KEY_F6 }, { 0xf85a, KEY_F6 },
{ 0xf8, 0x56, KEY_MODE }, { 0xf856, KEY_MODE },
{ 0xf8, 0x58, KEY_SWITCHVIDEOMODE }, { 0xf858, KEY_SWITCHVIDEOMODE },
}; };
static struct dvb_usb_rc_key tbs_rc_keys[] = { static struct dvb_usb_rc_key tbs_rc_keys[] = {
{ 0xf8, 0x84, KEY_POWER }, { 0xf884, KEY_POWER },
{ 0xf8, 0x94, KEY_MUTE }, { 0xf894, KEY_MUTE },
{ 0xf8, 0x87, KEY_1 }, { 0xf887, KEY_1 },
{ 0xf8, 0x86, KEY_2 }, { 0xf886, KEY_2 },
{ 0xf8, 0x85, KEY_3 }, { 0xf885, KEY_3 },
{ 0xf8, 0x8b, KEY_4 }, { 0xf88b, KEY_4 },
{ 0xf8, 0x8a, KEY_5 }, { 0xf88a, KEY_5 },
{ 0xf8, 0x89, KEY_6 }, { 0xf889, KEY_6 },
{ 0xf8, 0x8f, KEY_7 }, { 0xf88f, KEY_7 },
{ 0xf8, 0x8e, KEY_8 }, { 0xf88e, KEY_8 },
{ 0xf8, 0x8d, KEY_9 }, { 0xf88d, KEY_9 },
{ 0xf8, 0x92, KEY_0 }, { 0xf892, KEY_0 },
{ 0xf8, 0x96, KEY_CHANNELUP }, { 0xf896, KEY_CHANNELUP },
{ 0xf8, 0x91, KEY_CHANNELDOWN }, { 0xf891, KEY_CHANNELDOWN },
{ 0xf8, 0x93, KEY_VOLUMEUP }, { 0xf893, KEY_VOLUMEUP },
{ 0xf8, 0x8c, KEY_VOLUMEDOWN }, { 0xf88c, KEY_VOLUMEDOWN },
{ 0xf8, 0x83, KEY_RECORD }, { 0xf883, KEY_RECORD },
{ 0xf8, 0x98, KEY_PAUSE }, { 0xf898, KEY_PAUSE },
{ 0xf8, 0x99, KEY_OK }, { 0xf899, KEY_OK },
{ 0xf8, 0x9a, KEY_SHUFFLE }, { 0xf89a, KEY_SHUFFLE },
{ 0xf8, 0x81, KEY_UP }, { 0xf881, KEY_UP },
{ 0xf8, 0x90, KEY_LEFT }, { 0xf890, KEY_LEFT },
{ 0xf8, 0x82, KEY_RIGHT }, { 0xf882, KEY_RIGHT },
{ 0xf8, 0x88, KEY_DOWN }, { 0xf888, KEY_DOWN },
{ 0xf8, 0x95, KEY_FAVORITES }, { 0xf895, KEY_FAVORITES },
{ 0xf8, 0x97, KEY_SUBTITLE }, { 0xf897, KEY_SUBTITLE },
{ 0xf8, 0x9d, KEY_ZOOM }, { 0xf89d, KEY_ZOOM },
{ 0xf8, 0x9f, KEY_EXIT }, { 0xf89f, KEY_EXIT },
{ 0xf8, 0x9e, KEY_MENU }, { 0xf89e, KEY_MENU },
{ 0xf8, 0x9c, KEY_EPG }, { 0xf89c, KEY_EPG },
{ 0xf8, 0x80, KEY_PREVIOUS }, { 0xf880, KEY_PREVIOUS },
{ 0xf8, 0x9b, KEY_MODE } { 0xf89b, KEY_MODE }
}; };
static struct dvb_usb_rc_keys_table keys_tables[] = { static struct dvb_usb_rc_keys_table keys_tables[] = {
...@@ -894,7 +894,7 @@ static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -894,7 +894,7 @@ static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
*state = REMOTE_NO_KEY_PRESSED; *state = REMOTE_NO_KEY_PRESSED;
if (d->props.i2c_algo->master_xfer(&d->i2c_adap, &msg, 1) == 1) { if (d->props.i2c_algo->master_xfer(&d->i2c_adap, &msg, 1) == 1) {
for (i = 0; i < keymap_size ; i++) { for (i = 0; i < keymap_size ; i++) {
if (keymap[i].data == msg.buf[0]) { if (rc5_data(&keymap[i]) == msg.buf[0]) {
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
*event = keymap[i].event; *event = keymap[i].event;
break; break;
......
...@@ -140,7 +140,7 @@ static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -140,7 +140,7 @@ static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
goto unlock; goto unlock;
for (i = 0; i < d->props.rc_key_map_size; i++) for (i = 0; i < d->props.rc_key_map_size; i++)
if (d->props.rc_key_map[i].data == rc_state[1]) { if (rc5_data(&d->props.rc_key_map[i]) == rc_state[1]) {
*event = d->props.rc_key_map[i].event; *event = d->props.rc_key_map[i].event;
switch(rc_state[0]) { switch(rc_state[0]) {
...@@ -562,42 +562,42 @@ static struct m920x_inits tvwalkertwin_rc_init [] = { ...@@ -562,42 +562,42 @@ static struct m920x_inits tvwalkertwin_rc_init [] = {
/* ir keymaps */ /* ir keymaps */
static struct dvb_usb_rc_key megasky_rc_keys [] = { static struct dvb_usb_rc_key megasky_rc_keys [] = {
{ 0x0, 0x12, KEY_POWER }, { 0x0012, KEY_POWER },
{ 0x0, 0x1e, KEY_CYCLEWINDOWS }, /* min/max */ { 0x001e, KEY_CYCLEWINDOWS }, /* min/max */
{ 0x0, 0x02, KEY_CHANNELUP }, { 0x0002, KEY_CHANNELUP },
{ 0x0, 0x05, KEY_CHANNELDOWN }, { 0x0005, KEY_CHANNELDOWN },
{ 0x0, 0x03, KEY_VOLUMEUP }, { 0x0003, KEY_VOLUMEUP },
{ 0x0, 0x06, KEY_VOLUMEDOWN }, { 0x0006, KEY_VOLUMEDOWN },
{ 0x0, 0x04, KEY_MUTE }, { 0x0004, KEY_MUTE },
{ 0x0, 0x07, KEY_OK }, /* TS */ { 0x0007, KEY_OK }, /* TS */
{ 0x0, 0x08, KEY_STOP }, { 0x0008, KEY_STOP },
{ 0x0, 0x09, KEY_MENU }, /* swap */ { 0x0009, KEY_MENU }, /* swap */
{ 0x0, 0x0a, KEY_REWIND }, { 0x000a, KEY_REWIND },
{ 0x0, 0x1b, KEY_PAUSE }, { 0x001b, KEY_PAUSE },
{ 0x0, 0x1f, KEY_FASTFORWARD }, { 0x001f, KEY_FASTFORWARD },
{ 0x0, 0x0c, KEY_RECORD }, { 0x000c, KEY_RECORD },
{ 0x0, 0x0d, KEY_CAMERA }, /* screenshot */ { 0x000d, KEY_CAMERA }, /* screenshot */
{ 0x0, 0x0e, KEY_COFFEE }, /* "MTS" */ { 0x000e, KEY_COFFEE }, /* "MTS" */
}; };
static struct dvb_usb_rc_key tvwalkertwin_rc_keys [] = { static struct dvb_usb_rc_key tvwalkertwin_rc_keys [] = {
{ 0x0, 0x01, KEY_ZOOM }, /* Full Screen */ { 0x0001, KEY_ZOOM }, /* Full Screen */
{ 0x0, 0x02, KEY_CAMERA }, /* snapshot */ { 0x0002, KEY_CAMERA }, /* snapshot */
{ 0x0, 0x03, KEY_MUTE }, { 0x0003, KEY_MUTE },
{ 0x0, 0x04, KEY_REWIND }, { 0x0004, KEY_REWIND },
{ 0x0, 0x05, KEY_PLAYPAUSE }, /* Play/Pause */ { 0x0005, KEY_PLAYPAUSE }, /* Play/Pause */
{ 0x0, 0x06, KEY_FASTFORWARD }, { 0x0006, KEY_FASTFORWARD },
{ 0x0, 0x07, KEY_RECORD }, { 0x0007, KEY_RECORD },
{ 0x0, 0x08, KEY_STOP }, { 0x0008, KEY_STOP },
{ 0x0, 0x09, KEY_TIME }, /* Timeshift */ { 0x0009, KEY_TIME }, /* Timeshift */
{ 0x0, 0x0c, KEY_COFFEE }, /* Recall */ { 0x000c, KEY_COFFEE }, /* Recall */
{ 0x0, 0x0e, KEY_CHANNELUP }, { 0x000e, KEY_CHANNELUP },
{ 0x0, 0x12, KEY_POWER }, { 0x0012, KEY_POWER },
{ 0x0, 0x15, KEY_MENU }, /* source */ { 0x0015, KEY_MENU }, /* source */
{ 0x0, 0x18, KEY_CYCLEWINDOWS }, /* TWIN PIP */ { 0x0018, KEY_CYCLEWINDOWS }, /* TWIN PIP */
{ 0x0, 0x1a, KEY_CHANNELDOWN }, { 0x001a, KEY_CHANNELDOWN },
{ 0x0, 0x1b, KEY_VOLUMEDOWN }, { 0x001b, KEY_VOLUMEDOWN },
{ 0x0, 0x1e, KEY_VOLUMEUP }, { 0x001e, KEY_VOLUMEUP },
}; };
/* DVB USB Driver stuff */ /* DVB USB Driver stuff */
......
...@@ -22,51 +22,51 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); ...@@ -22,51 +22,51 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
/* Hauppauge NOVA-T USB2 keys */ /* Hauppauge NOVA-T USB2 keys */
static struct dvb_usb_rc_key haupp_rc_keys [] = { static struct dvb_usb_rc_key haupp_rc_keys [] = {
{ 0x1e, 0x00, KEY_0 }, { 0x1e00, KEY_0 },
{ 0x1e, 0x01, KEY_1 }, { 0x1e01, KEY_1 },
{ 0x1e, 0x02, KEY_2 }, { 0x1e02, KEY_2 },
{ 0x1e, 0x03, KEY_3 }, { 0x1e03, KEY_3 },
{ 0x1e, 0x04, KEY_4 }, { 0x1e04, KEY_4 },
{ 0x1e, 0x05, KEY_5 }, { 0x1e05, KEY_5 },
{ 0x1e, 0x06, KEY_6 }, { 0x1e06, KEY_6 },
{ 0x1e, 0x07, KEY_7 }, { 0x1e07, KEY_7 },
{ 0x1e, 0x08, KEY_8 }, { 0x1e08, KEY_8 },
{ 0x1e, 0x09, KEY_9 }, { 0x1e09, KEY_9 },
{ 0x1e, 0x0a, KEY_KPASTERISK }, { 0x1e0a, KEY_KPASTERISK },
{ 0x1e, 0x0b, KEY_RED }, { 0x1e0b, KEY_RED },
{ 0x1e, 0x0c, KEY_RADIO }, { 0x1e0c, KEY_RADIO },
{ 0x1e, 0x0d, KEY_MENU }, { 0x1e0d, KEY_MENU },
{ 0x1e, 0x0e, KEY_GRAVE }, /* # */ { 0x1e0e, KEY_GRAVE }, /* # */
{ 0x1e, 0x0f, KEY_MUTE }, { 0x1e0f, KEY_MUTE },
{ 0x1e, 0x10, KEY_VOLUMEUP }, { 0x1e10, KEY_VOLUMEUP },
{ 0x1e, 0x11, KEY_VOLUMEDOWN }, { 0x1e11, KEY_VOLUMEDOWN },
{ 0x1e, 0x12, KEY_CHANNEL }, { 0x1e12, KEY_CHANNEL },
{ 0x1e, 0x14, KEY_UP }, { 0x1e14, KEY_UP },
{ 0x1e, 0x15, KEY_DOWN }, { 0x1e15, KEY_DOWN },
{ 0x1e, 0x16, KEY_LEFT }, { 0x1e16, KEY_LEFT },
{ 0x1e, 0x17, KEY_RIGHT }, { 0x1e17, KEY_RIGHT },
{ 0x1e, 0x18, KEY_VIDEO }, { 0x1e18, KEY_VIDEO },
{ 0x1e, 0x19, KEY_AUDIO }, { 0x1e19, KEY_AUDIO },
{ 0x1e, 0x1a, KEY_MEDIA }, { 0x1e1a, KEY_MEDIA },
{ 0x1e, 0x1b, KEY_EPG }, { 0x1e1b, KEY_EPG },
{ 0x1e, 0x1c, KEY_TV }, { 0x1e1c, KEY_TV },
{ 0x1e, 0x1e, KEY_NEXT }, { 0x1e1e, KEY_NEXT },
{ 0x1e, 0x1f, KEY_BACK }, { 0x1e1f, KEY_BACK },
{ 0x1e, 0x20, KEY_CHANNELUP }, { 0x1e20, KEY_CHANNELUP },
{ 0x1e, 0x21, KEY_CHANNELDOWN }, { 0x1e21, KEY_CHANNELDOWN },
{ 0x1e, 0x24, KEY_LAST }, /* Skip backwards */ { 0x1e24, KEY_LAST }, /* Skip backwards */
{ 0x1e, 0x25, KEY_OK }, { 0x1e25, KEY_OK },
{ 0x1e, 0x29, KEY_BLUE}, { 0x1e29, KEY_BLUE},
{ 0x1e, 0x2e, KEY_GREEN }, { 0x1e2e, KEY_GREEN },
{ 0x1e, 0x30, KEY_PAUSE }, { 0x1e30, KEY_PAUSE },
{ 0x1e, 0x32, KEY_REWIND }, { 0x1e32, KEY_REWIND },
{ 0x1e, 0x34, KEY_FASTFORWARD }, { 0x1e34, KEY_FASTFORWARD },
{ 0x1e, 0x35, KEY_PLAY }, { 0x1e35, KEY_PLAY },
{ 0x1e, 0x36, KEY_STOP }, { 0x1e36, KEY_STOP },
{ 0x1e, 0x37, KEY_RECORD }, { 0x1e37, KEY_RECORD },
{ 0x1e, 0x38, KEY_YELLOW }, { 0x1e38, KEY_YELLOW },
{ 0x1e, 0x3b, KEY_GOTO }, { 0x1e3b, KEY_GOTO },
{ 0x1e, 0x3d, KEY_POWER }, { 0x1e3d, KEY_POWER },
}; };
/* Firmware bug? sometimes, when a new key is pressed, the previous pressed key /* Firmware bug? sometimes, when a new key is pressed, the previous pressed key
...@@ -92,10 +92,11 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -92,10 +92,11 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
deb_rc("raw key code 0x%02x, 0x%02x, 0x%02x to c: %02x d: %02x toggle: %d\n",key[1],key[2],key[3],custom,data,toggle); deb_rc("raw key code 0x%02x, 0x%02x, 0x%02x to c: %02x d: %02x toggle: %d\n",key[1],key[2],key[3],custom,data,toggle);
for (i = 0; i < ARRAY_SIZE(haupp_rc_keys); i++) { for (i = 0; i < ARRAY_SIZE(haupp_rc_keys); i++) {
if (haupp_rc_keys[i].data == data && if (rc5_data(&haupp_rc_keys[i]) == data &&
haupp_rc_keys[i].custom == custom) { rc5_custom(&haupp_rc_keys[i]) == custom) {
deb_rc("c: %x, d: %x\n",haupp_rc_keys[i].data,haupp_rc_keys[i].custom); deb_rc("c: %x, d: %x\n", rc5_data(&haupp_rc_keys[i]),
rc5_custom(&haupp_rc_keys[i]));
*event = haupp_rc_keys[i].event; *event = haupp_rc_keys[i].event;
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
......
...@@ -332,32 +332,32 @@ static int opera1_pid_filter_control(struct dvb_usb_adapter *adap, int onoff) ...@@ -332,32 +332,32 @@ static int opera1_pid_filter_control(struct dvb_usb_adapter *adap, int onoff)
} }
static struct dvb_usb_rc_key opera1_rc_keys[] = { static struct dvb_usb_rc_key opera1_rc_keys[] = {
{0x5f, 0xa0, KEY_1}, {0x5fa0, KEY_1},
{0x51, 0xaf, KEY_2}, {0x51af, KEY_2},
{0x5d, 0xa2, KEY_3}, {0x5da2, KEY_3},
{0x41, 0xbe, KEY_4}, {0x41be, KEY_4},
{0x0b, 0xf5, KEY_5}, {0x0bf5, KEY_5},
{0x43, 0xbd, KEY_6}, {0x43bd, KEY_6},
{0x47, 0xb8, KEY_7}, {0x47b8, KEY_7},
{0x49, 0xb6, KEY_8}, {0x49b6, KEY_8},
{0x05, 0xfa, KEY_9}, {0x05fa, KEY_9},
{0x45, 0xba, KEY_0}, {0x45ba, KEY_0},
{0x09, 0xf6, KEY_UP}, /*chanup */ {0x09f6, KEY_UP}, /*chanup */
{0x1b, 0xe5, KEY_DOWN}, /*chandown */ {0x1be5, KEY_DOWN}, /*chandown */
{0x5d, 0xa3, KEY_LEFT}, /*voldown */ {0x5da3, KEY_LEFT}, /*voldown */
{0x5f, 0xa1, KEY_RIGHT}, /*volup */ {0x5fa1, KEY_RIGHT}, /*volup */
{0x07, 0xf8, KEY_SPACE}, /*tab */ {0x07f8, KEY_SPACE}, /*tab */
{0x1f, 0xe1, KEY_ENTER}, /*play ok */ {0x1fe1, KEY_ENTER}, /*play ok */
{0x1b, 0xe4, KEY_Z}, /*zoom */ {0x1be4, KEY_Z}, /*zoom */
{0x59, 0xa6, KEY_M}, /*mute */ {0x59a6, KEY_M}, /*mute */
{0x5b, 0xa5, KEY_F}, /*tv/f */ {0x5ba5, KEY_F}, /*tv/f */
{0x19, 0xe7, KEY_R}, /*rec */ {0x19e7, KEY_R}, /*rec */
{0x01, 0xfe, KEY_S}, /*Stop */ {0x01fe, KEY_S}, /*Stop */
{0x03, 0xfd, KEY_P}, /*pause */ {0x03fd, KEY_P}, /*pause */
{0x03, 0xfc, KEY_W}, /*<- -> */ {0x03fc, KEY_W}, /*<- -> */
{0x07, 0xf9, KEY_C}, /*capture */ {0x07f9, KEY_C}, /*capture */
{0x47, 0xb9, KEY_Q}, /*exit */ {0x47b9, KEY_Q}, /*exit */
{0x43, 0xbc, KEY_O}, /*power */ {0x43bc, KEY_O}, /*power */
}; };
...@@ -405,8 +405,7 @@ static int opera1_rc_query(struct dvb_usb_device *dev, u32 * event, int *state) ...@@ -405,8 +405,7 @@ static int opera1_rc_query(struct dvb_usb_device *dev, u32 * event, int *state)
send_key = (send_key & 0xffff) | 0x0100; send_key = (send_key & 0xffff) | 0x0100;
for (i = 0; i < ARRAY_SIZE(opera1_rc_keys); i++) { for (i = 0; i < ARRAY_SIZE(opera1_rc_keys); i++) {
if ((opera1_rc_keys[i].custom * 256 + if (rc5_scan(&opera1_rc_keys[i]) == (send_key & 0xffff)) {
opera1_rc_keys[i].data) == (send_key & 0xffff)) {
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
*event = opera1_rc_keys[i].event; *event = opera1_rc_keys[i].event;
opst->last_key_pressed = opst->last_key_pressed =
......
...@@ -175,8 +175,8 @@ static int vp702x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) ...@@ -175,8 +175,8 @@ static int vp702x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
/* keys for the enclosed remote control */ /* keys for the enclosed remote control */
static struct dvb_usb_rc_key vp702x_rc_keys[] = { static struct dvb_usb_rc_key vp702x_rc_keys[] = {
{ 0x00, 0x01, KEY_1 }, { 0x0001, KEY_1 },
{ 0x00, 0x02, KEY_2 }, { 0x0002, KEY_2 },
}; };
/* remote control stuff (does not work with my box) */ /* remote control stuff (does not work with my box) */
...@@ -198,7 +198,7 @@ static int vp702x_rc_query(struct dvb_usb_device *d, u32 *event, int *state) ...@@ -198,7 +198,7 @@ static int vp702x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
} }
for (i = 0; i < ARRAY_SIZE(vp702x_rc_keys); i++) for (i = 0; i < ARRAY_SIZE(vp702x_rc_keys); i++)
if (vp702x_rc_keys[i].custom == key[1]) { if (rc5_custom(&vp702x_rc_keys[i]) == key[1]) {
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
*event = vp702x_rc_keys[i].event; *event = vp702x_rc_keys[i].event;
break; break;
......
...@@ -100,56 +100,56 @@ static int vp7045_power_ctrl(struct dvb_usb_device *d, int onoff) ...@@ -100,56 +100,56 @@ static int vp7045_power_ctrl(struct dvb_usb_device *d, int onoff)
/* The keymapping struct. Somehow this should be loaded to the driver, but /* The keymapping struct. Somehow this should be loaded to the driver, but
* currently it is hardcoded. */ * currently it is hardcoded. */
static struct dvb_usb_rc_key vp7045_rc_keys[] = { static struct dvb_usb_rc_key vp7045_rc_keys[] = {
{ 0x00, 0x16, KEY_POWER }, { 0x0016, KEY_POWER },
{ 0x00, 0x10, KEY_MUTE }, { 0x0010, KEY_MUTE },
{ 0x00, 0x03, KEY_1 }, { 0x0003, KEY_1 },
{ 0x00, 0x01, KEY_2 }, { 0x0001, KEY_2 },
{ 0x00, 0x06, KEY_3 }, { 0x0006, KEY_3 },
{ 0x00, 0x09, KEY_4 }, { 0x0009, KEY_4 },
{ 0x00, 0x1d, KEY_5 }, { 0x001d, KEY_5 },
{ 0x00, 0x1f, KEY_6 }, { 0x001f, KEY_6 },
{ 0x00, 0x0d, KEY_7 }, { 0x000d, KEY_7 },
{ 0x00, 0x19, KEY_8 }, { 0x0019, KEY_8 },
{ 0x00, 0x1b, KEY_9 }, { 0x001b, KEY_9 },
{ 0x00, 0x15, KEY_0 }, { 0x0015, KEY_0 },
{ 0x00, 0x05, KEY_CHANNELUP }, { 0x0005, KEY_CHANNELUP },
{ 0x00, 0x02, KEY_CHANNELDOWN }, { 0x0002, KEY_CHANNELDOWN },
{ 0x00, 0x1e, KEY_VOLUMEUP }, { 0x001e, KEY_VOLUMEUP },
{ 0x00, 0x0a, KEY_VOLUMEDOWN }, { 0x000a, KEY_VOLUMEDOWN },
{ 0x00, 0x11, KEY_RECORD }, { 0x0011, KEY_RECORD },
{ 0x00, 0x17, KEY_FAVORITES }, /* Heart symbol - Channel list. */ { 0x0017, KEY_FAVORITES }, /* Heart symbol - Channel list. */
{ 0x00, 0x14, KEY_PLAY }, { 0x0014, KEY_PLAY },
{ 0x00, 0x1a, KEY_STOP }, { 0x001a, KEY_STOP },
{ 0x00, 0x40, KEY_REWIND }, { 0x0040, KEY_REWIND },
{ 0x00, 0x12, KEY_FASTFORWARD }, { 0x0012, KEY_FASTFORWARD },
{ 0x00, 0x0e, KEY_PREVIOUS }, /* Recall - Previous channel. */ { 0x000e, KEY_PREVIOUS }, /* Recall - Previous channel. */
{ 0x00, 0x4c, KEY_PAUSE }, { 0x004c, KEY_PAUSE },
{ 0x00, 0x4d, KEY_SCREEN }, /* Full screen mode. */ { 0x004d, KEY_SCREEN }, /* Full screen mode. */
{ 0x00, 0x54, KEY_AUDIO }, /* MTS - Switch to secondary audio. */ { 0x0054, KEY_AUDIO }, /* MTS - Switch to secondary audio. */
{ 0x00, 0x0c, KEY_CANCEL }, /* Cancel */ { 0x000c, KEY_CANCEL }, /* Cancel */
{ 0x00, 0x1c, KEY_EPG }, /* EPG */ { 0x001c, KEY_EPG }, /* EPG */
{ 0x00, 0x00, KEY_TAB }, /* Tab */ { 0x0000, KEY_TAB }, /* Tab */
{ 0x00, 0x48, KEY_INFO }, /* Preview */ { 0x0048, KEY_INFO }, /* Preview */
{ 0x00, 0x04, KEY_LIST }, /* RecordList */ { 0x0004, KEY_LIST }, /* RecordList */
{ 0x00, 0x0f, KEY_TEXT }, /* Teletext */ { 0x000f, KEY_TEXT }, /* Teletext */
{ 0x00, 0x41, KEY_PREVIOUSSONG }, { 0x0041, KEY_PREVIOUSSONG },
{ 0x00, 0x42, KEY_NEXTSONG }, { 0x0042, KEY_NEXTSONG },
{ 0x00, 0x4b, KEY_UP }, { 0x004b, KEY_UP },
{ 0x00, 0x51, KEY_DOWN }, { 0x0051, KEY_DOWN },
{ 0x00, 0x4e, KEY_LEFT }, { 0x004e, KEY_LEFT },
{ 0x00, 0x52, KEY_RIGHT }, { 0x0052, KEY_RIGHT },
{ 0x00, 0x4f, KEY_ENTER }, { 0x004f, KEY_ENTER },
{ 0x00, 0x13, KEY_CANCEL }, { 0x0013, KEY_CANCEL },
{ 0x00, 0x4a, KEY_CLEAR }, { 0x004a, KEY_CLEAR },
{ 0x00, 0x54, KEY_PRINT }, /* Capture */ { 0x0054, KEY_PRINT }, /* Capture */
{ 0x00, 0x43, KEY_SUBTITLE }, /* Subtitle/CC */ { 0x0043, KEY_SUBTITLE }, /* Subtitle/CC */
{ 0x00, 0x08, KEY_VIDEO }, /* A/V */ { 0x0008, KEY_VIDEO }, /* A/V */
{ 0x00, 0x07, KEY_SLEEP }, /* Hibernate */ { 0x0007, KEY_SLEEP }, /* Hibernate */
{ 0x00, 0x45, KEY_ZOOM }, /* Zoom+ */ { 0x0045, KEY_ZOOM }, /* Zoom+ */
{ 0x00, 0x18, KEY_RED}, { 0x0018, KEY_RED},
{ 0x00, 0x53, KEY_GREEN}, { 0x0053, KEY_GREEN},
{ 0x00, 0x5e, KEY_YELLOW}, { 0x005e, KEY_YELLOW},
{ 0x00, 0x5f, KEY_BLUE} { 0x005f, KEY_BLUE}
}; };
static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state) static 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,7 +166,7 @@ static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
} }
for (i = 0; i < ARRAY_SIZE(vp7045_rc_keys); i++) for (i = 0; i < ARRAY_SIZE(vp7045_rc_keys); i++)
if (vp7045_rc_keys[i].data == key) { if (rc5_data(&vp7045_rc_keys[i]) == key) {
*state = REMOTE_KEY_PRESSED; *state = REMOTE_KEY_PRESSED;
*event = vp7045_rc_keys[i].event; *event = vp7045_rc_keys[i].event;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment