[media] rc-core: document the protocol type
Right now the protocol information is not preserved, rc-core gets handed a scancode but has no idea which protocol it corresponds to. This patch (which required reading through the source/keymap for all drivers, not fun) makes the protocol information explicit which is important documentation and makes it easier to e.g. support multiple protocols with one decoder (think rc5 and rc-streamzap). The information isn't used yet so there should be no functional changes. [m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

父節點
af3a4a9bbe
當前提交
120703f9eb
@@ -565,12 +565,12 @@ static int pctv452e_rc_query(struct dvb_usb_device *d)
|
||||
|
||||
if ((rx[3] == 9) && (rx[12] & 0x01)) {
|
||||
/* got a "press" event */
|
||||
state->last_rc_key = (rx[7] << 8) | rx[6];
|
||||
state->last_rc_key = RC_SCANCODE_RC5(rx[7], rx[6]);
|
||||
if (debug > 2)
|
||||
info("%s: cmd=0x%02x sys=0x%02x\n",
|
||||
__func__, rx[6], rx[7]);
|
||||
|
||||
rc_keydown(d->rc_dev, state->last_rc_key, 0);
|
||||
rc_keydown(d->rc_dev, RC_TYPE_RC5, state->last_rc_key, 0);
|
||||
} else if (state->last_rc_key) {
|
||||
rc_keyup(d->rc_dev);
|
||||
state->last_rc_key = 0;
|
||||
@@ -927,7 +927,7 @@ static struct dvb_usb_device_properties pctv452e_properties = {
|
||||
|
||||
.rc.core = {
|
||||
.rc_codes = RC_MAP_DIB0700_RC5_TABLE,
|
||||
.allowed_protos = RC_BIT_UNKNOWN,
|
||||
.allowed_protos = RC_BIT_RC5,
|
||||
.rc_query = pctv452e_rc_query,
|
||||
.rc_interval = 100,
|
||||
},
|
||||
@@ -980,7 +980,7 @@ static struct dvb_usb_device_properties tt_connect_s2_3600_properties = {
|
||||
|
||||
.rc.core = {
|
||||
.rc_codes = RC_MAP_TT_1500,
|
||||
.allowed_protos = RC_BIT_UNKNOWN,
|
||||
.allowed_protos = RC_BIT_RC5,
|
||||
.rc_query = pctv452e_rc_query,
|
||||
.rc_interval = 100,
|
||||
},
|
||||
|
Reference in New Issue
Block a user