Skip to content

drm/i915/audio: Add HDMI TMDS audio bandwidth check

Chaitanya Kumar Borah intel-gfx intel-xe 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 2 repliesIn review
  2. v42 patches 2 repliesSuperseded
  3. v32 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches0 repliesSuperseded
v12 patches0 repliesSuperseded

Changes in v5 from the cover letter

- Drop the FRL guard, i915 doesn't support FRL yet. (Ankit)
- s/required_tmds/hblank_audio_min (Ankit)
- Add HDMI_TMDS_AUDIO_PACKETS_LINE_MAX macro instead of a magic number 18. (Ankit)
- Use drm_eld_sad_get()/drm_eld_sad_set() instead of raw ELD byte access. (Ankit)
- Drop extra blank line. (Ankit)

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/i915/hdmi: Move audio compute config after format selectiondrivers/gpu/drm/i915/display/intel_hdmi.c+4 -41 reply
2/2drm/i915/audio: Prune ELD SADs based on HDMI audio bandwidthdrivers/gpu/drm/i915/display/intel_audio.c+153 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAnkit Nautiyal
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [v5 0/2] drm/i915/audio: Add HDMI TMDS audio bandwidth check

This series adds audio bandwidth validation for HDMI TMDS mode. When the available hblank period cannot carry the required audio packets for a given sample rate and channel count, the corresponding frequencies are pruned from the ELD SADs before they reach the audio driver.

Sample rates are pruned rather than channel counts because compressed audio formats like Dolby Digital (AC-3) and DTS require a fixed channel configuration to decode.

This improves on an earlier attempt which can be seen in [1]

[1] https://lore.kernel.org/intel-gfx/[email protected]/

v2:
- Use DIV64_U64_ROUND_UP() instead of DIV_ROUND_UP_ULL() to avoid do_div() truncating the 64-bit divisor to 32-bit, which caused audio_packets_line to be wildly inflated and all SADs to be pruned.
- Guard intel_audio_hdmi_eld_compute_config() against HDMI FRL modes.

v3:
- Rebase

v4:
- Simply SAD Removal logic (Jani)

v5:
- Drop the FRL guard, i915 doesn't support FRL yet. (Ankit)
- s/required_tmds/hblank_audio_min (Ankit)
- Add HDMI_TMDS_AUDIO_PACKETS_LINE_MAX macro instead of a magic number 18. (Ankit)
- Use drm_eld_sad_get()/drm_eld_sad_set() instead of raw ELD byte access. (Ankit)
- Drop extra blank line. (Ankit)

Chaitanya Kumar Borah (2):
drm/i915/hdmi: Move audio compute config after format selection drm/i915/audio: Prune ELD SADs based on HDMI audio bandwidth

 drivers/gpu/drm/i915/display/intel_audio.c | 153 +++++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_hdmi.c  |   8 +-
 2 files changed, 157 insertions(+), 4 deletions(-)
Signature · 1 line
2.50.1