diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ea2351d119f0..14ae979a92ea 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3026,6 +3026,11 @@ static void alc283_init(struct hda_codec *codec) | |||
3026 | bool hp_pin_sense; | 3026 | bool hp_pin_sense; |
3027 | int val; | 3027 | int val; |
3028 | 3028 | ||
3029 | if (!spec->gen.autocfg.hp_outs) { | ||
3030 | if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) | ||
3031 | hp_pin = spec->gen.autocfg.line_out_pins[0]; | ||
3032 | } | ||
3033 | |||
3029 | alc283_restore_default_value(codec); | 3034 | alc283_restore_default_value(codec); |
3030 | 3035 | ||
3031 | if (!hp_pin) | 3036 | if (!hp_pin) |
@@ -3062,6 +3067,11 @@ static void alc283_shutup(struct hda_codec *codec) | |||
3062 | bool hp_pin_sense; | 3067 | bool hp_pin_sense; |
3063 | int val; | 3068 | int val; |
3064 | 3069 | ||
3070 | if (!spec->gen.autocfg.hp_outs) { | ||
3071 | if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) | ||
3072 | hp_pin = spec->gen.autocfg.line_out_pins[0]; | ||
3073 | } | ||
3074 | |||
3065 | if (!hp_pin) { | 3075 | if (!hp_pin) { |
3066 | alc269_shutup(codec); | 3076 | alc269_shutup(codec); |
3067 | return; | 3077 | return; |
@@ -3085,6 +3095,7 @@ static void alc283_shutup(struct hda_codec *codec) | |||
3085 | 3095 | ||
3086 | if (hp_pin_sense) | 3096 | if (hp_pin_sense) |
3087 | msleep(100); | 3097 | msleep(100); |
3098 | alc_auto_setup_eapd(codec, false); | ||
3088 | snd_hda_shutup_pins(codec); | 3099 | snd_hda_shutup_pins(codec); |
3089 | alc_write_coef_idx(codec, 0x43, 0x9614); | 3100 | alc_write_coef_idx(codec, 0x43, 0x9614); |
3090 | } | 3101 | } |
@@ -3361,8 +3372,9 @@ static void alc269_fixup_mic_mute_hook(void *private_data, int enabled) | |||
3361 | 3372 | ||
3362 | if (spec->mute_led_polarity) | 3373 | if (spec->mute_led_polarity) |
3363 | enabled = !enabled; | 3374 | enabled = !enabled; |
3364 | pinval = AC_PINCTL_IN_EN | | 3375 | pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid); |
3365 | (enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80); | 3376 | pinval &= ~AC_PINCTL_VREFEN; |
3377 | pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80; | ||
3366 | if (spec->mute_led_nid) | 3378 | if (spec->mute_led_nid) |
3367 | snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); | 3379 | snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); |
3368 | } | 3380 | } |
@@ -3994,6 +4006,10 @@ static void alc283_fixup_chromebook(struct hda_codec *codec, | |||
3994 | spec->gen.mixer_nid = 0; | 4006 | spec->gen.mixer_nid = 0; |
3995 | break; | 4007 | break; |
3996 | case HDA_FIXUP_ACT_INIT: | 4008 | case HDA_FIXUP_ACT_INIT: |
4009 | /* MIC2-VREF control */ | ||
4010 | /* Set to manual mode */ | ||
4011 | val = alc_read_coef_idx(codec, 0x06); | ||
4012 | alc_write_coef_idx(codec, 0x06, val & ~0x000c); | ||
3997 | /* Enable Line1 input control by verb */ | 4013 | /* Enable Line1 input control by verb */ |
3998 | val = alc_read_coef_idx(codec, 0x1a); | 4014 | val = alc_read_coef_idx(codec, 0x1a); |
3999 | alc_write_coef_idx(codec, 0x1a, val | (1 << 4)); | 4015 | alc_write_coef_idx(codec, 0x1a, val | (1 << 4)); |
@@ -4602,6 +4618,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4602 | SND_PCI_QUIRK(0x1028, 0x0658, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4618 | SND_PCI_QUIRK(0x1028, 0x0658, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4603 | SND_PCI_QUIRK(0x1028, 0x065f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4619 | SND_PCI_QUIRK(0x1028, 0x065f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4604 | SND_PCI_QUIRK(0x1028, 0x0662, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4620 | SND_PCI_QUIRK(0x1028, 0x0662, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4621 | SND_PCI_QUIRK(0x1028, 0x0667, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4605 | SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), | 4622 | SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), |
4606 | SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), | 4623 | SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), |
4607 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4624 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
@@ -4768,7 +4785,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
4768 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, | 4785 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
4769 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, | 4786 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, |
4770 | {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, | 4787 | {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, |
4771 | {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-chrome"}, | 4788 | {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"}, |
4772 | {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, | 4789 | {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, |
4773 | {} | 4790 | {} |
4774 | }; | 4791 | }; |