提交 587d2fd7 编写于 作者: H Hartmut Hackmann 提交者: Mauro Carvalho Chehab

V4L/DVB (4726): Add support for Pinnacle 310i

The driver supports analog TV, radio and DVB-T.
It is based on the preliminary patch by Pierluigi Rolando.
Signed-off-by: NHartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 73438263
...@@ -99,3 +99,4 @@ ...@@ -99,3 +99,4 @@
98 -> Proteus Pro 2309 [0919:2003] 98 -> Proteus Pro 2309 [0919:2003]
99 -> AVerMedia TV Hybrid A16AR [1461:2c00] 99 -> AVerMedia TV Hybrid A16AR [1461:2c00]
100 -> Asus Europa2 OEM [1043:4860] 100 -> Asus Europa2 OEM [1043:4860]
101 -> Pinnacle PCTV 310i [11bd:002f]
...@@ -3022,6 +3022,39 @@ struct saa7134_board saa7134_boards[] = { ...@@ -3022,6 +3022,39 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1, .amux = LINE1,
}, },
}, },
[SAA7134_BOARD_PINNACLE_PCTV_310i] = {
.name = "Pinnacle PCTV 310i",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x000200000,
.inputs = {{
.name = name_tv,
.vmux = 4,
.amux = TV,
.tv = 1,
},{
.name = name_comp1,
.vmux = 1,
.amux = LINE2,
},{
.name = name_comp2,
.vmux = 0,
.amux = LINE2,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE2,
}},
.radio = {
.name = name_radio,
.amux = TV,
.gpio = 0x0200000,
},
},
}; };
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
...@@ -3630,6 +3663,12 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -3630,6 +3663,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x1043, .subvendor = 0x1043,
.subdevice = 0x4860, .subdevice = 0x4860,
.driver_data = SAA7134_BOARD_ASUS_EUROPA2_HYBRID, .driver_data = SAA7134_BOARD_ASUS_EUROPA2_HYBRID,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x11bd,
.subdevice = 0x002f,
.driver_data = SAA7134_BOARD_PINNACLE_PCTV_310i,
},{ },{
/* --- boards without eeprom + subsystem ID --- */ /* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
...@@ -3793,6 +3832,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) ...@@ -3793,6 +3832,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
break; break;
/* i2c remotes */ /* i2c remotes */
case SAA7134_BOARD_PINNACLE_PCTV_110i: case SAA7134_BOARD_PINNACLE_PCTV_110i:
case SAA7134_BOARD_PINNACLE_PCTV_310i:
case SAA7134_BOARD_UPMOST_PURPLE_TV: case SAA7134_BOARD_UPMOST_PURPLE_TV:
dev->has_remote = SAA7134_REMOTE_I2C; dev->has_remote = SAA7134_REMOTE_I2C;
break; break;
...@@ -3924,6 +3964,7 @@ int saa7134_board_init2(struct saa7134_dev *dev) ...@@ -3924,6 +3964,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
} }
break; break;
case SAA7134_BOARD_PHILIPS_TIGER: case SAA7134_BOARD_PHILIPS_TIGER:
case SAA7134_BOARD_PINNACLE_PCTV_310i:
case SAA7134_BOARD_TEVION_DVBT_220RF: case SAA7134_BOARD_TEVION_DVBT_220RF:
case SAA7134_BOARD_ASUSTeK_P7131_DUAL: case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
case SAA7134_BOARD_MEDION_MD8800_QUADRO: case SAA7134_BOARD_MEDION_MD8800_QUADRO:
......
...@@ -293,7 +293,7 @@ static int philips_tu1216_tuner_60_set_params(struct dvb_frontend *fe, struct dv ...@@ -293,7 +293,7 @@ static int philips_tu1216_tuner_60_set_params(struct dvb_frontend *fe, struct dv
return philips_tda6651_pll_set(0x60, fe, params); return philips_tda6651_pll_set(0x60, fe, params);
} }
static int philips_tu1216_request_firmware(struct dvb_frontend *fe, static int philips_tda1004x_request_firmware(struct dvb_frontend *fe,
const struct firmware **fw, char *name) const struct firmware **fw, char *name)
{ {
struct saa7134_dev *dev = fe->dvb->priv; struct saa7134_dev *dev = fe->dvb->priv;
...@@ -308,7 +308,7 @@ static struct tda1004x_config philips_tu1216_60_config = { ...@@ -308,7 +308,7 @@ static struct tda1004x_config philips_tu1216_60_config = {
.xtal_freq = TDA10046_XTAL_4M, .xtal_freq = TDA10046_XTAL_4M,
.agc_config = TDA10046_AGC_DEFAULT, .agc_config = TDA10046_AGC_DEFAULT,
.if_freq = TDA10046_FREQ_3617, .if_freq = TDA10046_FREQ_3617,
.request_firmware = philips_tu1216_request_firmware, .request_firmware = philips_tda1004x_request_firmware,
}; };
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
...@@ -331,7 +331,7 @@ static struct tda1004x_config philips_tu1216_61_config = { ...@@ -331,7 +331,7 @@ static struct tda1004x_config philips_tu1216_61_config = {
.xtal_freq = TDA10046_XTAL_4M, .xtal_freq = TDA10046_XTAL_4M,
.agc_config = TDA10046_AGC_DEFAULT, .agc_config = TDA10046_AGC_DEFAULT,
.if_freq = TDA10046_FREQ_3617, .if_freq = TDA10046_FREQ_3617,
.request_firmware = philips_tu1216_request_firmware, .request_firmware = philips_tda1004x_request_firmware,
}; };
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
...@@ -812,32 +812,40 @@ static int philips_tda827xa_tuner_sleep(u8 addr, struct dvb_frontend *fe) ...@@ -812,32 +812,40 @@ static int philips_tda827xa_tuner_sleep(u8 addr, struct dvb_frontend *fe)
if (fe->ops.i2c_gate_ctrl) if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.i2c_gate_ctrl(fe, 1);
i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
return 0; return 0;
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
static int philips_tiger_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) static int tda8290_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
{ {
int ret;
struct saa7134_dev *dev = fe->dvb->priv; struct saa7134_dev *dev = fe->dvb->priv;
static u8 tda8290_close[] = { 0x21, 0xc0}; static u8 tda8290_close[] = { 0x21, 0xc0};
static u8 tda8290_open[] = { 0x21, 0x80}; static u8 tda8290_open[] = { 0x21, 0x80};
struct i2c_msg tda8290_msg = {.addr = 0x4b,.flags = 0, .len = 2}; struct i2c_msg tda8290_msg = {.addr = 0x4b,.flags = 0, .len = 2};
if (enable) {
/* close tda8290 i2c bridge */
tda8290_msg.buf = tda8290_close; tda8290_msg.buf = tda8290_close;
ret = i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1); } else {
if (ret != 1) tda8290_msg.buf = tda8290_open;
}
if (i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1) != 1)
return -EIO; return -EIO;
msleep(20); msleep(20);
return 0;
}
/* ------------------------------------------------------------------ */
static int philips_tiger_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
{
int ret;
ret = philips_tda827xa_pll_set(0x61, fe, params); ret = philips_tda827xa_pll_set(0x61, fe, params);
if (ret != 0) if (ret != 0)
return ret; return ret;
/* open tda8290 i2c bridge */ return 0;
tda8290_msg.buf = tda8290_open;
i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1);
return ret;
} }
static int philips_tiger_tuner_init(struct dvb_frontend *fe) static int philips_tiger_tuner_init(struct dvb_frontend *fe)
...@@ -874,6 +882,18 @@ static struct tda1004x_config philips_tiger_config = { ...@@ -874,6 +882,18 @@ static struct tda1004x_config philips_tiger_config = {
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
static struct tda1004x_config pinnacle_pctv_310i_config = {
.demod_address = 0x08,
.invert = 1,
.invert_oclk = 0,
.xtal_freq = TDA10046_XTAL_16M,
.agc_config = TDA10046_AGC_TDA827X,
.if_freq = TDA10046_FREQ_045,
.request_firmware = philips_tda1004x_request_firmware,
};
/* ------------------------------------------------------------------ */
static int asus_p7131_dual_tuner_init(struct dvb_frontend *fe) static int asus_p7131_dual_tuner_init(struct dvb_frontend *fe)
{ {
struct saa7134_dev *dev = fe->dvb->priv; struct saa7134_dev *dev = fe->dvb->priv;
...@@ -1168,6 +1188,18 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1168,6 +1188,18 @@ static int dvb_init(struct saa7134_dev *dev)
&philips_tiger_config, &philips_tiger_config,
&dev->i2c_adap); &dev->i2c_adap);
if (dev->dvb.frontend) { if (dev->dvb.frontend) {
dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
}
break;
case SAA7134_BOARD_PINNACLE_PCTV_310i:
dev->dvb.frontend = dvb_attach(tda10046_attach,
&pinnacle_pctv_310i_config,
&dev->i2c_adap);
if (dev->dvb.frontend) {
dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
......
...@@ -227,6 +227,7 @@ struct saa7134_format { ...@@ -227,6 +227,7 @@ struct saa7134_format {
#define SAA7134_BOARD_PROTEUS_2309 98 #define SAA7134_BOARD_PROTEUS_2309 98
#define SAA7134_BOARD_AVERMEDIA_A16AR 99 #define SAA7134_BOARD_AVERMEDIA_A16AR 99
#define SAA7134_BOARD_ASUS_EUROPA2_HYBRID 100 #define SAA7134_BOARD_ASUS_EUROPA2_HYBRID 100
#define SAA7134_BOARD_PINNACLE_PCTV_310i 101
#define SAA7134_MAXBOARDS 8 #define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8 #define SAA7134_INPUT_MAX 8
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册