Skip to content

Instantly share code, notes, and snippets.

@kapouer
Created October 22, 2011 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kapouer/1306112 to your computer and use it in GitHub Desktop.
Save kapouer/1306112 to your computer and use it in GitHub Desktop.
GPIO imac 12,2
--- 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment