* [PATCH 1/6] V4L/DVB: dib0700: properly implement IR change_protocol
[not found] <cover.1280693675.git.mchehab@redhat.com>
@ 2010-08-01 20:17 ` Mauro Carvalho Chehab
2010-08-01 20:17 ` [PATCH 2/6] V4L/DVB: dib0700: Fix RC protocol logic to properly handle NEC/NECx and RC-5 Mauro Carvalho Chehab
` (4 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-01 20:17 UTC (permalink / raw)
Cc: Linux Media Mailing List
This patch implements change_protocol callback. With this change,
there's no need for an extra modprobe parameter to specify the
protocol. When a table is loaded (either from in-kernel rc-map
tables or via ir-keytable program), the driver will automatically
change the protocol, in order to work with the given table.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/dvb/dvb-usb/dib0700.h b/drivers/media/dvb/dvb-usb/dib0700.h
index 83fc24a..c2c9d23 100644
--- a/drivers/media/dvb/dvb-usb/dib0700.h
+++ b/drivers/media/dvb/dvb-usb/dib0700.h
@@ -60,6 +60,7 @@ extern int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff);
extern struct i2c_algorithm dib0700_i2c_algo;
extern int dib0700_identify_state(struct usb_device *udev, struct dvb_usb_device_properties *props,
struct dvb_usb_device_description **desc, int *cold);
+extern int dib0700_change_protocol(void *priv, u64 ir_type);
extern int dib0700_device_count;
extern int dvb_usb_dib0700_ir_proto;
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
index a05d955..d73a688 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_core.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
@@ -13,10 +13,6 @@ int dvb_usb_dib0700_debug;
module_param_named(debug,dvb_usb_dib0700_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debugging level (1=info,2=fw,4=fwdata,8=data (or-able))." DVB_USB_DEBUG_STATUS);
-int dvb_usb_dib0700_ir_proto = 1;
-module_param(dvb_usb_dib0700_ir_proto, int, 0644);
-MODULE_PARM_DESC(dvb_usb_dib0700_ir_proto, "set ir protocol (0=NEC, 1=RC5 (default), 2=RC6).");
-
static int nb_packet_buffer_size = 21;
module_param(nb_packet_buffer_size, int, 0644);
MODULE_PARM_DESC(nb_packet_buffer_size,
@@ -475,6 +471,39 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
return dib0700_ctrl_wr(adap->dev, b, 4);
}
+int dib0700_change_protocol(void *priv, u64 ir_type)
+{
+ struct dvb_usb_device *d = priv;
+ struct dib0700_state *st = d->priv;
+ u8 rc_setup[3] = { REQUEST_SET_RC, 0, 0 };
+ int new_proto, ret;
+
+ /* Set the IR mode */
+ if (ir_type == IR_TYPE_RC5)
+ new_proto = 1;
+ else if (ir_type == IR_TYPE_NEC)
+ new_proto = 0;
+ else if (ir_type == IR_TYPE_RC6) {
+ if (st->fw_version < 0x10200)
+ return -EINVAL;
+
+ new_proto = 2;
+ } else
+ return -EINVAL;
+
+ rc_setup[1] = new_proto;
+
+ ret = dib0700_ctrl_wr(d, rc_setup, sizeof(rc_setup));
+ if (ret < 0) {
+ err("ir protocol setup failed");
+ return ret;
+ }
+
+ d->props.rc.core.protocol = new_proto;
+
+ return ret;
+}
+
/* Number of keypresses to ignore before start repeating */
#define RC_REPEAT_DELAY_V1_20 10
@@ -524,9 +553,8 @@ static void dib0700_rc_urb_completion(struct urb *purb)
deb_data("IR raw %02X %02X %02X %02X %02X %02X (len %d)\n", buf[0],
buf[1], buf[2], buf[3], buf[4], buf[5], purb->actual_length);
- switch (dvb_usb_dib0700_ir_proto) {
- case 0:
- /* NEC Protocol */
+ switch (d->props.rc.core.protocol) {
+ case IR_TYPE_NEC:
poll_reply.data_state = 0;
poll_reply.system = buf[2];
poll_reply.data = buf[4];
@@ -543,6 +571,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
break;
default:
/* RC5 Protocol */
+ /* TODO: need to check the mapping for RC6 */
poll_reply.report_id = buf[0];
poll_reply.data_state = buf[1];
poll_reply.system = (buf[2] << 8) | buf[3];
@@ -580,18 +609,10 @@ resubmit:
int dib0700_rc_setup(struct dvb_usb_device *d)
{
struct dib0700_state *st = d->priv;
- u8 rc_setup[3] = { REQUEST_SET_RC, dvb_usb_dib0700_ir_proto, 0 };
struct urb *purb;
int ret;
- int i;
-
- /* Set the IR mode */
- i = dib0700_ctrl_wr(d, rc_setup, sizeof(rc_setup));
- if (i < 0) {
- err("ir protocol setup failed");
- return i;
- }
+ /* Poll-based. Don't initialize bulk mode */
if (st->fw_version < 0x10200)
return 0;
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index ee2a84b..f634d2e 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -486,8 +486,6 @@ static int dib0700_rc_query_old_firmware(struct dvb_usb_device *d)
int i;
struct dib0700_state *st = d->priv;
-printk("%s\n", __func__);
-
if (st->fw_version >= 0x10200) {
/* For 1.20 firmware , We need to keep the RC polling
callback so we can reuse the input device setup in
@@ -511,8 +509,8 @@ printk("%s\n", __func__);
dib0700_rc_setup(d); /* reset ir sensor data to prevent false events */
d->last_event = 0;
- switch (dvb_usb_dib0700_ir_proto) {
- case 0:
+ switch (d->props.rc.core.protocol) {
+ case IR_TYPE_NEC:
/* NEC protocol sends repeat code as 0 0 0 FF */
if ((key[3-2] == 0x00) && (key[3-3] == 0x00) &&
(key[3] == 0xff))
@@ -1873,7 +1871,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc.core = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -1903,7 +1907,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc.core = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -1958,7 +1968,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc.core = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -1996,7 +2012,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2068,7 +2090,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2108,7 +2136,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2172,7 +2206,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2215,7 +2255,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_NEC_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
@@ -2280,7 +2326,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
.num_adapters = 1,
@@ -2312,7 +2364,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
.num_adapters = 1,
@@ -2376,7 +2434,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
.num_adapters = 1,
@@ -2416,7 +2480,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_NEC_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
.num_adapters = 2,
@@ -2461,7 +2531,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
.num_adapters = 1,
@@ -2494,7 +2570,13 @@ struct dvb_usb_device_properties dib0700_devices[] = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
.module_name = "dib0700",
- .rc_query = dib0700_rc_query_old_firmware
+ .rc_query = dib0700_rc_query_old_firmware,
+ .rc_props = {
+ .allowed_protos = IR_TYPE_RC5 |
+ IR_TYPE_RC6 |
+ IR_TYPE_NEC,
+ .change_protocol = dib0700_change_protocol,
+ },
},
},
};
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index bcfbf9a..34f7b3b 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -179,6 +179,7 @@ struct dvb_rc_legacy {
/**
* struct dvb_rc properties of remote controller, using rc-core
* @rc_codes: name of rc codes table
+ * @protocol: type of protocol(s) currently used by the driver
* @rc_query: called to query an event event.
* @rc_interval: time in ms between two queries.
* @rc_props: remote controller properties
@@ -186,6 +187,7 @@ struct dvb_rc_legacy {
*/
struct dvb_rc {
char *rc_codes;
+ u64 protocol;
char *module_name;
int (*rc_query) (struct dvb_usb_device *d);
int rc_interval;
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/6] V4L/DVB: dib0700: Fix RC protocol logic to properly handle NEC/NECx and RC-5
[not found] <cover.1280693675.git.mchehab@redhat.com>
2010-08-01 20:17 ` [PATCH 1/6] V4L/DVB: dib0700: properly implement IR change_protocol Mauro Carvalho Chehab
@ 2010-08-01 20:17 ` Mauro Carvalho Chehab
2010-08-01 20:17 ` [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick Mauro Carvalho Chehab
` (3 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-01 20:17 UTC (permalink / raw)
Cc: Linux Media Mailing List
Simplifies the logic for handling firmware 1.20 RC messages, fixing the
logic.
While here, I tried to use a RC-6 remote controller from my TV set, but it
didn't work with dib0700. Not sure why, but maybe this never worked.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
index d73a688..fe81834 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_core.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
@@ -499,7 +499,7 @@ int dib0700_change_protocol(void *priv, u64 ir_type)
return ret;
}
- d->props.rc.core.protocol = new_proto;
+ d->props.rc.core.protocol = ir_type;
return ret;
}
@@ -511,7 +511,13 @@ int dib0700_change_protocol(void *priv, u64 ir_type)
struct dib0700_rc_response {
u8 report_id;
u8 data_state;
- u16 system;
+ union {
+ u16 system16;
+ struct {
+ u8 system;
+ u8 not_system;
+ };
+ };
u8 data;
u8 not_data;
};
@@ -521,9 +527,8 @@ static void dib0700_rc_urb_completion(struct urb *purb)
{
struct dvb_usb_device *d = purb->context;
struct dib0700_state *st;
- struct dib0700_rc_response poll_reply;
- u8 *buf;
- u32 keycode;
+ struct dib0700_rc_response *poll_reply;
+ u32 uninitialized_var(keycode);
u8 toggle;
deb_info("%s()\n", __func__);
@@ -537,7 +542,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
}
st = d->priv;
- buf = (u8 *)purb->transfer_buffer;
+ poll_reply = purb->transfer_buffer;
if (purb->status < 0) {
deb_info("discontinuing polling\n");
@@ -550,52 +555,51 @@ static void dib0700_rc_urb_completion(struct urb *purb)
goto resubmit;
}
- deb_data("IR raw %02X %02X %02X %02X %02X %02X (len %d)\n", buf[0],
- buf[1], buf[2], buf[3], buf[4], buf[5], purb->actual_length);
+ deb_data("IR ID = %02X state = %02X System = %02X %02X Cmd = %02X %02X (len %d)\n",
+ poll_reply->report_id, poll_reply->data_state,
+ poll_reply->system, poll_reply->not_system,
+ poll_reply->data, poll_reply->not_data,
+ purb->actual_length);
switch (d->props.rc.core.protocol) {
case IR_TYPE_NEC:
- poll_reply.data_state = 0;
- poll_reply.system = buf[2];
- poll_reply.data = buf[4];
- poll_reply.not_data = buf[5];
toggle = 0;
/* NEC protocol sends repeat code as 0 0 0 FF */
- if ((poll_reply.system == 0x00) && (poll_reply.data == 0x00)
- && (poll_reply.not_data == 0xff)) {
- poll_reply.data_state = 2;
+ if ((poll_reply->system == 0x00) && (poll_reply->data == 0x00)
+ && (poll_reply->not_data == 0xff)) {
+ poll_reply->data_state = 2;
break;
}
+ if ((poll_reply->system ^ poll_reply->not_system) != 0xff) {
+ deb_data("NEC extended protocol\n");
+ /* NEC extended code - 24 bits */
+ keycode = poll_reply->system16 << 8 | poll_reply->data;
+ } else {
+ deb_data("NEC normal protocol\n");
+ /* normal NEC code - 16 bits */
+ keycode = poll_reply->system << 8 | poll_reply->data;
+ }
+
break;
default:
+ deb_data("RC5 protocol\n");
/* RC5 Protocol */
- /* TODO: need to check the mapping for RC6 */
- poll_reply.report_id = buf[0];
- poll_reply.data_state = buf[1];
- poll_reply.system = (buf[2] << 8) | buf[3];
- poll_reply.data = buf[4];
- poll_reply.not_data = buf[5];
-
- toggle = poll_reply.report_id;
+ toggle = poll_reply->report_id;
+ keycode = poll_reply->system16 << 8 | poll_reply->data;
break;
}
- if ((poll_reply.data + poll_reply.not_data) != 0xff) {
+ if ((poll_reply->data + poll_reply->not_data) != 0xff) {
/* Key failed integrity check */
err("key failed integrity check: %04x %02x %02x",
- poll_reply.system,
- poll_reply.data, poll_reply.not_data);
+ poll_reply->system,
+ poll_reply->data, poll_reply->not_data);
goto resubmit;
}
- deb_data("rid=%02x ds=%02x sm=%04x d=%02x nd=%02x\n",
- poll_reply.report_id, poll_reply.data_state,
- poll_reply.system, poll_reply.data, poll_reply.not_data);
-
- keycode = poll_reply.system << 8 | poll_reply.data;
ir_keydown(d->rc_input_dev, keycode, toggle);
resubmit:
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
[not found] <cover.1280693675.git.mchehab@redhat.com>
2010-08-01 20:17 ` [PATCH 1/6] V4L/DVB: dib0700: properly implement IR change_protocol Mauro Carvalho Chehab
2010-08-01 20:17 ` [PATCH 2/6] V4L/DVB: dib0700: Fix RC protocol logic to properly handle NEC/NECx and RC-5 Mauro Carvalho Chehab
@ 2010-08-01 20:17 ` Mauro Carvalho Chehab
2010-08-02 7:27 ` Richard Zidlicky
2010-08-01 20:21 ` [PATCH 4/6] V4L/DVB: standardize names at rc-dib0700 tables Mauro Carvalho Chehab
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-01 20:17 UTC (permalink / raw)
Cc: Linux Media Mailing List, Udi Atar
Add the proper gpio port for WinTV MiniStick, with the information provided
by Michael.
Thanks-to: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
index cff77e2..dcde606 100644
--- a/drivers/media/dvb/siano/sms-cards.c
+++ b/drivers/media/dvb/siano/sms-cards.c
@@ -67,6 +67,7 @@ static struct sms_board sms_boards[] = {
.board_cfg.leds_power = 26,
.board_cfg.led0 = 27,
.board_cfg.led1 = 28,
+ .board_cfg.ir = 9,
.led_power = 26,
.led_lo = 27,
.led_hi = 28,
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
2010-08-01 20:17 ` [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick Mauro Carvalho Chehab
@ 2010-08-02 7:27 ` Richard Zidlicky
2010-08-03 2:01 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 14+ messages in thread
From: Richard Zidlicky @ 2010-08-02 7:27 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, udia
On Sun, Aug 01, 2010 at 05:17:18PM -0300, Mauro Carvalho Chehab wrote:
> Add the proper gpio port for WinTV MiniStick, with the information provided
> by Michael.
>
> Thanks-to: Michael Krufky <mkrufky@kernellabs.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
> index cff77e2..dcde606 100644
> --- a/drivers/media/dvb/siano/sms-cards.c
> +++ b/drivers/media/dvb/siano/sms-cards.c
> @@ -67,6 +67,7 @@ static struct sms_board sms_boards[] = {
> .board_cfg.leds_power = 26,
> .board_cfg.led0 = 27,
> .board_cfg.led1 = 28,
> + .board_cfg.ir = 9,
^^^^
are you sure about this?
I am using the value of 4 for the ir port and it definitely works.. confused.
Thanks for looking at it, will test the patches as soon as I can.
Richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
2010-08-02 7:27 ` Richard Zidlicky
@ 2010-08-03 2:01 ` Mauro Carvalho Chehab
2010-08-03 13:05 ` Richard Zidlicky
0 siblings, 1 reply; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-03 2:01 UTC (permalink / raw)
To: Richard Zidlicky; +Cc: linux-media, udia, Michael Krufky
Hi Richard,
Em 02-08-2010 04:27, Richard Zidlicky escreveu:
> On Sun, Aug 01, 2010 at 05:17:18PM -0300, Mauro Carvalho Chehab wrote:
>> Add the proper gpio port for WinTV MiniStick, with the information provided
>> by Michael.
>>
>> Thanks-to: Michael Krufky <mkrufky@kernellabs.com>
>> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>>
>> diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
>> index cff77e2..dcde606 100644
>> --- a/drivers/media/dvb/siano/sms-cards.c
>> +++ b/drivers/media/dvb/siano/sms-cards.c
>> @@ -67,6 +67,7 @@ static struct sms_board sms_boards[] = {
>> .board_cfg.leds_power = 26,
>> .board_cfg.led0 = 27,
>> .board_cfg.led1 = 28,
>> + .board_cfg.ir = 9,
> ^^^^
>
> are you sure about this?
>
> I am using the value of 4 for the ir port and it definitely works.. confused.
I got this from a reliable source, and that worked perfectly my with a Model 55009
LF Rev B1F7. What's the model of your device?
> Thanks for looking at it, will test the patches as soon as I can.
I'd appreciate if you could test those patches, as the new implementation is feature-rich,
as it uses the in-kernel decoders via RC subsystem.
>
> Richard
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
Mauro
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
2010-08-03 2:01 ` Mauro Carvalho Chehab
@ 2010-08-03 13:05 ` Richard Zidlicky
2010-08-03 13:32 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 14+ messages in thread
From: Richard Zidlicky @ 2010-08-03 13:05 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, udia, Michael Krufky
Hi,
> Em 02-08-2010 04:27, Richard Zidlicky escreveu:
> > On Sun, Aug 01, 2010 at 05:17:18PM -0300, Mauro Carvalho Chehab wrote:
> >> Add the proper gpio port for WinTV MiniStick, with the information provided
> >> by Michael.
> >>
> >> Thanks-to: Michael Krufky <mkrufky@kernellabs.com>
> >> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> >>
> >> diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
> >> index cff77e2..dcde606 100644
> >> --- a/drivers/media/dvb/siano/sms-cards.c
> >> +++ b/drivers/media/dvb/siano/sms-cards.c
> >> @@ -67,6 +67,7 @@ static struct sms_board sms_boards[] = {
> >> .board_cfg.leds_power = 26,
> >> .board_cfg.led0 = 27,
> >> .board_cfg.led1 = 28,
> >> + .board_cfg.ir = 9,
> > ^^^^
> >
> > are you sure about this?
> >
> > I am using the value of 4 for the ir port and it definitely works.. confused.
>
> I got this from a reliable source, and that worked perfectly my with a Model 55009
> LF Rev B1F7. What's the model of your device?
mine says
Aug 3 14:58:10 localhost kernel: [149778.591862] usb 5-5: New USB device found, idVendor=2040, idProduct=5500
Aug 3 14:58:10 localhost kernel: [149778.591865] usb 5-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 3 14:58:10 localhost kernel: [149778.591868] usb 5-5: Product: WinTV MiniStick
Aug 3 14:58:10 localhost kernel: [149778.591870] usb 5-5: Manufacturer: Hauppauge Computer Works
Aug 3 14:58:10 localhost kernel: [149778.591872] usb 5-5: SerialNumber: f069684c
not sure what else to report.
I will compile and try a new kernel tonight.
Wondering - is this
http://git.sliepen.org/browse?p=inputlirc
usefull to feed the input events to LIRC when trying the new driver with a slightly older
LIRC based distro?
Richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
2010-08-03 13:05 ` Richard Zidlicky
@ 2010-08-03 13:32 ` Mauro Carvalho Chehab
2010-08-03 14:21 ` Jarod Wilson
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-03 13:32 UTC (permalink / raw)
To: Richard Zidlicky; +Cc: linux-media, udia, Michael Krufky
Em 03-08-2010 10:05, Richard Zidlicky escreveu:
> Hi,
>
>> Em 02-08-2010 04:27, Richard Zidlicky escreveu:
>>> On Sun, Aug 01, 2010 at 05:17:18PM -0300, Mauro Carvalho Chehab wrote:
>>>> Add the proper gpio port for WinTV MiniStick, with the information provided
>>>> by Michael.
>>>>
>>>> Thanks-to: Michael Krufky <mkrufky@kernellabs.com>
>>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>>>>
>>>> diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
>>>> index cff77e2..dcde606 100644
>>>> --- a/drivers/media/dvb/siano/sms-cards.c
>>>> +++ b/drivers/media/dvb/siano/sms-cards.c
>>>> @@ -67,6 +67,7 @@ static struct sms_board sms_boards[] = {
>>>> .board_cfg.leds_power = 26,
>>>> .board_cfg.led0 = 27,
>>>> .board_cfg.led1 = 28,
>>>> + .board_cfg.ir = 9,
>>> ^^^^
>>>
>>> are you sure about this?
>>>
>>> I am using the value of 4 for the ir port and it definitely works.. confused.
>>
>> I got this from a reliable source, and that worked perfectly my with a Model 55009
>> LF Rev B1F7. What's the model of your device?
>
> mine says
>
> Aug 3 14:58:10 localhost kernel: [149778.591862] usb 5-5: New USB device found, idVendor=2040, idProduct=5500
> Aug 3 14:58:10 localhost kernel: [149778.591865] usb 5-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> Aug 3 14:58:10 localhost kernel: [149778.591868] usb 5-5: Product: WinTV MiniStick
> Aug 3 14:58:10 localhost kernel: [149778.591870] usb 5-5: Manufacturer: Hauppauge Computer Works
> Aug 3 14:58:10 localhost kernel: [149778.591872] usb 5-5: SerialNumber: f069684c
>
> not sure what else to report.
The model number is on a label at the back of the stick (at least, mine have it).
> I will compile and try a new kernel tonight.
>
> Wondering - is this
> http://git.sliepen.org/browse?p=inputlirc
> usefull to feed the input events to LIRC when trying the new driver with a slightly older
> LIRC based distro?
The in-kernel lirc support need a new version of LIRC since a few ioctls numbers were changed,
to avoid needing to write a code in kernel to handle compatibility between 32 and 64 bit kernels.
If you're running a 32 bits kernel, it may work.
Btw, you don't need to use lirc if all you want is to replace the IR keycodes. You can use, instead,
the ir-keycode program, available at http://git.linuxtv.org/v4l-utils.git. There are several keycode
tables already mapped there. Of course, lirc offers some extra features.
Cheers,
Mauro.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
2010-08-03 13:32 ` Mauro Carvalho Chehab
@ 2010-08-03 14:21 ` Jarod Wilson
2010-08-03 14:46 ` Richard Zidlicky
2010-08-04 7:30 ` Richard Zidlicky
2 siblings, 0 replies; 14+ messages in thread
From: Jarod Wilson @ 2010-08-03 14:21 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Richard Zidlicky, linux-media, udia, Michael Krufky
On Tue, Aug 3, 2010 at 9:32 AM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
> Em 03-08-2010 10:05, Richard Zidlicky escreveu:
>> Hi,
>>
>>> Em 02-08-2010 04:27, Richard Zidlicky escreveu:
>>>> On Sun, Aug 01, 2010 at 05:17:18PM -0300, Mauro Carvalho Chehab wrote:
>>>>> Add the proper gpio port for WinTV MiniStick, with the information provided
>>>>> by Michael.
>>>>>
>>>>> Thanks-to: Michael Krufky <mkrufky@kernellabs.com>
>>>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>>>>>
>>>>> diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
>>>>> index cff77e2..dcde606 100644
>>>>> --- a/drivers/media/dvb/siano/sms-cards.c
>>>>> +++ b/drivers/media/dvb/siano/sms-cards.c
>>>>> @@ -67,6 +67,7 @@ static struct sms_board sms_boards[] = {
>>>>> .board_cfg.leds_power = 26,
>>>>> .board_cfg.led0 = 27,
>>>>> .board_cfg.led1 = 28,
>>>>> + .board_cfg.ir = 9,
>>>> ^^^^
>>>>
>>>> are you sure about this?
>>>>
>>>> I am using the value of 4 for the ir port and it definitely works.. confused.
>>>
>>> I got this from a reliable source, and that worked perfectly my with a Model 55009
>>> LF Rev B1F7. What's the model of your device?
>>
>> mine says
>>
>> Aug 3 14:58:10 localhost kernel: [149778.591862] usb 5-5: New USB device found, idVendor=2040, idProduct=5500
>> Aug 3 14:58:10 localhost kernel: [149778.591865] usb 5-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
>> Aug 3 14:58:10 localhost kernel: [149778.591868] usb 5-5: Product: WinTV MiniStick
>> Aug 3 14:58:10 localhost kernel: [149778.591870] usb 5-5: Manufacturer: Hauppauge Computer Works
>> Aug 3 14:58:10 localhost kernel: [149778.591872] usb 5-5: SerialNumber: f069684c
>>
>> not sure what else to report.
>
> The model number is on a label at the back of the stick (at least, mine have it).
>
>> I will compile and try a new kernel tonight.
>>
>> Wondering - is this
>> http://git.sliepen.org/browse?p=inputlirc
>> usefull to feed the input events to LIRC when trying the new driver with a slightly older
>> LIRC based distro?
>
> The in-kernel lirc support need a new version of LIRC since a few ioctls numbers were changed,
> to avoid needing to write a code in kernel to handle compatibility between 32 and 64 bit kernels.
> If you're running a 32 bits kernel, it may work.
Should also be able to skirt around the issue if you don't use the
/dev/lircX interface to get data out of the receiver. For example, one
could use the lircd devinput driver, a la "lircd -H devinput -d
/dev/input/by-id/<my-remote's-input-device>", and I don't think the
ioctl changes should matter.
--
Jarod Wilson
jarod@wilsonet.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
2010-08-03 13:32 ` Mauro Carvalho Chehab
2010-08-03 14:21 ` Jarod Wilson
@ 2010-08-03 14:46 ` Richard Zidlicky
2010-08-03 15:23 ` Mauro Carvalho Chehab
2010-08-04 7:30 ` Richard Zidlicky
2 siblings, 1 reply; 14+ messages in thread
From: Richard Zidlicky @ 2010-08-03 14:46 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, udia, Michael Krufky
On Tue, Aug 03, 2010 at 10:32:15AM -0300, Mauro Carvalho Chehab wrote:
> The model number is on a label at the back of the stick (at least, mine have it).
ah.. I was wondering whichever magical tool you are using. So here is my number:
55009 LF Rev A1F7
> Btw, you don't need to use lirc if all you want is to replace the IR keycodes. You can use, instead,
> the ir-keycode program, available at http://git.linuxtv.org/v4l-utils.git. There are several keycode
> tables already mapped there. Of course, lirc offers some extra features.
thanks for the tipps.. the userspace configuration seems more confusing than the kernel
internals. So far I get keycodes that work nicely in an xterm and for controling firefox
but not much else.
Richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
2010-08-03 14:46 ` Richard Zidlicky
@ 2010-08-03 15:23 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-03 15:23 UTC (permalink / raw)
To: Richard Zidlicky; +Cc: linux-media, udia, Michael Krufky
Em 03-08-2010 11:46, Richard Zidlicky escreveu:
> On Tue, Aug 03, 2010 at 10:32:15AM -0300, Mauro Carvalho Chehab wrote:
>
>> The model number is on a label at the back of the stick (at least, mine have it).
>
> ah.. I was wondering whichever magical tool you are using. So here is my number:
> 55009 LF Rev A1F7
Ok, so it is close to mine.
>> Btw, you don't need to use lirc if all you want is to replace the IR keycodes. You can use, instead,
>> the ir-keycode program, available at http://git.linuxtv.org/v4l-utils.git. There are several keycode
>> tables already mapped there. Of course, lirc offers some extra features.
>
> thanks for the tipps.. the userspace configuration seems more confusing than the kernel
> internals. So far I get keycodes that work nicely in an xterm and for controling firefox
> but not much else.
Yes, that's the expected results without lirc. It will just use the RC as if it were a keyboard.
You can play with the IR, via ir-keycode, to use a different remote controller, or to reassign a
different keycode to a key. For example, reassigning the scancode for channel up as KEY_UP.
With lirc, you can also associate a keycode to an specific application, using for example, one key
to open your favorite TV application. There are some discussions about having a similar support
directly into X window managers, and direct support for RC into media applications, but, there's
no current patches for that, afaik.
Cheers,
Mauro.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
2010-08-03 13:32 ` Mauro Carvalho Chehab
2010-08-03 14:21 ` Jarod Wilson
2010-08-03 14:46 ` Richard Zidlicky
@ 2010-08-04 7:30 ` Richard Zidlicky
2 siblings, 0 replies; 14+ messages in thread
From: Richard Zidlicky @ 2010-08-04 7:30 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, udia, Michael Krufky
Hi,
not much success.. no key events appear in userspace, not sure if the hardware receives
anything. Tried both 4 and 9 ports which does not seem to make any difference.
lshal does list the IR port, as it did with the siano specific code.
Could be my fault, I have cherrypicked patches and applied them on top of Linus 2.6.35.
Is there an easy way to get a diff from your version against Linus 2.6.35? I would
rather not fetch the whole repo over my mobile connection;)
Aug 4 09:04:50 localhost kernel: [ 260.142019] usb 5-5: new high speed USB device using ehci_hcd and address 3
Aug 4 09:04:50 localhost kernel: [ 260.256894] usb 5-5: New USB device found, idVendor=2040, idProduct=5500
Aug 4 09:04:50 localhost kernel: [ 260.256896] usb 5-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 4 09:04:50 localhost kernel: [ 260.256899] usb 5-5: Product: WinTV MiniStick
Aug 4 09:04:50 localhost kernel: [ 260.256901] usb 5-5: Manufacturer: Hauppauge Computer Works
Aug 4 09:04:50 localhost kernel: [ 260.256903] usb 5-5: SerialNumber: f069684c
Aug 4 09:04:50 localhost kernel: [ 260.308378] IR NEC protocol handler initialized
Aug 4 09:04:50 localhost kernel: [ 260.322270] IR RC5(x) protocol handler initialized
Aug 4 09:04:50 localhost kernel: [ 260.332901] IR RC6 protocol handler initialized
Aug 4 09:04:50 localhost kernel: [ 260.363497] IR JVC protocol handler initialized
Aug 4 09:04:50 localhost kernel: [ 260.407230] IR Sony protocol handler initialized
Aug 4 09:04:51 localhost kernel: [ 260.958061] smscore_set_device_mode: firmware download success: sms1xxx-hcw-55xxx-dvbt-02.fw
Aug 4 09:04:51 localhost kernel: [ 260.958400] sms_ir_init: Allocating input device
Aug 4 09:04:51 localhost kernel: [ 260.958416] sms_ir_init: IR port 0, timeout 100 ms
Aug 4 09:04:51 localhost kernel: [ 260.958419] sms_ir_init: Input device (IR) SMS IR (Hauppauge WinTV MiniStick) is set for key
events
Aug 4 09:04:51 localhost kernel: [ 261.010020] Registered IR keymap rc-rc5-hauppauge-new
Aug 4 09:04:51 localhost kernel: [ 261.010571] input: SMS IR (Hauppauge WinTV MiniStick) as /devices/pci0000:00/0000:00:1d.7/usb
5/5-5/rc/rc0/input5
Aug 4 09:04:51 localhost kernel: [ 261.010797] rc0: SMS IR (Hauppauge WinTV MiniStick) as /devices/pci0000:00/0000:00:1d.7/usb5/
5-5/rc/rc0
Aug 4 09:04:51 localhost kernel: [ 261.037230] DVB: registering new adapter (Hauppauge WinTV MiniStick)
Aug 4 09:04:51 localhost kernel: [ 261.039296] DVB: registering adapter 0 frontend 0 (Siano Mobile Digital MDTV Receiver)...
Aug 4 09:04:51 localhost kernel: [ 261.044846] usbcore: registered new interface driver smsusb
Richard
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/6] V4L/DVB: standardize names at rc-dib0700 tables
[not found] <cover.1280693675.git.mchehab@redhat.com>
` (2 preceding siblings ...)
2010-08-01 20:17 ` [PATCH 3/6] V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick Mauro Carvalho Chehab
@ 2010-08-01 20:21 ` Mauro Carvalho Chehab
2010-08-01 20:21 ` [PATCH 5/6] V4L/DVB: sms: properly initialize IR phys and IR name Mauro Carvalho Chehab
2010-08-01 20:21 ` [PATCH 6/6] V4L/DVB: sms: Convert IR support to use the Remote Controller core Mauro Carvalho Chehab
5 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-01 20:21 UTC (permalink / raw)
To: Udi Atar; +Cc: Linux Media Mailing List
Use a more standard way to name those tables, as they're currently used
by the script that coverts those tables to be loaded via userspace.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/IR/keymaps/rc-dib0700-nec.c b/drivers/media/IR/keymaps/rc-dib0700-nec.c
index f5809f4..ae18320 100644
--- a/drivers/media/IR/keymaps/rc-dib0700-nec.c
+++ b/drivers/media/IR/keymaps/rc-dib0700-nec.c
@@ -17,7 +17,7 @@
#include <media/rc-map.h>
-static struct ir_scancode dib0700_table[] = {
+static struct ir_scancode dib0700_nec_table[] = {
/* Key codes for the Pixelview SBTVD remote */
{ 0x8613, KEY_MUTE },
{ 0x8612, KEY_POWER },
@@ -98,10 +98,10 @@ static struct ir_scancode dib0700_table[] = {
{ 0x4542, KEY_SELECT }, /* Select video input, 'Select' for Teletext */
};
-static struct rc_keymap dib0700_map = {
+static struct rc_keymap dib0700_nec_map = {
.map = {
- .scan = dib0700_table,
- .size = ARRAY_SIZE(dib0700_table),
+ .scan = dib0700_nec_table,
+ .size = ARRAY_SIZE(dib0700_nec_table),
.ir_type = IR_TYPE_NEC,
.name = RC_MAP_DIB0700_NEC_TABLE,
}
@@ -109,12 +109,12 @@ static struct rc_keymap dib0700_map = {
static int __init init_rc_map(void)
{
- return ir_register_map(&dib0700_map);
+ return ir_register_map(&dib0700_nec_map);
}
static void __exit exit_rc_map(void)
{
- ir_unregister_map(&dib0700_map);
+ ir_unregister_map(&dib0700_nec_map);
}
module_init(init_rc_map)
diff --git a/drivers/media/IR/keymaps/rc-dib0700-rc5.c b/drivers/media/IR/keymaps/rc-dib0700-rc5.c
index e2d0fd2..4a4797c 100644
--- a/drivers/media/IR/keymaps/rc-dib0700-rc5.c
+++ b/drivers/media/IR/keymaps/rc-dib0700-rc5.c
@@ -17,7 +17,7 @@
#include <media/rc-map.h>
-static struct ir_scancode dib0700_table[] = {
+static struct ir_scancode dib0700_rc5_table[] = {
/* Key codes for the tiny Pinnacle remote*/
{ 0x0700, KEY_MUTE },
{ 0x0701, KEY_MENU }, /* Pinnacle logo */
@@ -209,10 +209,10 @@ static struct ir_scancode dib0700_table[] = {
{ 0x1d3d, KEY_POWER },
};
-static struct rc_keymap dib0700_map = {
+static struct rc_keymap dib0700_rc5_map = {
.map = {
- .scan = dib0700_table,
- .size = ARRAY_SIZE(dib0700_table),
+ .scan = dib0700_rc5_table,
+ .size = ARRAY_SIZE(dib0700_rc5_table),
.ir_type = IR_TYPE_RC5,
.name = RC_MAP_DIB0700_RC5_TABLE,
}
@@ -220,12 +220,12 @@ static struct rc_keymap dib0700_map = {
static int __init init_rc_map(void)
{
- return ir_register_map(&dib0700_map);
+ return ir_register_map(&dib0700_rc5_map);
}
static void __exit exit_rc_map(void)
{
- ir_unregister_map(&dib0700_map);
+ ir_unregister_map(&dib0700_rc5_map);
}
module_init(init_rc_map)
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/6] V4L/DVB: sms: properly initialize IR phys and IR name
[not found] <cover.1280693675.git.mchehab@redhat.com>
` (3 preceding siblings ...)
2010-08-01 20:21 ` [PATCH 4/6] V4L/DVB: standardize names at rc-dib0700 tables Mauro Carvalho Chehab
@ 2010-08-01 20:21 ` Mauro Carvalho Chehab
2010-08-01 20:21 ` [PATCH 6/6] V4L/DVB: sms: Convert IR support to use the Remote Controller core Mauro Carvalho Chehab
5 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-01 20:21 UTC (permalink / raw)
Cc: Linux Media Mailing List, Udi Atar
sms were using a non-compliant nomenclature for the USB devices. Fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/dvb/siano/smsir.c b/drivers/media/dvb/siano/smsir.c
index a56eac7..f8a4fd6 100644
--- a/drivers/media/dvb/siano/smsir.c
+++ b/drivers/media/dvb/siano/smsir.c
@@ -22,6 +22,7 @@
#include <linux/types.h>
#include <linux/input.h>
+#include <media/ir-core.h>
#include "smscoreapi.h"
#include "smsir.h"
@@ -247,6 +248,7 @@ void sms_ir_event(struct smscore_device_t *coredev, const char *buf, int len)
int sms_ir_init(struct smscore_device_t *coredev)
{
struct input_dev *input_dev;
+ int board_id = smscore_get_board_id(coredev);
sms_log("Allocating input device");
input_dev = input_allocate_device();
@@ -256,8 +258,7 @@ int sms_ir_init(struct smscore_device_t *coredev)
}
coredev->ir.input_dev = input_dev;
- coredev->ir.ir_kb_type =
- sms_get_board(smscore_get_board_id(coredev))->ir_kb_type;
+ coredev->ir.ir_kb_type = sms_get_board(board_id)->ir_kb_type;
coredev->ir.keyboard_layout_map =
keyboard_layout_maps[coredev->ir.ir_kb_type].
keyboard_layout_map;
@@ -269,11 +270,15 @@ int sms_ir_init(struct smscore_device_t *coredev)
coredev->ir.controller, coredev->ir.timeout);
snprintf(coredev->ir.name,
- IR_DEV_NAME_MAX_LEN,
- "SMS IR w/kbd type %d",
- coredev->ir.ir_kb_type);
+ sizeof(coredev->ir.name),
+ "SMS IR (%s)",
+ sms_get_board(board_id)->name);
+
+ strlcpy(coredev->ir.phys, coredev->devpath, sizeof(coredev->ir.phys));
+ strlcat(coredev->ir.phys, "/ir0", sizeof(coredev->ir.phys));
+
input_dev->name = coredev->ir.name;
- input_dev->phys = coredev->ir.name;
+ input_dev->phys = coredev->ir.phys;
input_dev->dev.parent = coredev->device;
/* Key press events only */
diff --git a/drivers/media/dvb/siano/smsir.h b/drivers/media/dvb/siano/smsir.h
index b7d703e..77e6505 100644
--- a/drivers/media/dvb/siano/smsir.h
+++ b/drivers/media/dvb/siano/smsir.h
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <linux/input.h>
-#define IR_DEV_NAME_MAX_LEN 23 /* "SMS IR kbd type nn\0" */
+#define IR_DEV_NAME_MAX_LEN 40
#define IR_KEYBOARD_LAYOUT_SIZE 64
#define IR_DEFAULT_TIMEOUT 100
@@ -78,7 +78,8 @@ struct smscore_device_t;
struct ir_t {
struct input_dev *input_dev;
enum ir_kb_type ir_kb_type;
- char name[IR_DEV_NAME_MAX_LEN+1];
+ char name[IR_DEV_NAME_MAX_LEN + 1];
+ char phys[32];
u16 *keyboard_layout_map;
u32 timeout;
u32 controller;
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
index a9c27fb..50d4338 100644
--- a/drivers/media/dvb/siano/smsusb.c
+++ b/drivers/media/dvb/siano/smsusb.c
@@ -352,8 +352,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
params.num_buffers = MAX_BUFFERS;
params.sendrequest_handler = smsusb_sendrequest;
params.context = dev;
- snprintf(params.devpath, sizeof(params.devpath),
- "usb\\%d-%s", dev->udev->bus->busnum, dev->udev->devpath);
+ usb_make_path(dev->udev, params.devpath, sizeof(params.devpath));
/* register in smscore */
rc = smscore_register_device(¶ms, &dev->coredev);
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/6] V4L/DVB: sms: Convert IR support to use the Remote Controller core
[not found] <cover.1280693675.git.mchehab@redhat.com>
` (4 preceding siblings ...)
2010-08-01 20:21 ` [PATCH 5/6] V4L/DVB: sms: properly initialize IR phys and IR name Mauro Carvalho Chehab
@ 2010-08-01 20:21 ` Mauro Carvalho Chehab
5 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2010-08-01 20:21 UTC (permalink / raw)
Cc: Linux Media Mailing List, Udi Atar
Rewrites the siano IR implementation. The previous implementation were
non-standard. As such, it has issues if more than one device registers IR,
as there used to have some static constants used during protocol decoding
phase. Also, it used to implement its on RAW decoder, and only for RC5.
The new code uses RC core subsystem for handling IR. This brings several
new features to the driver, including:
- Allow to dynamically replace the IR keycodes;
- Supports all existing raw decoders (JVC, NEC, RC-5, RC-6, SONY);
- Supports lirc dev;
- Doesn't have race conditions when more than one sms IR is
registered;
- The code size for the IR implementation is very small;
- it exports the IR features via /sys/class/rc.
Cc: Udi Atar <udia@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index 94a8577..15a0f19 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -497,8 +497,9 @@ int __ir_input_register(struct input_dev *input_dev,
goto out_event;
}
- IR_dprintk(1, "Registered input device on %s for %s remote.\n",
- driver_name, rc_tab->name);
+ IR_dprintk(1, "Registered input device on %s for %s remote%s.\n",
+ driver_name, rc_tab->name,
+ ir_dev->props->driver_type == RC_DRIVER_IR_RAW ? " in raw mode" : "");
return 0;
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
index dcde606..25b43e5 100644
--- a/drivers/media/dvb/siano/sms-cards.c
+++ b/drivers/media/dvb/siano/sms-cards.c
@@ -64,6 +64,7 @@ static struct sms_board sms_boards[] = {
.type = SMS_NOVA_B0,
.fw[DEVICE_MODE_ISDBT_BDA] = "sms1xxx-hcw-55xxx-isdbt-02.fw",
.fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
+ .rc_codes = RC_MAP_RC5_HAUPPAUGE_NEW,
.board_cfg.leds_power = 26,
.board_cfg.led0 = 27,
.board_cfg.led1 = 28,
diff --git a/drivers/media/dvb/siano/sms-cards.h b/drivers/media/dvb/siano/sms-cards.h
index 8f19fc0..d8cdf75 100644
--- a/drivers/media/dvb/siano/sms-cards.h
+++ b/drivers/media/dvb/siano/sms-cards.h
@@ -75,7 +75,7 @@ struct sms_board {
enum sms_device_type_st type;
char *name, *fw[DEVICE_MODE_MAX];
struct sms_board_gpio_cfg board_cfg;
- enum ir_kb_type ir_kb_type;
+ char *rc_codes; /* Name of IR codes table */
/* gpios */
int led_power, led_hi, led_lo, lna_ctrl, rf_switch;
diff --git a/drivers/media/dvb/siano/smsir.c b/drivers/media/dvb/siano/smsir.c
index f8a4fd6..fbb6742 100644
--- a/drivers/media/dvb/siano/smsir.c
+++ b/drivers/media/dvb/siano/smsir.c
@@ -4,6 +4,11 @@
MDTV receiver kernel modules.
Copyright (C) 2006-2009, Uri Shkolnik
+ Copyright (c) 2010 - Mauro Carvalho Chehab
+ - Ported the driver to use rc-core
+ - IR raw event decoding is now done at rc-core
+ - Code almost re-written
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
@@ -22,227 +27,27 @@
#include <linux/types.h>
#include <linux/input.h>
-#include <media/ir-core.h>
#include "smscoreapi.h"
#include "smsir.h"
#include "sms-cards.h"
-/* In order to add new IR remote control -
- * 1) Add it to the <enum ir_kb_type> @ smsir,h,
- * 2) Add its map to keyboard_layout_maps below
- * 3) Set your board (sms-cards sub-module) to use it
- */
-
-static struct keyboard_layout_map_t keyboard_layout_maps[] = {
- [SMS_IR_KB_DEFAULT_TV] = {
- .ir_protocol = IR_RC5,
- .rc5_kbd_address = KEYBOARD_ADDRESS_TV1,
- .keyboard_layout_map = {
- KEY_0, KEY_1, KEY_2,
- KEY_3, KEY_4, KEY_5,
- KEY_6, KEY_7, KEY_8,
- KEY_9, 0, 0, KEY_POWER,
- KEY_MUTE, 0, 0,
- KEY_VOLUMEUP, KEY_VOLUMEDOWN,
- KEY_BRIGHTNESSUP,
- KEY_BRIGHTNESSDOWN, KEY_CHANNELUP,
- KEY_CHANNELDOWN,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- }
- },
- [SMS_IR_KB_HCW_SILVER] = {
- .ir_protocol = IR_RC5,
- .rc5_kbd_address = KEYBOARD_ADDRESS_LIGHTING1,
- .keyboard_layout_map = {
- KEY_0, KEY_1, KEY_2,
- KEY_3, KEY_4, KEY_5,
- KEY_6, KEY_7, KEY_8,
- KEY_9, KEY_TEXT, KEY_RED,
- KEY_RADIO, KEY_MENU,
- KEY_SUBTITLE,
- KEY_MUTE, KEY_VOLUMEUP,
- KEY_VOLUMEDOWN, KEY_PREVIOUS, 0,
- KEY_UP, KEY_DOWN, KEY_LEFT,
- KEY_RIGHT, KEY_VIDEO, KEY_AUDIO,
- KEY_MHP, KEY_EPG, KEY_TV,
- 0, KEY_NEXTSONG, KEY_EXIT,
- KEY_CHANNELUP, KEY_CHANNELDOWN,
- KEY_CHANNEL, 0,
- KEY_PREVIOUSSONG, KEY_ENTER,
- KEY_SLEEP, 0, 0, KEY_BLUE,
- 0, 0, 0, 0, KEY_GREEN, 0,
- KEY_PAUSE, 0, KEY_REWIND,
- 0, KEY_FASTFORWARD, KEY_PLAY,
- KEY_STOP, KEY_RECORD,
- KEY_YELLOW, 0, 0, KEY_SELECT,
- KEY_ZOOM, KEY_POWER, 0, 0
- }
- },
- { } /* Terminating entry */
-};
-
-static u32 ir_pos;
-static u32 ir_word;
-static u32 ir_toggle;
-
-#define RC5_PUSH_BIT(dst, bit, pos) \
- { dst <<= 1; dst |= bit; pos++; }
-
-
-static void sms_ir_rc5_event(struct smscore_device_t *coredev,
- u32 toggle, u32 addr, u32 cmd)
-{
- bool toggle_changed;
- u16 keycode;
-
- sms_log("IR RC5 word: address %d, command %d, toggle %d",
- addr, cmd, toggle);
-
- toggle_changed = ir_toggle != toggle;
- /* keep toggle */
- ir_toggle = toggle;
-
- if (addr !=
- keyboard_layout_maps[coredev->ir.ir_kb_type].rc5_kbd_address)
- return; /* Check for valid address */
-
- keycode =
- keyboard_layout_maps
- [coredev->ir.ir_kb_type].keyboard_layout_map[cmd];
-
- if (!toggle_changed &&
- (keycode != KEY_VOLUMEUP && keycode != KEY_VOLUMEDOWN))
- return; /* accept only repeated volume, reject other keys */
-
- sms_log("kernel input keycode (from ir) %d", keycode);
- input_report_key(coredev->ir.input_dev, keycode, 1);
- input_sync(coredev->ir.input_dev);
-
-}
-
-/* decode raw bit pattern to RC5 code */
-/* taken from ir-functions.c */
-static u32 ir_rc5_decode(unsigned int code)
-{
-/* unsigned int org_code = code;*/
- unsigned int pair;
- unsigned int rc5 = 0;
- int i;
-
- for (i = 0; i < 14; ++i) {
- pair = code & 0x3;
- code >>= 2;
-
- rc5 <<= 1;
- switch (pair) {
- case 0:
- case 2:
- break;
- case 1:
- rc5 |= 1;
- break;
- case 3:
-/* dprintk(1, "ir-common: ir_rc5_decode(%x) bad code\n", org_code);*/
- sms_log("bad code");
- return 0;
- }
- }
-/*
- dprintk(1, "ir-common: code=%x, rc5=%x, start=%x,
- toggle=%x, address=%x, "
- "instr=%x\n", rc5, org_code, RC5_START(rc5),
- RC5_TOGGLE(rc5), RC5_ADDR(rc5), RC5_INSTR(rc5));
-*/
- return rc5;
-}
-
-static void sms_rc5_parse_word(struct smscore_device_t *coredev)
-{
- #define RC5_START(x) (((x)>>12)&3)
- #define RC5_TOGGLE(x) (((x)>>11)&1)
- #define RC5_ADDR(x) (((x)>>6)&0x1F)
- #define RC5_INSTR(x) ((x)&0x3F)
-
- int i, j;
- u32 rc5_word = 0;
-
- /* Reverse the IR word direction */
- for (i = 0 ; i < 28 ; i++)
- RC5_PUSH_BIT(rc5_word, (ir_word>>i)&1, j)
-
- rc5_word = ir_rc5_decode(rc5_word);
- /* sms_log("temp = 0x%x, rc5_code = 0x%x", ir_word, rc5_word); */
-
- sms_ir_rc5_event(coredev,
- RC5_TOGGLE(rc5_word),
- RC5_ADDR(rc5_word),
- RC5_INSTR(rc5_word));
-}
-
-
-static void sms_rc5_accumulate_bits(struct smscore_device_t *coredev,
- s32 ir_sample)
-{
- #define RC5_TIME_GRANULARITY 200
- #define RC5_DEF_BIT_TIME 889
- #define RC5_MAX_SAME_BIT_CONT 4
- #define RC5_WORD_LEN 27 /* 28 bit */
-
- u32 i, j;
- s32 delta_time;
- u32 time = (ir_sample > 0) ? ir_sample : (0-ir_sample);
- u32 level = (ir_sample < 0) ? 0 : 1;
-
- for (i = RC5_MAX_SAME_BIT_CONT; i > 0; i--) {
- delta_time = time - (i*RC5_DEF_BIT_TIME) + RC5_TIME_GRANULARITY;
- if (delta_time < 0)
- continue; /* not so many consecutive bits */
- if (delta_time > (2 * RC5_TIME_GRANULARITY)) {
- /* timeout */
- if (ir_pos == (RC5_WORD_LEN-1))
- /* complete last bit */
- RC5_PUSH_BIT(ir_word, level, ir_pos)
-
- if (ir_pos == RC5_WORD_LEN)
- sms_rc5_parse_word(coredev);
- else if (ir_pos) /* timeout within a word */
- sms_log("IR error parsing a word");
-
- ir_pos = 0;
- ir_word = 0;
- /* sms_log("timeout %d", time); */
- break;
- }
- /* The time is within the range of this number of bits */
- for (j = 0 ; j < i ; j++)
- RC5_PUSH_BIT(ir_word, level, ir_pos)
-
- break;
- }
-}
+#define MODULE_NAME "smsmdtv"
void sms_ir_event(struct smscore_device_t *coredev, const char *buf, int len)
{
- #define IR_DATA_RECEIVE_MAX_LEN 520 /* 128*4 + 4 + 4 */
- u32 i;
- enum ir_protocol ir_protocol =
- keyboard_layout_maps[coredev->ir.ir_kb_type]
- .ir_protocol;
- s32 *samples;
- int count = len>>2;
+ int i;
+ const s32 *samples = (const void *)buf;
- samples = (s32 *)buf;
-/* sms_log("IR buffer received, length = %d", count);*/
+ for (i = 0; i < len >> 2; i++) {
+ struct ir_raw_event ev;
- for (i = 0; i < count; i++)
- if (ir_protocol == IR_RC5)
- sms_rc5_accumulate_bits(coredev, samples[i]);
- /* IR_RCMM not implemented */
+ ev.duration = abs(samples[i]) * 1000; /* Convert to ns */
+ ev.pulse = (samples[i] > 0) ? false : true;
+
+ ir_raw_event_store(coredev->ir.input_dev, &ev);
+ }
+ ir_raw_event_handle(coredev->ir.input_dev);
}
int sms_ir_init(struct smscore_device_t *coredev)
@@ -258,21 +63,14 @@ int sms_ir_init(struct smscore_device_t *coredev)
}
coredev->ir.input_dev = input_dev;
- coredev->ir.ir_kb_type = sms_get_board(board_id)->ir_kb_type;
- coredev->ir.keyboard_layout_map =
- keyboard_layout_maps[coredev->ir.ir_kb_type].
- keyboard_layout_map;
- sms_log("IR remote keyboard type is %d", coredev->ir.ir_kb_type);
coredev->ir.controller = 0; /* Todo: vega/nova SPI number */
coredev->ir.timeout = IR_DEFAULT_TIMEOUT;
sms_log("IR port %d, timeout %d ms",
coredev->ir.controller, coredev->ir.timeout);
- snprintf(coredev->ir.name,
- sizeof(coredev->ir.name),
- "SMS IR (%s)",
- sms_get_board(board_id)->name);
+ snprintf(coredev->ir.name, sizeof(coredev->ir.name),
+ "SMS IR (%s)", sms_get_board(board_id)->name);
strlcpy(coredev->ir.phys, coredev->devpath, sizeof(coredev->ir.phys));
strlcat(coredev->ir.phys, "/ir0", sizeof(coredev->ir.phys));
@@ -281,13 +79,22 @@ int sms_ir_init(struct smscore_device_t *coredev)
input_dev->phys = coredev->ir.phys;
input_dev->dev.parent = coredev->device;
- /* Key press events only */
- input_dev->evbit[0] = BIT_MASK(EV_KEY);
- input_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);
+#if 0
+ /* TODO: properly initialize the parameters bellow */
+ input_dev->id.bustype = BUS_USB;
+ input_dev->id.version = 1;
+ input_dev->id.vendor = le16_to_cpu(dev->udev->descriptor.idVendor);
+ input_dev->id.product = le16_to_cpu(dev->udev->descriptor.idProduct);
+#endif
+
+ coredev->ir.props.priv = coredev;
+ coredev->ir.props.driver_type = RC_DRIVER_IR_RAW;
+ coredev->ir.props.allowed_protos = IR_TYPE_ALL;
sms_log("Input device (IR) %s is set for key events", input_dev->name);
- if (input_register_device(input_dev)) {
+ if (ir_input_register(input_dev, sms_get_board(board_id)->rc_codes,
+ &coredev->ir.props, MODULE_NAME)) {
sms_err("Failed to register device");
input_free_device(input_dev);
return -EACCES;
@@ -299,8 +106,7 @@ int sms_ir_init(struct smscore_device_t *coredev)
void sms_ir_exit(struct smscore_device_t *coredev)
{
if (coredev->ir.input_dev)
- input_unregister_device(coredev->ir.input_dev);
+ ir_input_unregister(coredev->ir.input_dev);
sms_log("");
-}
-
+}
\ No newline at end of file
diff --git a/drivers/media/dvb/siano/smsir.h b/drivers/media/dvb/siano/smsir.h
index 77e6505..926e247 100644
--- a/drivers/media/dvb/siano/smsir.h
+++ b/drivers/media/dvb/siano/smsir.h
@@ -4,6 +4,11 @@ Siano Mobile Silicon, Inc.
MDTV receiver kernel modules.
Copyright (C) 2006-2009, Uri Shkolnik
+ Copyright (c) 2010 - Mauro Carvalho Chehab
+ - Ported the driver to use rc-core
+ - IR raw event decoding is now done at rc-core
+ - Code almost re-written
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
@@ -23,64 +28,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define __SMS_IR_H__
#include <linux/input.h>
+#include <media/ir-core.h>
-#define IR_DEV_NAME_MAX_LEN 40
-#define IR_KEYBOARD_LAYOUT_SIZE 64
#define IR_DEFAULT_TIMEOUT 100
-enum ir_kb_type {
- SMS_IR_KB_DEFAULT_TV,
- SMS_IR_KB_HCW_SILVER
-};
-
-enum rc5_keyboard_address {
- KEYBOARD_ADDRESS_TV1 = 0,
- KEYBOARD_ADDRESS_TV2 = 1,
- KEYBOARD_ADDRESS_TELETEXT = 2,
- KEYBOARD_ADDRESS_VIDEO = 3,
- KEYBOARD_ADDRESS_LV1 = 4,
- KEYBOARD_ADDRESS_VCR1 = 5,
- KEYBOARD_ADDRESS_VCR2 = 6,
- KEYBOARD_ADDRESS_EXPERIMENTAL = 7,
- KEYBOARD_ADDRESS_SAT1 = 8,
- KEYBOARD_ADDRESS_CAMERA = 9,
- KEYBOARD_ADDRESS_SAT2 = 10,
- KEYBOARD_ADDRESS_CDV = 12,
- KEYBOARD_ADDRESS_CAMCORDER = 13,
- KEYBOARD_ADDRESS_PRE_AMP = 16,
- KEYBOARD_ADDRESS_TUNER = 17,
- KEYBOARD_ADDRESS_RECORDER1 = 18,
- KEYBOARD_ADDRESS_PRE_AMP1 = 19,
- KEYBOARD_ADDRESS_CD_PLAYER = 20,
- KEYBOARD_ADDRESS_PHONO = 21,
- KEYBOARD_ADDRESS_SATA = 22,
- KEYBOARD_ADDRESS_RECORDER2 = 23,
- KEYBOARD_ADDRESS_CDR = 26,
- KEYBOARD_ADDRESS_LIGHTING = 29,
- KEYBOARD_ADDRESS_LIGHTING1 = 30, /* KEYBOARD_ADDRESS_HCW_SILVER */
- KEYBOARD_ADDRESS_PHONE = 31,
- KEYBOARD_ADDRESS_NOT_RC5 = 0xFFFF
-};
-
-enum ir_protocol {
- IR_RC5,
- IR_RCMM
-};
-
-struct keyboard_layout_map_t {
- enum ir_protocol ir_protocol;
- enum rc5_keyboard_address rc5_kbd_address;
- u16 keyboard_layout_map[IR_KEYBOARD_LAYOUT_SIZE];
-};
-
struct smscore_device_t;
struct ir_t {
struct input_dev *input_dev;
- enum ir_kb_type ir_kb_type;
- char name[IR_DEV_NAME_MAX_LEN + 1];
+ char name[40];
char phys[32];
- u16 *keyboard_layout_map;
+
+ char *rc_codes;
+ u64 protocol;
+ struct ir_dev_props props;
+
u32 timeout;
u32 controller;
};
--
1.7.1
^ permalink raw reply related [flat|nested] 14+ messages in thread