ALSA: hda - Enable subwoofer on Dell Vostro 5460/5470
[deliverable/linux.git] / sound / pci / hda / patch_realtek.c
index ef43171c0bd05c837fc98f94ea78f682e1eca65f..a84e0493499de37ed6162c155daec18eaf9eeab1 100644 (file)
@@ -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, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
This page took 0.027093 seconds and 5 git commands to generate.