提交 b3ea0166 编写于 作者: S Steven Toth 提交者: Mauro Carvalho Chehab

V4L/DVB (7645): Add support for the Hauppauge HVR-1200

This adds support for DVB-T mode only, analog mode is not supported.
Signed-off-by: NSteven Toth <stoth@hauppauge.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 7bbb1ce4
...@@ -5,3 +5,4 @@ ...@@ -5,3 +5,4 @@
4 -> DViCO FusionHDTV5 Express [18ac:d500] 4 -> DViCO FusionHDTV5 Express [18ac:d500]
5 -> Hauppauge WinTV-HVR1500Q [0070:7790,0070:7797] 5 -> Hauppauge WinTV-HVR1500Q [0070:7790,0070:7797]
6 -> Hauppauge WinTV-HVR1500 [0070:7710,0070:7717] 6 -> Hauppauge WinTV-HVR1500 [0070:7710,0070:7717]
7 -> Hauppauge WinTV-HVR1200 [0070:71d1]
...@@ -8,6 +8,7 @@ config VIDEO_CX23885 ...@@ -8,6 +8,7 @@ config VIDEO_CX23885
select VIDEO_TVEEPROM select VIDEO_TVEEPROM
select VIDEO_IR select VIDEO_IR
select VIDEOBUF_DVB select VIDEOBUF_DVB
select VIDEO_CX25840
select DVB_TUNER_MT2131 if !DVB_FE_CUSTOMISE select DVB_TUNER_MT2131 if !DVB_FE_CUSTOMISE
select DVB_S5H1409 if !DVB_FE_CUSTOMISE select DVB_S5H1409 if !DVB_FE_CUSTOMISE
select DVB_LGDT330X if !DVB_FE_CUSTOMISE select DVB_LGDT330X if !DVB_FE_CUSTOMISE
...@@ -16,6 +17,7 @@ config VIDEO_CX23885 ...@@ -16,6 +17,7 @@ config VIDEO_CX23885
select TUNER_TDA8290 if !DVB_FE_CUSTOMIZE select TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
select DVB_TDA18271 if !DVB_FE_CUSTOMIZE select DVB_TDA18271 if !DVB_FE_CUSTOMIZE
select DVB_TUNER_XC5000 if !DVB_FE_CUSTOMIZE select DVB_TUNER_XC5000 if !DVB_FE_CUSTOMIZE
select DVB_TDA10048 if !DVB_FE_CUSTOMIZE
---help--- ---help---
This is a video4linux driver for Conexant 23885 based This is a video4linux driver for Conexant 23885 based
TV cards. TV cards.
......
...@@ -130,6 +130,10 @@ struct cx23885_board cx23885_boards[] = { ...@@ -130,6 +130,10 @@ struct cx23885_board cx23885_boards[] = {
.name = "Hauppauge WinTV-HVR1500", .name = "Hauppauge WinTV-HVR1500",
.portc = CX23885_MPEG_DVB, .portc = CX23885_MPEG_DVB,
}, },
[CX23885_BOARD_HAUPPAUGE_HVR1200] = {
.name = "Hauppauge WinTV-HVR1200",
.portc = CX23885_MPEG_DVB,
},
}; };
const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
...@@ -181,6 +185,10 @@ struct cx23885_subid cx23885_subids[] = { ...@@ -181,6 +185,10 @@ struct cx23885_subid cx23885_subids[] = {
.subvendor = 0x0070, .subvendor = 0x0070,
.subdevice = 0x7717, .subdevice = 0x7717,
.card = CX23885_BOARD_HAUPPAUGE_HVR1500, .card = CX23885_BOARD_HAUPPAUGE_HVR1500,
}, {
.subvendor = 0x0070,
.subdevice = 0x71d1,
.card = CX23885_BOARD_HAUPPAUGE_HVR1200,
}, },
}; };
const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
...@@ -314,6 +322,17 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) ...@@ -314,6 +322,17 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
cx_set(GP0_IO, 0x00040004); cx_set(GP0_IO, 0x00040004);
mdelay(20); mdelay(20);
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1200:
/* GPIO-0 tda10048 demodulator reset */
/* GPIO-2 tda18271 tuner reset */
/* Put the parts into reset and back */
cx_set(GP0_IO, 0x00050000);
mdelay(20);
cx_clear(GP0_IO, 0x00000005);
mdelay(20);
cx_set(GP0_IO, 0x00050005);
break;
} }
} }
...@@ -324,6 +343,7 @@ int cx23885_ir_init(struct cx23885_dev *dev) ...@@ -324,6 +343,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
case CX23885_BOARD_HAUPPAUGE_HVR1500: case CX23885_BOARD_HAUPPAUGE_HVR1500:
case CX23885_BOARD_HAUPPAUGE_HVR1500Q: case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
case CX23885_BOARD_HAUPPAUGE_HVR1800: case CX23885_BOARD_HAUPPAUGE_HVR1800:
case CX23885_BOARD_HAUPPAUGE_HVR1200:
/* FIXME: Implement me */ /* FIXME: Implement me */
break; break;
} }
...@@ -353,6 +373,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) ...@@ -353,6 +373,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1800: case CX23885_BOARD_HAUPPAUGE_HVR1800:
case CX23885_BOARD_HAUPPAUGE_HVR1800lp: case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
case CX23885_BOARD_HAUPPAUGE_HVR1200:
if (dev->i2c_bus[0].i2c_rc == 0) if (dev->i2c_bus[0].i2c_rc == 0)
hauppauge_eeprom(dev, eeprom+0xc0); hauppauge_eeprom(dev, eeprom+0xc0);
break; break;
...@@ -369,6 +390,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) ...@@ -369,6 +390,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
case CX23885_BOARD_HAUPPAUGE_HVR1500Q: case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
case CX23885_BOARD_HAUPPAUGE_HVR1800: case CX23885_BOARD_HAUPPAUGE_HVR1800:
case CX23885_BOARD_HAUPPAUGE_HVR1800lp: case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
case CX23885_BOARD_HAUPPAUGE_HVR1200:
default: default:
ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "tda18271.h" #include "tda18271.h"
#include "lgdt330x.h" #include "lgdt330x.h"
#include "xc5000.h" #include "xc5000.h"
#include "tda10048.h"
#include "dvb-pll.h" #include "dvb-pll.h"
#include "tuner-xc2028.h" #include "tuner-xc2028.h"
#include "tuner-xc2028-types.h" #include "tuner-xc2028-types.h"
...@@ -107,6 +108,13 @@ static struct s5h1409_config hauppauge_generic_config = { ...@@ -107,6 +108,13 @@ static struct s5h1409_config hauppauge_generic_config = {
.mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
}; };
static struct tda10048_config hauppauge_hvr1200_config = {
.demod_address = 0x10 >> 1,
.output_mode = TDA10048_SERIAL_OUTPUT,
.fwbulkwritelen = TDA10048_BULKWRITE_200,
.inversion = TDA10048_INVERSION_ON
};
static struct s5h1409_config hauppauge_ezqam_config = { static struct s5h1409_config hauppauge_ezqam_config = {
.demod_address = 0x32 >> 1, .demod_address = 0x32 >> 1,
.output_mode = S5H1409_SERIAL_OUTPUT, .output_mode = S5H1409_SERIAL_OUTPUT,
...@@ -178,6 +186,10 @@ static struct tda18271_config hauppauge_tda18271_config = { ...@@ -178,6 +186,10 @@ static struct tda18271_config hauppauge_tda18271_config = {
.gate = TDA18271_GATE_ANALOG, .gate = TDA18271_GATE_ANALOG,
}; };
static struct tda18271_config hauppauge_hvr1200_tuner_config = {
.gate = TDA18271_GATE_ANALOG,
};
static int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg) static int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg)
{ {
struct cx23885_tsport *port = ptr; struct cx23885_tsport *port = ptr;
...@@ -317,6 +329,20 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -317,6 +329,20 @@ static int dvb_register(struct cx23885_tsport *port)
fe->ops.tuner_ops.set_config(fe, &ctl); fe->ops.tuner_ops.set_config(fe, &ctl);
} }
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1200:
i2c_bus = &dev->i2c_bus[0];
port->dvb.frontend = dvb_attach(tda10048_attach,
&hauppauge_hvr1200_config,
&i2c_bus->i2c_adap);
if (port->dvb.frontend != NULL) {
dvb_attach(tda829x_attach, port->dvb.frontend,
&dev->i2c_bus[1].i2c_adap, 0x42,
&tda829x_no_probe);
dvb_attach(tda18271_attach, port->dvb.frontend,
0x60, &dev->i2c_bus[1].i2c_adap,
&hauppauge_hvr1200_tuner_config);
}
break;
default: default:
printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
dev->name); dev->name);
......
...@@ -353,6 +353,7 @@ static struct i2c_client cx23885_i2c_client_template = { ...@@ -353,6 +353,7 @@ static struct i2c_client cx23885_i2c_client_template = {
}; };
static char *i2c_devs[128] = { static char *i2c_devs[128] = {
[0x10 >> 1] = "tda10048",
[ 0x1c >> 1 ] = "lgdt3303", [ 0x1c >> 1 ] = "lgdt3303",
[ 0x86 >> 1 ] = "tda9887", [ 0x86 >> 1 ] = "tda9887",
[ 0x32 >> 1 ] = "cx24227", [ 0x32 >> 1 ] = "cx24227",
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP 4 #define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP 4
#define CX23885_BOARD_HAUPPAUGE_HVR1500Q 5 #define CX23885_BOARD_HAUPPAUGE_HVR1500Q 5
#define CX23885_BOARD_HAUPPAUGE_HVR1500 6 #define CX23885_BOARD_HAUPPAUGE_HVR1500 6
#define CX23885_BOARD_HAUPPAUGE_HVR1200 7
/* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */ /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */
#define CX23885_NORMS (\ #define CX23885_NORMS (\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册