diff options
author | David Henningsson <david.henningsson@canonical.com> | 2013-10-11 04:18:46 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-11 04:23:49 -0400 |
commit | 7c478f03372ad2cf434fde62082895bfcb6e6e89 (patch) | |
tree | 0384f624374b9c53c2232dc42c8f573a2087351d | |
parent | 88cfcf86aa3ada84d97195bcad74f4dadb4ae23b (diff) |
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 <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | Documentation/sound/alsa/HD-Audio-Models.txt | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index f911e3656209..85c362d8ea34 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -28,6 +28,7 @@ ALC269/270/275/276/28x/29x | |||
28 | alc269-dmic Enable ALC269(VA) digital mic workaround | 28 | alc269-dmic Enable ALC269(VA) digital mic workaround |
29 | alc271-dmic Enable ALC271X digital mic workaround | 29 | alc271-dmic Enable ALC271X digital mic workaround |
30 | inv-dmic Inverted internal mic workaround | 30 | inv-dmic Inverted internal mic workaround |
31 | headset-mic Indicates a combined headset (headphone+mic) jack | ||
31 | lenovo-dock Enables docking station I/O for some Lenovos | 32 | lenovo-dock Enables docking station I/O for some Lenovos |
32 | dell-headset-multi Headset jack, which can also be used as mic-in | 33 | dell-headset-multi Headset jack, which can also be used as mic-in |
33 | dell-headset-dock Headset jack (without mic-in), and also dock I/O | 34 | dell-headset-dock Headset jack (without mic-in), and also dock I/O |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ae847fe006c8..79e6fe7a863a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2819,6 +2819,15 @@ static void alc269_fixup_hweq(struct hda_codec *codec, | |||
2819 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); | 2819 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); |
2820 | } | 2820 | } |
2821 | 2821 | ||
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 | |||
2822 | static void alc271_fixup_dmic(struct hda_codec *codec, | 2831 | static void alc271_fixup_dmic(struct hda_codec *codec, |
2823 | const struct hda_fixup *fix, int action) | 2832 | const struct hda_fixup *fix, int action) |
2824 | { | 2833 | { |
@@ -3516,6 +3525,7 @@ enum { | |||
3516 | ALC271_FIXUP_DMIC, | 3525 | ALC271_FIXUP_DMIC, |
3517 | ALC269_FIXUP_PCM_44K, | 3526 | ALC269_FIXUP_PCM_44K, |
3518 | ALC269_FIXUP_STEREO_DMIC, | 3527 | ALC269_FIXUP_STEREO_DMIC, |
3528 | ALC269_FIXUP_HEADSET_MIC, | ||
3519 | ALC269_FIXUP_QUANTA_MUTE, | 3529 | ALC269_FIXUP_QUANTA_MUTE, |
3520 | ALC269_FIXUP_LIFEBOOK, | 3530 | ALC269_FIXUP_LIFEBOOK, |
3521 | ALC269_FIXUP_AMIC, | 3531 | ALC269_FIXUP_AMIC, |
@@ -3615,6 +3625,10 @@ static const struct hda_fixup alc269_fixups[] = { | |||
3615 | .type = HDA_FIXUP_FUNC, | 3625 | .type = HDA_FIXUP_FUNC, |
3616 | .v.func = alc269_fixup_stereo_dmic, | 3626 | .v.func = alc269_fixup_stereo_dmic, |
3617 | }, | 3627 | }, |
3628 | [ALC269_FIXUP_HEADSET_MIC] = { | ||
3629 | .type = HDA_FIXUP_FUNC, | ||
3630 | .v.func = alc269_fixup_headset_mic, | ||
3631 | }, | ||
3618 | [ALC269_FIXUP_QUANTA_MUTE] = { | 3632 | [ALC269_FIXUP_QUANTA_MUTE] = { |
3619 | .type = HDA_FIXUP_FUNC, | 3633 | .type = HDA_FIXUP_FUNC, |
3620 | .v.func = alc269_fixup_quanta_mute, | 3634 | .v.func = alc269_fixup_quanta_mute, |
@@ -3988,6 +4002,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
3988 | {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, | 4002 | {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, |
3989 | {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, | 4003 | {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, |
3990 | {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, | 4004 | {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, |
4005 | {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"}, | ||
3991 | {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, | 4006 | {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, |
3992 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, | 4007 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
3993 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, | 4008 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, |