From: Steven Toth Date: Tue, 22 Apr 2008 18:37:01 +0000 (-0300) Subject: V4L/DVB (7672): dib7000p: Add output mode param to the attach struct X-Git-Tag: MMI-PSA29.97-13-9~35554^2~57 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a38d6e37c0bc073bae5eff37c939978974ea9712;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Reviewed-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab --- 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, ret = dib7000p_tune(fe, fep); /* make this a config parameter */ - dib7000p_set_output_mode(state, OUTMODE_MPEG2_FIFO); + dib7000p_set_output_mode(state, state->cfg.output_mode); return ret; } @@ -1330,6 +1330,12 @@ struct dvb_frontend * dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, st->gpio_val = cfg->gpio_val; st->gpio_dir = cfg->gpio_dir; + /* Ensure the output mode remains at the previous default if it's + * not specifically set by the caller. + */ + if (st->cfg.output_mode != OUTMODE_MPEG2_SERIAL) + st->cfg.output_mode = OUTMODE_MPEG2_FIFO; + demod = &st->demod; demod->demodulator_priv = st; 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 { u8 spur_protect; int (*agc_control) (struct dvb_frontend *, u8 before); + + u8 output_mode; }; #define DEFAULT_DIB7000P_I2C_ADDRESS 18