Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226272
b: refs/heads/master
c: 2f4f58d
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 29, 2010
1 parent a70d8c7 commit ef4bb25
Show file tree
Hide file tree
Showing 111 changed files with 275 additions and 275 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b088ba658b3438056dab4d744701364db3f08b9a
refs/heads/master: 2f4f58d689dd71dea67407b74405a3c43e797cb1
6 changes: 3 additions & 3 deletions trunk/drivers/media/dvb/dvb-usb/a800.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_pr
return 0;
}

static struct ir_scancode ir_codes_a800_table[] = {
static struct rc_map_table rc_map_a800_table[] = {
{ 0x0201, KEY_PROG1 }, /* SOURCE */
{ 0x0200, KEY_POWER }, /* POWER */
{ 0x0205, KEY_1 }, /* 1 */
Expand Down Expand Up @@ -148,8 +148,8 @@ static struct dvb_usb_device_properties a800_properties = {

.rc.legacy = {
.rc_interval = DEFAULT_RC_INTERVAL,
.rc_key_map = ir_codes_a800_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_a800_table),
.rc_map_table = rc_map_a800_table,
.rc_map_size = ARRAY_SIZE(rc_map_a800_table),
.rc_query = a800_rc_query,
},

Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/media/dvb/dvb-usb/af9005-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ MODULE_PARM_DESC(debug,

#define deb_decode(args...) dprintk(dvb_usb_af9005_remote_debug,0x01,args)

struct ir_scancode ir_codes_af9005_table[] = {
struct rc_map_table rc_map_af9005_table[] = {

{0x01b7, KEY_POWER},
{0x01a7, KEY_VOLUMEUP},
Expand Down Expand Up @@ -74,7 +74,7 @@ struct ir_scancode ir_codes_af9005_table[] = {
{0x00d5, KEY_GOTO}, /* marked jump on the remote */
};

int ir_codes_af9005_table_size = ARRAY_SIZE(ir_codes_af9005_table);
int rc_map_af9005_table_size = ARRAY_SIZE(rc_map_af9005_table);

static int repeatable_keys[] = {
KEY_VOLUMEUP,
Expand Down Expand Up @@ -130,10 +130,10 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event,
deb_decode("code != inverted code\n");
return 0;
}
for (i = 0; i < ir_codes_af9005_table_size; i++) {
if (rc5_custom(&ir_codes_af9005_table[i]) == cust
&& rc5_data(&ir_codes_af9005_table[i]) == dat) {
*event = ir_codes_af9005_table[i].keycode;
for (i = 0; i < rc_map_af9005_table_size; i++) {
if (rc5_custom(&rc_map_af9005_table[i]) == cust
&& rc5_data(&rc_map_af9005_table[i]) == dat) {
*event = rc_map_af9005_table[i].keycode;
*state = REMOTE_KEY_PRESSED;
deb_decode
("key pressed, event %x\n", *event);
Expand All @@ -146,8 +146,8 @@ int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len, u32 * event,
return 0;
}

EXPORT_SYMBOL(ir_codes_af9005_table);
EXPORT_SYMBOL(ir_codes_af9005_table_size);
EXPORT_SYMBOL(rc_map_af9005_table);
EXPORT_SYMBOL(rc_map_af9005_table_size);
EXPORT_SYMBOL(af9005_rc_decode);

MODULE_AUTHOR("Luca Olivetti <luca@ventoso.org>");
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/media/dvb/dvb-usb/af9005.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,8 @@ static struct dvb_usb_device_properties af9005_properties = {

.rc.legacy = {
.rc_interval = 200,
.rc_key_map = NULL,
.rc_key_map_size = 0,
.rc_map_table = NULL,
.rc_map_size = 0,
.rc_query = af9005_rc_query,
},

Expand Down Expand Up @@ -1070,14 +1070,14 @@ static int __init af9005_usb_module_init(void)
return result;
}
rc_decode = symbol_request(af9005_rc_decode);
rc_keys = symbol_request(ir_codes_af9005_table);
rc_keys_size = symbol_request(ir_codes_af9005_table_size);
rc_keys = symbol_request(rc_map_af9005_table);
rc_keys_size = symbol_request(rc_map_af9005_table_size);
if (rc_decode == NULL || rc_keys == NULL || rc_keys_size == NULL) {
err("af9005_rc_decode function not found, disabling remote");
af9005_properties.rc.legacy.rc_query = NULL;
} else {
af9005_properties.rc.legacy.rc_key_map = rc_keys;
af9005_properties.rc.legacy.rc_key_map_size = *rc_keys_size;
af9005_properties.rc.legacy.rc_map_table = rc_keys;
af9005_properties.rc.legacy.rc_map_size = *rc_keys_size;
}

return 0;
Expand All @@ -1089,9 +1089,9 @@ static void __exit af9005_usb_module_exit(void)
if (rc_decode != NULL)
symbol_put(af9005_rc_decode);
if (rc_keys != NULL)
symbol_put(ir_codes_af9005_table);
symbol_put(rc_map_af9005_table);
if (rc_keys_size != NULL)
symbol_put(ir_codes_af9005_table_size);
symbol_put(rc_map_af9005_table_size);
/* deregister this driver from the USB subsystem */
usb_deregister(&af9005_usb_driver);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/dvb/dvb-usb/af9005.h
Original file line number Diff line number Diff line change
Expand Up @@ -3490,7 +3490,7 @@ extern u8 regmask[8];
/* remote control decoder */
extern int af9005_rc_decode(struct dvb_usb_device *d, u8 * data, int len,
u32 * event, int *state);
extern struct ir_scancode ir_codes_af9005_table[];
extern int ir_codes_af9005_table_size;
extern struct rc_map_table rc_map_af9005_table[];
extern int rc_map_af9005_table_size;

#endif
6 changes: 3 additions & 3 deletions trunk/drivers/media/dvb/dvb-usb/az6027.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static int az6027_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
}

/* keys for the enclosed remote control */
static struct ir_scancode ir_codes_az6027_table[] = {
static struct rc_map_table rc_map_az6027_table[] = {
{ 0x01, KEY_1 },
{ 0x02, KEY_2 },
};
Expand Down Expand Up @@ -1126,8 +1126,8 @@ static struct dvb_usb_device_properties az6027_properties = {
.read_mac_address = az6027_read_mac_addr,
*/
.rc.legacy = {
.rc_key_map = ir_codes_az6027_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_az6027_table),
.rc_map_table = rc_map_az6027_table,
.rc_map_size = ARRAY_SIZE(rc_map_az6027_table),
.rc_interval = 400,
.rc_query = az6027_rc_query,
},
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/media/dvb/dvb-usb/cinergyT2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap)
return 0;
}

static struct ir_scancode ir_codes_cinergyt2_table[] = {
static struct rc_map_table rc_map_cinergyt2_table[] = {
{ 0x0401, KEY_POWER },
{ 0x0402, KEY_1 },
{ 0x0403, KEY_2 },
Expand Down Expand Up @@ -219,8 +219,8 @@ static struct dvb_usb_device_properties cinergyt2_properties = {

.rc.legacy = {
.rc_interval = 50,
.rc_key_map = ir_codes_cinergyt2_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_cinergyt2_table),
.rc_map_table = rc_map_cinergyt2_table,
.rc_map_size = ARRAY_SIZE(rc_map_cinergyt2_table),
.rc_query = cinergyt2_rc_query,
},

Expand Down
62 changes: 31 additions & 31 deletions trunk/drivers/media/dvb/dvb-usb/cxusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ static int cxusb_d680_dmb_streaming_ctrl(

static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
{
struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map;
struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
u8 ircode[4];
int i;

Expand All @@ -394,7 +394,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
*event = 0;
*state = REMOTE_NO_KEY_PRESSED;

for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) {
for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) {
if (rc5_custom(&keymap[i]) == ircode[2] &&
rc5_data(&keymap[i]) == ircode[3]) {
*event = keymap[i].keycode;
Expand All @@ -410,7 +410,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
int *state)
{
struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map;
struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
u8 ircode[4];
int i;
struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD,
Expand All @@ -422,7 +422,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
if (cxusb_i2c_xfer(&d->i2c_adap, &msg, 1) != 1)
return 0;

for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) {
for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) {
if (rc5_custom(&keymap[i]) == ircode[1] &&
rc5_data(&keymap[i]) == ircode[2]) {
*event = keymap[i].keycode;
Expand All @@ -438,7 +438,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event,
static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
int *state)
{
struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map;
struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table;
u8 ircode[2];
int i;

Expand All @@ -448,7 +448,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
if (cxusb_ctrl_msg(d, 0x10, NULL, 0, ircode, 2) < 0)
return 0;

for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) {
for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) {
if (rc5_custom(&keymap[i]) == ircode[0] &&
rc5_data(&keymap[i]) == ircode[1]) {
*event = keymap[i].keycode;
Expand All @@ -461,7 +461,7 @@ static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event,
return 0;
}

static struct ir_scancode ir_codes_dvico_mce_table[] = {
static struct rc_map_table rc_map_dvico_mce_table[] = {
{ 0xfe02, KEY_TV },
{ 0xfe0e, KEY_MP3 },
{ 0xfe1a, KEY_DVD },
Expand Down Expand Up @@ -509,7 +509,7 @@ static struct ir_scancode ir_codes_dvico_mce_table[] = {
{ 0xfe4e, KEY_POWER },
};

static struct ir_scancode ir_codes_dvico_portable_table[] = {
static struct rc_map_table rc_map_dvico_portable_table[] = {
{ 0xfc02, KEY_SETUP }, /* Profile */
{ 0xfc43, KEY_POWER2 },
{ 0xfc06, KEY_EPG },
Expand Down Expand Up @@ -548,7 +548,7 @@ static struct ir_scancode ir_codes_dvico_portable_table[] = {
{ 0xfc00, KEY_UNKNOWN }, /* HD */
};

static struct ir_scancode ir_codes_d680_dmb_table[] = {
static struct rc_map_table rc_map_d680_dmb_table[] = {
{ 0x0038, KEY_UNKNOWN }, /* TV/AV */
{ 0x080c, KEY_ZOOM },
{ 0x0800, KEY_0 },
Expand Down Expand Up @@ -923,15 +923,15 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap)
return -EIO;

/* try to determine if there is no IR decoder on the I2C bus */
for (i = 0; adap->dev->props.rc.legacy.rc_key_map != NULL && i < 5; i++) {
for (i = 0; adap->dev->props.rc.legacy.rc_map_table != NULL && i < 5; i++) {
msleep(20);
if (cxusb_i2c_xfer(&adap->dev->i2c_adap, &msg, 1) != 1)
goto no_IR;
if (ircode[0] == 0 && ircode[1] == 0)
continue;
if (ircode[2] + ircode[3] != 0xff) {
no_IR:
adap->dev->props.rc.legacy.rc_key_map = NULL;
adap->dev->props.rc.legacy.rc_map_table = NULL;
info("No IR receiver detected on this device.");
break;
}
Expand Down Expand Up @@ -1453,8 +1453,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = {

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_dvico_portable_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table),
.rc_map_table = rc_map_dvico_portable_table,
.rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
.rc_query = cxusb_rc_query,
},

Expand Down Expand Up @@ -1506,8 +1506,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = {

.rc.legacy = {
.rc_interval = 150,
.rc_key_map = ir_codes_dvico_mce_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table),
.rc_map_table = rc_map_dvico_mce_table,
.rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table),
.rc_query = cxusb_rc_query,
},

Expand Down Expand Up @@ -1567,8 +1567,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = {

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_dvico_portable_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table),
.rc_map_table = rc_map_dvico_portable_table,
.rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
.rc_query = cxusb_rc_query,
},

Expand Down Expand Up @@ -1619,8 +1619,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = {

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_dvico_portable_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table),
.rc_map_table = rc_map_dvico_portable_table,
.rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
.rc_query = cxusb_rc_query,
},

Expand Down Expand Up @@ -1670,8 +1670,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = {

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_dvico_mce_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table),
.rc_map_table = rc_map_dvico_mce_table,
.rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table),
.rc_query = cxusb_bluebird2_rc_query,
},

Expand Down Expand Up @@ -1720,8 +1720,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = {

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_dvico_portable_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table),
.rc_map_table = rc_map_dvico_portable_table,
.rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
.rc_query = cxusb_bluebird2_rc_query,
},

Expand Down Expand Up @@ -1772,8 +1772,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_dvico_portable_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_portable_table),
.rc_map_table = rc_map_dvico_portable_table,
.rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table),
.rc_query = cxusb_rc_query,
},

Expand Down Expand Up @@ -1865,8 +1865,8 @@ struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = {

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_dvico_mce_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_dvico_mce_table),
.rc_map_table = rc_map_dvico_mce_table,
.rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table),
.rc_query = cxusb_rc_query,
},

Expand Down Expand Up @@ -1915,8 +1915,8 @@ static struct dvb_usb_device_properties cxusb_d680_dmb_properties = {

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_d680_dmb_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table),
.rc_map_table = rc_map_d680_dmb_table,
.rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table),
.rc_query = cxusb_d680_dmb_rc_query,
},

Expand Down Expand Up @@ -1966,8 +1966,8 @@ static struct dvb_usb_device_properties cxusb_mygica_d689_properties = {

.rc.legacy = {
.rc_interval = 100,
.rc_key_map = ir_codes_d680_dmb_table,
.rc_key_map_size = ARRAY_SIZE(ir_codes_d680_dmb_table),
.rc_map_table = rc_map_d680_dmb_table,
.rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table),
.rc_query = cxusb_d680_dmb_rc_query,
},

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/dvb/dvb-usb/dibusb-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach);
/*
* common remote control stuff
*/
struct ir_scancode ir_codes_dibusb_table[] = {
struct rc_map_table rc_map_dibusb_table[] = {
/* Key codes for the little Artec T1/Twinhan/HAMA/ remote. */
{ 0x0016, KEY_POWER },
{ 0x0010, KEY_MUTE },
Expand Down Expand Up @@ -456,7 +456,7 @@ struct ir_scancode ir_codes_dibusb_table[] = {
{ 0x804e, KEY_ENTER },
{ 0x804f, KEY_VOLUMEDOWN },
};
EXPORT_SYMBOL(ir_codes_dibusb_table);
EXPORT_SYMBOL(rc_map_dibusb_table);

int dibusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
{
Expand Down
Loading

0 comments on commit ef4bb25

Please sign in to comment.