diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-12-04 07:59:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-12 01:36:25 -0500 |
commit | 64871fb0be804a971bcdc5db337101d2537167b4 (patch) | |
tree | 1b20a147f9f7f4562c65e7ac5d0d62716b7e76a3 /sound/pci | |
parent | c4fcb3cd61aecde82df7d9856e3d2201e908ca65 (diff) |
ALSA: hda - Fix silent output on MacBook Air 2,1
commit 0756f09c4946fe2d9ce2ebcb6f2e3c58830d22a3 upstream.
MacBook Air 2,1 has a fairly different pin assignment from its brother
MBA 1,1, and yet another quirks are needed for pin 0x18 and 0x19,
similarly like what iMac 9,1 requires, in order to make the sound
working on it.
Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a7605db321a4..e755f5109d84 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1763,6 +1763,7 @@ enum { | |||
1763 | ALC889_FIXUP_DAC_ROUTE, | 1763 | ALC889_FIXUP_DAC_ROUTE, |
1764 | ALC889_FIXUP_MBP_VREF, | 1764 | ALC889_FIXUP_MBP_VREF, |
1765 | ALC889_FIXUP_IMAC91_VREF, | 1765 | ALC889_FIXUP_IMAC91_VREF, |
1766 | ALC889_FIXUP_MBA21_VREF, | ||
1766 | ALC882_FIXUP_INV_DMIC, | 1767 | ALC882_FIXUP_INV_DMIC, |
1767 | ALC882_FIXUP_NO_PRIMARY_HP, | 1768 | ALC882_FIXUP_NO_PRIMARY_HP, |
1768 | ALC887_FIXUP_ASUS_BASS, | 1769 | ALC887_FIXUP_ASUS_BASS, |
@@ -1866,17 +1867,13 @@ static void alc889_fixup_mbp_vref(struct hda_codec *codec, | |||
1866 | } | 1867 | } |
1867 | } | 1868 | } |
1868 | 1869 | ||
1869 | /* Set VREF on speaker pins on imac91 */ | 1870 | static void alc889_fixup_mac_pins(struct hda_codec *codec, |
1870 | static void alc889_fixup_imac91_vref(struct hda_codec *codec, | 1871 | const hda_nid_t *nids, int num_nids) |
1871 | const struct hda_fixup *fix, int action) | ||
1872 | { | 1872 | { |
1873 | struct alc_spec *spec = codec->spec; | 1873 | struct alc_spec *spec = codec->spec; |
1874 | static hda_nid_t nids[2] = { 0x18, 0x1a }; | ||
1875 | int i; | 1874 | int i; |
1876 | 1875 | ||
1877 | if (action != HDA_FIXUP_ACT_INIT) | 1876 | for (i = 0; i < num_nids; i++) { |
1878 | return; | ||
1879 | for (i = 0; i < ARRAY_SIZE(nids); i++) { | ||
1880 | unsigned int val; | 1877 | unsigned int val; |
1881 | val = snd_hda_codec_get_pin_target(codec, nids[i]); | 1878 | val = snd_hda_codec_get_pin_target(codec, nids[i]); |
1882 | val |= AC_PINCTL_VREF_50; | 1879 | val |= AC_PINCTL_VREF_50; |
@@ -1885,6 +1882,26 @@ static void alc889_fixup_imac91_vref(struct hda_codec *codec, | |||
1885 | spec->gen.keep_vref_in_automute = 1; | 1882 | spec->gen.keep_vref_in_automute = 1; |
1886 | } | 1883 | } |
1887 | 1884 | ||
1885 | /* Set VREF on speaker pins on imac91 */ | ||
1886 | static void alc889_fixup_imac91_vref(struct hda_codec *codec, | ||
1887 | const struct hda_fixup *fix, int action) | ||
1888 | { | ||
1889 | static hda_nid_t nids[2] = { 0x18, 0x1a }; | ||
1890 | |||
1891 | if (action == HDA_FIXUP_ACT_INIT) | ||
1892 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); | ||
1893 | } | ||
1894 | |||
1895 | /* Set VREF on speaker pins on mba21 */ | ||
1896 | static void alc889_fixup_mba21_vref(struct hda_codec *codec, | ||
1897 | const struct hda_fixup *fix, int action) | ||
1898 | { | ||
1899 | static hda_nid_t nids[2] = { 0x18, 0x19 }; | ||
1900 | |||
1901 | if (action == HDA_FIXUP_ACT_INIT) | ||
1902 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); | ||
1903 | } | ||
1904 | |||
1888 | /* Don't take HP output as primary | 1905 | /* Don't take HP output as primary |
1889 | * Strangely, the speaker output doesn't work on Vaio Z and some Vaio | 1906 | * Strangely, the speaker output doesn't work on Vaio Z and some Vaio |
1890 | * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 | 1907 | * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 |
@@ -2079,6 +2096,12 @@ static const struct hda_fixup alc882_fixups[] = { | |||
2079 | .chained = true, | 2096 | .chained = true, |
2080 | .chain_id = ALC882_FIXUP_GPIO1, | 2097 | .chain_id = ALC882_FIXUP_GPIO1, |
2081 | }, | 2098 | }, |
2099 | [ALC889_FIXUP_MBA21_VREF] = { | ||
2100 | .type = HDA_FIXUP_FUNC, | ||
2101 | .v.func = alc889_fixup_mba21_vref, | ||
2102 | .chained = true, | ||
2103 | .chain_id = ALC889_FIXUP_MBP_VREF, | ||
2104 | }, | ||
2082 | [ALC882_FIXUP_INV_DMIC] = { | 2105 | [ALC882_FIXUP_INV_DMIC] = { |
2083 | .type = HDA_FIXUP_FUNC, | 2106 | .type = HDA_FIXUP_FUNC, |
2084 | .v.func = alc_fixup_inv_dmic_0x12, | 2107 | .v.func = alc_fixup_inv_dmic_0x12, |
@@ -2143,7 +2166,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
2143 | SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF), | 2166 | SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF), |
2144 | SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), | 2167 | SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), |
2145 | SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF), | 2168 | SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF), |
2146 | SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBP_VREF), | 2169 | SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF), |
2147 | SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF), | 2170 | SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF), |
2148 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), | 2171 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), |
2149 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO), | 2172 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO), |