aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/af9015.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:38:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:38:08 -0400
commitf63b759c44b0561c76a67894c734157df3313b42 (patch)
tree4e9638f6c1aa5c0faa62ad4213282cc7cb39772a /drivers/media/dvb/dvb-usb/af9015.c
parent4a35cee066df1b1958e25e71595b3845d06b192e (diff)
parent844a9e93d7fcd910cd94f6eb262e2cc43cacbe56 (diff)
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (243 commits) V4L/DVB: sms: Convert IR support to use the Remote Controller core V4L/DVB: sms: properly initialize IR phys and IR name V4L/DVB: standardize names at rc-dib0700 tables V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick V4L/DVB: dib0700: Fix RC protocol logic to properly handle NEC/NECx and RC-5 V4L/DVB: dib0700: properly implement IR change_protocol V4L/DVB: dib0700: break keytable into NEC and RC-5 variants V4L/DVB: dib0700: avoid bad repeat V4L/DVB: Port dib0700 to rc-core V4L/DVB: Add a keymap file with dib0700 table V4L/DVB: dvb-usb: add support for rc-core mode V4L/DVB: dvb-usb: prepare drivers for using rc-core V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key V4L/DVB: rj54n1cb0c: fix a comment in the driver V4L/DVB: V4L2: sh_vou: VOU does support the full PAL resolution too V4L/DVB: V4L2: sh_mobile_camera_ceu: add support for CSI2 V4L/DVB: V4L2: soc-camera: add a MIPI CSI-2 driver for SH-Mobile platforms V4L/DVB: V4L2: soc-camera: export soc-camera bus type for notifications V4L/DVB: V4L2: mediabus: add 12-bit Bayer and YUV420 pixel formats V4L/DVB: mediabus: fix ambiguous pixel code names ...
Diffstat (limited to 'drivers/media/dvb/dvb-usb/af9015.c')
-rw-r--r--drivers/media/dvb/dvb-usb/af9015.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index 66c7c3ea7990..ea1ed3b4592a 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -735,7 +735,7 @@ error:
735 735
736struct af9015_setup { 736struct af9015_setup {
737 unsigned int id; 737 unsigned int id;
738 struct dvb_usb_rc_key *rc_key_map; 738 struct ir_scancode *rc_key_map;
739 unsigned int rc_key_map_size; 739 unsigned int rc_key_map_size;
740 u8 *ir_table; 740 u8 *ir_table;
741 unsigned int ir_table_size; 741 unsigned int ir_table_size;
@@ -847,8 +847,8 @@ static void af9015_set_remote_config(struct usb_device *udev,
847 } 847 }
848 848
849 if (table) { 849 if (table) {
850 props->rc_key_map = table->rc_key_map; 850 props->rc.legacy.rc_key_map = table->rc_key_map;
851 props->rc_key_map_size = table->rc_key_map_size; 851 props->rc.legacy.rc_key_map_size = table->rc_key_map_size;
852 af9015_config.ir_table = table->ir_table; 852 af9015_config.ir_table = table->ir_table;
853 af9015_config.ir_table_size = table->ir_table_size; 853 af9015_config.ir_table_size = table->ir_table_size;
854 } 854 }
@@ -878,8 +878,8 @@ static int af9015_read_config(struct usb_device *udev)
878 deb_info("%s: IR mode:%d\n", __func__, val); 878 deb_info("%s: IR mode:%d\n", __func__, val);
879 for (i = 0; i < af9015_properties_count; i++) { 879 for (i = 0; i < af9015_properties_count; i++) {
880 if (val == AF9015_IR_MODE_DISABLED) { 880 if (val == AF9015_IR_MODE_DISABLED) {
881 af9015_properties[i].rc_key_map = NULL; 881 af9015_properties[i].rc.legacy.rc_key_map = NULL;
882 af9015_properties[i].rc_key_map_size = 0; 882 af9015_properties[i].rc.legacy.rc_key_map_size = 0;
883 } else 883 } else
884 af9015_set_remote_config(udev, &af9015_properties[i]); 884 af9015_set_remote_config(udev, &af9015_properties[i]);
885 } 885 }
@@ -1063,7 +1063,7 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
1063{ 1063{
1064 u8 buf[8]; 1064 u8 buf[8];
1065 struct req_t req = {GET_IR_CODE, 0, 0, 0, 0, sizeof(buf), buf}; 1065 struct req_t req = {GET_IR_CODE, 0, 0, 0, 0, sizeof(buf), buf};
1066 struct dvb_usb_rc_key *keymap = d->props.rc_key_map; 1066 struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map;
1067 int i, ret; 1067 int i, ret;
1068 1068
1069 memset(buf, 0, sizeof(buf)); 1069 memset(buf, 0, sizeof(buf));
@@ -1075,10 +1075,10 @@ static int af9015_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
1075 *event = 0; 1075 *event = 0;
1076 *state = REMOTE_NO_KEY_PRESSED; 1076 *state = REMOTE_NO_KEY_PRESSED;
1077 1077
1078 for (i = 0; i < d->props.rc_key_map_size; i++) { 1078 for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) {
1079 if (!buf[1] && rc5_custom(&keymap[i]) == buf[0] && 1079 if (!buf[1] && rc5_custom(&keymap[i]) == buf[0] &&
1080 rc5_data(&keymap[i]) == buf[2]) { 1080 rc5_data(&keymap[i]) == buf[2]) {
1081 *event = keymap[i].event; 1081 *event = keymap[i].keycode;
1082 *state = REMOTE_KEY_PRESSED; 1082 *state = REMOTE_KEY_PRESSED;
1083 break; 1083 break;
1084 } 1084 }
@@ -1299,6 +1299,7 @@ static struct usb_device_id af9015_usb_table[] = {
1299 {USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV2000DS)}, 1299 {USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV2000DS)},
1300/* 30 */{USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_UB383_T)}, 1300/* 30 */{USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_UB383_T)},
1301 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_4)}, 1301 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_4)},
1302 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A815M)},
1302 {0}, 1303 {0},
1303}; 1304};
1304MODULE_DEVICE_TABLE(usb, af9015_usb_table); 1305MODULE_DEVICE_TABLE(usb, af9015_usb_table);
@@ -1353,8 +1354,10 @@ static struct dvb_usb_device_properties af9015_properties[] = {
1353 1354
1354 .identify_state = af9015_identify_state, 1355 .identify_state = af9015_identify_state,
1355 1356
1356 .rc_query = af9015_rc_query, 1357 .rc.legacy = {
1357 .rc_interval = 150, 1358 .rc_query = af9015_rc_query,
1359 .rc_interval = 150,
1360 },
1358 1361
1359 .i2c_algo = &af9015_i2c_algo, 1362 .i2c_algo = &af9015_i2c_algo,
1360 1363
@@ -1460,8 +1463,10 @@ static struct dvb_usb_device_properties af9015_properties[] = {
1460 1463
1461 .identify_state = af9015_identify_state, 1464 .identify_state = af9015_identify_state,
1462 1465
1463 .rc_query = af9015_rc_query, 1466 .rc.legacy = {
1464 .rc_interval = 150, 1467 .rc_query = af9015_rc_query,
1468 .rc_interval = 150,
1469 },
1465 1470
1466 .i2c_algo = &af9015_i2c_algo, 1471 .i2c_algo = &af9015_i2c_algo,
1467 1472
@@ -1567,12 +1572,14 @@ static struct dvb_usb_device_properties af9015_properties[] = {
1567 1572
1568 .identify_state = af9015_identify_state, 1573 .identify_state = af9015_identify_state,
1569 1574
1570 .rc_query = af9015_rc_query, 1575 .rc.legacy = {
1571 .rc_interval = 150, 1576 .rc_query = af9015_rc_query,
1577 .rc_interval = 150,
1578 },
1572 1579
1573 .i2c_algo = &af9015_i2c_algo, 1580 .i2c_algo = &af9015_i2c_algo,
1574 1581
1575 .num_device_descs = 8, /* max 9 */ 1582 .num_device_descs = 9, /* max 9 */
1576 .devices = { 1583 .devices = {
1577 { 1584 {
1578 .name = "AverMedia AVerTV Volar GPS 805 (A805)", 1585 .name = "AverMedia AVerTV Volar GPS 805 (A805)",
@@ -1617,6 +1624,11 @@ static struct dvb_usb_device_properties af9015_properties[] = {
1617 .cold_ids = {&af9015_usb_table[30], NULL}, 1624 .cold_ids = {&af9015_usb_table[30], NULL},
1618 .warm_ids = {NULL}, 1625 .warm_ids = {NULL},
1619 }, 1626 },
1627 {
1628 .name = "AverMedia AVerTV Volar M (A815Mac)",
1629 .cold_ids = {&af9015_usb_table[32], NULL},
1630 .warm_ids = {NULL},
1631 },
1620 } 1632 }
1621 }, 1633 },
1622}; 1634};