diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-09-11 10:53:08 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-11 11:00:14 -0400 |
commit | ef596a57b4d7d8b258beb570ed309ef85bf24dd1 (patch) | |
tree | 6e419aa5ab052eb2cbbbe5fbacf1683dc82da4d8 /sound/pci/hda | |
parent | 05288426908ecb7ed7cbff61901db5918525578a (diff) |
ALSA: hda - Add support for MacBook Pro 10,1
MacBook Pro 10,1 needs a few adjustments to make it working:
- more COEF verbs
- some pin config overrides to disable the unused pin (0x0d, 0x12),
and fix the internal mic (0x0e)
In addition, it uses GPIO 1 and 3 like other MacBooks.
The internal digital mic on the machine is still problematic: it seems
that only the right channel is used and the left is always static.
This looks like a hardware design, so we need to cope in the software
side somehow...
The primary information and test were brought from Daniel J Blueman.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 6aca4a05a329..82253f137359 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -85,6 +85,8 @@ enum { | |||
85 | CS420X_GPIO_23, | 85 | CS420X_GPIO_23, |
86 | CS420X_IMAC27_122 = CS420X_GPIO_23, | 86 | CS420X_IMAC27_122 = CS420X_GPIO_23, |
87 | CS420X_APPLE = CS420X_GPIO_13, | 87 | CS420X_APPLE = CS420X_GPIO_13, |
88 | CS420X_MBP101, | ||
89 | CS420X_MBP101_COEF, | ||
88 | CS420X_AUTO, | 90 | CS420X_AUTO, |
89 | }; | 91 | }; |
90 | 92 | ||
@@ -1159,6 +1161,14 @@ static const struct hda_verb cs_errata_init_verbs[] = { | |||
1159 | {} /* terminator */ | 1161 | {} /* terminator */ |
1160 | }; | 1162 | }; |
1161 | 1163 | ||
1164 | static const struct hda_verb mbp101_init_verbs[] = { | ||
1165 | {0x11, AC_VERB_SET_COEF_INDEX, 0x0002}, | ||
1166 | {0x11, AC_VERB_SET_PROC_COEF, 0x100a}, | ||
1167 | {0x11, AC_VERB_SET_COEF_INDEX, 0x0004}, | ||
1168 | {0x11, AC_VERB_SET_PROC_COEF, 0x000f}, | ||
1169 | {} | ||
1170 | }; | ||
1171 | |||
1162 | /* SPDIF setup */ | 1172 | /* SPDIF setup */ |
1163 | static void init_digital(struct hda_codec *codec) | 1173 | static void init_digital(struct hda_codec *codec) |
1164 | { | 1174 | { |
@@ -1286,6 +1296,7 @@ static const struct hda_model_fixup cs420x_models[] = { | |||
1286 | { .id = CS420X_IMAC27, .name = "imac27" }, | 1296 | { .id = CS420X_IMAC27, .name = "imac27" }, |
1287 | { .id = CS420X_IMAC27_122, .name = "imac27_122" }, | 1297 | { .id = CS420X_IMAC27_122, .name = "imac27_122" }, |
1288 | { .id = CS420X_APPLE, .name = "apple" }, | 1298 | { .id = CS420X_APPLE, .name = "apple" }, |
1299 | { .id = CS420X_MBP101, .name = "mbp101" }, | ||
1289 | {} | 1300 | {} |
1290 | }; | 1301 | }; |
1291 | 1302 | ||
@@ -1299,6 +1310,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = { | |||
1299 | 1310 | ||
1300 | /* codec SSID */ | 1311 | /* codec SSID */ |
1301 | SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), | 1312 | SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), |
1313 | SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101), | ||
1302 | SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), | 1314 | SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), |
1303 | {} /* terminator */ | 1315 | {} /* terminator */ |
1304 | }; | 1316 | }; |
@@ -1345,6 +1357,13 @@ static const struct hda_pintbl imac27_pincfgs[] = { | |||
1345 | {} /* terminator */ | 1357 | {} /* terminator */ |
1346 | }; | 1358 | }; |
1347 | 1359 | ||
1360 | static const struct hda_pintbl mbp101_pincfgs[] = { | ||
1361 | { 0x0d, 0x40ab90f0 }, | ||
1362 | { 0x0e, 0x90a600f0 }, | ||
1363 | { 0x12, 0x50a600f0 }, | ||
1364 | {} /* terminator */ | ||
1365 | }; | ||
1366 | |||
1348 | static void cs420x_fixup_gpio_13(struct hda_codec *codec, | 1367 | static void cs420x_fixup_gpio_13(struct hda_codec *codec, |
1349 | const struct hda_fixup *fix, int action) | 1368 | const struct hda_fixup *fix, int action) |
1350 | { | 1369 | { |
@@ -1396,6 +1415,18 @@ static const struct hda_fixup cs420x_fixups[] = { | |||
1396 | .type = HDA_FIXUP_FUNC, | 1415 | .type = HDA_FIXUP_FUNC, |
1397 | .v.func = cs420x_fixup_gpio_23, | 1416 | .v.func = cs420x_fixup_gpio_23, |
1398 | }, | 1417 | }, |
1418 | [CS420X_MBP101] = { | ||
1419 | .type = HDA_FIXUP_PINS, | ||
1420 | .v.pins = mbp101_pincfgs, | ||
1421 | .chained = true, | ||
1422 | .chain_id = CS420X_MBP101_COEF, | ||
1423 | }, | ||
1424 | [CS420X_MBP101_COEF] = { | ||
1425 | .type = HDA_FIXUP_VERBS, | ||
1426 | .v.verbs = mbp101_init_verbs, | ||
1427 | .chained = true, | ||
1428 | .chain_id = CS420X_GPIO_13, | ||
1429 | }, | ||
1399 | }; | 1430 | }; |
1400 | 1431 | ||
1401 | static int patch_cs420x(struct hda_codec *codec) | 1432 | static int patch_cs420x(struct hda_codec *codec) |