Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-21 09:04:49 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-21 09:04:54 +0100
commit35a167edd11440a560c631e91bf0bc90a9e43449 (patch)
treeb3299b8b9ea0090ac5402f930876d8cf10955fe7
parent564f2faa28fedfde762f07e63c58ba234b3c90e5 (diff)
ALSA: hda/realtek - Headset microphone and internal speaker
support for System76 oryp5 (bsc#1051510).
-rw-r--r--patches.drivers/ALSA-hda-realtek-Headset-microphone-and-internal-spe.patch92
-rw-r--r--series.conf1
2 files changed, 93 insertions, 0 deletions
diff --git a/patches.drivers/ALSA-hda-realtek-Headset-microphone-and-internal-spe.patch b/patches.drivers/ALSA-hda-realtek-Headset-microphone-and-internal-spe.patch
new file mode 100644
index 0000000000..f17ef0bd00
--- /dev/null
+++ b/patches.drivers/ALSA-hda-realtek-Headset-microphone-and-internal-spe.patch
@@ -0,0 +1,92 @@
+From 7f665b1c3283aae5b61843136d0a8ee808ba3199 Mon Sep 17 00:00:00 2001
+From: Jeremy Soller <jeremy@system76.com>
+Date: Wed, 13 Feb 2019 10:56:19 -0700
+Subject: [PATCH] ALSA: hda/realtek - Headset microphone and internal speaker support for System76 oryp5
+Git-commit: 7f665b1c3283aae5b61843136d0a8ee808ba3199
+Patch-mainline: v5.0
+References: bsc#1051510
+
+On the System76 Oryx Pro (oryp5), there is a headset microphone input
+attached to 0x19 that does not have a jack detect. In order to get it
+working, the pin configuration needs to be set correctly, and the
+ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC fixup needs to be applied. This is
+similar to the MIC_NO_PRESENCE fixups for some Dell laptops, except we
+have a separate microphone jack that is already configured correctly.
+
+Since the ALC1220 does not have a fixup similar to
+ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, I have exposed the fixup from the
+ALC269 in a way that it can be accessed from the
+alc1220_fixup_system76_oryp5 function. In addition, the
+alc1220_fixup_clevo_p950 needs to be applied to gain speaker output.
+
+Signed-off-by: Jeremy Soller <jeremy@system76.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/pci/hda/patch_realtek.c | 28 ++++++++++++++++++++++++++++
+ 1 file changed, 28 insertions(+)
+
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
+index 6df758adff84..3ce318a3086d 100644
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -1855,6 +1855,8 @@ enum {
+ ALC887_FIXUP_BASS_CHMAP,
+ ALC1220_FIXUP_GB_DUAL_CODECS,
+ ALC1220_FIXUP_CLEVO_P950,
++ ALC1220_FIXUP_SYSTEM76_ORYP5,
++ ALC1220_FIXUP_SYSTEM76_ORYP5_PINS,
+ };
+
+ static void alc889_fixup_coef(struct hda_codec *codec,
+@@ -2056,6 +2058,17 @@ static void alc1220_fixup_clevo_p950(struct hda_codec *codec,
+ snd_hda_override_conn_list(codec, 0x1b, 1, conn1);
+ }
+
++static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
++ const struct hda_fixup *fix, int action);
++
++static void alc1220_fixup_system76_oryp5(struct hda_codec *codec,
++ const struct hda_fixup *fix,
++ int action)
++{
++ alc1220_fixup_clevo_p950(codec, fix, action);
++ alc_fixup_headset_mode_no_hp_mic(codec, fix, action);
++}
++
+ static const struct hda_fixup alc882_fixups[] = {
+ [ALC882_FIXUP_ABIT_AW9D_MAX] = {
+ .type = HDA_FIXUP_PINS,
+@@ -2300,6 +2313,19 @@ static const struct hda_fixup alc882_fixups[] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc1220_fixup_clevo_p950,
+ },
++ [ALC1220_FIXUP_SYSTEM76_ORYP5] = {
++ .type = HDA_FIXUP_FUNC,
++ .v.func = alc1220_fixup_system76_oryp5,
++ },
++ [ALC1220_FIXUP_SYSTEM76_ORYP5_PINS] = {
++ .type = HDA_FIXUP_PINS,
++ .v.pins = (const struct hda_pintbl[]) {
++ { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
++ {}
++ },
++ .chained = true,
++ .chain_id = ALC1220_FIXUP_SYSTEM76_ORYP5,
++ },
+ };
+
+ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
+@@ -2376,6 +2402,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
+ SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
+ SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950),
+ SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
++ SND_PCI_QUIRK(0x1558, 0x96e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_SYSTEM76_ORYP5_PINS),
++ SND_PCI_QUIRK(0x1558, 0x97e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_SYSTEM76_ORYP5_PINS),
+ SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
+ SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
+ SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index acca779f96..7b830ed0a8 100644
--- a/series.conf
+++ b/series.conf
@@ -20387,6 +20387,7 @@
patches.drivers/i2c-cadence-Fix-the-hold-bit-setting.patch
patches.drivers/i2c-bcm2835-Clear-current-buffer-pointers-and-counts.patch
patches.fixes/mac80211-Restore-vif-beacon-interval-if-start-ap-fai.patch
+ patches.drivers/ALSA-hda-realtek-Headset-microphone-and-internal-spe.patch
# git://linuxtv.org/media_tree.git
patches.fixes/0001-media-usb-pwc-Don-t-use-coherent-DMA-buffers-for-ISO.patch