diff options
author | Kailang Yang <kailang@realtek.com> | 2014-03-03 02:27:22 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-03-03 04:48:55 -0500 |
commit | 31278997add61ee13b709e274934c7b0085accce (patch) | |
tree | 971e5861623b8232340d5d53d74fc35ac6327dbe /sound/pci/hda | |
parent | db291e36a4c511c0e95817b0083d78c66efbb4e0 (diff) |
ALSA: hda/realtek - Add headset quirk for Dell DT
This quirk is needed for the headset microphone to work.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c2322209d6c3..753df6f2cc58 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3594,21 +3594,38 @@ static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, | |||
3594 | alc_fixup_headset_mode(codec, fix, action); | 3594 | alc_fixup_headset_mode(codec, fix, action); |
3595 | } | 3595 | } |
3596 | 3596 | ||
3597 | static void alc255_set_default_jack_type(struct hda_codec *codec) | ||
3598 | { | ||
3599 | /* Set to iphone type */ | ||
3600 | alc_write_coef_idx(codec, 0x1b, 0x880b); | ||
3601 | alc_write_coef_idx(codec, 0x45, 0xd089); | ||
3602 | alc_write_coef_idx(codec, 0x1b, 0x080b); | ||
3603 | alc_write_coef_idx(codec, 0x46, 0x0004); | ||
3604 | alc_write_coef_idx(codec, 0x1b, 0x0c0b); | ||
3605 | msleep(30); | ||
3606 | } | ||
3607 | |||
3597 | static void alc_fixup_headset_mode_alc255(struct hda_codec *codec, | 3608 | static void alc_fixup_headset_mode_alc255(struct hda_codec *codec, |
3598 | const struct hda_fixup *fix, int action) | 3609 | const struct hda_fixup *fix, int action) |
3599 | { | 3610 | { |
3600 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | 3611 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
3601 | /* Set to iphone type */ | 3612 | alc255_set_default_jack_type(codec); |
3602 | alc_write_coef_idx(codec, 0x1b, 0x880b); | ||
3603 | alc_write_coef_idx(codec, 0x45, 0xd089); | ||
3604 | alc_write_coef_idx(codec, 0x1b, 0x080b); | ||
3605 | alc_write_coef_idx(codec, 0x46, 0x0004); | ||
3606 | alc_write_coef_idx(codec, 0x1b, 0x0c0b); | ||
3607 | msleep(30); | ||
3608 | } | 3613 | } |
3609 | alc_fixup_headset_mode(codec, fix, action); | 3614 | alc_fixup_headset_mode(codec, fix, action); |
3610 | } | 3615 | } |
3611 | 3616 | ||
3617 | static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec, | ||
3618 | const struct hda_fixup *fix, int action) | ||
3619 | { | ||
3620 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
3621 | struct alc_spec *spec = codec->spec; | ||
3622 | spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; | ||
3623 | alc255_set_default_jack_type(codec); | ||
3624 | } | ||
3625 | else | ||
3626 | alc_fixup_headset_mode(codec, fix, action); | ||
3627 | } | ||
3628 | |||
3612 | static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec, | 3629 | static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec, |
3613 | const struct hda_fixup *fix, int action) | 3630 | const struct hda_fixup *fix, int action) |
3614 | { | 3631 | { |
@@ -3875,7 +3892,9 @@ enum { | |||
3875 | ALC290_FIXUP_SUBWOOFER_HSJACK, | 3892 | ALC290_FIXUP_SUBWOOFER_HSJACK, |
3876 | ALC269_FIXUP_THINKPAD_ACPI, | 3893 | ALC269_FIXUP_THINKPAD_ACPI, |
3877 | ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 3894 | ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
3895 | ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, | ||
3878 | ALC255_FIXUP_HEADSET_MODE, | 3896 | ALC255_FIXUP_HEADSET_MODE, |
3897 | ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, | ||
3879 | }; | 3898 | }; |
3880 | 3899 | ||
3881 | static const struct hda_fixup alc269_fixups[] = { | 3900 | static const struct hda_fixup alc269_fixups[] = { |
@@ -4248,10 +4267,23 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4248 | .chained = true, | 4267 | .chained = true, |
4249 | .chain_id = ALC255_FIXUP_HEADSET_MODE | 4268 | .chain_id = ALC255_FIXUP_HEADSET_MODE |
4250 | }, | 4269 | }, |
4270 | [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = { | ||
4271 | .type = HDA_FIXUP_PINS, | ||
4272 | .v.pins = (const struct hda_pintbl[]) { | ||
4273 | { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ | ||
4274 | { } | ||
4275 | }, | ||
4276 | .chained = true, | ||
4277 | .chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC | ||
4278 | }, | ||
4251 | [ALC255_FIXUP_HEADSET_MODE] = { | 4279 | [ALC255_FIXUP_HEADSET_MODE] = { |
4252 | .type = HDA_FIXUP_FUNC, | 4280 | .type = HDA_FIXUP_FUNC, |
4253 | .v.func = alc_fixup_headset_mode_alc255, | 4281 | .v.func = alc_fixup_headset_mode_alc255, |
4254 | }, | 4282 | }, |
4283 | [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { | ||
4284 | .type = HDA_FIXUP_FUNC, | ||
4285 | .v.func = alc_fixup_headset_mode_alc255_no_hp_mic, | ||
4286 | }, | ||
4255 | }; | 4287 | }; |
4256 | 4288 | ||
4257 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 4289 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -4314,6 +4346,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4314 | SND_PCI_QUIRK(0x1028, 0x0658, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4346 | SND_PCI_QUIRK(0x1028, 0x0658, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4315 | SND_PCI_QUIRK(0x1028, 0x065f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4347 | SND_PCI_QUIRK(0x1028, 0x065f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4316 | SND_PCI_QUIRK(0x1028, 0x0662, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4348 | SND_PCI_QUIRK(0x1028, 0x0662, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4349 | SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), | ||
4350 | SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), | ||
4317 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4351 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4318 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4352 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4319 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), | 4353 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |