Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232202
b: refs/heads/master
c: 6a58bc0
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 19, 2011
1 parent 012b70a commit b0a01ff
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 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: 6183040680c56ec4bd3d7c9398cbc05e84d60c1f
refs/heads/master: 6a58bc0f506c1825cb8f8b81a5123e26bf70902c
5 changes: 4 additions & 1 deletion trunk/drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -5179,7 +5179,11 @@ struct saa7134_board saa7134_boards[] = {
[SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG] = {
.name = "Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid",
.audio_clock = 0x00187de7,
#if 0
.tuner_type = TUNER_PHILIPS_TDA8290,
#else
.tuner_type = UNSET,
#endif
.tuner_addr = ADDR_UNSET,
.radio_type = UNSET,
.radio_addr = ADDR_UNSET,
Expand All @@ -5191,7 +5195,6 @@ struct saa7134_board saa7134_boards[] = {
.vmux = 1,
.amux = TV,
.tv = 1,
.gpio = 0x4000,
#if 0 /* FIXME */
}, {
.name = name_comp1,
Expand Down
38 changes: 37 additions & 1 deletion trunk/drivers/media/video/saa7134/saa7134-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,38 @@ static struct tda18271_std_map mb86a20s_tda18271_std_map = {

static struct tda18271_config kworld_tda18271_config = {
.std_map = &mb86a20s_tda18271_std_map,
.gate = TDA18271_GATE_ANALOG,
.gate = TDA18271_GATE_DIGITAL,
};

static const struct mb86a20s_config kworld_mb86a20s_config = {
.demod_address = 0x10,
};

static int kworld_sbtvd_gate_ctrl(struct dvb_frontend* fe, int enable)
{
struct saa7134_dev *dev = fe->dvb->priv;

unsigned char initmsg[] = {0x45, 0x97};
unsigned char msg_enable[] = {0x45, 0xc1};
unsigned char msg_disable[] = {0x45, 0x81};
struct i2c_msg msg = {.addr = 0x4b, .flags = 0, .buf = initmsg, .len = 2};

if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) {
wprintk("could not access the I2C gate\n");
return -EIO;
}
if (enable)
msg.buf = msg_enable;
else
msg.buf = msg_disable;
if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) {
wprintk("could not access the I2C gate\n");
return -EIO;
}
msleep(20);
return 0;
}

/* ==================================================================
* tda1004x based DVB-T cards, helper functions
*/
Expand Down Expand Up @@ -1639,10 +1664,21 @@ static int dvb_init(struct saa7134_dev *dev)
&kworld_mb86a20s_config,
&dev->i2c_adap);
if (fe0->dvb.frontend != NULL) {
#if 0
dvb_attach(tda829x_attach, fe0->dvb.frontend,
&dev->i2c_adap, 0x4b,
&tda829x_no_probe);
#else
dvb_attach(tda829x_attach, fe0->dvb.frontend,
&dev->i2c_adap, 0x4b, NULL);
#endif
dvb_attach(tda18271_attach, fe0->dvb.frontend,
0x60, &dev->i2c_adap,
&kworld_tda18271_config);
fe0->dvb.frontend->ops.i2c_gate_ctrl = kworld_sbtvd_gate_ctrl;
}

/* mb86a20s need to use the I2C gateway */
break;
default:
wprintk("Huh? unknown DVB card?\n");
Expand Down

0 comments on commit b0a01ff

Please sign in to comment.