Skip to content

Commit 10f5b1b

Browse files
KailangYangtiwai
authored andcommitted
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: e854747 ("ALSA: hda/realtek - Enable headset button support for new codec") Signed-off-by: Kailang Yang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent cbc05fd commit 10f5b1b

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5521,6 +5521,26 @@ static void alc_fixup_headset_jack(struct hda_codec *codec,
55215521
}
55225522
}
55235523

5524+
static void alc295_fixup_chromebook(struct hda_codec *codec,
5525+
const struct hda_fixup *fix, int action)
5526+
{
5527+
5528+
switch (action) {
5529+
case HDA_FIXUP_ACT_PRE_PROBE:
5530+
switch (codec->core.vendor_id) {
5531+
case 0x10ec0295:
5532+
alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
5533+
alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
5534+
break;
5535+
case 0x10ec0236:
5536+
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
5537+
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
5538+
break;
5539+
}
5540+
break;
5541+
}
5542+
}
5543+
55245544
static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
55255545
const struct hda_fixup *fix, int action)
55265546
{
@@ -5674,6 +5694,7 @@ enum {
56745694
ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
56755695
ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
56765696
ALC255_FIXUP_ACER_HEADSET_MIC,
5697+
ALC295_FIXUP_CHROME_BOOK,
56775698
};
56785699

56795700
static const struct hda_fixup alc269_fixups[] = {
@@ -6650,6 +6671,12 @@ static const struct hda_fixup alc269_fixups[] = {
66506671
.chained = true,
66516672
.chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
66526673
},
6674+
[ALC295_FIXUP_CHROME_BOOK] = {
6675+
.type = HDA_FIXUP_FUNC,
6676+
.v.func = alc295_fixup_chromebook,
6677+
.chained = true,
6678+
.chain_id = ALC225_FIXUP_HEADSET_JACK
6679+
},
66536680
};
66546681

66556682
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7060,7 +7087,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
70607087
{.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
70617088
{.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
70627089
{.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
7063-
{.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-sense-combo"},
7090+
{.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-sense-combo"},
70647091
{}
70657092
};
70667093
#define ALC225_STANDARD_PINS \

0 commit comments

Comments
 (0)