aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-06-17 04:19:49 -0400
committerTakashi Iwai <tiwai@suse.de>2013-06-17 04:22:46 -0400
commit6ab982e8cf8e5760da407ccdc4abc815bea23179 (patch)
tree48acb517ca5cba41fdc9eb1923bb8b13be644e0a /sound
parent342cda29343a6272c630f94ed56810a76740251b (diff)
ALSA: hda - Fix pin configurations for MacBook Air 4,2
MacBook Air 4,2 requires the whole default pin configuration table to be overridden by the driver, as usual, as Apple's machines don't set up properly after boot. Otherwise mic won't work, and other ill effect may happen. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59381 Reported-and-tested-by: Peter John Hartman <peterjohnhartman@gmail.com> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_cirrus.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index bd8d46cca2b3..cccaf9c7a7bb 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -58,6 +58,7 @@ enum {
58 CS420X_GPIO_23, 58 CS420X_GPIO_23,
59 CS420X_MBP101, 59 CS420X_MBP101,
60 CS420X_MBP81, 60 CS420X_MBP81,
61 CS420X_MBA42,
61 CS420X_AUTO, 62 CS420X_AUTO,
62 /* aliases */ 63 /* aliases */
63 CS420X_IMAC27_122 = CS420X_GPIO_23, 64 CS420X_IMAC27_122 = CS420X_GPIO_23,
@@ -346,6 +347,7 @@ static const struct hda_model_fixup cs420x_models[] = {
346 { .id = CS420X_APPLE, .name = "apple" }, 347 { .id = CS420X_APPLE, .name = "apple" },
347 { .id = CS420X_MBP101, .name = "mbp101" }, 348 { .id = CS420X_MBP101, .name = "mbp101" },
348 { .id = CS420X_MBP81, .name = "mbp81" }, 349 { .id = CS420X_MBP81, .name = "mbp81" },
350 { .id = CS420X_MBA42, .name = "mba42" },
349 {} 351 {}
350}; 352};
351 353
@@ -361,6 +363,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = {
361 SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81), 363 SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
362 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), 364 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
363 SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101), 365 SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101),
366 SND_PCI_QUIRK(0x106b, 0x5b00, "MacBookAir 4,2", CS420X_MBA42),
364 SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), 367 SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE),
365 {} /* terminator */ 368 {} /* terminator */
366}; 369};
@@ -414,6 +417,20 @@ static const struct hda_pintbl mbp101_pincfgs[] = {
414 {} /* terminator */ 417 {} /* terminator */
415}; 418};
416 419
420static const struct hda_pintbl mba42_pincfgs[] = {
421 { 0x09, 0x012b4030 }, /* HP */
422 { 0x0a, 0x400000f0 },
423 { 0x0b, 0x90100120 }, /* speaker */
424 { 0x0c, 0x400000f0 },
425 { 0x0d, 0x90a00110 }, /* mic */
426 { 0x0e, 0x400000f0 },
427 { 0x0f, 0x400000f0 },
428 { 0x10, 0x400000f0 },
429 { 0x12, 0x400000f0 },
430 { 0x15, 0x400000f0 },
431 {} /* terminator */
432};
433
417static void cs420x_fixup_gpio_13(struct hda_codec *codec, 434static void cs420x_fixup_gpio_13(struct hda_codec *codec,
418 const struct hda_fixup *fix, int action) 435 const struct hda_fixup *fix, int action)
419{ 436{
@@ -482,6 +499,12 @@ static const struct hda_fixup cs420x_fixups[] = {
482 .chained = true, 499 .chained = true,
483 .chain_id = CS420X_GPIO_13, 500 .chain_id = CS420X_GPIO_13,
484 }, 501 },
502 [CS420X_MBA42] = {
503 .type = HDA_FIXUP_PINS,
504 .v.pins = mba42_pincfgs,
505 .chained = true,
506 .chain_id = CS420X_GPIO_13,
507 },
485}; 508};
486 509
487static struct cs_spec *cs_alloc_spec(struct hda_codec *codec, int vendor_nid) 510static struct cs_spec *cs_alloc_spec(struct hda_codec *codec, int vendor_nid)