diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-29 14:19:31 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:19:48 -0400 |
commit | 2e3658836efad06662968bd6373c72df06c4b2f1 (patch) | |
tree | 50748b6a7a9cbcb2e0a7d44a59c65783a8fe6fa7 /drivers/media/dvb/dvb-usb/cxusb.c | |
parent | 715a223323c8c8bcbe7739e20f6c619f7343b595 (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/cxusb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/cxusb.c | 244 |
1 files changed, 122 insertions, 122 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index 88205e734aaf..f65591fb7cec 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -392,8 +392,8 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
392 | *state = REMOTE_NO_KEY_PRESSED; | 392 | *state = REMOTE_NO_KEY_PRESSED; |
393 | 393 | ||
394 | for (i = 0; i < d->props.rc_key_map_size; i++) { | 394 | for (i = 0; i < d->props.rc_key_map_size; i++) { |
395 | if (keymap[i].custom == ircode[2] && | 395 | if (rc5_custom(&keymap[i]) == ircode[2] && |
396 | keymap[i].data == ircode[3]) { | 396 | rc5_data(&keymap[i]) == ircode[3]) { |
397 | *event = keymap[i].event; | 397 | *event = keymap[i].event; |
398 | *state = REMOTE_KEY_PRESSED; | 398 | *state = REMOTE_KEY_PRESSED; |
399 | 399 | ||
@@ -420,8 +420,8 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, | |||
420 | return 0; | 420 | return 0; |
421 | 421 | ||
422 | for (i = 0; i < d->props.rc_key_map_size; i++) { | 422 | for (i = 0; i < d->props.rc_key_map_size; i++) { |
423 | if (keymap[i].custom == ircode[1] && | 423 | if (rc5_custom(&keymap[i]) == ircode[1] && |
424 | keymap[i].data == ircode[2]) { | 424 | rc5_data(&keymap[i]) == ircode[2]) { |
425 | *event = keymap[i].event; | 425 | *event = keymap[i].event; |
426 | *state = REMOTE_KEY_PRESSED; | 426 | *state = REMOTE_KEY_PRESSED; |
427 | 427 | ||
@@ -446,8 +446,8 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, | |||
446 | return 0; | 446 | return 0; |
447 | 447 | ||
448 | for (i = 0; i < d->props.rc_key_map_size; i++) { | 448 | for (i = 0; i < d->props.rc_key_map_size; i++) { |
449 | if (keymap[i].custom == ircode[0] && | 449 | if (rc5_custom(&keymap[i]) == ircode[0] && |
450 | keymap[i].data == ircode[1]) { | 450 | rc5_data(&keymap[i]) == ircode[1]) { |
451 | *event = keymap[i].event; | 451 | *event = keymap[i].event; |
452 | *state = REMOTE_KEY_PRESSED; | 452 | *state = REMOTE_KEY_PRESSED; |
453 | 453 | ||
@@ -459,128 +459,128 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, | |||
459 | } | 459 | } |
460 | 460 | ||
461 | static struct dvb_usb_rc_key dvico_mce_rc_keys[] = { | 461 | static struct dvb_usb_rc_key dvico_mce_rc_keys[] = { |
462 | { 0xfe, 0x02, KEY_TV }, | 462 | { 0xfe02, KEY_TV }, |
463 | { 0xfe, 0x0e, KEY_MP3 }, | 463 | { 0xfe0e, KEY_MP3 }, |
464 | { 0xfe, 0x1a, KEY_DVD }, | 464 | { 0xfe1a, KEY_DVD }, |
465 | { 0xfe, 0x1e, KEY_FAVORITES }, | 465 | { 0xfe1e, KEY_FAVORITES }, |
466 | { 0xfe, 0x16, KEY_SETUP }, | 466 | { 0xfe16, KEY_SETUP }, |
467 | { 0xfe, 0x46, KEY_POWER2 }, | 467 | { 0xfe46, KEY_POWER2 }, |
468 | { 0xfe, 0x0a, KEY_EPG }, | 468 | { 0xfe0a, KEY_EPG }, |
469 | { 0xfe, 0x49, KEY_BACK }, | 469 | { 0xfe49, KEY_BACK }, |
470 | { 0xfe, 0x4d, KEY_MENU }, | 470 | { 0xfe4d, KEY_MENU }, |
471 | { 0xfe, 0x51, KEY_UP }, | 471 | { 0xfe51, KEY_UP }, |
472 | { 0xfe, 0x5b, KEY_LEFT }, | 472 | { 0xfe5b, KEY_LEFT }, |
473 | { 0xfe, 0x5f, KEY_RIGHT }, | 473 | { 0xfe5f, KEY_RIGHT }, |
474 | { 0xfe, 0x53, KEY_DOWN }, | 474 | { 0xfe53, KEY_DOWN }, |
475 | { 0xfe, 0x5e, KEY_OK }, | 475 | { 0xfe5e, KEY_OK }, |
476 | { 0xfe, 0x59, KEY_INFO }, | 476 | { 0xfe59, KEY_INFO }, |
477 | { 0xfe, 0x55, KEY_TAB }, | 477 | { 0xfe55, KEY_TAB }, |
478 | { 0xfe, 0x0f, KEY_PREVIOUSSONG },/* Replay */ | 478 | { 0xfe0f, KEY_PREVIOUSSONG },/* Replay */ |
479 | { 0xfe, 0x12, KEY_NEXTSONG }, /* Skip */ | 479 | { 0xfe12, KEY_NEXTSONG }, /* Skip */ |
480 | { 0xfe, 0x42, KEY_ENTER }, /* Windows/Start */ | 480 | { 0xfe42, KEY_ENTER }, /* Windows/Start */ |
481 | { 0xfe, 0x15, KEY_VOLUMEUP }, | 481 | { 0xfe15, KEY_VOLUMEUP }, |
482 | { 0xfe, 0x05, KEY_VOLUMEDOWN }, | 482 | { 0xfe05, KEY_VOLUMEDOWN }, |
483 | { 0xfe, 0x11, KEY_CHANNELUP }, | 483 | { 0xfe11, KEY_CHANNELUP }, |
484 | { 0xfe, 0x09, KEY_CHANNELDOWN }, | 484 | { 0xfe09, KEY_CHANNELDOWN }, |
485 | { 0xfe, 0x52, KEY_CAMERA }, | 485 | { 0xfe52, KEY_CAMERA }, |
486 | { 0xfe, 0x5a, KEY_TUNER }, /* Live */ | 486 | { 0xfe5a, KEY_TUNER }, /* Live */ |
487 | { 0xfe, 0x19, KEY_OPEN }, | 487 | { 0xfe19, KEY_OPEN }, |
488 | { 0xfe, 0x0b, KEY_1 }, | 488 | { 0xfe0b, KEY_1 }, |
489 | { 0xfe, 0x17, KEY_2 }, | 489 | { 0xfe17, KEY_2 }, |
490 | { 0xfe, 0x1b, KEY_3 }, | 490 | { 0xfe1b, KEY_3 }, |
491 | { 0xfe, 0x07, KEY_4 }, | 491 | { 0xfe07, KEY_4 }, |
492 | { 0xfe, 0x50, KEY_5 }, | 492 | { 0xfe50, KEY_5 }, |
493 | { 0xfe, 0x54, KEY_6 }, | 493 | { 0xfe54, KEY_6 }, |
494 | { 0xfe, 0x48, KEY_7 }, | 494 | { 0xfe48, KEY_7 }, |
495 | { 0xfe, 0x4c, KEY_8 }, | 495 | { 0xfe4c, KEY_8 }, |
496 | { 0xfe, 0x58, KEY_9 }, | 496 | { 0xfe58, KEY_9 }, |
497 | { 0xfe, 0x13, KEY_ANGLE }, /* Aspect */ | 497 | { 0xfe13, KEY_ANGLE }, /* Aspect */ |
498 | { 0xfe, 0x03, KEY_0 }, | 498 | { 0xfe03, KEY_0 }, |
499 | { 0xfe, 0x1f, KEY_ZOOM }, | 499 | { 0xfe1f, KEY_ZOOM }, |
500 | { 0xfe, 0x43, KEY_REWIND }, | 500 | { 0xfe43, KEY_REWIND }, |
501 | { 0xfe, 0x47, KEY_PLAYPAUSE }, | 501 | { 0xfe47, KEY_PLAYPAUSE }, |
502 | { 0xfe, 0x4f, KEY_FASTFORWARD }, | 502 | { 0xfe4f, KEY_FASTFORWARD }, |
503 | { 0xfe, 0x57, KEY_MUTE }, | 503 | { 0xfe57, KEY_MUTE }, |
504 | { 0xfe, 0x0d, KEY_STOP }, | 504 | { 0xfe0d, KEY_STOP }, |
505 | { 0xfe, 0x01, KEY_RECORD }, | 505 | { 0xfe01, KEY_RECORD }, |
506 | { 0xfe, 0x4e, KEY_POWER }, | 506 | { 0xfe4e, KEY_POWER }, |
507 | }; | 507 | }; |
508 | 508 | ||
509 | static struct dvb_usb_rc_key dvico_portable_rc_keys[] = { | 509 | static struct dvb_usb_rc_key dvico_portable_rc_keys[] = { |
510 | { 0xfc, 0x02, KEY_SETUP }, /* Profile */ | 510 | { 0xfc02, KEY_SETUP }, /* Profile */ |
511 | { 0xfc, 0x43, KEY_POWER2 }, | 511 | { 0xfc43, KEY_POWER2 }, |
512 | { 0xfc, 0x06, KEY_EPG }, | 512 | { 0xfc06, KEY_EPG }, |
513 | { 0xfc, 0x5a, KEY_BACK }, | 513 | { 0xfc5a, KEY_BACK }, |
514 | { 0xfc, 0x05, KEY_MENU }, | 514 | { 0xfc05, KEY_MENU }, |
515 | { 0xfc, 0x47, KEY_INFO }, | 515 | { 0xfc47, KEY_INFO }, |
516 | { 0xfc, 0x01, KEY_TAB }, | 516 | { 0xfc01, KEY_TAB }, |
517 | { 0xfc, 0x42, KEY_PREVIOUSSONG },/* Replay */ | 517 | { 0xfc42, KEY_PREVIOUSSONG },/* Replay */ |
518 | { 0xfc, 0x49, KEY_VOLUMEUP }, | 518 | { 0xfc49, KEY_VOLUMEUP }, |
519 | { 0xfc, 0x09, KEY_VOLUMEDOWN }, | 519 | { 0xfc09, KEY_VOLUMEDOWN }, |
520 | { 0xfc, 0x54, KEY_CHANNELUP }, | 520 | { 0xfc54, KEY_CHANNELUP }, |
521 | { 0xfc, 0x0b, KEY_CHANNELDOWN }, | 521 | { 0xfc0b, KEY_CHANNELDOWN }, |
522 | { 0xfc, 0x16, KEY_CAMERA }, | 522 | { 0xfc16, KEY_CAMERA }, |
523 | { 0xfc, 0x40, KEY_TUNER }, /* ATV/DTV */ | 523 | { 0xfc40, KEY_TUNER }, /* ATV/DTV */ |
524 | { 0xfc, 0x45, KEY_OPEN }, | 524 | { 0xfc45, KEY_OPEN }, |
525 | { 0xfc, 0x19, KEY_1 }, | 525 | { 0xfc19, KEY_1 }, |
526 | { 0xfc, 0x18, KEY_2 }, | 526 | { 0xfc18, KEY_2 }, |
527 | { 0xfc, 0x1b, KEY_3 }, | 527 | { 0xfc1b, KEY_3 }, |
528 | { 0xfc, 0x1a, KEY_4 }, | 528 | { 0xfc1a, KEY_4 }, |
529 | { 0xfc, 0x58, KEY_5 }, | 529 | { 0xfc58, KEY_5 }, |
530 | { 0xfc, 0x59, KEY_6 }, | 530 | { 0xfc59, KEY_6 }, |
531 | { 0xfc, 0x15, KEY_7 }, | 531 | { 0xfc15, KEY_7 }, |
532 | { 0xfc, 0x14, KEY_8 }, | 532 | { 0xfc14, KEY_8 }, |
533 | { 0xfc, 0x17, KEY_9 }, | 533 | { 0xfc17, KEY_9 }, |
534 | { 0xfc, 0x44, KEY_ANGLE }, /* Aspect */ | 534 | { 0xfc44, KEY_ANGLE }, /* Aspect */ |
535 | { 0xfc, 0x55, KEY_0 }, | 535 | { 0xfc55, KEY_0 }, |
536 | { 0xfc, 0x07, KEY_ZOOM }, | 536 | { 0xfc07, KEY_ZOOM }, |
537 | { 0xfc, 0x0a, KEY_REWIND }, | 537 | { 0xfc0a, KEY_REWIND }, |
538 | { 0xfc, 0x08, KEY_PLAYPAUSE }, | 538 | { 0xfc08, KEY_PLAYPAUSE }, |
539 | { 0xfc, 0x4b, KEY_FASTFORWARD }, | 539 | { 0xfc4b, KEY_FASTFORWARD }, |
540 | { 0xfc, 0x5b, KEY_MUTE }, | 540 | { 0xfc5b, KEY_MUTE }, |
541 | { 0xfc, 0x04, KEY_STOP }, | 541 | { 0xfc04, KEY_STOP }, |
542 | { 0xfc, 0x56, KEY_RECORD }, | 542 | { 0xfc56, KEY_RECORD }, |
543 | { 0xfc, 0x57, KEY_POWER }, | 543 | { 0xfc57, KEY_POWER }, |
544 | { 0xfc, 0x41, KEY_UNKNOWN }, /* INPUT */ | 544 | { 0xfc41, KEY_UNKNOWN }, /* INPUT */ |
545 | { 0xfc, 0x00, KEY_UNKNOWN }, /* HD */ | 545 | { 0xfc00, KEY_UNKNOWN }, /* HD */ |
546 | }; | 546 | }; |
547 | 547 | ||
548 | static struct dvb_usb_rc_key d680_dmb_rc_keys[] = { | 548 | static struct dvb_usb_rc_key d680_dmb_rc_keys[] = { |
549 | { 0x00, 0x38, KEY_UNKNOWN }, /* TV/AV */ | 549 | { 0x0038, KEY_UNKNOWN }, /* TV/AV */ |
550 | { 0x08, 0x0c, KEY_ZOOM }, | 550 | { 0x080c, KEY_ZOOM }, |
551 | { 0x08, 0x00, KEY_0 }, | 551 | { 0x0800, KEY_0 }, |
552 | { 0x00, 0x01, KEY_1 }, | 552 | { 0x0001, KEY_1 }, |
553 | { 0x08, 0x02, KEY_2 }, | 553 | { 0x0802, KEY_2 }, |
554 | { 0x00, 0x03, KEY_3 }, | 554 | { 0x0003, KEY_3 }, |
555 | { 0x08, 0x04, KEY_4 }, | 555 | { 0x0804, KEY_4 }, |
556 | { 0x00, 0x05, KEY_5 }, | 556 | { 0x0005, KEY_5 }, |
557 | { 0x08, 0x06, KEY_6 }, | 557 | { 0x0806, KEY_6 }, |
558 | { 0x00, 0x07, KEY_7 }, | 558 | { 0x0007, KEY_7 }, |
559 | { 0x08, 0x08, KEY_8 }, | 559 | { 0x0808, KEY_8 }, |
560 | { 0x00, 0x09, KEY_9 }, | 560 | { 0x0009, KEY_9 }, |
561 | { 0x00, 0x0a, KEY_MUTE }, | 561 | { 0x000a, KEY_MUTE }, |
562 | { 0x08, 0x29, KEY_BACK }, | 562 | { 0x0829, KEY_BACK }, |
563 | { 0x00, 0x12, KEY_CHANNELUP }, | 563 | { 0x0012, KEY_CHANNELUP }, |
564 | { 0x08, 0x13, KEY_CHANNELDOWN }, | 564 | { 0x0813, KEY_CHANNELDOWN }, |
565 | { 0x00, 0x2b, KEY_VOLUMEUP }, | 565 | { 0x002b, KEY_VOLUMEUP }, |
566 | { 0x08, 0x2c, KEY_VOLUMEDOWN }, | 566 | { 0x082c, KEY_VOLUMEDOWN }, |
567 | { 0x00, 0x20, KEY_UP }, | 567 | { 0x0020, KEY_UP }, |
568 | { 0x08, 0x21, KEY_DOWN }, | 568 | { 0x0821, KEY_DOWN }, |
569 | { 0x00, 0x11, KEY_LEFT }, | 569 | { 0x0011, KEY_LEFT }, |
570 | { 0x08, 0x10, KEY_RIGHT }, | 570 | { 0x0810, KEY_RIGHT }, |
571 | { 0x00, 0x0d, KEY_OK }, | 571 | { 0x000d, KEY_OK }, |
572 | { 0x08, 0x1f, KEY_RECORD }, | 572 | { 0x081f, KEY_RECORD }, |
573 | { 0x00, 0x17, KEY_PLAYPAUSE }, | 573 | { 0x0017, KEY_PLAYPAUSE }, |
574 | { 0x08, 0x16, KEY_PLAYPAUSE }, | 574 | { 0x0816, KEY_PLAYPAUSE }, |
575 | { 0x00, 0x0b, KEY_STOP }, | 575 | { 0x000b, KEY_STOP }, |
576 | { 0x08, 0x27, KEY_FASTFORWARD }, | 576 | { 0x0827, KEY_FASTFORWARD }, |
577 | { 0x00, 0x26, KEY_REWIND }, | 577 | { 0x0026, KEY_REWIND }, |
578 | { 0x08, 0x1e, KEY_UNKNOWN }, /* Time Shift */ | 578 | { 0x081e, KEY_UNKNOWN }, /* Time Shift */ |
579 | { 0x00, 0x0e, KEY_UNKNOWN }, /* Snapshot */ | 579 | { 0x000e, KEY_UNKNOWN }, /* Snapshot */ |
580 | { 0x08, 0x2d, KEY_UNKNOWN }, /* Mouse Cursor */ | 580 | { 0x082d, KEY_UNKNOWN }, /* Mouse Cursor */ |
581 | { 0x00, 0x0f, KEY_UNKNOWN }, /* Minimize/Maximize */ | 581 | { 0x000f, KEY_UNKNOWN }, /* Minimize/Maximize */ |
582 | { 0x08, 0x14, KEY_UNKNOWN }, /* Shuffle */ | 582 | { 0x0814, KEY_UNKNOWN }, /* Shuffle */ |
583 | { 0x00, 0x25, KEY_POWER }, | 583 | { 0x0025, KEY_POWER }, |
584 | }; | 584 | }; |
585 | 585 | ||
586 | static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) | 586 | static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) |