From d3eca31ea6c33655af67add45a6007bcde549c56 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 9 Dec 2019 19:25:15 +0000 Subject: [PATCH] Configure headphone redirection for the Dell L780 and X1 Carbon 7th gen. 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. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/sound/pci/hda/hdaa_patches.c | 6 ++++-- sys/dev/sound/pci/hda/hdac.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 06c2f416dfac..755f2aef461b 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -390,7 +390,8 @@ hdac_pin_patch(struct hdaa_widget *w) break; } } else if (id == HDA_CODEC_ALC285 && - subid == LENOVO_X120KH_SUBVENDOR) { + (subid == LENOVO_X120KH_SUBVENDOR || + subid == LENOVO_X120QD_SUBVENDOR)) { switch (nid) { case 33: patch = "as=1 seq=15"; @@ -447,7 +448,8 @@ hdac_pin_patch(struct hdaa_widget *w) config = 0x01a1913d; break; } - } else if (id == HDA_CODEC_ALC256 && subid == DELL_I7577_SUBVENDOR) { + } else if (id == HDA_CODEC_ALC256 && (subid == DELL_I7577_SUBVENDOR || + subid == DELL_L7480_SUBVENDOR)) { switch (nid) { case 20: patch = "as=1 seq=0"; diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index f2556445078a..e4a7a02f51d8 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -206,6 +206,7 @@ #define DELL_V1400_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0227) #define DELL_V1500_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0228) #define DELL_I1300_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01c9) +#define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) @@ -264,6 +265,7 @@ #define LENOVO_X1CRBN_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f9) #define LENOVO_X120BS_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2227) #define LENOVO_X120KH_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x225c) +#define LENOVO_X120QD_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2292) #define LENOVO_X220_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21da) #define LENOVO_X300_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac) #define LENOVO_T400_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20f2)