From d8ee99e79994f916bc5b81990f861ea923e7f332 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Thu, 24 Mar 2011 12:59:10 -0300 Subject: [media] mceusb: tivo transceiver should default to tivo keymap Signed-off-by: Jarod Wilson Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/mceusb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/media/rc/mceusb.c') diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 0c273ec465c9..9145be9c0f04 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -149,6 +149,7 @@ enum mceusb_model_type { POLARIS_EVK, CX_HYBRID_TV, MULTIFUNCTION, + TIVO_KIT, }; struct mceusb_model { @@ -197,6 +198,10 @@ static const struct mceusb_model mceusb_model[] = { .mce_gen2 = 1, .ir_intfnum = 2, }, + [TIVO_KIT] = { + .mce_gen2 = 1, + .rc_map = RC_MAP_TIVO, + }, }; static struct usb_device_id mceusb_dev_table[] = { @@ -308,7 +313,8 @@ static struct usb_device_id mceusb_dev_table[] = { /* Northstar Systems, Inc. eHome Infrared Transceiver */ { USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) }, /* TiVo PC IR Receiver */ - { USB_DEVICE(VENDOR_TIVO, 0x2000) }, + { USB_DEVICE(VENDOR_TIVO, 0x2000), + .driver_info = TIVO_KIT }, /* Conexant Hybrid TV "Shelby" Polaris SDK */ { USB_DEVICE(VENDOR_CONEXANT, 0x58a1), .driver_info = POLARIS_EVK }, -- cgit v1.2.3 From 2faa0ca82c7180f58a4b3bb3c460e5bdcdcf04c6 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Tue, 19 Apr 2011 16:47:34 -0300 Subject: [media] mceusb: Formosa e017 device has no tx Per hardware provided to me, the Formosa Industrial Computing eHome Infrared Receiver, 0x147a:0xe017, has no tx capability, it is rx only. Thanks go to Paul Rae for the hardware. Signed-off-by: Jarod Wilson Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/mceusb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/media/rc/mceusb.c') diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 9145be9c0f04..5edd2cb8128a 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -150,6 +150,7 @@ enum mceusb_model_type { CX_HYBRID_TV, MULTIFUNCTION, TIVO_KIT, + MCE_GEN2_NO_TX, }; struct mceusb_model { @@ -173,6 +174,10 @@ static const struct mceusb_model mceusb_model[] = { [MCE_GEN2] = { .mce_gen2 = 1, }, + [MCE_GEN2_NO_TX] = { + .mce_gen2 = 1, + .no_tx = 1, + }, [MCE_GEN2_TX_INV] = { .mce_gen2 = 1, .tx_mask_normal = 1, @@ -284,7 +289,8 @@ static struct usb_device_id mceusb_dev_table[] = { /* Formosa21 / eHome Infrared Receiver */ { USB_DEVICE(VENDOR_FORMOSA, 0xe016) }, /* Formosa aim / Trust MCE Infrared Receiver */ - { USB_DEVICE(VENDOR_FORMOSA, 0xe017) }, + { USB_DEVICE(VENDOR_FORMOSA, 0xe017), + .driver_info = MCE_GEN2_NO_TX }, /* Formosa Industrial Computing / Beanbag Emulation Device */ { USB_DEVICE(VENDOR_FORMOSA, 0xe018) }, /* Formosa21 / eHome Infrared Receiver */ -- cgit v1.2.3 From 51ea62927e5bbb577360dd92c3f282edbf4cd3f8 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Tue, 10 May 2011 14:09:59 -0300 Subject: [media] mceusb: passing ep to request_packet is redundant Signed-off-by: Jarod Wilson Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/mceusb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/media/rc/mceusb.c') diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 5edd2cb8128a..ad927fcaa020 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -615,11 +615,10 @@ static void mce_async_callback(struct urb *urb, struct pt_regs *regs) } /* request incoming or send outgoing usb packet - used to initialize remote */ -static void mce_request_packet(struct mceusb_dev *ir, - struct usb_endpoint_descriptor *ep, - unsigned char *data, int size, int urb_type) +static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data, + int size, int urb_type) { - int res; + int res, pipe; struct urb *async_urb; struct device *dev = ir->dev; unsigned char *async_buf; @@ -639,10 +638,11 @@ static void mce_request_packet(struct mceusb_dev *ir, } /* outbound data */ - usb_fill_int_urb(async_urb, ir->usbdev, - usb_sndintpipe(ir->usbdev, ep->bEndpointAddress), + pipe = usb_sndintpipe(ir->usbdev, + ir->usb_ep_out->bEndpointAddress); + usb_fill_int_urb(async_urb, ir->usbdev, pipe, async_buf, size, (usb_complete_t)mce_async_callback, - ir, ep->bInterval); + ir, ir->usb_ep_out->bInterval); memcpy(async_buf, data, size); } else if (urb_type == MCEUSB_RX) { @@ -670,12 +670,12 @@ static void mce_request_packet(struct mceusb_dev *ir, static void mce_async_out(struct mceusb_dev *ir, unsigned char *data, int size) { - mce_request_packet(ir, ir->usb_ep_out, data, size, MCEUSB_TX); + mce_request_packet(ir, data, size, MCEUSB_TX); } static void mce_sync_in(struct mceusb_dev *ir, unsigned char *data, int size) { - mce_request_packet(ir, ir->usb_ep_in, data, size, MCEUSB_RX); + mce_request_packet(ir, data, size, MCEUSB_RX); } /* Send data out the IR blaster port(s) */ -- cgit v1.2.3