From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52ABE606A327 for ; Mon, 30 Nov 2026 14:24:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Ex143Rmm Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AD8110F097; Mon, 30 Nov 2026 14:24:17 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id ADC1510E8D1; Mon, 30 Nov 2026 14:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796048651; x=1827584651; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=b5kJrgIGMTTVwwZ2Qh2SU5fNtT4UWs588wCJiTA0JRQ=; b=Ex143Rmm8eSmwU2G5zgsPVFPmFkTOBeVip/rHoMIVNHSt0hi7DQ7nJ96 1rKFHYwZSYeit+NUnSMM5PfkdKTC4U5h0ZpCHi7ZHtBAEsPb4cu20RJAi wpSSJsWFboKosbifg65R4twXuftl7CL1YS8wEaWxF0g46txx7FJ0LkDXS l6H1gGtKSyGGR93hae1Hhjn1oXXhL8e4YTSgKpv3xIc1ZFn9ghvjSEDdC b70SQ0pk/ldd4K33yR5gNnhLebfp84dHXy/fumsXD6eNX/b0jH5QQnobu s/b6mx/bJnvVK/w9rp4OZqXIh5iq0VSxgnEown2Evd9wjibHaZpu+I7ky A==; X-CSE-ConnectionGUID: Mdfx78DTQdeKibdhqu4Rag== X-CSE-MsgGUID: uyEhtEZ+STulhDeBvc4oKA== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4769167" X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; d="scan'208";a="4769167" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 06:24:10 -0800 X-CSE-ConnectionGUID: 1EKmnDDDQ2qkITvDppBFlA== X-CSE-MsgGUID: uF68sGieSEiZsleTFZikFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; d="scan'208";a="12943668" Received: from amilburn-desk.amilburn-desk (HELO kvehmane-desk1.ger.corp.intel.com) ([10.245.244.87]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 06:24:05 -0800 From: Kai Vehmanen To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: kai.vehmanen@linux.intel.com, Jani Nikula , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , David Airlie , Simona Vetter , Takashi Iwai , Jaroslav Kysela , linux-sound@vger.kernel.org, Harry Wentland , Leo Li , Alex Deucher , amd-gfx@lists.freedesktop.org, Lyude Paul , Danilo Krummrich , =?UTF-8?q?Tom=C3=A1=C5=A1=20Hnyk?= , Wim Taymans , nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] drm: Populate ELD Port_ID to identify audio endpoints Date: Mon, 30 Nov 2026 16:23:50 +0200 Message-ID: <20261130142352.635531-1-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.43.0 X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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. Changes in V2: - rebased on top of latest drm-misc-next - added reviewed/acked-by received so far 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(+) base-commit: 4991c2c80fb984b50c3b405bc4f4472d21dee049 -- 2.43.0