History

[media] v4l: add RF tuner channel bandwidth control

Modern silicon RF tuners has one or more adjustable filters on signal path, in order to filter noise from desired radio channel. Add channel bandwidth control to tell the driver which is radio channel width we want receive. Filters could be then adjusted by the driver or hardware, using RF frequency and channel bandwidth as a base of filter calculations. On automatic mode (normal mode), bandwidth is calculated from sampling rate or tuning info got from userspace. That new control gives possibility to set manual mode and let user have more control for filters.

Antti Palosaari committed 12 years ago

Commit 3ce569f1 parent 30845f72 files · +6 −0Browse files

Unified · Split

2 files
  1. drivers/media/v4l2-core/v4l2-ctrls.c +4 −0
  2. include/uapi/linux/v4l2-controls.h +2 −0
drivers/media/v4l2-core/v4l2-ctrls.c+4−0
@@ -867,6 +867,8 @@ const char *v4l2_ctrl_get_name(u32 id) · 866 unmodified lines
867867 case V4L2_CID_RF_TUNER_MIXER_GAIN: return "Mixer Gain";
868868 case V4L2_CID_RF_TUNER_IF_GAIN_AUTO: return "IF Gain, Auto";
869869 case V4L2_CID_RF_TUNER_IF_GAIN: return "IF Gain";
870+ case V4L2_CID_RF_TUNER_BANDWIDTH_AUTO: return "Bandwidth, Auto";
871+ case V4L2_CID_RF_TUNER_BANDWIDTH: return "Bandwidth";
870872 default:
871873 return NULL;
872874 }
@@ -919,6 +921,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, · 46 unmodified lines
919921 case V4L2_CID_RF_TUNER_LNA_GAIN_AUTO:
920922 case V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO:
921923 case V4L2_CID_RF_TUNER_IF_GAIN_AUTO:
924+ case V4L2_CID_RF_TUNER_BANDWIDTH_AUTO:
922925 *type = V4L2_CTRL_TYPE_BOOLEAN;
923926 *min = 0;
924927 *max = *step = 1;
@@ -1084,6 +1087,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, · 159 unmodified lines
10841087 case V4L2_CID_RF_TUNER_LNA_GAIN:
10851088 case V4L2_CID_RF_TUNER_MIXER_GAIN:
10861089 case V4L2_CID_RF_TUNER_IF_GAIN:
1090+ case V4L2_CID_RF_TUNER_BANDWIDTH:
10871091 *flags |= V4L2_CTRL_FLAG_SLIDER;
10881092 break;
10891093 case V4L2_CID_PAN_RELATIVE:
include/uapi/linux/v4l2-controls.h+2−0
@@ -910,5 +910,7 @@ enum v4l2_deemphasis { · 909 unmodified lines
910910 #define V4L2_CID_RF_TUNER_MIXER_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 4)
911911 #define V4L2_CID_RF_TUNER_IF_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 5)
912912 #define V4L2_CID_RF_TUNER_IF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 6)
913+#define V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 7)
914+#define V4L2_CID_RF_TUNER_BANDWIDTH (V4L2_CID_RF_TUNER_CLASS_BASE + 8)
913915
914916 #endif