Merge remote-tracking branch 'lsk/v3.10/topic/gator' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / sound / pci / hda / patch_realtek.c
index e0bdcb3ecf0e0f14a3dc017326297202fdb04a75..0b85e857f1c7299e519e8fb27fdfe194b2c83a04 100644 (file)
@@ -937,6 +937,7 @@ static int alc_codec_rename_from_preset(struct hda_codec *codec)
 
 static const struct snd_pci_quirk beep_white_list[] = {
        SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
+       SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1),
        SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
        SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1),
        SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
@@ -1589,12 +1590,10 @@ static const struct hda_fixup alc260_fixups[] = {
        [ALC260_FIXUP_COEF] = {
                .type = HDA_FIXUP_VERBS,
                .v.verbs = (const struct hda_verb[]) {
-                       { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
-                       { 0x20, AC_VERB_SET_PROC_COEF,  0x3040 },
+                       { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 },
+                       { 0x1a, AC_VERB_SET_PROC_COEF,  0x3040 },
                        { }
                },
-               .chained = true,
-               .chain_id = ALC260_FIXUP_HP_PIN_0F,
        },
        [ALC260_FIXUP_GPIO1] = {
                .type = HDA_FIXUP_VERBS,
@@ -1609,8 +1608,8 @@ static const struct hda_fixup alc260_fixups[] = {
        [ALC260_FIXUP_REPLACER] = {
                .type = HDA_FIXUP_VERBS,
                .v.verbs = (const struct hda_verb[]) {
-                       { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
-                       { 0x20, AC_VERB_SET_PROC_COEF,  0x3050 },
+                       { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 },
+                       { 0x1a, AC_VERB_SET_PROC_COEF,  0x3050 },
                        { }
                },
                .chained = true,
@@ -2858,8 +2857,9 @@ static void alc269_fixup_mic_mute_hook(void *private_data, int enabled)
 
        if (spec->mute_led_polarity)
                enabled = !enabled;
-       pinval = AC_PINCTL_IN_EN |
-               (enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80);
+       pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid);
+       pinval &= ~AC_PINCTL_VREFEN;
+       pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80;
        if (spec->mute_led_nid)
                snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval);
 }
@@ -3356,6 +3356,7 @@ enum {
        ALC269_FIXUP_STEREO_DMIC,
        ALC269_FIXUP_QUANTA_MUTE,
        ALC269_FIXUP_LIFEBOOK,
+       ALC269_FIXUP_LIFEBOOK_EXTMIC,
        ALC269_FIXUP_AMIC,
        ALC269_FIXUP_DMIC,
        ALC269VB_FIXUP_AMIC,
@@ -3463,6 +3464,13 @@ static const struct hda_fixup alc269_fixups[] = {
                .chained = true,
                .chain_id = ALC269_FIXUP_QUANTA_MUTE
        },
+       [ALC269_FIXUP_LIFEBOOK_EXTMIC] = {
+               .type = HDA_FIXUP_PINS,
+               .v.pins = (const struct hda_pintbl[]) {
+                       { 0x19, 0x01a1903c }, /* headset mic, with jack detect */
+                       { }
+               },
+       },
        [ALC269_FIXUP_AMIC] = {
                .type = HDA_FIXUP_PINS,
                .v.pins = (const struct hda_pintbl[]) {
@@ -3648,6 +3656,7 @@ static const struct hda_fixup alc269_fixups[] = {
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+       SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC),
        SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC),
        SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC),
        SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
@@ -3712,6 +3721,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
        SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
        SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
+       SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
        SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
        SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
        SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
@@ -3900,6 +3910,7 @@ static int patch_alc269(struct hda_codec *codec)
                spec->codec_variant = ALC269_TYPE_ALC284;
                break;
        case 0x10ec0286:
+       case 0x10ec0288:
                spec->codec_variant = ALC269_TYPE_ALC286;
                break;
        case 0x10ec0255:
@@ -4642,6 +4653,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = {
        { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 },
        { .id = 0x10ec0284, .name = "ALC284", .patch = patch_alc269 },
        { .id = 0x10ec0286, .name = "ALC286", .patch = patch_alc269 },
+       { .id = 0x10ec0288, .name = "ALC288", .patch = patch_alc269 },
        { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 },
        { .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 },
        { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
@@ -4661,6 +4673,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = {
        { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 },
        { .id = 0x10ec0671, .name = "ALC671", .patch = patch_alc662 },
        { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 },
+       { .id = 0x10ec0867, .name = "ALC891", .patch = patch_alc882 },
        { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 },
        { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 },
        { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc882 },