static void cx23885_dvb_gate_ctrl(struct cx23885_tsport  *port, int open)
{
	struct videobuf_dvb_frontends *f;
	struct videobuf_dvb_frontend *fe;

	f = &port->frontends;

	if (f->gate <= 1) 
		fe = videobuf_dvb_get_frontend(f, 1);
	else
		fe = videobuf_dvb_get_frontend(f, f->gate);

	if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl)
		fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, open);

	cx23885_dvb_set_frontend(fe->dvb.frontend);
}
示例#2
0
static void cx23885_dvb_gate_ctrl(struct cx23885_tsport  *port, int open)
{
	struct videobuf_dvb_frontends *f;
	struct videobuf_dvb_frontend *fe;

	f = &port->frontends;

	if (f->gate <= 1) /* undefined or fe0 */
		fe = videobuf_dvb_get_frontend(f, 1);
	else
		fe = videobuf_dvb_get_frontend(f, f->gate);

	if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl)
		fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, open);

	/*
	 * FIXME: Improve this path to avoid calling the
	 * cx23885_dvb_set_frontend() every time it passes here.
	 */
	cx23885_dvb_set_frontend(fe->dvb.frontend);
}
示例#3
0
static int cx23885_dvb_fe_ioctl_override(struct dvb_frontend *fe,
					 unsigned int cmd, void *parg,
					 unsigned int stage)
{
	int err = 0;

	switch (stage) {
	case DVB_FE_IOCTL_PRE:

		switch (cmd) {
		case FE_SET_FRONTEND:
			err = cx23885_dvb_set_frontend(fe,
				(struct dvb_frontend_parameters *) parg);
			break;
		}
		break;

	case DVB_FE_IOCTL_POST:
		/* no post-ioctl handling required */
		break;
	}
	return err;
};