[PATCH v2 8/9] media: i2c: it6625: use the standard audio rate and present controls

From: Hermes Wu via B4 Relay

Date: Mon Nov 23 2026 - 22:06:14 EST


From: Hermes Wu <Hermes.wu@xxxxxxxxxx>

The driver reports the HDMI audio sampling rate and whether audio is
present through the driver-specific controls
V4L2_CID_IT6625_AUDIO_SAMPLING_RATE and V4L2_CID_IT6625_AUDIO_PRESENT.
There are now standard controls for both.

Report V4L2_CID_DV_RX_AUDIO_SAMPLING_RATE and
V4L2_CID_DV_RX_AUDIO_PRESENT instead, with the same range and the same
values. The driver-specific control IDs are no longer used.
---
drivers/media/i2c/it6625.c | 30 ++++--------------------------
1 file changed, 4 insertions(+), 26 deletions(-)

diff --git a/drivers/media/i2c/it6625.c b/drivers/media/i2c/it6625.c
index 72ca1d4ecdc932609f1a38129bfa1e188a024ddf..e4487e8111b94b2fa9f599e37ecd2b8a11425862 100644
--- a/drivers/media/i2c/it6625.c
+++ b/drivers/media/i2c/it6625.c
@@ -2127,28 +2127,6 @@ static const struct v4l2_subdev_internal_ops it6625_internal_ops = {
.init_state = it6625_init_state,
};

-static const struct v4l2_ctrl_config it6625_ctrl_audio_sampling_rate = {
- .id = V4L2_CID_IT6625_AUDIO_SAMPLING_RATE,
- .name = "Audio Sampling Rate",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0,
- .max = 1536000,
- .step = 1,
- .def = 0,
- .flags = V4L2_CTRL_FLAG_READ_ONLY,
-};
-
-static const struct v4l2_ctrl_config it6625_ctrl_audio_present = {
- .id = V4L2_CID_IT6625_AUDIO_PRESENT,
- .name = "Audio Present",
- .type = V4L2_CTRL_TYPE_BOOLEAN,
- .min = 0,
- .max = 1,
- .step = 1,
- .def = 0,
- .flags = V4L2_CTRL_FLAG_READ_ONLY,
-};
-
static int it6625_v4l2_init_controls(struct v4l2_subdev *sd)
{
struct it6625 *it6625 = sd_to_6625(sd);
@@ -2163,11 +2141,11 @@ static int it6625_v4l2_init_controls(struct v4l2_subdev *sd)
0, 1, 0, 0);

it6625->ctrl_audio_sampling_rate =
- v4l2_ctrl_new_custom(hdl,
- &it6625_ctrl_audio_sampling_rate,
- NULL);
+ v4l2_ctrl_new_std(hdl, NULL, V4L2_CID_DV_RX_AUDIO_SAMPLING_RATE,
+ 0, 1536000, 1, 0);
it6625->ctrl_audio_present =
- v4l2_ctrl_new_custom(hdl, &it6625_ctrl_audio_present, NULL);
+ v4l2_ctrl_new_std(hdl, NULL, V4L2_CID_DV_RX_AUDIO_PRESENT,
+ 0, 1, 1, 0);
it6625->ctrl_audio_type =
v4l2_ctrl_new_std_menu(hdl, NULL, V4L2_CID_DV_RX_AUDIO_TYPE,
V4L2_DV_RX_AUDIO_TYPE_ONE_BIT, 0,

--
2.34.1