diff options
| author | Steven Toth <stoth@hauppauge.com> | 2008-04-22 14:37:01 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:45 -0400 |
| commit | a38d6e37c0bc073bae5eff37c939978974ea9712 (patch) | |
| tree | 951a1603067e2c5bcdf26dacf6acacaa7b33f059 /drivers/media/dvb/frontends | |
| parent | 5aa2110f3f33feb4a0c67a4996dc400dc594bc1d (diff) | |
V4L/DVB (7672): dib7000p: Add output mode param to the attach struct
This allows future drivers to select the most appropriate output mode.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends')
| -rw-r--r-- | drivers/media/dvb/frontends/dib7000p.c | 8 | ||||
| -rw-r--r-- | drivers/media/dvb/frontends/dib7000p.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index 47c23e29753e..1a0142e0d741 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb/frontends/dib7000p.c | |||
| @@ -1168,7 +1168,7 @@ static int dib7000p_set_frontend(struct dvb_frontend* fe, | |||
| 1168 | ret = dib7000p_tune(fe, fep); | 1168 | ret = dib7000p_tune(fe, fep); |
| 1169 | 1169 | ||
| 1170 | /* make this a config parameter */ | 1170 | /* make this a config parameter */ |
| 1171 | dib7000p_set_output_mode(state, OUTMODE_MPEG2_FIFO); | 1171 | dib7000p_set_output_mode(state, state->cfg.output_mode); |
| 1172 | return ret; | 1172 | return ret; |
| 1173 | } | 1173 | } |
| 1174 | 1174 | ||
| @@ -1330,6 +1330,12 @@ struct dvb_frontend * dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, | |||
| 1330 | st->gpio_val = cfg->gpio_val; | 1330 | st->gpio_val = cfg->gpio_val; |
| 1331 | st->gpio_dir = cfg->gpio_dir; | 1331 | st->gpio_dir = cfg->gpio_dir; |
| 1332 | 1332 | ||
| 1333 | /* Ensure the output mode remains at the previous default if it's | ||
| 1334 | * not specifically set by the caller. | ||
| 1335 | */ | ||
| 1336 | if (st->cfg.output_mode != OUTMODE_MPEG2_SERIAL) | ||
| 1337 | st->cfg.output_mode = OUTMODE_MPEG2_FIFO; | ||
| 1338 | |||
| 1333 | demod = &st->demod; | 1339 | demod = &st->demod; |
| 1334 | demod->demodulator_priv = st; | 1340 | demod->demodulator_priv = st; |
| 1335 | memcpy(&st->demod.ops, &dib7000p_ops, sizeof(struct dvb_frontend_ops)); | 1341 | memcpy(&st->demod.ops, &dib7000p_ops, sizeof(struct dvb_frontend_ops)); |
diff --git a/drivers/media/dvb/frontends/dib7000p.h b/drivers/media/dvb/frontends/dib7000p.h index eefcac8b5244..081bd81f3da2 100644 --- a/drivers/media/dvb/frontends/dib7000p.h +++ b/drivers/media/dvb/frontends/dib7000p.h | |||
| @@ -31,6 +31,8 @@ struct dib7000p_config { | |||
| 31 | u8 spur_protect; | 31 | u8 spur_protect; |
| 32 | 32 | ||
| 33 | int (*agc_control) (struct dvb_frontend *, u8 before); | 33 | int (*agc_control) (struct dvb_frontend *, u8 before); |
| 34 | |||
| 35 | u8 output_mode; | ||
| 34 | }; | 36 | }; |
| 35 | 37 | ||
| 36 | #define DEFAULT_DIB7000P_I2C_ADDRESS 18 | 38 | #define DEFAULT_DIB7000P_I2C_ADDRESS 18 |
