Commit 1cab969d authored by Scott K Logan's avatar Scott K Logan Committed by Mauro Carvalho Chehab

media: saa7134: Add support for Leadtek WinFast HDTV200 H

Similar configuration to Kworld PC150-U.

Tested: Composite, S-Video, NTSC, ATSC
Unsupported: IR remote
Signed-off-by: default avatarScott K Logan <logans@cottsay.net>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 52fed10a
......@@ -5765,6 +5765,33 @@ struct saa7134_board saa7134_boards[] = {
.gpio = 0x0200000,
},
},
[SAA7134_BOARD_LEADTEK_WINFAST_HDTV200_H] = {
.name = "Leadtek Winfast HDTV200 H",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
.ts_type = SAA7134_MPEG_TS_PARALLEL,
.gpiomask = 0x00200700,
.inputs = { {
.type = SAA7134_INPUT_TV,
.vmux = 1,
.amux = TV,
.gpio = 0x00000300,
}, {
.type = SAA7134_INPUT_COMPOSITE,
.vmux = 3,
.amux = LINE1,
.gpio = 0x00200300,
}, {
.type = SAA7134_INPUT_SVIDEO,
.vmux = 8,
.amux = LINE1,
.gpio = 0x00200300,
} },
},
};
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
......@@ -7040,6 +7067,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x1779, /* V One Multimedia PTE Ltd */
.subdevice = 0x13cf,
.driver_data = SAA7134_BOARD_SNAZIO_TVPVR_PRO,
}, {
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x107d,
.subdevice = 0x6f2e,
.driver_data = SAA7134_BOARD_LEADTEK_WINFAST_HDTV200_H,
}, {
/* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS,
......@@ -7245,6 +7278,22 @@ static int saa7134_kworld_pc150u_toggle_agc(struct saa7134_dev *dev,
return 0;
}
static int saa7134_leadtek_hdtv200h_toggle_agc(struct saa7134_dev *dev,
enum tda18271_mode mode)
{
switch (mode) {
case TDA18271_ANALOG:
saa7134_set_gpio(dev, 10, 0);
break;
case TDA18271_DIGITAL:
saa7134_set_gpio(dev, 10, 1);
break;
default:
return -EINVAL;
}
return 0;
}
static int saa7134_tda8290_18271_callback(struct saa7134_dev *dev,
int command, int arg)
{
......@@ -7264,6 +7313,9 @@ static int saa7134_tda8290_18271_callback(struct saa7134_dev *dev,
case SAA7134_BOARD_KWORLD_PC150U:
ret = saa7134_kworld_pc150u_toggle_agc(dev, arg);
break;
case SAA7134_BOARD_LEADTEK_WINFAST_HDTV200_H:
ret = saa7134_leadtek_hdtv200h_toggle_agc(dev, arg);
break;
default:
break;
}
......@@ -7287,6 +7339,7 @@ static int saa7134_tda8290_callback(struct saa7134_dev *dev,
case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG:
case SAA7134_BOARD_KWORLD_PC150U:
case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2:
case SAA7134_BOARD_LEADTEK_WINFAST_HDTV200_H:
/* tda8290 + tda18271 */
ret = saa7134_tda8290_18271_callback(dev, command, arg);
break;
......
......@@ -1189,6 +1189,22 @@ static struct s5h1411_config kworld_s5h1411_config = {
S5H1411_MPEGTIMING_CONTINUOUS_NONINVERTING_CLOCK,
};
static struct tda18271_config hdtv200h_tda18271_config = {
.gate = TDA18271_GATE_ANALOG,
.config = 3 /* Use tuner callback for AGC */
};
static struct s5h1411_config hdtv200h_s5h1411_config = {
.output_mode = S5H1411_PARALLEL_OUTPUT,
.gpio = S5H1411_GPIO_OFF,
.qam_if = S5H1411_IF_4000,
.vsb_if = S5H1411_IF_3250,
.inversion = S5H1411_INVERSION_ON,
.status_mode = S5H1411_DEMODLOCKING,
.mpeg_timing =
S5H1411_MPEGTIMING_CONTINUOUS_NONINVERTING_CLOCK,
};
/* ==================================================================
* Core code
......@@ -1854,6 +1870,19 @@ static int dvb_init(struct saa7134_dev *dev)
__func__);
}
break;
case SAA7134_BOARD_LEADTEK_WINFAST_HDTV200_H:
fe0->dvb.frontend = dvb_attach(s5h1411_attach,
&hdtv200h_s5h1411_config,
&dev->i2c_adap);
if (fe0->dvb.frontend) {
dvb_attach(tda829x_attach, fe0->dvb.frontend,
&dev->i2c_adap, 0x4b,
&tda829x_no_probe);
dvb_attach(tda18271_attach, fe0->dvb.frontend,
0x60, &dev->i2c_adap,
&hdtv200h_tda18271_config);
}
break;
default:
pr_warn("Huh? unknown DVB card?\n");
break;
......
......@@ -328,6 +328,7 @@ struct saa7134_card_ir {
#define SAA7134_BOARD_AVERMEDIA_505 194
#define SAA7134_BOARD_LEADTEK_WINFAST_TV2100_FM 195
#define SAA7134_BOARD_SNAZIO_TVPVR_PRO 196
#define SAA7134_BOARD_LEADTEK_WINFAST_HDTV200_H 197
#define SAA7134_MAXBOARDS 32
#define SAA7134_INPUT_MAX 8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment