RE: [PATCH v2 1/9] media: v4l2-ctrls: add DV RX audio sampling rate and present controls

From: Hermes.Wu

Date: Wed Nov 25 2026 - 21:16:19 EST


Hi Hans,

On 25/11/2026 13:38, Hans Verkuil wrote:
>> +``V4L2_CID_DV_RX_AUDIO_SAMPLING_RATE (integer)``
>> + Reads the sampling rate, in Hz, of the audio that the receiver
>> + receives from the source. It is 0 if no audio is received, or if the
>
> received -> present
>
> Is this indeed the case, that it is 0 if V4L2_CID_DV_RX_AUDIO_PRESENT is
> false? I think both the tc358743 and this driver actually do not set the
> sampling rate to 0 if audio disappears. (Might be wrong, I didn't dig deeply
> into this)

You're right about tc358743: its rate control can keep the previous value
after the audio disappears. IT6625 does set it to 0, but the documentation
shouldn't require that.

> I'm inclined to drop that requirement, and instead...
>
>> + receiver cannot determine the sampling rate. This read-only control
>> + is applicable to HDMI and DisplayPort connectors.
>
> ...add 'The value is only meaningful while ``V4L2_CID_DV_RX_AUDIO_PRESENT`` is set.'
> to the description.
>
> So '0' is specific to the case that there is audio present, but the sampling rate
> cannot be determined. If there is no audio present, then, just like AUDIO_TYPE, the
> value is not meaningful. I.e., it should be ignored.

Agreed. In v3 the description will read:

Reads the sampling rate, in Hz, of the audio that is present on the
receiver's input. It is 0 if audio is present but the receiver cannot
determine the sampling rate. The value is only meaningful while
``V4L2_CID_DV_RX_AUDIO_PRESENT`` is set. This read-only control is
applicable to HDMI and DisplayPort connectors.

and I'll update the commit message to match.

Best regards,
Hermes