Comment 41 for bug 1211920

Revision history for this message
Takashi Iwai (tiwai) wrote : Re: [PATCH] ALSA: hda - Enable subwoofer on Dell Vostro 5460/5470

At Fri, 20 Dec 2013 16:08:13 +0100,
David Henningsson wrote:
>
> In this case, there are two DACs, and DAC 0x03 is mono. In order
> to make headphones and front speaker use DAC 0x02, and subwoofer use
> DAC 0x03, we artificially cut the connection from nodes 0x14 and 0x15
> to node 0x03, so they can only use DAC 0x02.
>
> In addition, the 5460 and 5470 differs in the sense that 5470 also
> needs a headset mic patch, whereas 5460 has individual detection for
> headphone and headset mic.
>
> BugLink: https://bugs.launchpad.net/bugs/1211920
> Signed-off-by: David Henningsson <email address hidden>
> ---
>
> I'm adding Kailang to cc on this one; hopefully he'll scream if this patch
> is doing anything dangerous, such as if there's a risk to blow up the subwoofer.

OK, I applied it now to for-next branch. Let me know if this is to be
removed.

thanks,

Takashi

>
> sound/pci/hda/patch_realtek.c | 43 +++++++++++++++++++++++++++++++++++------
> 1 file changed, 37 insertions(+), 6 deletions(-)
>
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index dfe4080..16c0caa 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -3770,10 +3770,14 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
> static void alc290_fixup_mono_speakers(struct hda_codec *codec,
> const struct hda_fixup *fix, int action)
> {
> - if (action == HDA_FIXUP_ACT_PRE_PROBE)
> - /* Remove DAC node 0x03, as it seems to be
> - giving mono output */
> - snd_hda_override_wcaps(codec, 0x03, 0);
> + if (action == HDA_FIXUP_ACT_PRE_PROBE) {
> + /* DAC node 0x03 is giving mono output. We therefore want to
> + make sure 0x14 (front speaker) and 0x15 (headphones) use the
> + stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */
> + hda_nid_t conn1[2] = { 0x0c };
> + snd_hda_override_conn_list(codec, 0x14, 1, conn1);
> + snd_hda_override_conn_list(codec, 0x15, 1, conn1);
> + }
> }
>
> #if IS_ENABLED(CONFIG_THINKPAD_ACPI)
> @@ -3913,6 +3917,9 @@ enum {
> ALC282_FIXUP_ASUS_TX300,
> ALC283_FIXUP_INT_MIC,
> ALC290_FIXUP_MONO_SPEAKERS,
> + ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
> + ALC290_FIXUP_SUBWOOFER,
> + ALC290_FIXUP_SUBWOOFER_HSJACK,
> ALC269_FIXUP_THINKPAD_ACPI,
> ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
> ALC255_FIXUP_HEADSET_MODE,
> @@ -4235,9 +4242,31 @@ static const struct hda_fixup alc269_fixups[] = {
> .chained = true,
> .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
> },
> + [ALC290_FIXUP_SUBWOOFER_HSJACK] = {
> + .type = HDA_FIXUP_PINS,
> + .v.pins = (const struct hda_pintbl[]) {
> + { 0x17, 0x90170112 }, /* subwoofer */
> + { }
> + },
> + .chained = true,
> + .chain_id = ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
> + },
> + [ALC290_FIXUP_SUBWOOFER] = {
> + .type = HDA_FIXUP_PINS,
> + .v.pins = (const struct hda_pintbl[]) {
> + { 0x17, 0x90170112 }, /* subwoofer */
> + { }
> + },
> + .chained = true,
> + .chain_id = ALC290_FIXUP_MONO_SPEAKERS,
> + },
> [ALC290_FIXUP_MONO_SPEAKERS] = {
> .type = HDA_FIXUP_FUNC,
> .v.func = alc290_fixup_mono_speakers,
> + },
> + [ALC290_FIXUP_MONO_SPEAKERS_HSJACK] = {
> + .type = HDA_FIXUP_FUNC,
> + .v.func = alc290_fixup_mono_speakers,
> .chained = true,
> .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
> },
> @@ -4282,6 +4311,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> SND_PCI_QUIRK(0x1028, 0x05cb, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x05cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x05cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
> + SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER),
> SND_PCI_QUIRK(0x1028, 0x05de, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x05e0, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x05e9, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
> @@ -4303,10 +4333,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> SND_PCI_QUIRK(0x1028, 0x0610, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
> - SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
> + SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
> + SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK),
> SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x0629, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
> - SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS),
> + SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK),
> SND_PCI_QUIRK(0x1028, 0x063e, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
> SND_PCI_QUIRK(0x1028, 0x0640, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
> --
> 1.7.9.5
>