Em Tue, 16 Jun 2009 11:19:29 -0400 Michael Krufky <mkrufky@xxxxxxxxxxx> escreveu: > Mauro, > > Please pull from: > > http://kernellabs.com/hg/~mkrufky/k2c2 > > for: > > - cx23885: override set_frontend to allow rf input path switching on the HVR1275 > > cx23885-dvb.c | 29 +++++++++++++++++++++++++++++ > cx23885.h | 2 ++ > 2 files changed, 31 insertions(+) > > Hopefully, you can get this into the next merge window with all the > other pending changesets ;-) > > Thanks & regards, > > Mike > Use separate RF input spigots for Antennae and Cable. > > Priority: normal > > Reviewed-by: Steven Toth <stoth@xxxxxxxxxxxxxx> > Signed-off-by: Michael Krufky <mkrufky@xxxxxxxxxxxxxx> > > --- a/linux/drivers/media/video/cx23885/cx23885-dvb.c Tue May 12 17:53:47 2009 -0400 > +++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c Fri May 08 21:39:24 2009 -0400 > @@ -417,6 +417,30 @@ > .demod_address = 0x05, > }; > > +static int cx23885_dvb_set_frontend(struct dvb_frontend *fe, > + struct dvb_frontend_parameters *param) > +{ > + struct cx23885_tsport *port = fe->dvb->priv; > + struct cx23885_dev *dev = port->dev; > + > + switch (dev->board) { > + case CX23885_BOARD_HAUPPAUGE_HVR1275: > + switch (param->u.vsb.modulation) { > + case VSB_8: > + cx23885_gpio_clear(dev, GPIO_5); > + break; > + case QAM_64: > + case QAM_256: > + default: > + cx23885_gpio_set(dev, GPIO_5); > + break; > + } > + break; > + } > + return (port->set_frontend_save) ? > + port->set_frontend_save(fe, param) : -ENODEV; > +} > + > static int dvb_register(struct cx23885_tsport *port) > { > struct cx23885_dev *dev = port->dev; > @@ -456,6 +480,11 @@ > 0x60, &dev->i2c_bus[1].i2c_adap, > &hauppauge_hvr127x_config); > } > + > + /* define bridge override to set_frontend */ > + port->set_frontend_save = fe0->dvb.frontend->ops.set_frontend; > + fe0->dvb.frontend->ops.set_frontend = cx23885_dvb_set_frontend; > + > break; > case CX23885_BOARD_HAUPPAUGE_HVR1255: > i2c_bus = &dev->i2c_bus[0]; > --- a/linux/drivers/media/video/cx23885/cx23885.h Tue May 12 17:53:47 2009 -0400 > +++ b/linux/drivers/media/video/cx23885/cx23885.h Fri May 08 21:39:24 2009 -0400 > @@ -288,6 +288,8 @@ > /* Allow a single tsport to have multiple frontends */ > u32 num_frontends; > void *port_priv; > + int (*set_frontend_save) (struct dvb_frontend *, > + struct dvb_frontend_parameters *); > }; > > struct cx23885_dev { > Argh! this looks like a hack! Don't you have a better approach for it? Cheers, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html