ALSA: hda - Fix silent output on MacBook Air 1,1

Similarly to other Apple products, MBA 1,1 needs a specific quirk.
Pin 0x18 must be set to VREF_50 to have sound output. This was no
longer done since commit 1a97b7f, resulting in a mute built-in speaker.

This patch corrects the regression by creating a fixup for the MBA 1,1.

Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")
Cc: <stable@vger.kernel.org> [v3.4+]
Tested-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Adrien Vergé and committed by Takashi Iwai e7729a41 deb6596f

+18 -1
+18 -1
sound/pci/hda/patch_realtek.c
··· 1819 1819 ALC889_FIXUP_DAC_ROUTE, 1820 1820 ALC889_FIXUP_MBP_VREF, 1821 1821 ALC889_FIXUP_IMAC91_VREF, 1822 + ALC889_FIXUP_MBA11_VREF, 1822 1823 ALC889_FIXUP_MBA21_VREF, 1823 1824 ALC882_FIXUP_INV_DMIC, 1824 1825 ALC882_FIXUP_NO_PRIMARY_HP, ··· 1945 1944 const struct hda_fixup *fix, int action) 1946 1945 { 1947 1946 static hda_nid_t nids[2] = { 0x18, 0x1a }; 1947 + 1948 + if (action == HDA_FIXUP_ACT_INIT) 1949 + alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); 1950 + } 1951 + 1952 + /* Set VREF on speaker pins on mba11 */ 1953 + static void alc889_fixup_mba11_vref(struct hda_codec *codec, 1954 + const struct hda_fixup *fix, int action) 1955 + { 1956 + static hda_nid_t nids[1] = { 0x18 }; 1948 1957 1949 1958 if (action == HDA_FIXUP_ACT_INIT) 1950 1959 alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); ··· 2178 2167 .chained = true, 2179 2168 .chain_id = ALC882_FIXUP_GPIO1, 2180 2169 }, 2170 + [ALC889_FIXUP_MBA11_VREF] = { 2171 + .type = HDA_FIXUP_FUNC, 2172 + .v.func = alc889_fixup_mba11_vref, 2173 + .chained = true, 2174 + .chain_id = ALC889_FIXUP_MBP_VREF, 2175 + }, 2181 2176 [ALC889_FIXUP_MBA21_VREF] = { 2182 2177 .type = HDA_FIXUP_FUNC, 2183 2178 .v.func = alc889_fixup_mba21_vref, ··· 2259 2242 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF), 2260 2243 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF), 2261 2244 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), 2262 - SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF), 2245 + SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF), 2263 2246 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF), 2264 2247 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF), 2265 2248 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),