[Intel-gfx] [RFC 1/4] drm/i915/hdmi: Add audio config related params in crtc_state

Jani Nikula jani.nikula at linux.intel.com
Fri Jun 9 09:38:24 UTC 2023


On Fri, 09 Jun 2023, Mitul Golani <mitulkumar.ajitkumar.golani at intel.com> wrote:
> Add source audio-related config params in crtc_state.
> These params can be supported frequency, supported channel,
> and audio support, which can be further computed based on
> source capabilities.
>
> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 731f2ec04d5c..873a60f3f870 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1129,9 +1129,15 @@ struct intel_crtc_state {
>  	/* Whether we should send NULL infoframes. Required for audio. */
>  	bool has_hdmi_sink;
>  
> -	/* Audio enabled on this pipe. Only valid if either has_hdmi_sink or
> -	 * has_dp_encoder is set. */
> -	bool has_audio;
> +	struct {
> +		bool has_audio;
> +
> +		/* Audio rate in Hz */
> +		unsigned int max_frequency;
> +
> +		/* Number of audio channels */
> +		unsigned int max_channel;

Please just use int, not unsigned int, for both of these.

BR,
Jani.

> +	} audio_config;
>  
>  	/*
>  	 * Enable dithering, used when the selected pipe bpp doesn't match the

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list