From nobody Tue May 26 10:41:01 2026 X-Original-To: dev-commits-src-all@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 4gPq6V62tJz6fpMj for ; Tue, 26 May 2026 10:41:06 +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 4gPq6V5KyGz3QjC for ; Tue, 26 May 2026 10:41:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779792066; 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=pBbN0WGyll2ihDvoAhVCDqdsXWc63Jxx5x72pah9PRo=; b=Dyn1fJVI3f/Ql4ql7khWLFPvNTiykquxZOjq14v8b/q1r7dghn8qCHi5jo5bW21OACTXeS Mg5rrF6HuOfMjzsfEWEyM6F1bTwGcmVzrdAmzwyZiSc2NM0LQc8sSymcLYdaB2mYW2NbcT lUrDBvprwtou4IBW6w3RqfoPM2DmpCI3N4Xtj2adfk16dkRb7h6NssAaOUjGSVUz4aPkwB gS1Doo5rx1BhMShX+nD/J79lYPtJwvRBAJCLODiL5bl0he+p5s+4Cfa9gXW34G9UbQ7Voz K931cKtlaBQMvb1BKfm1QxNHKdYxznPecNdbga9NdCxI2aZVNwvlllB6vILCLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779792066; a=rsa-sha256; cv=none; b=BV80c2SHK5T4ovbFKcMorWe1vEdi6TCH5j0hM6nlfFOKcIeTHzIT0IUgz3BLTR/Zn3ZVON M9ECp4/ypovbdRRNd1zrNPeuHFbxIUj4s59PYDDDZzOfef3Y30pZE8SaHnw0mai2zQU2jg Dz7SHz7019WPNhW3dJph+pPIKfRHOsnrVEnsdjiqjVCZ7cqD2cBgydIk1VsBKdN1dnTT1Q jo12+shw7koiK5bL3pCyal0gMBA1tKPwj+zIryvkbGPSfZV4hD0fkhaimq/MOyuXqD5v5V aBIeaKqJwhLEcLBi6HGHjrejEas5Ch9g+ZiFJlrm2JbpJbdCcLY12SnCD1+kcg== 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=1779792066; 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=pBbN0WGyll2ihDvoAhVCDqdsXWc63Jxx5x72pah9PRo=; b=Qn5UzlYgE8DEQ9ducymbrI9l2dxvq19nz5UWVFvuiWI9XisTn2fOW4NEmSgX+OyJ9OVrW9 lSYSwq7xiHgjDthU11auSiHEQk+rUdeCbVFVu4XVYSAxVcOMywwSRUn8adkxei2k2EQ2GM 3+xdY1JMWEuU/tDxYFtn5pKTcpTEs73n7UTt4Knl5g63h9yjiEzrXdNUyBh1/5s4GcKB6N v/t7V9084xiTVR9OsAWxrSVCpCyuDf7fqNOUuTuIODyCyAyJDTKG6jv2Ofwf9d8TkB8zAr qNU6QH2lx0CwtHzX2xykZmvUGgjFNty28t+fSoUHFQg/oSEac6+7nDJcLBeg1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPq6V4tW2z1NLX for ; Tue, 26 May 2026 10:41:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38b03 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 10:41:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Christos Margiolis Subject: git: ee7148ff11ff - stable/15 - snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/15 X-Git-Reftype: branch X-Git-Commit: ee7148ff11ff5e30242e8d20e7d6cebcad5707a1 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 10:41:01 +0000 Message-Id: <6a1578bd.38b03.5522d09c@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ee7148ff11ff5e30242e8d20e7d6cebcad5707a1 commit ee7148ff11ff5e30242e8d20e7d6cebcad5707a1 Author: Abdelkader Boudih AuthorDate: 2026-05-19 12:24:14 +0000 Commit: Christos Margiolis CommitDate: 2026-05-26 10:40:40 +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 (cherry picked from commit 65341ec3172936804b081c8ceca9bae88f5c7192) --- 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 "