[media] mceusb: add support for cx231xx-based IR (e. g. Polaris)
For now, it adds support for Conexant EVK and for Pixelview. We should probably find a better way to specify all Conexant Polaris devices, to avoid needing to repeat this setup on both mceusb and cx231xx-cards. Reviewed-by: Jarod Wilson <jarod@redhat.com> Acked-by: Sri Devi <Srinivasa.Deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Родитель
9efd85dfff
Коммит
56e92f60c3
|
@ -104,6 +104,7 @@ static int debug;
|
||||||
#define VENDOR_NORTHSTAR 0x04eb
|
#define VENDOR_NORTHSTAR 0x04eb
|
||||||
#define VENDOR_REALTEK 0x0bda
|
#define VENDOR_REALTEK 0x0bda
|
||||||
#define VENDOR_TIVO 0x105a
|
#define VENDOR_TIVO 0x105a
|
||||||
|
#define VENDOR_CONEXANT 0x0572
|
||||||
|
|
||||||
static struct usb_device_id mceusb_dev_table[] = {
|
static struct usb_device_id mceusb_dev_table[] = {
|
||||||
/* Original Microsoft MCE IR Transceiver (often HP-branded) */
|
/* Original Microsoft MCE IR Transceiver (often HP-branded) */
|
||||||
|
@ -198,6 +199,8 @@ static struct usb_device_id mceusb_dev_table[] = {
|
||||||
{ USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) },
|
{ USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) },
|
||||||
/* TiVo PC IR Receiver */
|
/* TiVo PC IR Receiver */
|
||||||
{ USB_DEVICE(VENDOR_TIVO, 0x2000) },
|
{ USB_DEVICE(VENDOR_TIVO, 0x2000) },
|
||||||
|
/* Conexant SDK */
|
||||||
|
{ USB_DEVICE(VENDOR_CONEXANT, 0x58a1) },
|
||||||
/* Terminating entry */
|
/* Terminating entry */
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
@ -229,6 +232,11 @@ static struct usb_device_id std_tx_mask_list[] = {
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct usb_device_id cx_polaris_list[] = {
|
||||||
|
{ USB_DEVICE(VENDOR_CONEXANT, 0x58a1) },
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
/* data structure for each usb transceiver */
|
/* data structure for each usb transceiver */
|
||||||
struct mceusb_dev {
|
struct mceusb_dev {
|
||||||
/* ir-core bits */
|
/* ir-core bits */
|
||||||
|
@ -929,6 +937,7 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
|
||||||
bool is_gen3;
|
bool is_gen3;
|
||||||
bool is_microsoft_gen1;
|
bool is_microsoft_gen1;
|
||||||
bool tx_mask_inverted;
|
bool tx_mask_inverted;
|
||||||
|
bool is_polaris;
|
||||||
|
|
||||||
dev_dbg(&intf->dev, ": %s called\n", __func__);
|
dev_dbg(&intf->dev, ": %s called\n", __func__);
|
||||||
|
|
||||||
|
@ -937,6 +946,13 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
|
||||||
is_gen3 = usb_match_id(intf, gen3_list) ? 1 : 0;
|
is_gen3 = usb_match_id(intf, gen3_list) ? 1 : 0;
|
||||||
is_microsoft_gen1 = usb_match_id(intf, microsoft_gen1_list) ? 1 : 0;
|
is_microsoft_gen1 = usb_match_id(intf, microsoft_gen1_list) ? 1 : 0;
|
||||||
tx_mask_inverted = usb_match_id(intf, std_tx_mask_list) ? 0 : 1;
|
tx_mask_inverted = usb_match_id(intf, std_tx_mask_list) ? 0 : 1;
|
||||||
|
is_polaris = usb_match_id(intf, cx_polaris_list) ? 1 : 0;
|
||||||
|
|
||||||
|
if (is_polaris) {
|
||||||
|
/* Interface 0 is IR */
|
||||||
|
if (idesc->desc.bInterfaceNumber)
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
/* step through the endpoints to find first bulk in and out endpoint */
|
/* step through the endpoints to find first bulk in and out endpoint */
|
||||||
for (i = 0; i < idesc->desc.bNumEndpoints; ++i) {
|
for (i = 0; i < idesc->desc.bNumEndpoints; ++i) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче