Commit 10f5b1b8 authored by Kailang Yang's avatar Kailang Yang Committed by Takashi Iwai

ALSA: hda/realtek - Fixed Headset Mic JD not stable

It will be lose Mic JD state when Chrome OS boot and headset was plugged.
Implement of reset combo jack JD. It will show normally.

Fixes: e854747d ("ALSA: hda/realtek - Enable headset button support for new codec")
Signed-off-by: default avatarKailang Yang <kailang@realtek.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent cbc05fd6
...@@ -5521,6 +5521,26 @@ static void alc_fixup_headset_jack(struct hda_codec *codec, ...@@ -5521,6 +5521,26 @@ static void alc_fixup_headset_jack(struct hda_codec *codec,
} }
} }
static void alc295_fixup_chromebook(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
switch (codec->core.vendor_id) {
case 0x10ec0295:
alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
break;
case 0x10ec0236:
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
break;
}
break;
}
}
static void alc_fixup_disable_mic_vref(struct hda_codec *codec, static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
const struct hda_fixup *fix, int action) const struct hda_fixup *fix, int action)
{ {
...@@ -5674,6 +5694,7 @@ enum { ...@@ -5674,6 +5694,7 @@ enum {
ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE, ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
ALC255_FIXUP_ACER_HEADSET_MIC, ALC255_FIXUP_ACER_HEADSET_MIC,
ALC295_FIXUP_CHROME_BOOK,
}; };
static const struct hda_fixup alc269_fixups[] = { static const struct hda_fixup alc269_fixups[] = {
...@@ -6650,6 +6671,12 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -6650,6 +6671,12 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true, .chained = true,
.chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
}, },
[ALC295_FIXUP_CHROME_BOOK] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc295_fixup_chromebook,
.chained = true,
.chain_id = ALC225_FIXUP_HEADSET_JACK
},
}; };
static const struct snd_pci_quirk alc269_fixup_tbl[] = { static const struct snd_pci_quirk alc269_fixup_tbl[] = {
...@@ -7060,7 +7087,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { ...@@ -7060,7 +7087,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"}, {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
{.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"}, {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
{.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"}, {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
{.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-sense-combo"}, {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-sense-combo"},
{} {}
}; };
#define ALC225_STANDARD_PINS \ #define ALC225_STANDARD_PINS \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment