On 10 Apr 2002, Gerd Knorr wrote:
> Trent Piepho wrote:
> >  On 10 Apr 2002, Gerd Knorr wrote:
> > > video_tuner->signal = (BT848_DSTATUS & BT848_DSTATUS_HLOC) ? 0xFFFF : 0;
> >  
> >  Not very useful.  You can't query the tuner unless you have it
> >  selected as the input.  So if your card doesn't have a tuner, or you
> >  are using the composite or s-video input, this won't work.
> 
> Wrong at least for bttv.  bttv doesn't check that the current selected
> input _really_ is the tuner, thus it works for other inputs to.

I didn't check every version from bttv released in the last 5 years, but this
is from linux-2.2.20 kernel driver:

                case VIDIOCGTUNER:
                {
                        struct video_tuner v;
                        if(copy_from_user(&v,arg,sizeof(v))!=0)
                                return -EFAULT;
                        if(v.tuner||btv->channel)       /* Only tuner 0 */
                                return -EINVAL;

See that if(v.tuner||btv->channel)?  You can only query the tuner if you
have channel 0 selected as input.  So in this case, you're the one who's
wrong.



_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list

Reply via email to