Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21607
b: refs/heads/master
c: a78d0bf
h: refs/heads/master
i:
  21605: 0f32494
  21603: 8204fc9
  21599: 0c5ed88
v: v3
  • Loading branch information
Jose Alberto Reguero authored and Mauro Carvalho Chehab committed Feb 7, 2006
1 parent 3e628c0 commit f932bdd
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17801f5fa2e31b60f26aadd7ba41395dd1b1093e
refs/heads/master: a78d0bfabda67dd40a5a97ba4c24265e1820e7ea
1 change: 1 addition & 0 deletions trunk/Documentation/video4linux/CARDLIST.saa7134
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@
82 -> MSI TV@Anywhere plus [1462:6231]
83 -> Terratec Cinergy 250 PCI TV [153b:1160]
84 -> LifeView FlyDVB Trio [5168:0319]
85 -> AverTV DVB-T 777 [1461:2c05]
42 changes: 42 additions & 0 deletions trunk/drivers/media/dvb/frontends/dvb-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,48 @@ struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {
};
EXPORT_SYMBOL(dvb_pll_philips_sd1878_tda8261);

/*
* Philips TD1316 Tuner.
*/
static void td1316_bw(u8 *buf, u32 freq, int bandwidth)
{
u8 band;

/* determine band */
if (freq < 161000000)
band = 1;
else if (freq < 444000000)
band = 2;
else
band = 4;

buf[3] |= band;

/* setup PLL filter */
if (bandwidth == BANDWIDTH_8_MHZ)
buf[3] |= 1 << 3;
}

struct dvb_pll_desc dvb_pll_philips_td1316 = {
.name = "Philips TD1316",
.min = 87000000,
.max = 895000000,
.setbw = td1316_bw,
.count = 9,
.entries = {
{ 93834000, 36166000, 166666, 0xca, 0x60},
{ 123834000, 36166000, 166666, 0xca, 0xa0},
{ 163834000, 36166000, 166666, 0xca, 0xc0},
{ 253834000, 36166000, 166666, 0xca, 0x60},
{ 383834000, 36166000, 166666, 0xca, 0xa0},
{ 443834000, 36166000, 166666, 0xca, 0xc0},
{ 583834000, 36166000, 166666, 0xca, 0x60},
{ 793834000, 36166000, 166666, 0xca, 0xa0},
{ 858834000, 36166000, 166666, 0xca, 0xe0},
},
};
EXPORT_SYMBOL(dvb_pll_philips_td1316);

/* ----------------------------------------------------------- */
/* code */

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/frontends/dvb-pll.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extern struct dvb_pll_desc dvb_pll_tuv1236d;
extern struct dvb_pll_desc dvb_pll_tdhu2;
extern struct dvb_pll_desc dvb_pll_samsung_tbmv;
extern struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261;
extern struct dvb_pll_desc dvb_pll_philips_td1316;

int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf,
u32 freq, int bandwidth);
Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -2619,6 +2619,24 @@ struct saa7134_board saa7134_boards[] = {
.gpio = 0x000000, /* GPIO21=Low for FM radio antenna */
},
},
[SAA7134_BOARD_AVERMEDIA_777] = {
.name = "AverTV DVB-T 777",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_comp1,
.vmux = 0,
.amux = LINE1,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
}},
},
};

const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
Expand Down Expand Up @@ -3089,6 +3107,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x5168,
.subdevice = 0x0319,
.driver_data = SAA7134_BOARD_FLYDVB_TRIO,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134, /* SAA 7131E */
.subvendor = 0x1461,
.subdevice = 0x2c05,
.driver_data = SAA7134_BOARD_AVERMEDIA_777,
},{
/* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS,
Expand Down
41 changes: 40 additions & 1 deletion trunk/drivers/media/video/saa7134/saa7134-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "saa7134-reg.h"
#include "saa7134.h"
#include <media/v4l2-common.h>
#include "dvb-pll.h"

#ifdef HAVE_MT352
# include "mt352.h"
Expand All @@ -42,7 +43,6 @@
#endif
#ifdef HAVE_NXT200X
# include "nxt200x.h"
# include "dvb-pll.h"
#endif

MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
Expand Down Expand Up @@ -113,6 +113,24 @@ static int mt352_pinnacle_init(struct dvb_frontend* fe)
return 0;
}

static int mt352_aver777_init(struct dvb_frontend* fe)
{
static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x2d };
static u8 reset [] = { RESET, 0x80 };
static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 };
static u8 agc_cfg [] = { AGC_TARGET, 0x28, 0xa0 };
static u8 capt_range_cfg[] = { CAPT_RANGE, 0x33 };

mt352_write(fe, clock_config, sizeof(clock_config));
udelay(200);
mt352_write(fe, reset, sizeof(reset));
mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg));
mt352_write(fe, agc_cfg, sizeof(agc_cfg));
mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg));

return 0;
}

static int mt352_pinnacle_pll_set(struct dvb_frontend* fe,
struct dvb_frontend_parameters* params,
u8* pllbuf)
Expand Down Expand Up @@ -142,6 +160,15 @@ static int mt352_pinnacle_pll_set(struct dvb_frontend* fe,
return 0;
}

static int mt352_aver777_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params, u8* pllbuf)
{
pllbuf[0] = 0xc2;
dvb_pll_configure(&dvb_pll_philips_td1316, pllbuf+1,
params->frequency,
params->u.ofdm.bandwidth);
return 0;
}

static struct mt352_config pinnacle_300i = {
.demod_address = 0x3c >> 1,
.adc_clock = 20333,
Expand All @@ -150,6 +177,12 @@ static struct mt352_config pinnacle_300i = {
.demod_init = mt352_pinnacle_init,
.pll_set = mt352_pinnacle_pll_set,
};

static struct mt352_config avermedia_777 = {
.demod_address = 0xf,
.demod_init = mt352_aver777_init,
.pll_set = mt352_aver777_pll_set,
};
#endif

/* ------------------------------------------------------------------ */
Expand Down Expand Up @@ -847,6 +880,12 @@ static int dvb_init(struct saa7134_dev *dev)
dev->dvb.frontend = mt352_attach(&pinnacle_300i,
&dev->i2c_adap);
break;

case SAA7134_BOARD_AVERMEDIA_777:
printk("%s: avertv 777 dvb setup\n",dev->name);
dev->dvb.frontend = mt352_attach(&avermedia_777,
&dev->i2c_adap);
break;
#endif
#ifdef HAVE_TDA1004X
case SAA7134_BOARD_MD7134:
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/saa7134/saa7134.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ struct saa7134_format {
#define SAA7134_BOARD_MSI_TVATANYWHERE_PLUS 82
#define SAA7134_BOARD_CINERGY250PCI 83
#define SAA7134_BOARD_FLYDVB_TRIO 84
#define SAA7134_BOARD_AVERMEDIA_777 85

#define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8
Expand Down

0 comments on commit f932bdd

Please sign in to comment.