diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-18 15:32:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 09:46:42 -0400 |
commit | 56e92f60c3baa08a66a025ba4ed10c15c4a059cb (patch) | |
tree | 75f108fefe4b71736262f0ec62da71782f9b25ef /drivers | |
parent | 9efd85dfff92d9b52675045362677064321332bf (diff) |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/IR/mceusb.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/IR/mceusb.c b/drivers/media/IR/mceusb.c index 6825da5771f6..a726f63ecfea 100644 --- a/drivers/media/IR/mceusb.c +++ b/drivers/media/IR/mceusb.c | |||
@@ -104,6 +104,7 @@ static int debug; | |||
104 | #define VENDOR_NORTHSTAR 0x04eb | 104 | #define VENDOR_NORTHSTAR 0x04eb |
105 | #define VENDOR_REALTEK 0x0bda | 105 | #define VENDOR_REALTEK 0x0bda |
106 | #define VENDOR_TIVO 0x105a | 106 | #define VENDOR_TIVO 0x105a |
107 | #define VENDOR_CONEXANT 0x0572 | ||
107 | 108 | ||
108 | static struct usb_device_id mceusb_dev_table[] = { | 109 | static struct usb_device_id mceusb_dev_table[] = { |
109 | /* Original Microsoft MCE IR Transceiver (often HP-branded) */ | 110 | /* Original Microsoft MCE IR Transceiver (often HP-branded) */ |
@@ -198,6 +199,8 @@ static struct usb_device_id mceusb_dev_table[] = { | |||
198 | { USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) }, | 199 | { USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) }, |
199 | /* TiVo PC IR Receiver */ | 200 | /* TiVo PC IR Receiver */ |
200 | { USB_DEVICE(VENDOR_TIVO, 0x2000) }, | 201 | { USB_DEVICE(VENDOR_TIVO, 0x2000) }, |
202 | /* Conexant SDK */ | ||
203 | { USB_DEVICE(VENDOR_CONEXANT, 0x58a1) }, | ||
201 | /* Terminating entry */ | 204 | /* Terminating entry */ |
202 | { } | 205 | { } |
203 | }; | 206 | }; |
@@ -229,6 +232,11 @@ static struct usb_device_id std_tx_mask_list[] = { | |||
229 | {} | 232 | {} |
230 | }; | 233 | }; |
231 | 234 | ||
235 | static struct usb_device_id cx_polaris_list[] = { | ||
236 | { USB_DEVICE(VENDOR_CONEXANT, 0x58a1) }, | ||
237 | {} | ||
238 | }; | ||
239 | |||
232 | /* data structure for each usb transceiver */ | 240 | /* data structure for each usb transceiver */ |
233 | struct mceusb_dev { | 241 | struct mceusb_dev { |
234 | /* ir-core bits */ | 242 | /* ir-core bits */ |
@@ -929,6 +937,7 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf, | |||
929 | bool is_gen3; | 937 | bool is_gen3; |
930 | bool is_microsoft_gen1; | 938 | bool is_microsoft_gen1; |
931 | bool tx_mask_inverted; | 939 | bool tx_mask_inverted; |
940 | bool is_polaris; | ||
932 | 941 | ||
933 | dev_dbg(&intf->dev, ": %s called\n", __func__); | 942 | dev_dbg(&intf->dev, ": %s called\n", __func__); |
934 | 943 | ||
@@ -937,6 +946,13 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf, | |||
937 | is_gen3 = usb_match_id(intf, gen3_list) ? 1 : 0; | 946 | is_gen3 = usb_match_id(intf, gen3_list) ? 1 : 0; |
938 | is_microsoft_gen1 = usb_match_id(intf, microsoft_gen1_list) ? 1 : 0; | 947 | is_microsoft_gen1 = usb_match_id(intf, microsoft_gen1_list) ? 1 : 0; |
939 | tx_mask_inverted = usb_match_id(intf, std_tx_mask_list) ? 0 : 1; | 948 | tx_mask_inverted = usb_match_id(intf, std_tx_mask_list) ? 0 : 1; |
949 | is_polaris = usb_match_id(intf, cx_polaris_list) ? 1 : 0; | ||
950 | |||
951 | if (is_polaris) { | ||
952 | /* Interface 0 is IR */ | ||
953 | if (idesc->desc.bInterfaceNumber) | ||
954 | return -ENODEV; | ||
955 | } | ||
940 | 956 | ||
941 | /* step through the endpoints to find first bulk in and out endpoint */ | 957 | /* step through the endpoints to find first bulk in and out endpoint */ |
942 | for (i = 0; i < idesc->desc.bNumEndpoints; ++i) { | 958 | for (i = 0; i < idesc->desc.bNumEndpoints; ++i) { |