mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] drm: Populate ELD Port_ID to identify audio endpoints
@ 2026-11-05 16:02 Kai Vehmanen
  2026-11-05 16:02 ` [PATCH 1/2] drm/eld: Add drm_eld_set_port_id() helper Kai Vehmanen
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Kai Vehmanen @ 2026-11-05 16:02 UTC (permalink / raw)
  To: intel-gfx, intel-xe, dri-devel
  Cc: Jani Nikula, Ville Syrjälä,
	Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Takashi Iwai, Jaroslav Kysela, linux-sound, Harry Wentland,
	Leo Li, Alex Deucher, amd-gfx, Lyude Paul, Danilo Krummrich,
	Tomáš Hnyk, Wim Taymans, nouveau, linux-kernel,
	Kai Vehmanen

The ELD Port_ID field (bytes 8..15 of the baseline block) is typically
zero on Linux today: drm_edid_to_eld() leaves it empty and no in-tree driver
fills it in. amdgpu, radeon and nouveau pass the raw connector->eld to
the audio component. On the amdgpu DC Azalia register path the value
is a hardcoded constant, the same for every port.
Only closed display drivers fill the value.

Pipewire added support for "Port_ID" in merge request:
https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/3025

As a result, when two identical monitors are connected their ELDs are
byte-identical, and userspace (e.g. PipeWire/WirePlumber) cannot
passively tell which HDMI/DP PCM belongs to which DRM connector.

This series adds a DRM helper that fills Port_ID with a common layout,
and uses it in i915:

  bits 63:48 - PCI domain of the DRM device
  bits 47:32 - PCI bus/device/function of the DRM device
  bits 31:0  - DRM connector object ID

The upper half follows the layout documented for the AMD Azalia sink
info registers (dce_audio.c: "PORT_ID1 = 16bit BDF"). The aim is for
this to become a convention other drivers can opt into. For drivers
that copy connector->eld to the audio component (amdgpu DM, radeon,
nouveau), adopting it would be a one-line change. Comments from the
AMD and nouveau folks on whether the layout works for them are very
welcome.

An alternative would be to fill Port_ID directly in drm_edid_to_eld(),
so every driver gets it without changes. I went with an opt-in helper
to avoid changing the ELD contents seen by all drivers and existing
userspace at once.

The value is exposed to userspace via the ALSA ELD control and
/proc/asound/cardX/eld#Y.

Kai Vehmanen (2):
  drm/eld: Add drm_eld_set_port_id() helper
  drm/i915/audio: Populate ELD Port_ID

 drivers/gpu/drm/drm_eld.c                  | 42 ++++++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_audio.c |  2 ++
 include/drm/drm_eld.h                      |  3 ++
 3 files changed, 47 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-06 13:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 16:02 [PATCH 0/2] drm: Populate ELD Port_ID to identify audio endpoints Kai Vehmanen
2026-11-05 16:02 ` [PATCH 1/2] drm/eld: Add drm_eld_set_port_id() helper Kai Vehmanen
2026-11-05 17:08   ` Ville Syrjälä
2026-11-05 16:02 ` [PATCH 2/2] drm/i915/audio: Populate ELD Port_ID Kai Vehmanen
2026-11-05 17:09   ` Ville Syrjälä
2026-11-06  7:16 ` [PATCH 0/2] drm: Populate ELD Port_ID to identify audio endpoints Takashi Iwai
2026-11-06 13:30 ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®