OK, after consulting with Manu a bit, my original idea isn't going to work well. Here is an updated patch. The initialisation sequence would now be: struct dvb_frontend *fe = stv0299_attach(); stb6100_attach(fe); The stb6100 attaches itself to the stv0299 using the (*attach_tuner)() callback. After that, the stv0299 is then responsible for controlling the PLL - so this really just becomes a standardised/expanded way of how we do it already. Main reason being - many of the enhanced demod tuning algorithms will need to control the tuner directly - my idea of the frontend loop doing this just isn't flexible enough.
diff -r 2b05b5271ae1 linux/drivers/media/dvb/dvb-core/dvb_frontend.h --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h Thu Apr 13 12:29:04 2006 -0400 +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h Fri Apr 14 13:56:43 2006 +0100 @@ -86,6 +86,23 @@ struct dvb_frontend_ops { int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg); int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd); int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable); + + int (*attach_tuner)(struct dvb_frontend *fe, struct dvb_tuner_ops *ops, void *tuner_priv); +}; + +struct dvb_tuner_ops { + int (*release)(struct dvb_frontend *fe, void*tuner_priv); + + int (*init)(struct dvb_frontend *fe, void *tuner_priv); + int (*sleep)(struct dvb_frontend *fe, void *tuner_priv); + + int (*set_frequency)(struct dvb_frontend *fe, void *tuner_priv, u32 frequency); + int (*get_frequency)(struct dvb_frontend *fe, void *tuner_priv, u32 *frequency); + int (*set_bandwidth)(struct dvb_frontend *fe, void *tuner_priv, u32 bandwidth); + int (*get_bandwidth)(struct dvb_frontend *fe, void *tuner_priv, u32 *bandwidth); + +#define TUNER_STATUS_LOCKED 1 + int (*get_status)(struct dvb_frontend *fe, void *tuner_priv, u32 *status); }; #define MAX_EVENT 8
_______________________________________________ linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb