From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796048651; b=p9uCIlHjZWZQ0TRJ1ITQDDux3Xf1cfc+mphiCIJNW4Ki2nuLOSl79WYIJLSuJhdI5Z9/ cZZgQBM1xYLjWG2j6E/VfQkikUbre5AOgQXk4inl8IEiSqHZ2zn/gDiJjHvlij8KjdIO6 7w4gR1GoyqePlUxlHbejsCrmsdPCD/RSCWyyPM7KE+C7OCwN3OnYRsBfuZ4+kJ/sRfk6D KergHFEwPFwoVDJzxShcXN1JltlbFx+kaHtCoFZpi59CGgKMndauY+GMUN8u4OFt2uCZH CMTJVa14437gxp2TlioRn9XAz3k9Kkba3hOf5AmCg7Vo2xPFl4H65a8rHdvUFCuFEAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796048651; 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: Date:Message-ID:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=b5kJrgIGMTTVwwZ2Qh2SU5fNtT4UWs588wCJiTA0JRQ=; b=wVgc9GGX/BKFd9lP9fYsrP6nCcPPd67D5R/JpPU6tVgo3q6D984NAiIaH/Y9/tAdf9o+ 5JG2a7pGf1kqH9VDyhecQAzKQli4oezrzl9vnXAs9i7mxY+cT2c08O0HLBzvekfJCislo bwDTJv2fv6HFX087Vpsbm3tCKB9uzv/QeASeUTPN+4MCkRIuMNwlXyIVTfrzSbTRPpmU8 iSFUII03fnH9OSTog+kekLKifPqi4ghJifT0cVIrq5C4JZ7q5Wxpczm+k5I2/HZ20Cm5d XslQqpTTodoU4mHTW9nDYWk6TDcEg99qPEPkGOgmrGGEhF3YDaiIB9gV/5XmTkyRS7Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=l6QFzT+z; arc=none smtp.remote-ip=198.175.65.11 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 794DE606A327; Mon, 30 Nov 2026 14:24:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 794DE606A327 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=linux.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=l6QFzT+z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796048650; x=1827584650; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=b5kJrgIGMTTVwwZ2Qh2SU5fNtT4UWs588wCJiTA0JRQ=; b=l6QFzT+zIetF/JJNY011Agmceqy5ODJs55NtzULmSd9qnaYten1Bpr44 F3EQ9djYgKd820UlKhZ34VC7Z7chYi6H53pDaC4W8LgZgTkCdJylL1FK7 6tr7DXZaAO3iCz8mCRJdboLgiaXTS3OIaHUvPYyDQuYtJivJVBEj4kL0W kl3UcEniursTngDLxDXnmmI1FTidePWXQW47344UUeT3k7hClJGNoQDV7 TKkfj25UbDWDOXePvtw2g0j+4iz1AY3pyVBadq+41xx5S+cYz9Imiw4yF KkTMQjdQm4RVoEn0sqiMygcQB74c0NLxOpAV900r0iPyAyqAeYYWlrsml Q==; X-CSE-ConnectionGUID: Vs6yVxfqRZ+d/mdg0bCrYQ== X-CSE-MsgGUID: 2LV+hDxESxqcvPZXBhN3HA== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4769169" X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; d="scan'208";a="4769169" 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-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; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 DB58B606A335 for ; Mon, 30 Nov 2026 14:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Ex143Rmm Received: from kara.freedesktop.org (unknown [131.252.210.166]) by gabe.freedesktop.org (Postfix) with ESMTPS id C7B7D10F0F0; Mon, 30 Nov 2026 14:24:24 +0000 (UTC) Received: from kara.freedesktop.org (localhost [127.0.0.1]) by kara.freedesktop.org (Postfix) with ESMTP id BAE3A4047E; Mon, 30 Nov 2026 14:24:19 +0000 (UTC) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=lists.freedesktop.org; s=20240201; t=1796048659; b=VutB44fU0KlUWlgyg5279nOHXoV97hMPf90TWCPJfD0Lo7alFLI6WofFfk1swIOJplMjX sJPRPSHqPB7c9VUM1Ai28Mj6Limmv/eHXIj+c/22XZaq/gwIygurwU9pftZFQ/PxV8fuRi7 giYWcu7OqOi+UeizeXOIg+/QFe4NEZLTvO31rf5JoxSd4Mc3mCBPfcFCJ+oA7UZGpycHtN4 EnyMubxxedG9sdsLS5DyEJMIoeZ2sIZykBAPmD9admXS5W2K/x+7QlNCpAQGSomOrfSib/u x6q93OIzZM+QbyfJ8/LIQYdOUa6EHGgvryyL5X730dC5Z6NGzyORMQ1uMqYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.freedesktop.org; s=20240201; t=1796048659; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=b5kJrgIGMTTVwwZ2Qh2SU5fNtT4UWs588wCJiTA0JRQ=; b=MGbtQm4w4SDeSfDj8grGmhU+qbzVA5obBM1eo5DXIweeCka5J7vkBXpyrMBGJARKOT/BU 08C1YFGSGy3iNhjel2UGKaTucFBJzsMxoF64lN1djwMdghxSEpAqyH0GEVoYb/SaI2qON6i RiYrtW8L/ADfT9usZP2XW7C9BAg8hpNZRVoYhx0gdMP924KLo2xRC0L+1tc4Emf5iAKMng3 bw3DER4eirM0YvH8+3+1jjmAIrPm2xFp8ZbsCHTtrUbomTRgzHPNEFvnapkBp3TQybV9n6t PQDGhbi3wkwW5bnqIRJrVozvA71iV8IyXDJ2DJV1bUAA2T/2LSGGwDuUT0YA== ARC-Authentication-Results: i=1; mail.freedesktop.org; dkim=pass header.d=intel.com header.i=@intel.com; arc=none; dmarc=pass header.from=linux.intel.com policy.dmarc=none Authentication-Results: mail.freedesktop.org; dkim=pass header.d=intel.com header.i=@intel.com; arc=none (Message is not ARC signed); dmarc=pass (Used Org Domain Record) header.from=linux.intel.com policy.dmarc=none Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by kara.freedesktop.org (Postfix) with ESMTPS id E702340382 for ; Mon, 30 Nov 2026 14:24:15 +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 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 Message-ID-Hash: K3DEXZRA4P5J5EL2XILKOFPOLTK2T6AH X-Message-ID-Hash: K3DEXZRA4P5J5EL2XILKOFPOLTK2T6AH X-MailFrom: kai.vehmanen@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: kai.vehmanen@linux.intel.com, Jani Nikula , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , Simona Vetter , Takashi Iwai , Jaroslav Kysela , linux-sound@vger.kernel.org, Harry Wentland , Leo Li , Alex Deucher , amd-gfx@lists.freedesktop.org, Danilo Krummrich , =?UTF-8?q?Tom=C3=A1=C5=A1=20Hnyk?= , Wim Taymans , nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailman-Version: 3.3.10 Precedence: list List-Id: Nouveau development list Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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