Commit 6f6c625d authored by Jarod Wilson's avatar Jarod Wilson Committed by Mauro Carvalho Chehab

[media] mceusb: add support for Conexant Hybrid TV RDU253S

Another multi-function Conexant device. Interface 0 is IR, though on
this model, TX isn't wired up at all, so I've mixed in support for
models without TX (and verified that lircd says TX isn't supported when
trying to send w/this device).
Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 798174ab
...@@ -146,6 +146,7 @@ enum mceusb_model_type { ...@@ -146,6 +146,7 @@ enum mceusb_model_type {
MCE_GEN3, MCE_GEN3,
MCE_GEN2_TX_INV, MCE_GEN2_TX_INV,
POLARIS_EVK, POLARIS_EVK,
CX_HYBRID_TV,
}; };
struct mceusb_model { struct mceusb_model {
...@@ -154,6 +155,7 @@ struct mceusb_model { ...@@ -154,6 +155,7 @@ struct mceusb_model {
u32 mce_gen3:1; u32 mce_gen3:1;
u32 tx_mask_inverted:1; u32 tx_mask_inverted:1;
u32 is_polaris:1; u32 is_polaris:1;
u32 no_tx:1;
const char *rc_map; /* Allow specify a per-board map */ const char *rc_map; /* Allow specify a per-board map */
const char *name; /* per-board name */ const char *name; /* per-board name */
...@@ -183,7 +185,12 @@ static const struct mceusb_model mceusb_model[] = { ...@@ -183,7 +185,12 @@ static const struct mceusb_model mceusb_model[] = {
* to allow testing it * to allow testing it
*/ */
.rc_map = RC_MAP_RC5_HAUPPAUGE_NEW, .rc_map = RC_MAP_RC5_HAUPPAUGE_NEW,
.name = "cx231xx MCE IR", .name = "Conexant Hybrid TV (cx231xx) MCE IR",
},
[CX_HYBRID_TV] = {
.is_polaris = 1,
.no_tx = 1, /* tx isn't wired up at all */
.name = "Conexant Hybrid TV (cx231xx) MCE IR",
}, },
}; };
...@@ -292,9 +299,12 @@ static struct usb_device_id mceusb_dev_table[] = { ...@@ -292,9 +299,12 @@ 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 */ /* Conexant Hybrid TV "Shelby" Polaris SDK */
{ USB_DEVICE(VENDOR_CONEXANT, 0x58a1), { USB_DEVICE(VENDOR_CONEXANT, 0x58a1),
.driver_info = POLARIS_EVK }, .driver_info = POLARIS_EVK },
/* Conexant Hybrid TV RDU253S Polaris */
{ USB_DEVICE(VENDOR_CONEXANT, 0x58a5),
.driver_info = CX_HYBRID_TV },
/* Terminating entry */ /* Terminating entry */
{ } { }
}; };
...@@ -334,6 +344,7 @@ struct mceusb_dev { ...@@ -334,6 +344,7 @@ struct mceusb_dev {
u32 connected:1; u32 connected:1;
u32 tx_mask_inverted:1; u32 tx_mask_inverted:1;
u32 microsoft_gen1:1; u32 microsoft_gen1:1;
u32 no_tx:1;
} flags; } flags;
/* transmit support */ /* transmit support */
...@@ -724,7 +735,7 @@ static int mceusb_tx_ir(void *priv, int *txbuf, u32 n) ...@@ -724,7 +735,7 @@ static int mceusb_tx_ir(void *priv, int *txbuf, u32 n)
return ret ? ret : n; return ret ? ret : n;
} }
/* Sets active IR outputs -- mce devices typically (all?) have two */ /* Sets active IR outputs -- mce devices typically have two */
static int mceusb_set_tx_mask(void *priv, u32 mask) static int mceusb_set_tx_mask(void *priv, u32 mask)
{ {
struct mceusb_dev *ir = priv; struct mceusb_dev *ir = priv;
...@@ -984,9 +995,11 @@ static void mceusb_get_parameters(struct mceusb_dev *ir) ...@@ -984,9 +995,11 @@ static void mceusb_get_parameters(struct mceusb_dev *ir)
mce_async_out(ir, GET_CARRIER_FREQ, sizeof(GET_CARRIER_FREQ)); mce_async_out(ir, GET_CARRIER_FREQ, sizeof(GET_CARRIER_FREQ));
mce_sync_in(ir, NULL, maxp); mce_sync_in(ir, NULL, maxp);
if (!ir->flags.no_tx) {
/* get the transmitter bitmask */ /* get the transmitter bitmask */
mce_async_out(ir, GET_TX_BITMASK, sizeof(GET_TX_BITMASK)); mce_async_out(ir, GET_TX_BITMASK, sizeof(GET_TX_BITMASK));
mce_sync_in(ir, NULL, maxp); mce_sync_in(ir, NULL, maxp);
}
/* get receiver timeout value */ /* get receiver timeout value */
mce_async_out(ir, GET_RX_TIMEOUT, sizeof(GET_RX_TIMEOUT)); mce_async_out(ir, GET_RX_TIMEOUT, sizeof(GET_RX_TIMEOUT));
...@@ -1035,9 +1048,11 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir) ...@@ -1035,9 +1048,11 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)
props->priv = ir; props->priv = ir;
props->driver_type = RC_DRIVER_IR_RAW; props->driver_type = RC_DRIVER_IR_RAW;
props->allowed_protos = IR_TYPE_ALL; props->allowed_protos = IR_TYPE_ALL;
if (!ir->flags.no_tx) {
props->s_tx_mask = mceusb_set_tx_mask; props->s_tx_mask = mceusb_set_tx_mask;
props->s_tx_carrier = mceusb_set_tx_carrier; props->s_tx_carrier = mceusb_set_tx_carrier;
props->tx_ir = mceusb_tx_ir; props->tx_ir = mceusb_tx_ir;
}
ir->props = props; ir->props = props;
...@@ -1151,6 +1166,7 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf, ...@@ -1151,6 +1166,7 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
ir->len_in = maxp; ir->len_in = maxp;
ir->flags.microsoft_gen1 = is_microsoft_gen1; ir->flags.microsoft_gen1 = is_microsoft_gen1;
ir->flags.tx_mask_inverted = tx_mask_inverted; ir->flags.tx_mask_inverted = tx_mask_inverted;
ir->flags.no_tx = mceusb_model[model].no_tx;
ir->model = model; ir->model = model;
init_ir_raw_event(&ir->rawir); init_ir_raw_event(&ir->rawir);
...@@ -1191,6 +1207,7 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf, ...@@ -1191,6 +1207,7 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
mceusb_get_parameters(ir); mceusb_get_parameters(ir);
if (!ir->flags.no_tx)
mceusb_set_tx_mask(ir, MCE_DEFAULT_TX_MASK); mceusb_set_tx_mask(ir, MCE_DEFAULT_TX_MASK);
usb_set_intfdata(intf, ir); usb_set_intfdata(intf, ir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment