diff options
author | Magnus Alm <magnus.alm@gmail.com> | 2009-11-13 11:48:24 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 21:10:51 +0300 |
commit | ca39d84d438b609af127f2eb161cd9029afbc9a7 (patch) | |
tree | 04cccd6ae583ae496943248198af370c0d0be34a /drivers/media/video/em28xx/em28xx-input.c | |
parent | 5d26b6443292027314a2e2c9178140e60acd3587 (diff) | |
download | linux-ca39d84d438b609af127f2eb161cd9029afbc9a7.tar.xz |
V4L/DVB: em28xx: fix for "Leadtek winfast tv usbii deluxe"
fix Video/Sound support "Leadtek winfast tv usbii deluxe".
Now, it is working Stereo, IR, Radio, TV, Svideo and Composite.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-input.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-input.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 69dcf0cc1f1e..1fb754e20875 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c @@ -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 **********************************************************/ |