diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-09-11 16:53:08 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-11 17:00:14 +0200 |
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 { CS420X_GPIO_23, CS420X_IMAC27_122 = CS420X_GPIO_23, CS420X_APPLE = CS420X_GPIO_13, + CS420X_MBP101, + CS420X_MBP101_COEF, CS420X_AUTO, }; @@ -1159,6 +1161,14 @@ static const struct hda_verb cs_errata_init_verbs[] = { {} /* terminator */ }; +static const struct hda_verb mbp101_init_verbs[] = { + {0x11, AC_VERB_SET_COEF_INDEX, 0x0002}, + {0x11, AC_VERB_SET_PROC_COEF, 0x100a}, + {0x11, AC_VERB_SET_COEF_INDEX, 0x0004}, + {0x11, AC_VERB_SET_PROC_COEF, 0x000f}, + {} +}; + /* SPDIF setup */ static void init_digital(struct hda_codec *codec) { @@ -1286,6 +1296,7 @@ static const struct hda_model_fixup cs420x_models[] = { { .id = CS420X_IMAC27, .name = "imac27" }, { .id = CS420X_IMAC27_122, .name = "imac27_122" }, { .id = CS420X_APPLE, .name = "apple" }, + { .id = CS420X_MBP101, .name = "mbp101" }, {} }; @@ -1299,6 +1310,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = { /* codec SSID */ SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), + SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101), SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), {} /* terminator */ }; @@ -1345,6 +1357,13 @@ static const struct hda_pintbl imac27_pincfgs[] = { {} /* terminator */ }; +static const struct hda_pintbl mbp101_pincfgs[] = { + { 0x0d, 0x40ab90f0 }, + { 0x0e, 0x90a600f0 }, + { 0x12, 0x50a600f0 }, + {} /* terminator */ +}; + static void cs420x_fixup_gpio_13(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -1396,6 +1415,18 @@ static const struct hda_fixup cs420x_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = cs420x_fixup_gpio_23, }, + [CS420X_MBP101] = { + .type = HDA_FIXUP_PINS, + .v.pins = mbp101_pincfgs, + .chained = true, + .chain_id = CS420X_MBP101_COEF, + }, + [CS420X_MBP101_COEF] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = mbp101_init_verbs, + .chained = true, + .chain_id = CS420X_GPIO_13, + }, }; static int patch_cs420x(struct hda_codec *codec) |