v4l2-ctl: set S_FREQUENCY type to RADIO for modulators.
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 18 Jan 2011 10:06:54 +0000 (11:06 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 18 Jan 2011 10:06:54 +0000 (11:06 +0100)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
utils/v4l2-ctl/v4l2-ctl.cpp

index 41551ee..da2469c 100644 (file)
@@ -2535,8 +2535,10 @@ int main(int argc, char **argv)
                double fac = 16;
 
                if (capabilities & V4L2_CAP_MODULATOR) {
-                       if (doioctl(fd, VIDIOC_G_MODULATOR, &modulator) == 0)
+                       vf.type = V4L2_TUNER_RADIO;
+                       if (doioctl(fd, VIDIOC_G_MODULATOR, &modulator) == 0) {
                                fac = (modulator.capability & V4L2_TUNER_CAP_LOW) ? 16000 : 16;
+                       }
                } else {
                        vf.type = V4L2_TUNER_ANALOG_TV;
                        if (doioctl(fd, VIDIOC_G_TUNER, &tuner) == 0) {