aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorHui Wang <hui.wang@canonical.com>2014-01-14 01:07:36 -0500
committerTakashi Iwai <tiwai@suse.de>2014-01-14 04:42:29 -0500
commit493a52a9b6645f61954580c7d4bd52fa62110934 (patch)
treeceda9a03afdc3de188a3ed5194fc056daf28e94f /sound/pci
parentdfc6e469b6d1ee5e8c71fa398b7b58fbb600dad8 (diff)
ALSA: hda - automute via amp instead of pinctl on some AIO models
On some AIO (All In One) models with the codec alc668 (Vendor ID: 0x10ec0668) on it, when we plug a headphone into the jack, the system will switch the output to headphone and set the speaker to automute as well as change the speaker Pin-ctls from 0x40 to 0x00, this will bring loud noise to the headphone. I tried to disable the corresponding EAPD, but it did not help to eliminate the noise. According to Takashi's suggestion, we use amp operation to replace the pinctl modification for the automute, this really eliminate the noise. BugLink: https://bugs.launchpad.net/bugs/1268468 Cc: David Henningsson <david.henningsson@canonical.com> Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d35cf3dc6711..a1c16457880e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3580,6 +3580,15 @@ static void alc_fixup_headset_mode_alc255(struct hda_codec *codec,
3580 alc_fixup_headset_mode(codec, fix, action); 3580 alc_fixup_headset_mode(codec, fix, action);
3581} 3581}
3582 3582
3583static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec,
3584 const struct hda_fixup *fix, int action)
3585{
3586 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
3587 struct alc_spec *spec = codec->spec;
3588 spec->gen.auto_mute_via_amp = 1;
3589 }
3590}
3591
3583static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, 3592static void alc_fixup_headset_mode_alc668(struct hda_codec *codec,
3584 const struct hda_fixup *fix, int action) 3593 const struct hda_fixup *fix, int action)
3585{ 3594{
@@ -4839,6 +4848,7 @@ enum {
4839 ALC662_FIXUP_BASS_CHMAP, 4848 ALC662_FIXUP_BASS_CHMAP,
4840 ALC662_FIXUP_BASS_1A, 4849 ALC662_FIXUP_BASS_1A,
4841 ALC662_FIXUP_BASS_1A_CHMAP, 4850 ALC662_FIXUP_BASS_1A_CHMAP,
4851 ALC668_FIXUP_AUTO_MUTE,
4842}; 4852};
4843 4853
4844static const struct hda_fixup alc662_fixups[] = { 4854static const struct hda_fixup alc662_fixups[] = {
@@ -4999,6 +5009,12 @@ static const struct hda_fixup alc662_fixups[] = {
4999 .type = HDA_FIXUP_FUNC, 5009 .type = HDA_FIXUP_FUNC,
5000 .v.func = alc_fixup_inv_dmic_0x12, 5010 .v.func = alc_fixup_inv_dmic_0x12,
5001 }, 5011 },
5012 [ALC668_FIXUP_AUTO_MUTE] = {
5013 .type = HDA_FIXUP_FUNC,
5014 .v.func = alc_fixup_auto_mute_via_amp,
5015 .chained = true,
5016 .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE
5017 },
5002 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = { 5018 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = {
5003 .type = HDA_FIXUP_PINS, 5019 .type = HDA_FIXUP_PINS,
5004 .v.pins = (const struct hda_pintbl[]) { 5020 .v.pins = (const struct hda_pintbl[]) {
@@ -5044,11 +5060,11 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
5044 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), 5060 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
5045 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 5061 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
5046 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 5062 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
5047 SND_PCI_QUIRK(0x1028, 0x0623, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 5063 SND_PCI_QUIRK(0x1028, 0x0623, "Dell", ALC668_FIXUP_AUTO_MUTE),
5048 SND_PCI_QUIRK(0x1028, 0x0624, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 5064 SND_PCI_QUIRK(0x1028, 0x0624, "Dell", ALC668_FIXUP_AUTO_MUTE),
5049 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 5065 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
5050 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 5066 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
5051 SND_PCI_QUIRK(0x1028, 0x0628, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 5067 SND_PCI_QUIRK(0x1028, 0x0628, "Dell", ALC668_FIXUP_AUTO_MUTE),
5052 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 5068 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
5053 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A_CHMAP), 5069 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A_CHMAP),
5054 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP), 5070 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP),