aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2009-05-03 22:27:02 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:21:03 -0400
commita5dbf45766a378cc00f341f7179befab1edae573 (patch)
tree482685ed6f65ee885a6d46d78e7d001aad104276 /drivers/media/video/cx23885
parent2074dffaedebbf5a8468fd37855d6d94ba34041c (diff)
V4L/DVB (11768): cx23885: add ATSC/QAM tuning support for Hauppauge WinTV-HVR1270
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c1
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c34
2 files changed, 35 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index 49c6634c6327..90d0ad63d992 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -183,6 +183,7 @@ struct cx23885_board cx23885_boards[] = {
183 }, 183 },
184 [CX23885_BOARD_HAUPPAUGE_HVR1270] = { 184 [CX23885_BOARD_HAUPPAUGE_HVR1270] = {
185 .name = "Hauppauge WinTV-HVR1270", 185 .name = "Hauppauge WinTV-HVR1270",
186 .portc = CX23885_MPEG_DVB,
186 }, 187 },
187}; 188};
188const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 189const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 07b76053a050..48cdf2795985 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -51,6 +51,7 @@
51#include "cimax2.h" 51#include "cimax2.h"
52#include "netup-eeprom.h" 52#include "netup-eeprom.h"
53#include "netup-init.h" 53#include "netup-init.h"
54#include "lgdt3305.h"
54 55
55static unsigned int debug; 56static unsigned int debug;
56 57
@@ -226,6 +227,28 @@ static struct tda18271_config hauppauge_hvr1200_tuner_config = {
226 .gate = TDA18271_GATE_ANALOG, 227 .gate = TDA18271_GATE_ANALOG,
227}; 228};
228 229
230static struct tda18271_std_map hcw_lgdt3305_tda18271_std_map = {
231 .atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 4,
232 .if_lvl = 1, .rfagc_top = 0x58 },
233 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 5,
234 .if_lvl = 1, .rfagc_top = 0x58 },
235};
236
237static struct tda18271_config hcw_lgdt3305_tda18271_config = {
238 .std_map = &hcw_lgdt3305_tda18271_std_map,
239};
240
241static struct lgdt3305_config hcw_lgdt3305_config = {
242 .i2c_addr = 0x0e,
243 .mpeg_mode = LGDT3305_MPEG_SERIAL,
244 .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE,
245 .tpvalid_polarity = LGDT3305_TP_VALID_HIGH,
246 .deny_i2c_rptr = 1,
247 .spectral_inversion = 1,
248 .qam_if_khz = 4000,
249 .vsb_if_khz = 3250,
250};
251
229static struct dibx000_agc_config xc3028_agc_config = { 252static struct dibx000_agc_config xc3028_agc_config = {
230 BAND_VHF | BAND_UHF, /* band_caps */ 253 BAND_VHF | BAND_UHF, /* band_caps */
231 254
@@ -398,6 +421,17 @@ static int dvb_register(struct cx23885_tsport *port)
398 &hauppauge_generic_tunerconfig, 0); 421 &hauppauge_generic_tunerconfig, 0);
399 } 422 }
400 break; 423 break;
424 case CX23885_BOARD_HAUPPAUGE_HVR1270:
425 i2c_bus = &dev->i2c_bus[0];
426 fe0->dvb.frontend = dvb_attach(lgdt3305_attach,
427 &hcw_lgdt3305_config,
428 &i2c_bus->i2c_adap);
429 if (fe0->dvb.frontend != NULL) {
430 dvb_attach(tda18271_attach, fe0->dvb.frontend,
431 0x60, &dev->i2c_bus[1].i2c_adap,
432 &hcw_lgdt3305_tda18271_config);
433 }
434 break;
401 case CX23885_BOARD_HAUPPAUGE_HVR1800: 435 case CX23885_BOARD_HAUPPAUGE_HVR1800:
402 i2c_bus = &dev->i2c_bus[0]; 436 i2c_bus = &dev->i2c_bus[0];
403 switch (alt_tuner) { 437 switch (alt_tuner) {