diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-30 00:36:12 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-30 00:36:12 -0200 |
commit | cc32a31b441fde4d431e0688f8ed4d24227d560f (patch) | |
tree | b3ec104b803110b411540beef2c8a70780c9386f /linux/drivers/media | |
parent | 0f9b6245afd4197cd3e92b390985f6e9e4c2b09c (diff) | |
download | mediapointer-dvb-s2-cc32a31b441fde4d431e0688f8ed4d24227d560f.tar.gz mediapointer-dvb-s2-cc32a31b441fde4d431e0688f8ed4d24227d560f.tar.bz2 |
Add support for analog tv on HVR-950
From: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch adds USB ID for HVR-950. It also adds the callback for handling
firmware loading.
Thanks to Markus Reichberger for the reset commands.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-cards.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-i2c.c | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c index 29d7031d1..b9a11dee2 100644 --- a/linux/drivers/media/video/em28xx/em28xx-cards.c +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c @@ -345,6 +345,7 @@ struct usb_device_id em28xx_id_table [] = { { USB_DEVICE(0x2040, 0x4200), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, { USB_DEVICE(0x2304, 0x0207), .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, { USB_DEVICE(0x2040, 0x6500), .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, + { USB_DEVICE(0x2040, 0x6513), .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, { USB_DEVICE(0x0ccd, 0x0042), .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS }, { USB_DEVICE(0x0ccd, 0x0047), .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS }, { }, diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c index 5d102ec8c..209370e2b 100644 --- a/linux/drivers/media/video/em28xx/em28xx-i2c.c +++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c @@ -28,6 +28,7 @@ #include <linux/video_decoder.h> #include "em28xx.h" +#include "tuner-xc2028.h" #include <media/v4l2-common.h> #include <media/tuner.h> @@ -402,6 +403,26 @@ static void dec_use(struct i2c_adapter *adap) } #endif +static int em28xx_tuner_callback(void *ptr, int command, int arg) +{ + int rc = 0; + struct em28xx *dev = ptr; + + if (dev->tuner_type != TUNER_XC2028) + return 0; + + switch (command) { + case XC2028_TUNER_RESET: + /* FIXME: This is device-dependent */ + dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1); + dev->em28xx_write_regs_req(dev, 0x00, 0x12, "\x67", 1); + + msleep(140); + break; + } + return rc; +} + static int em28xx_set_tuner(int check_eeprom, struct i2c_client *client) { struct em28xx *dev = client->adapter->algo_data; @@ -411,6 +432,8 @@ static int em28xx_set_tuner(int check_eeprom, struct i2c_client *client) tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; tun_setup.type = dev->tuner_type; tun_setup.addr = dev->tuner_addr; + tun_setup.tuner_callback = em28xx_tuner_callback; + em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup); } |