diff options
Diffstat (limited to 'drivers/media/rc/mceusb.c')
-rw-r--r-- | drivers/media/rc/mceusb.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 0c273ec465c9..ad927fcaa020 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c | |||
@@ -149,6 +149,8 @@ enum mceusb_model_type { | |||
149 | POLARIS_EVK, | 149 | POLARIS_EVK, |
150 | CX_HYBRID_TV, | 150 | CX_HYBRID_TV, |
151 | MULTIFUNCTION, | 151 | MULTIFUNCTION, |
152 | TIVO_KIT, | ||
153 | MCE_GEN2_NO_TX, | ||
152 | }; | 154 | }; |
153 | 155 | ||
154 | struct mceusb_model { | 156 | struct mceusb_model { |
@@ -172,6 +174,10 @@ static const struct mceusb_model mceusb_model[] = { | |||
172 | [MCE_GEN2] = { | 174 | [MCE_GEN2] = { |
173 | .mce_gen2 = 1, | 175 | .mce_gen2 = 1, |
174 | }, | 176 | }, |
177 | [MCE_GEN2_NO_TX] = { | ||
178 | .mce_gen2 = 1, | ||
179 | .no_tx = 1, | ||
180 | }, | ||
175 | [MCE_GEN2_TX_INV] = { | 181 | [MCE_GEN2_TX_INV] = { |
176 | .mce_gen2 = 1, | 182 | .mce_gen2 = 1, |
177 | .tx_mask_normal = 1, | 183 | .tx_mask_normal = 1, |
@@ -197,6 +203,10 @@ static const struct mceusb_model mceusb_model[] = { | |||
197 | .mce_gen2 = 1, | 203 | .mce_gen2 = 1, |
198 | .ir_intfnum = 2, | 204 | .ir_intfnum = 2, |
199 | }, | 205 | }, |
206 | [TIVO_KIT] = { | ||
207 | .mce_gen2 = 1, | ||
208 | .rc_map = RC_MAP_TIVO, | ||
209 | }, | ||
200 | }; | 210 | }; |
201 | 211 | ||
202 | static struct usb_device_id mceusb_dev_table[] = { | 212 | static struct usb_device_id mceusb_dev_table[] = { |
@@ -279,7 +289,8 @@ static struct usb_device_id mceusb_dev_table[] = { | |||
279 | /* Formosa21 / eHome Infrared Receiver */ | 289 | /* Formosa21 / eHome Infrared Receiver */ |
280 | { USB_DEVICE(VENDOR_FORMOSA, 0xe016) }, | 290 | { USB_DEVICE(VENDOR_FORMOSA, 0xe016) }, |
281 | /* Formosa aim / Trust MCE Infrared Receiver */ | 291 | /* Formosa aim / Trust MCE Infrared Receiver */ |
282 | { USB_DEVICE(VENDOR_FORMOSA, 0xe017) }, | 292 | { USB_DEVICE(VENDOR_FORMOSA, 0xe017), |
293 | .driver_info = MCE_GEN2_NO_TX }, | ||
283 | /* Formosa Industrial Computing / Beanbag Emulation Device */ | 294 | /* Formosa Industrial Computing / Beanbag Emulation Device */ |
284 | { USB_DEVICE(VENDOR_FORMOSA, 0xe018) }, | 295 | { USB_DEVICE(VENDOR_FORMOSA, 0xe018) }, |
285 | /* Formosa21 / eHome Infrared Receiver */ | 296 | /* Formosa21 / eHome Infrared Receiver */ |
@@ -308,7 +319,8 @@ static struct usb_device_id mceusb_dev_table[] = { | |||
308 | /* Northstar Systems, Inc. eHome Infrared Transceiver */ | 319 | /* Northstar Systems, Inc. eHome Infrared Transceiver */ |
309 | { USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) }, | 320 | { USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) }, |
310 | /* TiVo PC IR Receiver */ | 321 | /* TiVo PC IR Receiver */ |
311 | { USB_DEVICE(VENDOR_TIVO, 0x2000) }, | 322 | { USB_DEVICE(VENDOR_TIVO, 0x2000), |
323 | .driver_info = TIVO_KIT }, | ||
312 | /* Conexant Hybrid TV "Shelby" Polaris SDK */ | 324 | /* Conexant Hybrid TV "Shelby" Polaris SDK */ |
313 | { USB_DEVICE(VENDOR_CONEXANT, 0x58a1), | 325 | { USB_DEVICE(VENDOR_CONEXANT, 0x58a1), |
314 | .driver_info = POLARIS_EVK }, | 326 | .driver_info = POLARIS_EVK }, |
@@ -603,11 +615,10 @@ static void mce_async_callback(struct urb *urb, struct pt_regs *regs) | |||
603 | } | 615 | } |
604 | 616 | ||
605 | /* request incoming or send outgoing usb packet - used to initialize remote */ | 617 | /* request incoming or send outgoing usb packet - used to initialize remote */ |
606 | static void mce_request_packet(struct mceusb_dev *ir, | 618 | static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data, |
607 | struct usb_endpoint_descriptor *ep, | 619 | int size, int urb_type) |
608 | unsigned char *data, int size, int urb_type) | ||
609 | { | 620 | { |
610 | int res; | 621 | int res, pipe; |
611 | struct urb *async_urb; | 622 | struct urb *async_urb; |
612 | struct device *dev = ir->dev; | 623 | struct device *dev = ir->dev; |
613 | unsigned char *async_buf; | 624 | unsigned char *async_buf; |
@@ -627,10 +638,11 @@ static void mce_request_packet(struct mceusb_dev *ir, | |||
627 | } | 638 | } |
628 | 639 | ||
629 | /* outbound data */ | 640 | /* outbound data */ |
630 | usb_fill_int_urb(async_urb, ir->usbdev, | 641 | pipe = usb_sndintpipe(ir->usbdev, |
631 | usb_sndintpipe(ir->usbdev, ep->bEndpointAddress), | 642 | ir->usb_ep_out->bEndpointAddress); |
643 | usb_fill_int_urb(async_urb, ir->usbdev, pipe, | ||
632 | async_buf, size, (usb_complete_t)mce_async_callback, | 644 | async_buf, size, (usb_complete_t)mce_async_callback, |
633 | ir, ep->bInterval); | 645 | ir, ir->usb_ep_out->bInterval); |
634 | memcpy(async_buf, data, size); | 646 | memcpy(async_buf, data, size); |
635 | 647 | ||
636 | } else if (urb_type == MCEUSB_RX) { | 648 | } else if (urb_type == MCEUSB_RX) { |
@@ -658,12 +670,12 @@ static void mce_request_packet(struct mceusb_dev *ir, | |||
658 | 670 | ||
659 | static void mce_async_out(struct mceusb_dev *ir, unsigned char *data, int size) | 671 | static void mce_async_out(struct mceusb_dev *ir, unsigned char *data, int size) |
660 | { | 672 | { |
661 | mce_request_packet(ir, ir->usb_ep_out, data, size, MCEUSB_TX); | 673 | mce_request_packet(ir, data, size, MCEUSB_TX); |
662 | } | 674 | } |
663 | 675 | ||
664 | static void mce_sync_in(struct mceusb_dev *ir, unsigned char *data, int size) | 676 | static void mce_sync_in(struct mceusb_dev *ir, unsigned char *data, int size) |
665 | { | 677 | { |
666 | mce_request_packet(ir, ir->usb_ep_in, data, size, MCEUSB_RX); | 678 | mce_request_packet(ir, data, size, MCEUSB_RX); |
667 | } | 679 | } |
668 | 680 | ||
669 | /* Send data out the IR blaster port(s) */ | 681 | /* Send data out the IR blaster port(s) */ |