hda: add patch for Framework laptop headphone jack

For Framework laptops built after Oct 2021 (like mine) that have a Tempo
Semiconductor 92HD95B codec rather than Realtek ALC295 (see
https://frame.work/ca/en/blog/solving-for-silicon-shortages).

As we do for many other laptops, put the headphone jack and speakers in
the same association by default so that the generic sound device
automatically switches between them.  Also specify the jack colour and
location.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34596
This commit is contained in:
Ed Maste 2022-03-17 15:47:55 -04:00
parent d234b011a8
commit 06731139ca
2 changed files with 11 additions and 0 deletions

View file

@ -322,6 +322,13 @@ hdac_pin_patch(struct hdaa_widget *w)
patch_str = "as=1 seq=15";
break;
}
} else if (id == HDA_CODEC_IDT92HD95B &&
(subid == FRAMEWORK_LAPTOP_SUBVENDOR)) {
switch (nid) {
case 10:
patch_str = "as=1 seq=15 color=Black loc=Left";
break;
}
} else {
/*
* loop over hdaa_model_pin_patch

View file

@ -503,6 +503,10 @@
#define AOPEN_VENDORID 0xa0a0
#define AOPEN_I915GMMHFS_SUBVENDOR HDA_MODEL_CONSTRUCT(AOPEN, 0x8202)
/* Framework */
#define FRAMEWORK_VENDORID 0xf111
#define FRAMEWORK_LAPTOP_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0001)
/* All codecs you can eat... */
#define HDA_CODEC_CONSTRUCT(vendor, id) \
(((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff))