aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-07-21 09:45:40 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-25 18:27:51 -0400
commit9570a14847a9d334a0baf5a5921da2dbc6b9f6d2 (patch)
tree021cab1e44a1d8b0053e895f4d10d67c7b7f4375 /drivers/media/v4l2-core
parent1abba28cf171f8216363652b263c259a1547d70d (diff)
[media] v4l2-ctrls: add RX RDS controls
The radio-miropcm20 driver has firmware that decodes the RDS signals. So in that case the RDS data becomes available in the form of controls. Add support for these controls to the control framework, allowing the miro driver to use them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/v4l2-ctrls.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 4863cf05175d..2d8ced8ad80b 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -881,7 +881,6 @@ const char *v4l2_ctrl_get_name(u32 id)
881 case V4L2_CID_FM_RX_CLASS: return "FM Radio Receiver Controls"; 881 case V4L2_CID_FM_RX_CLASS: return "FM Radio Receiver Controls";
882 case V4L2_CID_TUNE_DEEMPHASIS: return "De-Emphasis"; 882 case V4L2_CID_TUNE_DEEMPHASIS: return "De-Emphasis";
883 case V4L2_CID_RDS_RECEPTION: return "RDS Reception"; 883 case V4L2_CID_RDS_RECEPTION: return "RDS Reception";
884
885 case V4L2_CID_RF_TUNER_CLASS: return "RF Tuner Controls"; 884 case V4L2_CID_RF_TUNER_CLASS: return "RF Tuner Controls";
886 case V4L2_CID_RF_TUNER_LNA_GAIN_AUTO: return "LNA Gain, Auto"; 885 case V4L2_CID_RF_TUNER_LNA_GAIN_AUTO: return "LNA Gain, Auto";
887 case V4L2_CID_RF_TUNER_LNA_GAIN: return "LNA Gain"; 886 case V4L2_CID_RF_TUNER_LNA_GAIN: return "LNA Gain";
@@ -892,6 +891,12 @@ const char *v4l2_ctrl_get_name(u32 id)
892 case V4L2_CID_RF_TUNER_BANDWIDTH_AUTO: return "Bandwidth, Auto"; 891 case V4L2_CID_RF_TUNER_BANDWIDTH_AUTO: return "Bandwidth, Auto";
893 case V4L2_CID_RF_TUNER_BANDWIDTH: return "Bandwidth"; 892 case V4L2_CID_RF_TUNER_BANDWIDTH: return "Bandwidth";
894 case V4L2_CID_RF_TUNER_PLL_LOCK: return "PLL Lock"; 893 case V4L2_CID_RF_TUNER_PLL_LOCK: return "PLL Lock";
894 case V4L2_CID_RDS_RX_PTY: return "RDS Program Type";
895 case V4L2_CID_RDS_RX_PS_NAME: return "RDS PS Name";
896 case V4L2_CID_RDS_RX_RADIO_TEXT: return "RDS Radio Text";
897 case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT: return "RDS Traffic Announcement";
898 case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM: return "RDS Traffic Program";
899 case V4L2_CID_RDS_RX_MUSIC_SPEECH: return "RDS Music";
895 900
896 /* Detection controls */ 901 /* Detection controls */
897 /* Keep the order of the 'case's the same as in v4l2-controls.h! */ 902 /* Keep the order of the 'case's the same as in v4l2-controls.h! */
@@ -900,7 +905,6 @@ const char *v4l2_ctrl_get_name(u32 id)
900 case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD: return "MD Global Threshold"; 905 case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD: return "MD Global Threshold";
901 case V4L2_CID_DETECT_MD_THRESHOLD_GRID: return "MD Threshold Grid"; 906 case V4L2_CID_DETECT_MD_THRESHOLD_GRID: return "MD Threshold Grid";
902 case V4L2_CID_DETECT_MD_REGION_GRID: return "MD Region Grid"; 907 case V4L2_CID_DETECT_MD_REGION_GRID: return "MD Region Grid";
903
904 default: 908 default:
905 return NULL; 909 return NULL;
906 } 910 }
@@ -963,6 +967,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
963 case V4L2_CID_RDS_TX_TRAFFIC_PROGRAM: 967 case V4L2_CID_RDS_TX_TRAFFIC_PROGRAM:
964 case V4L2_CID_RDS_TX_MUSIC_SPEECH: 968 case V4L2_CID_RDS_TX_MUSIC_SPEECH:
965 case V4L2_CID_RDS_TX_ALT_FREQS_ENABLE: 969 case V4L2_CID_RDS_TX_ALT_FREQS_ENABLE:
970 case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT:
971 case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM:
972 case V4L2_CID_RDS_RX_MUSIC_SPEECH:
966 *type = V4L2_CTRL_TYPE_BOOLEAN; 973 *type = V4L2_CTRL_TYPE_BOOLEAN;
967 *min = 0; 974 *min = 0;
968 *max = *step = 1; 975 *max = *step = 1;
@@ -1035,6 +1042,8 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
1035 break; 1042 break;
1036 case V4L2_CID_RDS_TX_PS_NAME: 1043 case V4L2_CID_RDS_TX_PS_NAME:
1037 case V4L2_CID_RDS_TX_RADIO_TEXT: 1044 case V4L2_CID_RDS_TX_RADIO_TEXT:
1045 case V4L2_CID_RDS_RX_PS_NAME:
1046 case V4L2_CID_RDS_RX_RADIO_TEXT:
1038 *type = V4L2_CTRL_TYPE_STRING; 1047 *type = V4L2_CTRL_TYPE_STRING;
1039 break; 1048 break;
1040 case V4L2_CID_ISO_SENSITIVITY: 1049 case V4L2_CID_ISO_SENSITIVITY:
@@ -1166,6 +1175,12 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
1166 case V4L2_CID_DV_TX_RXSENSE: 1175 case V4L2_CID_DV_TX_RXSENSE:
1167 case V4L2_CID_DV_TX_EDID_PRESENT: 1176 case V4L2_CID_DV_TX_EDID_PRESENT:
1168 case V4L2_CID_DV_RX_POWER_PRESENT: 1177 case V4L2_CID_DV_RX_POWER_PRESENT:
1178 case V4L2_CID_RDS_RX_PTY:
1179 case V4L2_CID_RDS_RX_PS_NAME:
1180 case V4L2_CID_RDS_RX_RADIO_TEXT:
1181 case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT:
1182 case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM:
1183 case V4L2_CID_RDS_RX_MUSIC_SPEECH:
1169 *flags |= V4L2_CTRL_FLAG_READ_ONLY; 1184 *flags |= V4L2_CTRL_FLAG_READ_ONLY;
1170 break; 1185 break;
1171 case V4L2_CID_RF_TUNER_PLL_LOCK: 1186 case V4L2_CID_RF_TUNER_PLL_LOCK: