Skip to content

Commit 7c478f0

Browse files
David Henningssontiwai
authored andcommitted
ALSA: hda - Add a headset mic model for ALC269 and friends
Using the headset mic model will cause the headset mic to be labeled "headset mic" instead of just "mic". Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 88cfcf8 commit 7c478f0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Documentation/sound/alsa/HD-Audio-Models.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ALC269/270/275/276/28x/29x
2828
alc269-dmic Enable ALC269(VA) digital mic workaround
2929
alc271-dmic Enable ALC271X digital mic workaround
3030
inv-dmic Inverted internal mic workaround
31+
headset-mic Indicates a combined headset (headphone+mic) jack
3132
lenovo-dock Enables docking station I/O for some Lenovos
3233
dell-headset-multi Headset jack, which can also be used as mic-in
3334
dell-headset-dock Headset jack (without mic-in), and also dock I/O

sound/pci/hda/patch_realtek.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,6 +2819,15 @@ static void alc269_fixup_hweq(struct hda_codec *codec,
28192819
alc_write_coef_idx(codec, 0x1e, coef | 0x80);
28202820
}
28212821

2822+
static void alc269_fixup_headset_mic(struct hda_codec *codec,
2823+
const struct hda_fixup *fix, int action)
2824+
{
2825+
struct alc_spec *spec = codec->spec;
2826+
2827+
if (action == HDA_FIXUP_ACT_PRE_PROBE)
2828+
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
2829+
}
2830+
28222831
static void alc271_fixup_dmic(struct hda_codec *codec,
28232832
const struct hda_fixup *fix, int action)
28242833
{
@@ -3516,6 +3525,7 @@ enum {
35163525
ALC271_FIXUP_DMIC,
35173526
ALC269_FIXUP_PCM_44K,
35183527
ALC269_FIXUP_STEREO_DMIC,
3528+
ALC269_FIXUP_HEADSET_MIC,
35193529
ALC269_FIXUP_QUANTA_MUTE,
35203530
ALC269_FIXUP_LIFEBOOK,
35213531
ALC269_FIXUP_AMIC,
@@ -3615,6 +3625,10 @@ static const struct hda_fixup alc269_fixups[] = {
36153625
.type = HDA_FIXUP_FUNC,
36163626
.v.func = alc269_fixup_stereo_dmic,
36173627
},
3628+
[ALC269_FIXUP_HEADSET_MIC] = {
3629+
.type = HDA_FIXUP_FUNC,
3630+
.v.func = alc269_fixup_headset_mic,
3631+
},
36183632
[ALC269_FIXUP_QUANTA_MUTE] = {
36193633
.type = HDA_FIXUP_FUNC,
36203634
.v.func = alc269_fixup_quanta_mute,
@@ -3988,6 +4002,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
39884002
{.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
39894003
{.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
39904004
{.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
4005+
{.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
39914006
{.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
39924007
{.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
39934008
{.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},

0 commit comments

Comments
 (0)