Skip to content

Commit 6ab982e

Browse files
committed
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 <[email protected]> Cc: <[email protected]> [v3.9+] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 342cda2 commit 6ab982e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

sound/pci/hda/patch_cirrus.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ enum {
5858
CS420X_GPIO_23,
5959
CS420X_MBP101,
6060
CS420X_MBP81,
61+
CS420X_MBA42,
6162
CS420X_AUTO,
6263
/* aliases */
6364
CS420X_IMAC27_122 = CS420X_GPIO_23,
@@ -346,6 +347,7 @@ static const struct hda_model_fixup cs420x_models[] = {
346347
{ .id = CS420X_APPLE, .name = "apple" },
347348
{ .id = CS420X_MBP101, .name = "mbp101" },
348349
{ .id = CS420X_MBP81, .name = "mbp81" },
350+
{ .id = CS420X_MBA42, .name = "mba42" },
349351
{}
350352
};
351353

@@ -361,6 +363,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = {
361363
SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
362364
SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
363365
SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101),
366+
SND_PCI_QUIRK(0x106b, 0x5b00, "MacBookAir 4,2", CS420X_MBA42),
364367
SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE),
365368
{} /* terminator */
366369
};
@@ -414,6 +417,20 @@ static const struct hda_pintbl mbp101_pincfgs[] = {
414417
{} /* terminator */
415418
};
416419

420+
static 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+
417434
static void cs420x_fixup_gpio_13(struct hda_codec *codec,
418435
const struct hda_fixup *fix, int action)
419436
{
@@ -482,6 +499,12 @@ static const struct hda_fixup cs420x_fixups[] = {
482499
.chained = true,
483500
.chain_id = CS420X_GPIO_13,
484501
},
502+
[CS420X_MBA42] = {
503+
.type = HDA_FIXUP_PINS,
504+
.v.pins = mba42_pincfgs,
505+
.chained = true,
506+
.chain_id = CS420X_GPIO_13,
507+
},
485508
};
486509

487510
static struct cs_spec *cs_alloc_spec(struct hda_codec *codec, int vendor_nid)

0 commit comments

Comments
 (0)