aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Timofeev <timp87@gmail.com>2022-08-28 23:31:40 +0000
committerEd Maste <emaste@FreeBSD.org>2022-09-13 16:16:26 +0000
commitd88dc1b0b9af4de5ecbe0cdae1cea6055c8c9ec8 (patch)
treec68ccb20012e7bb2ce8cad4eb7dc29b73b47863c
parenta8e8a914456878a67dfc5ef6f917a04be2e6a0c7 (diff)
downloadsrc-d88dc1b0b9af4de5ecbe0cdae1cea6055c8c9ec8.tar.gz
src-d88dc1b0b9af4de5ecbe0cdae1cea6055c8c9ec8.zip
hda: add patch for Framework laptop v2 headphone jack
Fix headphone (12th gen Intel laptops) and mic jack (both 11th and 12th gen) switching. PR: 262579 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D36354
-rw-r--r--sys/dev/sound/pci/hda/hdaa_patches.c6
-rw-r--r--sys/dev/sound/pci/hda/hdac.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c
index dc677bc36143..632f74a0a0cc 100644
--- a/sys/dev/sound/pci/hda/hdaa_patches.c
+++ b/sys/dev/sound/pci/hda/hdaa_patches.c
@@ -329,11 +329,15 @@ hdac_pin_patch(struct hdaa_widget *w)
break;
}
} else if (id == HDA_CODEC_IDT92HD95B &&
- (subid == FRAMEWORK_LAPTOP_SUBVENDOR)) {
+ (subid == FRAMEWORK_LAPTOP_0001_SUBVENDOR ||
+ subid == FRAMEWORK_LAPTOP_0002_SUBVENDOR)) {
switch (nid) {
case 10:
patch_str = "as=1 seq=15 color=Black loc=Left";
break;
+ case 11:
+ patch_str = "as=3 seq=15 color=Black loc=Left";
+ break;
}
} else {
/*
diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h
index 886669898005..a4928dd0b4c5 100644
--- a/sys/dev/sound/pci/hda/hdac.h
+++ b/sys/dev/sound/pci/hda/hdac.h
@@ -513,7 +513,8 @@
/* Framework */
#define FRAMEWORK_VENDORID 0xf111
-#define FRAMEWORK_LAPTOP_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0001)
+#define FRAMEWORK_LAPTOP_0001_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0001)
+#define FRAMEWORK_LAPTOP_0002_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0002)
/* All codecs you can eat... */
#define HDA_CODEC_CONSTRUCT(vendor, id) \