[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>
This commit is contained in:
parent
1abba28cf1
commit
9570a14847
|
@ -881,7 +881,6 @@ const char *v4l2_ctrl_get_name(u32 id)
|
|||
case V4L2_CID_FM_RX_CLASS: return "FM Radio Receiver Controls";
|
||||
case V4L2_CID_TUNE_DEEMPHASIS: return "De-Emphasis";
|
||||
case V4L2_CID_RDS_RECEPTION: return "RDS Reception";
|
||||
|
||||
case V4L2_CID_RF_TUNER_CLASS: return "RF Tuner Controls";
|
||||
case V4L2_CID_RF_TUNER_LNA_GAIN_AUTO: return "LNA Gain, Auto";
|
||||
case V4L2_CID_RF_TUNER_LNA_GAIN: return "LNA Gain";
|
||||
|
@ -892,6 +891,12 @@ const char *v4l2_ctrl_get_name(u32 id)
|
|||
case V4L2_CID_RF_TUNER_BANDWIDTH_AUTO: return "Bandwidth, Auto";
|
||||
case V4L2_CID_RF_TUNER_BANDWIDTH: return "Bandwidth";
|
||||
case V4L2_CID_RF_TUNER_PLL_LOCK: return "PLL Lock";
|
||||
case V4L2_CID_RDS_RX_PTY: return "RDS Program Type";
|
||||
case V4L2_CID_RDS_RX_PS_NAME: return "RDS PS Name";
|
||||
case V4L2_CID_RDS_RX_RADIO_TEXT: return "RDS Radio Text";
|
||||
case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT: return "RDS Traffic Announcement";
|
||||
case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM: return "RDS Traffic Program";
|
||||
case V4L2_CID_RDS_RX_MUSIC_SPEECH: return "RDS Music";
|
||||
|
||||
/* Detection controls */
|
||||
/* 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)
|
|||
case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD: return "MD Global Threshold";
|
||||
case V4L2_CID_DETECT_MD_THRESHOLD_GRID: return "MD Threshold Grid";
|
||||
case V4L2_CID_DETECT_MD_REGION_GRID: return "MD Region Grid";
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
@ -963,6 +967,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
|
|||
case V4L2_CID_RDS_TX_TRAFFIC_PROGRAM:
|
||||
case V4L2_CID_RDS_TX_MUSIC_SPEECH:
|
||||
case V4L2_CID_RDS_TX_ALT_FREQS_ENABLE:
|
||||
case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT:
|
||||
case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM:
|
||||
case V4L2_CID_RDS_RX_MUSIC_SPEECH:
|
||||
*type = V4L2_CTRL_TYPE_BOOLEAN;
|
||||
*min = 0;
|
||||
*max = *step = 1;
|
||||
|
@ -1035,6 +1042,8 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
|
|||
break;
|
||||
case V4L2_CID_RDS_TX_PS_NAME:
|
||||
case V4L2_CID_RDS_TX_RADIO_TEXT:
|
||||
case V4L2_CID_RDS_RX_PS_NAME:
|
||||
case V4L2_CID_RDS_RX_RADIO_TEXT:
|
||||
*type = V4L2_CTRL_TYPE_STRING;
|
||||
break;
|
||||
case V4L2_CID_ISO_SENSITIVITY:
|
||||
|
@ -1166,6 +1175,12 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
|
|||
case V4L2_CID_DV_TX_RXSENSE:
|
||||
case V4L2_CID_DV_TX_EDID_PRESENT:
|
||||
case V4L2_CID_DV_RX_POWER_PRESENT:
|
||||
case V4L2_CID_RDS_RX_PTY:
|
||||
case V4L2_CID_RDS_RX_PS_NAME:
|
||||
case V4L2_CID_RDS_RX_RADIO_TEXT:
|
||||
case V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT:
|
||||
case V4L2_CID_RDS_RX_TRAFFIC_PROGRAM:
|
||||
case V4L2_CID_RDS_RX_MUSIC_SPEECH:
|
||||
*flags |= V4L2_CTRL_FLAG_READ_ONLY;
|
||||
break;
|
||||
case V4L2_CID_RF_TUNER_PLL_LOCK:
|
||||
|
|
|
@ -910,6 +910,12 @@ enum v4l2_deemphasis {
|
|||
};
|
||||
|
||||
#define V4L2_CID_RDS_RECEPTION (V4L2_CID_FM_RX_CLASS_BASE + 2)
|
||||
#define V4L2_CID_RDS_RX_PTY (V4L2_CID_FM_RX_CLASS_BASE + 3)
|
||||
#define V4L2_CID_RDS_RX_PS_NAME (V4L2_CID_FM_RX_CLASS_BASE + 4)
|
||||
#define V4L2_CID_RDS_RX_RADIO_TEXT (V4L2_CID_FM_RX_CLASS_BASE + 5)
|
||||
#define V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_RX_CLASS_BASE + 6)
|
||||
#define V4L2_CID_RDS_RX_TRAFFIC_PROGRAM (V4L2_CID_FM_RX_CLASS_BASE + 7)
|
||||
#define V4L2_CID_RDS_RX_MUSIC_SPEECH (V4L2_CID_FM_RX_CLASS_BASE + 8)
|
||||
|
||||
#define V4L2_CID_RF_TUNER_CLASS_BASE (V4L2_CTRL_CLASS_RF_TUNER | 0x900)
|
||||
#define V4L2_CID_RF_TUNER_CLASS (V4L2_CTRL_CLASS_RF_TUNER | 1)
|
||||
|
|
Loading…
Reference in New Issue