summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/dib7000p.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-22 12:37:01 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-22 12:37:01 -0300
commite1e328317ed3588c8950b6aa41e81dd5dfaf8f92 (patch)
tree1cac30c4c32eaad7a8ab4ad8c3f2b24f0e40519a /linux/drivers/media/dvb/frontends/dib7000p.c
parent7d440e6d3f726f2a94ef5f16fb39aa078d3b1a12 (diff)
downloadmediapointer-dvb-s2-e1e328317ed3588c8950b6aa41e81dd5dfaf8f92.tar.gz
mediapointer-dvb-s2-e1e328317ed3588c8950b6aa41e81dd5dfaf8f92.tar.bz2
dib7000p: Add output mode param to the attach struct
From: Steven Toth <stoth@hauppauge.com> 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 'linux/drivers/media/dvb/frontends/dib7000p.c')
-rw-r--r--linux/drivers/media/dvb/frontends/dib7000p.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/dib7000p.c b/linux/drivers/media/dvb/frontends/dib7000p.c
index 9b6702b70..c74d373b6 100644
--- a/linux/drivers/media/dvb/frontends/dib7000p.c
+++ b/linux/drivers/media/dvb/frontends/dib7000p.c
@@ -1194,7 +1194,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;
}
@@ -1356,6 +1356,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));