25d8527a44
This is the logic that: a) Ensures /sys/class/pvrusb2/sn-*/ctl_frequency/{max,min}_val are "automagically" reset to sane values on each mode change. b) Allows tuning to a radio frequency by something like: echo `perl -e "print int(94.9*16000 + 0.5)"` \ > /sys/class/pvrusb2/sn-*/ctl_input/cur_val The trick was to take advantage of the already existing .get_{min,max}_value function pointers in pvr2_ctrl, to "dynamically override" the hardcoded values for min/max frequency at runtime. For a moment I thought to dispose of the hardcoded MIN/MAX_FREQ and use the hirange/lowrange fields of the v4l2_tuner struct instead, but then I see that tuner-core.c kinda hardcodes these as well, so I decided to not bother. Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
pvrusb2-audio.c | ||
pvrusb2-audio.h | ||
pvrusb2-context.c | ||
pvrusb2-context.h | ||
pvrusb2-ctrl.c | ||
pvrusb2-ctrl.h | ||
pvrusb2-cx2584x-v4l.c | ||
pvrusb2-cx2584x-v4l.h | ||
pvrusb2-debug.h | ||
pvrusb2-debugifc.c | ||
pvrusb2-debugifc.h | ||
pvrusb2-eeprom.c | ||
pvrusb2-eeprom.h | ||
pvrusb2-encoder.c | ||
pvrusb2-encoder.h | ||
pvrusb2-hdw-internal.h | ||
pvrusb2-hdw.c | ||
pvrusb2-hdw.h | ||
pvrusb2-i2c-chips-v4l2.c | ||
pvrusb2-i2c-cmd-v4l2.c | ||
pvrusb2-i2c-cmd-v4l2.h | ||
pvrusb2-i2c-core.c | ||
pvrusb2-i2c-core.h | ||
pvrusb2-io.c | ||
pvrusb2-io.h | ||
pvrusb2-ioread.c | ||
pvrusb2-ioread.h | ||
pvrusb2-main.c | ||
pvrusb2-std.c | ||
pvrusb2-std.h | ||
pvrusb2-sysfs.c | ||
pvrusb2-sysfs.h | ||
pvrusb2-tuner.c | ||
pvrusb2-tuner.h | ||
pvrusb2-util.h | ||
pvrusb2-v4l2.c | ||
pvrusb2-v4l2.h | ||
pvrusb2-video-v4l.c | ||
pvrusb2-video-v4l.h | ||
pvrusb2-wm8775.c | ||
pvrusb2-wm8775.h | ||
pvrusb2.h |