From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.13 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793971829; b=Y+PuWUjbtT5Xfkm8y8O9TNnM7Kys1GfBc2V9D/PBUd8zAJacc5Hu8qs9zhrZZ6t3eJr0 CaELLKa70Ll54g7SY5CrphyowyMscd8QLgY4/i0xuUVqhtpgx9nP395FSjtNEvy2A5Ffa RM3ZXaibdOTI3jjrbxkIAnjzuKzYaE8cKsCR/Vb2RfA9ZKFJW+1XiN3dhd5U2CY5F2kjc UfouCrDqugCBCQZjbdG/O7uyFm4cvsMW3GU47isO3RMyapmCqLqn30bRWdLt0JsN/2kMQ pXYixz2c7ZHwerR6bRJamlmHkSUY3QWsibRmUrS3kCwD45ckw82eo6UGwROirpwkFjg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793971829; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:From:To:Cc:Subject: In-Reply-To:Organization:References:Date:Message-ID:MIME-Version: Content-Type; bh=SN/6UBtRF9t23k+xh5kIB4pVCw09MPBbP88OI2a0J9Q=; b=yqlC0IMn7+g6+dIbN38BoH3YImmsMksZadgfKiR1FVo1AlasCUzzP+v1xEMbxmq+BmHZ J4/7GNJ3VHZ2H62eRiDI4J8qp45haK9exTsp+hYv5AJU1tarEQrC0QvcEbDun6qxpc68f YbHMWfywFupOAHd32IESsYRNqPp0VgJMcIoXijOHtgdhJJ3QViT9y2ybHaNtaJ3sJMKLY iqhIvx4TH6ks63QpiU0txDHNDZ3/TTv/yE9qUhmwvPp97N4c5yRSUChFZ7Pe22W4L9xcE vlodzQRu+5RcoP7SfrucdrirO2VhCfAFrjf31fUbPWP1FBOLBZzNMRl+TWu8wZfLuGw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=EDlVThOT; arc=none smtp.remote-ip=192.198.163.13 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D17A606A32C; Fri, 6 Nov 2026 13:30:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3D17A606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=EDlVThOT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1793971828; x=1825507828; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=Hg3E2tV8t/r3xvA5nyxI35xq+Jk6OiCkXu5R71On+t8=; b=EDlVThOTAwyzZA4iokKQreh1uTlVDSUxOLa6nVyx4DXf0yFKM+476pUK 7Kvet/46H0IpQtK4O6v/fnxGumJ8pt+9e7SWlwevq+08u2uc7Y41BBe1Y Q9FU5Xe9gORRKuVKdQGRn3pFsqqpzZ9XJ/ZoUsuGTwZz/C/gzN6OCaA9g 1C2ssdx4tfB9ypHRbszYI4KJK/94BmO3ssMjIFVQQ0en/+N1A/xb3d0JA qmiLVgsoQHv4i+Buku3kFOYGCz+0FeNm1xf8LDY143PpbW+YoSiSewNaJ 3x19qXrDl/nvxJxGqv0w1iPcYvXyVGEmfyJUnDP4OrW8duPzVLhE1FDdP A==; X-CSE-ConnectionGUID: Ha+jqaGBSPylWYVFATwrmw== X-CSE-MsgGUID: Vhv7ckQTQ6aj/jKtkmZF3Q== X-IronPort-AV: E=McAfee;i="6800,10657,11957"; a="2775394" X-IronPort-AV: E=Sophos;i="6.27,197,1787036400"; d="scan'208";a="2775394" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2026 05:30:16 -0800 X-CSE-ConnectionGUID: X3MEUOGvQgyeCvaHWnjegg== X-CSE-MsgGUID: MyRyuK9DTWKlwEdX2DelYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,197,1787036400"; d="scan'208";a="7159162" Received: from conormcd-mobl2.ger.corp.intel.com (HELO localhost) ([10.245.245.101]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2026 05:30:10 -0800 From: Jani Nikula To: Kai Vehmanen , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: Ville =?utf-8?B?U3lyasOkbMOk?= , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , 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?B?VG9tw6HFoQ==?= Hnyk , Wim Taymans , nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, Kai Vehmanen Subject: Re: [PATCH 0/2] drm: Populate ELD Port_ID to identify audio endpoints In-Reply-To: <20261105160240.2850042-1-kai.vehmanen@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland References: <20261105160240.2850042-1-kai.vehmanen@linux.intel.com> Date: Fri, 06 Nov 2026 15:30:06 +0200 Message-ID: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain On Thu, 05 Nov 2026, Kai Vehmanen wrote: > 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. We might want drm_edid_to_eld() to do this automatically for everyone in the future, but I think this is a good, cautious first step. Acked-by: Jani Nikula > > 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(+) -- Jani Nikula, Intel