public
Last active

GPIO imac 12,2

  • Download Gist
gistfile1.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
--- sound/pci/hda/patch_cirrus.c.orig 2011-09-02 10:07:32.013460479 +0200
+++ sound/pci/hda/patch_cirrus.c 2011-09-02 10:07:45.604995395 +0200
@@ -922,7 +922,7 @@
if (spec->board_config == CS420X_MBP53 ||
spec->board_config == CS420X_MBP55 ||
spec->board_config == CS420X_IMAC27) {
- unsigned int gpio = hp_present ? 0x02 : 0x08;
+ unsigned int gpio = hp_present ? 0x04 : 0x08;
snd_hda_codec_write(codec, 0x01, 0,
AC_VERB_SET_GPIO_DATA, gpio);
}
@@ -1319,16 +1319,46 @@
};
static const struct cs_pincfg imac27_pincfgs[] = {
- { 0x09, 0x012b4050 },
- { 0x0a, 0x90100140 },
- { 0x0b, 0x90100142 },
- { 0x0c, 0x018b3020 },
- { 0x0d, 0x90a00110 },
- { 0x0e, 0x400000f0 },
- { 0x0f, 0x01cbe030 },
- { 0x10, 0x014be060 },
- { 0x12, 0x01ab9070 },
- { 0x15, 0x400000f0 },
+ { 0x00, 0x821c9700 },
+ { 0x01, 0x011d9700 },
+ { 0x02, 0x101e9700 },
+ { 0x03, 0x901f9700 },
+ { 0x04, 0xf01ca700 },
+ { 0x05, 0x101da700 },
+ { 0x06, 0x011ea700 },
+ { 0x07, 0x021fa700 },
+ { 0x08, 0x801cb700 },
+ { 0x09, 0x001db700 },
+ { 0x0a, 0x101eb700 },
+ { 0x0b, 0x901fb700 },
+ { 0x0c, 0x5017c700 },
+ { 0x0d, 0x101dc700 },
+ { 0x0e, 0x811ec700 },
+ { 0x0f, 0x021fc700 },
+ { 0x10, 0x301cd700 },
+ { 0x11, 0x101dd700 },
+ { 0x12, 0xa11ed700 },
+ { 0x13, 0x031fd700 },
+ { 0x14, 0xf01ce700 },
+ { 0x15, 0x111de700 },
+ { 0x16, 0x961ee700 },
+ { 0x17, 0x771fe700 },
+ { 0x18, 0xf01cf700 },
+ { 0x19, 0x111df700 },
+ { 0x1a, 0xc51ef700 },
+ { 0x1b, 0x041f0701 },
+ { 0x1c, 0xf01c0701 },
+ { 0x1d, 0x101d0701 },
+ { 0x1e, 0x451e0701 },
+ { 0x1f, 0x041f0701 },
+ { 0x20, 0xf01c2701 },
+ { 0x21, 0x111d2701 },
+ { 0x22, 0x961e2701 },
+ { 0x23, 0x771f2701 },
+ { 0x24, 0xf01c5701 },
+ { 0x25, 0x001d5701 },
+ { 0x26, 0x001e5701 },
+ { 0x27, 0x401f5701 },
{} /* terminator */
};
@@ -1370,10 +1400,10 @@
case CS420X_IMAC27:
case CS420X_MBP53:
case CS420X_MBP55:
- /* GPIO1 = headphones */
+ /* GPIO2 = headphones */
/* GPIO3 = speakers */
- spec->gpio_mask = 0x0a;
- spec->gpio_dir = 0x0a;
+ spec->gpio_mask = 0x0c;
+ spec->gpio_dir = 0x0c;
break;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.