Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181620
b: refs/heads/master
c: ca39d84
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Alm authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 80c5997 commit 050d899
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 7 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: 5d26b6443292027314a2e2c9178140e60acd3587
refs/heads/master: ca39d84d438b609af127f2eb161cd9029afbc9a7
48 changes: 48 additions & 0 deletions trunk/drivers/media/IR/ir-keymaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -3393,3 +3393,51 @@ struct ir_scancode_table ir_codes_nec_terratec_cinergy_xs_table = {
};
EXPORT_SYMBOL_GPL(ir_codes_nec_terratec_cinergy_xs_table);


/* Leadtek Winfast TV USB II Deluxe remote
Magnus Alm <magnus.alm@gmail.com>
*/
static struct ir_scancode ir_codes_winfast_usbii_deluxe[] = {
{ 0x62, KEY_0},
{ 0x75, KEY_1},
{ 0x76, KEY_2},
{ 0x77, KEY_3},
{ 0x79, KEY_4},
{ 0x7a, KEY_5},
{ 0x7b, KEY_6},
{ 0x7d, KEY_7},
{ 0x7e, KEY_8},
{ 0x7f, KEY_9},

{ 0x38, KEY_CAMERA}, /* SNAPSHOT */
{ 0x37, KEY_RECORD}, /* RECORD */
{ 0x35, KEY_TIME}, /* TIMESHIFT */

{ 0x74, KEY_VOLUMEUP}, /* VOLUMEUP */
{ 0x78, KEY_VOLUMEDOWN}, /* VOLUMEDOWN */
{ 0x64, KEY_MUTE}, /* MUTE */

{ 0x21, KEY_CHANNEL}, /* SURF */
{ 0x7c, KEY_CHANNELUP}, /* CHANNELUP */
{ 0x60, KEY_CHANNELDOWN}, /* CHANNELDOWN */
{ 0x61, KEY_LAST}, /* LAST CHANNEL (RECALL) */

{ 0x72, KEY_VIDEO}, /* INPUT MODES (TV/FM) */

{ 0x70, KEY_POWER2}, /* TV ON/OFF */

{ 0x39, KEY_CYCLEWINDOWS}, /* MINIMIZE (BOSS) */
{ 0x3a, KEY_NEW}, /* PIP */
{ 0x73, KEY_ZOOM}, /* FULLSECREEN */

{ 0x66, KEY_INFO}, /* OSD (DISPLAY) */

{ 0x31, KEY_DOT}, /* '.' */
{ 0x63, KEY_ENTER}, /* ENTER */

};
struct ir_scancode_table ir_codes_winfast_usbii_deluxe_table = {
.scan = ir_codes_winfast_usbii_deluxe,
.size = ARRAY_SIZE(ir_codes_winfast_usbii_deluxe),
};
EXPORT_SYMBOL_GPL(ir_codes_winfast_usbii_deluxe_table);
29 changes: 23 additions & 6 deletions trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,21 +461,30 @@ struct em28xx_board em28xx_boards[] = {
.name = "Leadtek Winfast USB II Deluxe",
.valid = EM28XX_BOARD_NOT_VALIDATED,
.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
.tda9887_conf = TDA9887_PRESENT,
.has_ir_i2c = 1,
.tvaudio_addr = 0x58,
.tda9887_conf = TDA9887_PRESENT |
TDA9887_PORT2_ACTIVE |
TDA9887_QSS,
.decoder = EM28XX_SAA711X,
.adecoder = EM28XX_TVAUDIO,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
.vmux = SAA7115_COMPOSITE2,
.amux = EM28XX_AMUX_VIDEO,
.vmux = SAA7115_COMPOSITE4,
.amux = EM28XX_AMUX_AUX,
}, {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = SAA7115_COMPOSITE0,
.vmux = SAA7115_COMPOSITE5,
.amux = EM28XX_AMUX_LINE_IN,
}, {
.type = EM28XX_VMUX_SVIDEO,
.vmux = SAA7115_COMPOSITE0,
.vmux = SAA7115_SVIDEO3,
.amux = EM28XX_AMUX_LINE_IN,
} },
.radio = {
.type = EM28XX_RADIO,
.amux = EM28XX_AMUX_AUX,
}
},
[EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
.name = "Videology 20K14XUSB USB2.0",
Expand Down Expand Up @@ -2259,9 +2268,12 @@ static int em28xx_hint_board(struct em28xx *dev)
/* ----------------------------------------------------------------------- */
void em28xx_register_i2c_ir(struct em28xx *dev)
{
/* Leadtek winfast tv USBII deluxe can find a non working IR-device */
/* at address 0x18, so if that address is needed for another board in */
/* the future, please put it after 0x1f. */
struct i2c_board_info info;
const unsigned short addr_list[] = {
0x30, 0x47, I2C_CLIENT_END
0x1f, 0x30, 0x47, I2C_CLIENT_END
};

if (disable_ir)
Expand Down Expand Up @@ -2344,6 +2356,11 @@ void em28xx_card_setup(struct em28xx *dev)
dev->board.has_msp34xx = 1;
}
break;
case EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE:
dev->init_data.ir_codes = &ir_codes_winfast_usbii_deluxe_table;;
dev->init_data.get_key = em28xx_get_key_winfast_usbii_deluxe;
dev->init_data.name = "i2c IR (EM2820 Winfast TV USBII Deluxe)";
break;
}
case EM2882_BOARD_KWORLD_ATSC_315U:
em28xx_write_reg(dev, 0x0d, 0x42);
Expand Down
30 changes: 30 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,36 @@ int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key,
return 1;
}

int em28xx_get_key_winfast_usbii_deluxe(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
{
unsigned char subaddr, keydetect, key;

struct i2c_msg msg[] = { { .addr = ir->c->addr, .flags = 0, .buf = &subaddr, .len = 1},

{ .addr = ir->c->addr, .flags = I2C_M_RD, .buf = &keydetect, .len = 1} };

subaddr = 0x10;
if (2 != i2c_transfer(ir->c->adapter, msg, 2)) {
i2cdprintk("read error\n");
return -EIO;
}
if (keydetect == 0x00)
return 0;

subaddr = 0x00;
msg[1].buf = &key;
if (2 != i2c_transfer(ir->c->adapter, msg, 2)) {
i2cdprintk("read error\n");
return -EIO;
}
if (key == 0x00)
return 0;

*ir_key = key;
*ir_raw = key;
return 1;
}

/**********************************************************
Poll based get keycode functions
**********************************************************/
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw);
int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw);
int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key,
u32 *ir_raw);
int em28xx_get_key_winfast_usbii_deluxe(struct IR_i2c *ir, u32 *ir_key,
u32 *ir_raw);
void em28xx_register_snapshot_button(struct em28xx *dev);
void em28xx_deregister_snapshot_button(struct em28xx *dev);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/ir-kbd-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
ir_codes = &ir_codes_pv951_table;
break;
case 0x18:
case 0x1f:
case 0x1a:
name = "Hauppauge";
ir->get_key = get_key_haup;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/media/ir-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,5 @@ extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table;
extern struct ir_scancode_table ir_codes_videomate_s350_table;
extern struct ir_scancode_table ir_codes_gadmei_rm008z_table;
extern struct ir_scancode_table ir_codes_nec_terratec_cinergy_xs_table;
extern struct ir_scancode_table ir_codes_winfast_usbii_deluxe_table;
#endif

0 comments on commit 050d899

Please sign in to comment.