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

Kai Vehmanen kai.vehmanen at linux.intel.com
Wed Jun 28 17:11:15 UTC 2023


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


More information about the Intel-gfx mailing list