diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2009-05-03 22:27:02 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2009-05-03 22:27:02 -0400 |
commit | add6db3f5ca3f7cf4e3a0fd1f2c347319537e10a (patch) | |
tree | 1462586bfae946c6e01d42804ceec7bb1eadbff4 /linux/drivers/media | |
parent | d72082806f7688e66f823051fe7bc4f62acca533 (diff) | |
download | mediapointer-dvb-s2-add6db3f5ca3f7cf4e3a0fd1f2c347319537e10a.tar.gz mediapointer-dvb-s2-add6db3f5ca3f7cf4e3a0fd1f2c347319537e10a.tar.bz2 |
cx23885: add ATSC/QAM tuning support for Hauppauge WinTV-HVR1270
From: Michael Krufky <mkrufky@kernellabs.com>
Priority: normal
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-cards.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-dvb.c | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-cards.c b/linux/drivers/media/video/cx23885/cx23885-cards.c index bd608b4a0..299182227 100644 --- a/linux/drivers/media/video/cx23885/cx23885-cards.c +++ b/linux/drivers/media/video/cx23885/cx23885-cards.c @@ -184,6 +184,7 @@ struct cx23885_board cx23885_boards[] = { }, [CX23885_BOARD_HAUPPAUGE_HVR1270] = { .name = "Hauppauge WinTV-HVR1270", + .portc = CX23885_MPEG_DVB, }, }; const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c index eb3293789..b60f68a6d 100644 --- a/linux/drivers/media/video/cx23885/cx23885-dvb.c +++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c @@ -52,6 +52,7 @@ #include "cimax2.h" #include "netup-eeprom.h" #include "netup-init.h" +#include "lgdt3305.h" static unsigned int debug; @@ -227,6 +228,28 @@ static struct tda18271_config hauppauge_hvr1200_tuner_config = { .gate = TDA18271_GATE_ANALOG, }; +static struct tda18271_std_map hcw_lgdt3305_tda18271_std_map = { + .atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 4, + .if_lvl = 1, .rfagc_top = 0x58 }, + .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 5, + .if_lvl = 1, .rfagc_top = 0x58 }, +}; + +static struct tda18271_config hcw_lgdt3305_tda18271_config = { + .std_map = &hcw_lgdt3305_tda18271_std_map, +}; + +static struct lgdt3305_config hcw_lgdt3305_config = { + .i2c_addr = 0x0e, + .mpeg_mode = LGDT3305_MPEG_SERIAL, + .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, + .tpvalid_polarity = LGDT3305_TP_VALID_HIGH, + .deny_i2c_rptr = 1, + .spectral_inversion = 1, + .qam_if_khz = 4000, + .vsb_if_khz = 3250, +}; + static struct dibx000_agc_config xc3028_agc_config = { BAND_VHF | BAND_UHF, /* band_caps */ @@ -399,6 +422,17 @@ static int dvb_register(struct cx23885_tsport *port) &hauppauge_generic_tunerconfig, 0); } break; + case CX23885_BOARD_HAUPPAUGE_HVR1270: + i2c_bus = &dev->i2c_bus[0]; + fe0->dvb.frontend = dvb_attach(lgdt3305_attach, + &hcw_lgdt3305_config, + &i2c_bus->i2c_adap); + if (fe0->dvb.frontend != NULL) { + dvb_attach(tda18271_attach, fe0->dvb.frontend, + 0x60, &dev->i2c_bus[1].i2c_adap, + &hcw_lgdt3305_tda18271_config); + } + break; case CX23885_BOARD_HAUPPAUGE_HVR1800: i2c_bus = &dev->i2c_bus[0]; switch (alt_tuner) { |