Commit ac0085be authored by Hui Wang's avatar Hui Wang Committed by Kamal Mostafa

ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO

BugLink: http://bugs.launchpad.net/bugs/1615620

commit dd9aa335 upstream.

We have a Dell AIO on which we can't adjust its speaker's volume.
The problem is it is connected to a Audio Output node without Amp-out
capability. To fix it, we change it to be connnected to a node with
Amp-out capability.
Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent fdbc2666
...@@ -4674,6 +4674,22 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec, ...@@ -4674,6 +4674,22 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec,
} }
} }
static void alc298_fixup_speaker_volume(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
/* The speaker is routed to the Node 0x06 by a mistake, as a result
we can't adjust the speaker's volume since this node does not has
Amp-out capability. we change the speaker's route to:
Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
speaker's volume now. */
hda_nid_t conn1[1] = { 0x0c };
snd_hda_override_conn_list(codec, 0x17, 1, conn1);
}
}
/* Hook to update amp GPIO4 for automute */ /* Hook to update amp GPIO4 for automute */
static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec, static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack) struct hda_jack_callback *jack)
...@@ -4823,6 +4839,7 @@ enum { ...@@ -4823,6 +4839,7 @@ enum {
ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
ALC280_FIXUP_HP_HEADSET_MIC, ALC280_FIXUP_HP_HEADSET_MIC,
ALC292_FIXUP_TPT460, ALC292_FIXUP_TPT460,
ALC298_FIXUP_SPK_VOLUME,
}; };
static const struct hda_fixup alc269_fixups[] = { static const struct hda_fixup alc269_fixups[] = {
...@@ -5478,6 +5495,10 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -5478,6 +5495,10 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true, .chained = true,
.chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE, .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
}, },
[ALC298_FIXUP_SPK_VOLUME] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc298_fixup_speaker_volume,
},
}; };
static const struct snd_pci_quirk alc269_fixup_tbl[] = { static const struct snd_pci_quirk alc269_fixup_tbl[] = {
...@@ -5524,6 +5545,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -5524,6 +5545,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment