Skip to content

Instantly share code, notes, and snippets.

@andydvsn
Created September 20, 2018 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andydvsn/16bf774d236fdeaa5de22ab0378643c3 to your computer and use it in GitHub Desktop.
Save andydvsn/16bf774d236fdeaa5de22ab0378643c3 to your computer and use it in GitHub Desktop.
--- /home/andy/Desktop/kernel14/69/linux-4.14.69-original/sound/pci/hda/patch_sigmatel.c 2018-09-09 18:56:02.000000000 +0100
+++ /home/andy/Desktop/kernel14/69/linux-4.14.69/sound/pci/hda/patch_sigmatel.c 2018-09-20 02:16:46.487316835 +0100
@@ -135,6 +135,7 @@
STAC_M3,
STAC_M5,
STAC_M6,
+ STAC_OPENFRAME1,
STAC_925x_MODELS
};
@@ -1668,6 +1669,40 @@
{}
};
+/// This is the original pin config from kernel 3.18 which worked on that version, albeit with
+/// gen.own_eapd_ctl commented out and pin = 0x07 forced, as shown here:
+/// https://github.com/andydvsn/OpenFrame-Kernel/blob/master/patches/03-stac9202-audio-pin-tweak.patch
+// static const struct hda_pintbl stac925xOPENFRAME1_pin_configs[] = {
+// { 0x07, 0x01110014 },
+// { 0x08, 0x01410013 },
+// { 0x0a, 0x02111011 },
+// { 0x0b, 0x01a10021 },
+// { 0x0c, 0x01810022 },
+// { 0x0d, 0x02214012 },
+// { 0x10, 0x01010031 },
+// { 0x11, 0x01310023 },
+// { 0x15, 0x01d10024 },
+// {}
+// };
+
+/// This is the closest to a correct configuration for appearance, but actually results in no practical difference,
+/// as although signal muting to the internal speakers works when HP/LO is attached (detection shown on 0x0d)
+/// circuit noise is still amplified through the internal speakers. When auto-mute is disabled in alsamixer,
+/// circuit noise stops, but signal plays through both HP/LO and internal speakers simultaneously. In both
+/// HP/LO and internal speakers, circuit noise appears to be limited to the R channel only.
+static const struct hda_pintbl stac925xOPENFRAME1_pin_configs[] = {
+ {0x07, 0x90c60190},
+ {0x08, 0x98460180},
+ {0x0a, 0x90170150},
+ {0x0b, 0x40f000f0},
+ {0x0c, 0x40f000f0},
+ {0x0d, 0x01011010},
+ {0x10, 0x40f000f0},
+ {0x11, 0x40f000f0},
+ {0x15, 0x40f000f0},
+ {}
+};
+
static const struct hda_fixup stac925x_fixups[] = {
[STAC_REF] = {
.type = HDA_FIXUP_PINS,
@@ -1701,6 +1736,10 @@
.type = HDA_FIXUP_PINS,
.v.pins = stac925xM6_pin_configs,
},
+ [STAC_OPENFRAME1] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = stac925xOPENFRAME1_pin_configs,
+ },
};
static const struct hda_model_fixup stac925x_models[] = {
@@ -1712,6 +1751,7 @@
{ .id = STAC_M3, .name = "m3" },
{ .id = STAC_M5, .name = "m5" },
{ .id = STAC_M6, .name = "m6" },
+ { .id = STAC_OPENFRAME1, .name = "openframe1" },
{}
};
@@ -1719,7 +1759,7 @@
/* SigmaTel reference board */
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, "DFI LanParty", STAC_REF),
- SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF),
+ //SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF), // commented out for testing openframe1 patch, just in case
/* Default table for unknown ID */
SND_PCI_QUIRK(0x1002, 0x437b, "Gateway mobile", STAC_M2_2),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment