[Intel-gfx] [RFC 2/3] drm/i915/display: Configure and initialize HDMI audio capabilities

Golani, Mitulkumar Ajitkumar mitulkumar.ajitkumar.golani at intel.com
Thu Jun 29 03:04:04 UTC 2023


Hi,

> -----Original Message-----
> From: Kai Vehmanen <kai.vehmanen at linux.intel.com>
> Sent: 28 June 2023 22:41
> To: Golani, Mitulkumar Ajitkumar <mitulkumar.ajitkumar.golani at intel.com>
> Cc: Kai Vehmanen <kai.vehmanen at linux.intel.com>; Borah, Chaitanya
> Kumar <chaitanya.kumar.borah at intel.com>; intel-
> gfx at lists.freedesktop.org; jyri.sarha at linux.intel.com
> Subject: RE: [Intel-gfx] [RFC 2/3] drm/i915/display: Configure and initialize
> HDMI audio capabilities
> 
> Hi,
> 
> On Mon, 26 Jun 2023, Golani, Mitulkumar Ajitkumar wrote:
> > Let's say, with the obtained audio_req_bandwidth, if I encounter the
> following combination:
> > pipe_config->audio.max_channel = 8 and pipe_config-
> >audio.max_frequency = "X" value.
> > Now, let's assume my sink supports only 7 channels. In this case, with
> > current implementation, pruning will be bypassed, and there is a
> > possibility that the sink-supported channel multiplied by the sink-
> supported rate exceeding the available blank bandwidth, but pruning didn't
> occur.
> >
> > For this situation, I am considering adding an "else" part in
> intel_audio_compute_eld.
> > This "else" part would check if (sad_to_channels(sad) < crtc_state-
> >audio.max_channel), for example, in the GLK case also.
> > In that case, the channel would be fixed.
> >
> > So, if Channel * audio sample container size * (iterating from Max
> > rate to Min rate) is less than max_audio_samples_per_second, I believe
> we can eliminate the above mentioned situation.
> > If the sink's supported channel is lower than
> > pipe_config->audio.max_channel, we can get another chance to adjust the
> rate based on the sink's maximum capability.
> [...]
> > now pruning will happen in 2 cases,
> >
> > 1. If pipe_config->audio.max_channel < sink's supported channels then
> > prune as per obtained combination from,
> intel_hdmi_audio_compute_config.
> > 2. If pipe_config->audio.max_channel >  sink's supported channels, but
> > sink's supported channel * sink supported max rate * audio sample
> container size exceeds the max_audio_samples_per_second then prune
> with sink's supported channel and rate (which satisfy bandwidth condition.
> range: in between  Max to min).
> >
> > Please give your opinion.
> 
> ack, I think this is sensible. The SAD filtering cannot be perfect as there can
> be multiple ways to prune the config to get within bandwidth budget (as we
> have three varibles for LPCM, channel count, sampling rate and also sample
> depth). So given limited visibility, I'd say above approach sounds good. I'd
> also proceed (in your step2) with limiting first the sampling rate and only
> further limit channel count in second step.
> 
> Br, Kai

Thanks Kai, 

I will update changes with new revision.

Regards,
MItul


More information about the Intel-gfx mailing list