From nobody Tue May 19 12:26:04 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKYms35JKz6f76w for ; Tue, 19 May 2026 12:26:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKYmr5Pt7z3Rdd for ; Tue, 19 May 2026 12:26:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779193564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZCWMqMeQtCqcuwqm/bFf4sgqunfYj+g6EF1HDjWk/vk=; b=r0oU+07AHn6hHYUb/EtIvX7F+Gr9iDd2C0vt8uTxAfuwO1sqmyGaHs8pbN9bdvgrr7EwCP 2sUlE6LW5LoEi3JxhPl83iZBx9WLPlW2lIPOSjWi1vjtYiRpMczbaSNfDd9Or84XQOg3Bq qko3Gnm/GKPFVPpEPAscePieuIKz59LjVggq9psg+8yYwUFeQ72Z3ctLIhb+D1AzzKw7fS Nwt75LOc5tC+dMEVviRNn/srIz75/e6xx557PxmoWzadwjnwkWd60iGX/U3XZqkAuVyIl3 ohnMFfD657JsuD07lPUOtyp4QxWo5ARc2LBgjiq+4YmFeNUNu30qGouvXXQEnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779193564; a=rsa-sha256; cv=none; b=iawZTl80EEW9ISz1OYDX97EC6QP+ifa2bZzsQQfC+K3gGnzGtngeTfJ4pIPfRTZsHScdOC aVQPfEDsrZc2qdZmElnMb29O9UA4sXSKxZ8lYOjmysgPDj0hpqUAisB7Cox9OgYCwZtsIj DDPuIGZo59904jEPOo5rCVa2dEnconRkFZdGYOg5179qPhOmWAPNaWkLR38SVJpw7U2oji Yan4RiWJ8dpqqzwfqTQ5vMgl97zZWuXOayWGJ4kO7MTDXJrREhZJtVZ9miSOOtu/9o3lqq 5aIpMRcGl7YpsWDoBGw1wNRMrfiLjFmR8n6BqzvOVNuXeAQgMXLb2DPw8e6qQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779193564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZCWMqMeQtCqcuwqm/bFf4sgqunfYj+g6EF1HDjWk/vk=; b=KLKzNJs0nPWAtf3yGdTcwoEbqSFkx+qVdofhBc+KfKRcp4erbqYKJDJTAj3A18uER4nLGT ti4Ovzatd52EJqA2UKr41cKLy2fP+1ed+scSEc0H4wb3CaGpQSSOt1wmE9j2fKsdjDA5ll Q3TFsxqgXAOZJWgBjAHFOucMZK8jOPDBerzBHyWnI1xwVXrMQ8Oq1dFvtl2bdyKedSjY9E cRJRbLTK1B6/7T6vfYoTJHCBQwE5cVgm1PJvelOdEpy9dowczP4lnXZ4Loc8GTbADfWuKo Y0vUoqZK/RlZUSa2lCUVCcy6pP+EhFwgyDjV7Fh2u4xzCuPsyt+snOBvG5Yixg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKYmr4lKPzk6 for ; Tue, 19 May 2026 12:26:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 317f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 12:26:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Christos Margiolis Subject: git: 65341ec31729 - main - snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.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 X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65341ec3172936804b081c8ceca9bae88f5c7192 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 12:26:04 +0000 Message-Id: <6a0c56dc.317f6.28faeda0@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=65341ec3172936804b081c8ceca9bae88f5c7192 commit 65341ec3172936804b081c8ceca9bae88f5c7192 Author: Abdelkader Boudih AuthorDate: 2026-05-19 12:24:14 +0000 Commit: Christos Margiolis CommitDate: 2026-05-19 12:25:51 +0000 snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling Some firmware (e.g. Apple EFI on Sandy Bridge Mac hardware) programs all HDMI/DP output pins in an association with identical sequence numbers. The existing code disables the entire association on the first duplicate, leaving HDMI/DP audio non-functional. For digital output pins (HDMI/DP) with seq=0 duplicates, search for the next free sequence slot and reassign the duplicate rather than disabling. The seq=0 restriction targets the known Apple firmware pattern; any other duplicate sequence is more likely a genuine firmware error and the association is still disabled. Update first after reassignment so that hpredir is not left pointing at a stale sequence. Non-digital and input associations retain the existing disable behaviour. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D55473 --- sys/dev/sound/pci/hda/hdaa.c | 49 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 7dec437de944..8add23217d1b 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -3268,10 +3268,51 @@ hdaa_audio_as_parse(struct hdaa_devinfo *devinfo) first = seq; /* Check association correctness. */ if (as[cnt].pins[seq] != 0) { - device_printf(devinfo->dev, "%s: Duplicate pin %d (%d) " - "in association %d! Disabling association.\n", - __func__, seq, w->nid, j); - as[cnt].enable = 0; + int newseq = -1; + + /* + * Some firmware (e.g. Apple EFI on Mac hardware) + * assigns seq=0 to all HDMI/DP output pins in + * an association. Reassign the duplicate to + * the next free slot rather than disabling the + * whole association. Limit to seq=0 duplicates: + * any other duplicate sequence is more likely a + * genuine firmware error and should still disable. + */ + if (seq == 0 && dir == HDAA_CTL_OUT && + HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL( + w->param.widget_cap) && + (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap) || + HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap))) { + int cand; + + for (cand = 1; cand < 16; cand++) { + if (as[cnt].pins[cand] == 0) { + newseq = cand; + break; + } + } + } + if (newseq >= 0) { + HDA_BOOTVERBOSE( + device_printf(devinfo->dev, + "%s: Duplicate pin %d (%d) " + "in association %d, " + "reassigning to seq %d.\n", + __func__, seq, w->nid, + j, newseq); + ); + seq = newseq; + /* Update hpredir anchor to lowest seq. */ + first = min(first, newseq); + } else { + device_printf(devinfo->dev, + "%s: Duplicate pin %d (%d) " + "in association %d! " + "Disabling association.\n", + __func__, seq, w->nid, j); + as[cnt].enable = 0; + } } if (dir != as[cnt].dir) { device_printf(devinfo->dev, "%s: Pin %d has wrong "