git: c4f9b0df3fa7 - stable/15 - snd_hda: Add patch for Framework 16 AMD Ryzen AI 300 Series

From: ShengYi Hung <aokblast_at_FreeBSD.org>
Date: Tue, 23 Sep 2025 17:18:45 UTC
The branch stable/15 has been updated by aokblast:

URL: https://cgit.FreeBSD.org/src/commit/?id=c4f9b0df3fa70f5a0414dde1518f764399ac5229

commit c4f9b0df3fa70f5a0414dde1518f764399ac5229
Author:     ShengYi Hung <aokblast@FreeBSD.org>
AuthorDate: 2025-09-08 11:15:14 +0000
Commit:     ShengYi Hung <aokblast@FreeBSD.org>
CommitDate: 2023-01-01 23:29:21 +0000

    snd_hda: Add patch for Framework 16 AMD Ryzen AI 300 Series
    
    The new Framework 16 with ALC285 exhibits the same issue as the previous
    model. Therefore, we apply the same fix to the new model.
    
    Reviewed by:    emaste, Daniel Schaefer <dhs@frame.work>
    Approved by:    lwhsu (mentor)
    Sponsored by:   The FreeBSD Foundation
    Sponsored by:   Framework Computer Inc
    Differential Revision: https://reviews.freebsd.org/D52423
    
    (cherry picked from commit 7f81b2519aebcf90d7e027122ca99b628ca81ed9)
---
 sys/dev/sound/pci/hda/hdaa_patches.c | 6 ++++--
 sys/dev/sound/pci/hda/hdac.h         | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c
index 8967cb49125c..91bb244578c7 100644
--- a/sys/dev/sound/pci/hda/hdaa_patches.c
+++ b/sys/dev/sound/pci/hda/hdaa_patches.c
@@ -362,8 +362,10 @@ hdac_pin_patch(struct hdaa_widget *w)
 			patch_str = "as=3 seq=15 color=Black loc=Left";
 			break;
 		}
-	} else if (id == HDA_CODEC_ALC295 &&
-	    subid == FRAMEWORK_LAPTOP_0005_SUBVENDOR) {
+	} else if ((id == HDA_CODEC_ALC295 &&
+	    subid == FRAMEWORK_LAPTOP_0005_SUBVENDOR) ||
+	    (id == HDA_CODEC_ALC285 &&
+	    subid == FRAMEWORK_LAPTOP_000D_SUBVENDOR)) {
 		switch (nid) {
 		case 20:
 			/*
diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h
index 223434a214b1..ff3a1d0dcfb5 100644
--- a/sys/dev/sound/pci/hda/hdac.h
+++ b/sys/dev/sound/pci/hda/hdac.h
@@ -535,6 +535,7 @@
 #define FRAMEWORK_LAPTOP_0003_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0003)
 #define FRAMEWORK_LAPTOP_0005_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0005)
 #define FRAMEWORK_LAPTOP_0006_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0006)
+#define FRAMEWORK_LAPTOP_000D_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x000d)
 
 /* All codecs you can eat... */
 #define HDA_CODEC_CONSTRUCT(vendor, id) \