summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dib7000p.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-04-22 15:37:01 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:09:45 -0300
commita38d6e37c0bc073bae5eff37c939978974ea9712 (patch)
tree951a1603067e2c5bcdf26dacf6acacaa7b33f059 /drivers/media/dvb/frontends/dib7000p.c
parent5aa2110f3f33feb4a0c67a4996dc400dc594bc1d (diff)
downloadlinux-a38d6e37c0bc073bae5eff37c939978974ea9712.tar.gz
linux-a38d6e37c0bc073bae5eff37c939978974ea9712.tar.bz2
linux-a38d6e37c0bc073bae5eff37c939978974ea9712.zip
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/dib7000p.c')
-rw-r--r--drivers/media/dvb/frontends/dib7000p.c8
1 files changed, 7 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,
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));