On Saturday, June 11, 2011 15:44:43 Mauro Carvalho Chehab wrote:
> Em 11-06-2011 10:34, Hans Verkuil escreveu:
> > From: Hans Verkuil <[email protected]>
> >
> > VIDIOC_G_FREQUENCY should not check the tuner type, instead that is
> > something the driver fill in.
> >
> > Since apps will often leave the type at 0, the 'supported_mode' call
> > will return false and the frequency never gets filled in.
> >
> > Remove this check.
>
> This patch is wrong, as it breaks support for devices with multiple
> tuners (e. g. a tea5767 for radio and another tuner for TV).
Thanks for catching this, I had it right in an earlier version, but it
got lost somewhere along the way.
What should happen is that this should be added at the beginning:
if (t->standby)
return 0;
Ditto for g_tuner. If the current mode is not supported, standby is set to
true.
Regards,
Hans
>
> >
> > Signed-off-by: Hans Verkuil <[email protected]>
> > ---
> > drivers/media/video/tuner-core.c | 2 --
> > 1 files changed, 0 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/video/tuner-core.c
> > b/drivers/media/video/tuner-core.c
> > index ee43e0a..4d8dcea 100644
> > --- a/drivers/media/video/tuner-core.c
> > +++ b/drivers/media/video/tuner-core.c
> > @@ -1132,8 +1132,6 @@ static int tuner_g_frequency(struct v4l2_subdev *sd,
> > struct v4l2_frequency *f)
> > struct tuner *t = to_tuner(sd);
> > struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops;
> >
> > - if (!supported_mode(t, f->type))
> > - return 0;
> > f->type = t->mode;
> > if (fe_tuner_ops->get_frequency && !t->standby) {
> > u32 abs_freq;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html