diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/m920x.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/m920x.c | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index c211fef45fc3..bdef1a18b664 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -69,7 +69,7 @@ static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq) | |||
69 | int adap_enabled[M9206_MAX_ADAPTERS] = { 0 }; | 69 | int adap_enabled[M9206_MAX_ADAPTERS] = { 0 }; |
70 | 70 | ||
71 | /* Remote controller init. */ | 71 | /* Remote controller init. */ |
72 | if (d->props.rc_query) { | 72 | if (d->props.rc.legacy.rc_query) { |
73 | deb("Initialising remote control\n"); | 73 | deb("Initialising remote control\n"); |
74 | while (rc_seq->address) { | 74 | while (rc_seq->address) { |
75 | if ((ret = m920x_write(d->udev, M9206_CORE, | 75 | if ((ret = m920x_write(d->udev, M9206_CORE, |
@@ -142,9 +142,9 @@ static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
142 | if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0) | 142 | if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0) |
143 | goto unlock; | 143 | goto unlock; |
144 | 144 | ||
145 | for (i = 0; i < d->props.rc_key_map_size; i++) | 145 | for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) |
146 | if (rc5_data(&d->props.rc_key_map[i]) == rc_state[1]) { | 146 | if (rc5_data(&d->props.rc.legacy.rc_key_map[i]) == rc_state[1]) { |
147 | *event = d->props.rc_key_map[i].event; | 147 | *event = d->props.rc.legacy.rc_key_map[i].keycode; |
148 | 148 | ||
149 | switch(rc_state[0]) { | 149 | switch(rc_state[0]) { |
150 | case 0x80: | 150 | case 0x80: |
@@ -589,7 +589,7 @@ static struct m920x_inits pinnacle310e_init[] = { | |||
589 | }; | 589 | }; |
590 | 590 | ||
591 | /* ir keymaps */ | 591 | /* ir keymaps */ |
592 | static struct dvb_usb_rc_key ir_codes_megasky_table [] = { | 592 | static struct ir_scancode ir_codes_megasky_table[] = { |
593 | { 0x0012, KEY_POWER }, | 593 | { 0x0012, KEY_POWER }, |
594 | { 0x001e, KEY_CYCLEWINDOWS }, /* min/max */ | 594 | { 0x001e, KEY_CYCLEWINDOWS }, /* min/max */ |
595 | { 0x0002, KEY_CHANNELUP }, | 595 | { 0x0002, KEY_CHANNELUP }, |
@@ -608,7 +608,7 @@ static struct dvb_usb_rc_key ir_codes_megasky_table [] = { | |||
608 | { 0x000e, KEY_COFFEE }, /* "MTS" */ | 608 | { 0x000e, KEY_COFFEE }, /* "MTS" */ |
609 | }; | 609 | }; |
610 | 610 | ||
611 | static struct dvb_usb_rc_key ir_codes_tvwalkertwin_table [] = { | 611 | static struct ir_scancode ir_codes_tvwalkertwin_table[] = { |
612 | { 0x0001, KEY_ZOOM }, /* Full Screen */ | 612 | { 0x0001, KEY_ZOOM }, /* Full Screen */ |
613 | { 0x0002, KEY_CAMERA }, /* snapshot */ | 613 | { 0x0002, KEY_CAMERA }, /* snapshot */ |
614 | { 0x0003, KEY_MUTE }, | 614 | { 0x0003, KEY_MUTE }, |
@@ -628,7 +628,7 @@ static struct dvb_usb_rc_key ir_codes_tvwalkertwin_table [] = { | |||
628 | { 0x001e, KEY_VOLUMEUP }, | 628 | { 0x001e, KEY_VOLUMEUP }, |
629 | }; | 629 | }; |
630 | 630 | ||
631 | static struct dvb_usb_rc_key ir_codes_pinnacle310e_table[] = { | 631 | static struct ir_scancode ir_codes_pinnacle310e_table[] = { |
632 | { 0x16, KEY_POWER }, | 632 | { 0x16, KEY_POWER }, |
633 | { 0x17, KEY_FAVORITES }, | 633 | { 0x17, KEY_FAVORITES }, |
634 | { 0x0f, KEY_TEXT }, | 634 | { 0x0f, KEY_TEXT }, |
@@ -784,10 +784,12 @@ static struct dvb_usb_device_properties megasky_properties = { | |||
784 | .firmware = "dvb-usb-megasky-02.fw", | 784 | .firmware = "dvb-usb-megasky-02.fw", |
785 | .download_firmware = m920x_firmware_download, | 785 | .download_firmware = m920x_firmware_download, |
786 | 786 | ||
787 | .rc_interval = 100, | 787 | .rc.legacy = { |
788 | .rc_key_map = ir_codes_megasky_table, | 788 | .rc_interval = 100, |
789 | .rc_key_map_size = ARRAY_SIZE(ir_codes_megasky_table), | 789 | .rc_key_map = ir_codes_megasky_table, |
790 | .rc_query = m920x_rc_query, | 790 | .rc_key_map_size = ARRAY_SIZE(ir_codes_megasky_table), |
791 | .rc_query = m920x_rc_query, | ||
792 | }, | ||
791 | 793 | ||
792 | .size_of_priv = sizeof(struct m920x_state), | 794 | .size_of_priv = sizeof(struct m920x_state), |
793 | 795 | ||
@@ -885,10 +887,12 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { | |||
885 | .firmware = "dvb-usb-tvwalkert.fw", | 887 | .firmware = "dvb-usb-tvwalkert.fw", |
886 | .download_firmware = m920x_firmware_download, | 888 | .download_firmware = m920x_firmware_download, |
887 | 889 | ||
888 | .rc_interval = 100, | 890 | .rc.legacy = { |
889 | .rc_key_map = ir_codes_tvwalkertwin_table, | 891 | .rc_interval = 100, |
890 | .rc_key_map_size = ARRAY_SIZE(ir_codes_tvwalkertwin_table), | 892 | .rc_key_map = ir_codes_tvwalkertwin_table, |
891 | .rc_query = m920x_rc_query, | 893 | .rc_key_map_size = ARRAY_SIZE(ir_codes_tvwalkertwin_table), |
894 | .rc_query = m920x_rc_query, | ||
895 | }, | ||
892 | 896 | ||
893 | .size_of_priv = sizeof(struct m920x_state), | 897 | .size_of_priv = sizeof(struct m920x_state), |
894 | 898 | ||
@@ -992,10 +996,12 @@ static struct dvb_usb_device_properties pinnacle_pctv310e_properties = { | |||
992 | .usb_ctrl = DEVICE_SPECIFIC, | 996 | .usb_ctrl = DEVICE_SPECIFIC, |
993 | .download_firmware = NULL, | 997 | .download_firmware = NULL, |
994 | 998 | ||
995 | .rc_interval = 100, | 999 | .rc.legacy = { |
996 | .rc_key_map = ir_codes_pinnacle310e_table, | 1000 | .rc_interval = 100, |
997 | .rc_key_map_size = ARRAY_SIZE(ir_codes_pinnacle310e_table), | 1001 | .rc_key_map = ir_codes_pinnacle310e_table, |
998 | .rc_query = m920x_rc_query, | 1002 | .rc_key_map_size = ARRAY_SIZE(ir_codes_pinnacle310e_table), |
1003 | .rc_query = m920x_rc_query, | ||
1004 | }, | ||
999 | 1005 | ||
1000 | .size_of_priv = sizeof(struct m920x_state), | 1006 | .size_of_priv = sizeof(struct m920x_state), |
1001 | 1007 | ||