From 18ee9a09e1bcc1f54036891b5256a83e8dce8cab Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 26 May 2012 12:59:40 +0200 Subject: [PATCH] v4l2-ctl: Be consistent in handling v4l2_frequency.type for modulators Currently for a S_FREQUENCY we set v4l2_frequency.type to V4L2_TUNER_RADIO, but on G_FREQUENCY we leave it unset. The spec states that the type field should be ignored by modulators, but since we're setting it on S_FREQUENCY, lets be consistent and also set if on G_FREQUENCY. Signed-off-by: Hans de Goede --- utils/v4l2-ctl/v4l2-ctl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index c8d929e..1fa2461 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -3606,6 +3606,7 @@ int main(int argc, char **argv) double fac = 16; if (capabilities & V4L2_CAP_MODULATOR) { + vf.type = V4L2_TUNER_RADIO; if (doioctl(fd, VIDIOC_G_MODULATOR, &modulator) == 0) fac = (modulator.capability & V4L2_TUNER_CAP_LOW) ? 16000 : 16; } else { -- 2.7.4