Re: V4L2 spec behavior for G_TUNER and T_STANDBY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, January 01, 2011 22:25:04 Devin Heitmueller wrote:
> Hi Hans,
> 
> Thanks for the feedback.
> 
> On Sat, Jan 1, 2011 at 4:18 PM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> >> This basically means that a video tuner will bail out, which sounds
> >> good because the rest of the function supposedly assumes a radio
> >> device.  However, as a result the has_signal() call (which returns
> >> signal strength) will never be executed for video tuners.  You
> >> wouldn't notice this if a video decoder subdev is responsible for
> >> showing signal strength, but if you're expecting the tuner to provide
> >> the info, the call will never happen.
> >
> > I am not aware of any tuner that does that. I think that for video this
> > is always done by a video decoder. That said, it isn't pretty, but a lot
> > of this is legacy code and I wouldn't want to change it.
> 
> The Xceive tuners have their analog demodulator onboard, so they make
> available a 0-100% signal strength.
> 
> > After digging some more I think that check_mode is a poor function. There are
> > two things that check_mode does: checking if the tuner support radio and/or tv
> > mode (that's fine), and if it is in standby: not so fine. That should be a
> > separate function since filling in frequency ranges can be done regardless of
> > the standby state.
> 
> Yeah, I didn't realize myself that is what check_mode was doing until
> I had this problem.
> 
> I'll see if I can cook up a patch which returns the appropriate data
> even when in standby, while trying to minimize the risk of introducing
> a regression.

Since you are working with tuner-core and xceive I wonder if you could also
make a patch to remove T_DIGITAL_TV in enum tuner_mode. T_DIGITAL_TV (and it's
public API counterpart V4L2_TUNER_DIGITAL_TV) are not used (and never were used
since digital tuning is handled through dvb).

We can't remove V4L2_TUNER_DIGITAL_TV (although we can mark it as deprecated in
videodev2.h), but T_DIGITAL_TV should definitely be removed.

The only tuner driver that uses T_DIGITAL_TV is tuner-xc2028.c, but on closer
analysis it turns out that it uses enum tuner_mode as an internal mode. So this
mode is never set outside the driver. Instead it should have used an internal
xceive_mode enum.

Everywhere else T_DIGITAL_TV can be removed.

For some reason I'm in an early spring-cleaning mode (winter-cleaning mode?)
these days :-) Getting rid of old obsolete stuff is always nice.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by Cisco
--
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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux