Created
September 9, 2018 08:09
-
-
Save andydvsn/7bffa8de0ed691b14508485d75501ffc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -rupN linux-4.14.68/sound/pci/hda/patch_sigmatel.c linux-4.14.68-stac9202/sound/pci/hda/patch_sigmatel.c | |
--- linux-4.14.68/sound/pci/hda/patch_sigmatel.c 2018-09-05 08:26:42.000000000 +0100 | |
+++ linux-4.14.68-stac9202/sound/pci/hda/patch_sigmatel.c 2018-09-05 15:12:43.000000000 +0100 | |
@@ -60,6 +60,11 @@ enum { | |
}; | |
enum { | |
+ STAC_9202_OPENPEAK, | |
+ STAC_9202_MODELS | |
+}; | |
+ | |
+enum { | |
STAC_9205_REF, | |
STAC_9205_DELL_M42, | |
STAC_9205_DELL_M43, | |
@@ -4983,6 +4988,84 @@ static int patch_stac9205(struct hda_cod | |
} | |
/* | |
+ * STAC9202 Support | |
+ */ | |
+ | |
+static const struct hda_verb stac9202_eapd_init[] = { | |
+ /* set dac0mux for dac converter */ | |
+ {0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, | |
+ {0x07, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, | |
+ /* Unmute the Input MUX */ | |
+ {0x14, 0x390, 0x00}, | |
+ {0x14, 0x3a0, 0x00}, | |
+ {0x0F, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00}, | |
+ {} | |
+}; | |
+ | |
+static const struct hda_pintbl stac9202_openpeak_pin_configs[] = { | |
+ { 0x07, 0x01110014 }, | |
+ { 0x08, 0x01410013 }, | |
+ { 0x0a, 0x02111011 }, | |
+ { 0x0d, 0x02214012 }, | |
+ { 0x0c, 0x01810022 }, | |
+ { 0x0b, 0x01a10021 }, | |
+ { 0x10, 0x01010031 }, | |
+ { 0x11, 0x01310023 }, | |
+ { 0x15, 0x01d10024 }, | |
+ {} | |
+}; | |
+ | |
+static const struct hda_model_fixup stac9202_models[] = { | |
+ { .id = STAC_9202_OPENPEAK, .name = "openpeak" }, | |
+ {} | |
+}; | |
+ | |
+static const struct hda_fixup stac9202_fixups[] = { | |
+ [STAC_9202_OPENPEAK] = { | |
+ .type = HDA_FIXUP_PINS, | |
+ .v.pins = stac9202_openpeak_pin_configs, | |
+ }, | |
+}; | |
+ | |
+static const struct snd_pci_quirk stac9202_fixup_tbl[] = { | |
+ SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x8119, | |
+ "OpenPeak ATOM Frame", STAC_9202_OPENPEAK), | |
+ {} | |
+}; | |
+ | |
+static int patch_stac9202(struct hda_codec *codec) | |
+{ | |
+ struct sigmatel_spec *spec; | |
+ int err; | |
+ | |
+ err = alloc_stac_spec(codec); | |
+ if (err < 0) | |
+ return err; | |
+ | |
+ spec = codec->spec; | |
+ spec->linear_tone_beep = 1; | |
+ spec->gen.own_eapd_ctl = 1; | |
+ | |
+ codec->power_filter = snd_hda_codec_eapd_power_filter; | |
+ | |
+ snd_hda_add_verbs(codec, stac9202_eapd_init); | |
+ | |
+ snd_hda_pick_fixup(codec, stac9202_models, stac9202_fixup_tbl, | |
+ stac9202_fixups); | |
+ snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); | |
+ | |
+ err = stac_parse_auto_config(codec); | |
+ if (err < 0) { | |
+ stac_free(codec); | |
+ return err; | |
+ } | |
+ | |
+ snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); | |
+ | |
+ return 0; | |
+} | |
+ | |
+/* | |
* STAC9872 hack | |
*/ | |
@@ -5082,8 +5165,8 @@ static const struct hda_device_id snd_hd | |
HDA_CODEC_ENTRY(0x83847627, "STAC9271D", patch_stac927x), | |
HDA_CODEC_ENTRY(0x83847628, "STAC9274X5NH", patch_stac927x), | |
HDA_CODEC_ENTRY(0x83847629, "STAC9274D5NH", patch_stac927x), | |
- HDA_CODEC_ENTRY(0x83847632, "STAC9202", patch_stac925x), | |
- HDA_CODEC_ENTRY(0x83847633, "STAC9202D", patch_stac925x), | |
+ HDA_CODEC_ENTRY(0x83847632, "STAC9202", patch_stac9202), | |
+ HDA_CODEC_ENTRY(0x83847633, "STAC9202D", patch_stac9202), | |
HDA_CODEC_ENTRY(0x83847634, "STAC9250", patch_stac925x), | |
HDA_CODEC_ENTRY(0x83847635, "STAC9250D", patch_stac925x), | |
HDA_CODEC_ENTRY(0x83847636, "STAC9251", patch_stac925x), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment