Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117051
b: refs/heads/master
c: 1af46b4
h: refs/heads/master
i:
  117049: 750bcb2
  117047: a423cf0
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 21, 2008
1 parent 491af46 commit 82b271c
Show file tree
Hide file tree
Showing 2 changed files with 17 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: e16c63de928f00075f0ea466581e04b44bb33f75
refs/heads/master: 1af46b450fa49c57d73764d66f267335ccd807e2
18 changes: 16 additions & 2 deletions trunk/drivers/media/dvb/frontends/s5h1411.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,20 @@ static int s5h1411_set_spectralinversion(struct dvb_frontend *fe, int inversion)
return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x24, val);
}

static int s5h1411_set_serialmode(struct dvb_frontend *fe, int serial)
{
struct s5h1411_state *state = fe->demodulator_priv;
u16 val;

dprintk("%s(%d)\n", __func__, serial);
val = s5h1411_readreg(state, S5H1411_I2C_TOP_ADDR, 0xbd) & ~0x100;

if (serial == 1)
val |= 0x100;

return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, val);
}

static int s5h1411_enable_modulation(struct dvb_frontend *fe,
fe_modulation_t m)
{
Expand Down Expand Up @@ -611,10 +625,10 @@ static int s5h1411_init(struct dvb_frontend *fe)

if (state->config->output_mode == S5H1411_SERIAL_OUTPUT)
/* Serial */
s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, 0x1101);
s5h1411_set_serialmode(fe, 1);
else
/* Parallel */
s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, 0x1001);
s5h1411_set_serialmode(fe, 0);

s5h1411_set_spectralinversion(fe, state->config->inversion);
s5h1411_set_if_freq(fe, state->config->vsb_if);
Expand Down

0 comments on commit 82b271c

Please sign in to comment.