aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJérémy Lal <kapouer@melix.org>2012-01-09 11:19:45 -0500
committerTakashi Iwai <tiwai@suse.de>2012-01-09 11:26:25 -0500
commit7e5bea19aed376855eb2928c6d3c9ab0b35b5af7 (patch)
tree7c12199f39c05cbdd511d128535cd8f724e2b982 /sound
parentf16c2cc3c40ea8b7860f3abb9c7bb887a1bdd703 (diff)
ALSA: hda/cirrus - support for iMac12,2 model
This early 2011 model just need to have headphones on GPI02 instead of GPI01, and use BIOS pincfgs. It is detected by codec SSID. The iMac12,1 model is known to work the same way, although maybe not with the same codec SSID. Signed-off-by: Jérémy Lal <kapouer@melix.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_cirrus.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 036056c42c13..0e99357e822c 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -79,6 +79,7 @@ enum {
79 CS420X_MBP53, 79 CS420X_MBP53,
80 CS420X_MBP55, 80 CS420X_MBP55,
81 CS420X_IMAC27, 81 CS420X_IMAC27,
82 CS420X_IMAC27_122,
82 CS420X_APPLE, 83 CS420X_APPLE,
83 CS420X_AUTO, 84 CS420X_AUTO,
84 CS420X_MODELS 85 CS420X_MODELS
@@ -1290,6 +1291,7 @@ static const char * const cs420x_models[CS420X_MODELS] = {
1290 [CS420X_MBP53] = "mbp53", 1291 [CS420X_MBP53] = "mbp53",
1291 [CS420X_MBP55] = "mbp55", 1292 [CS420X_MBP55] = "mbp55",
1292 [CS420X_IMAC27] = "imac27", 1293 [CS420X_IMAC27] = "imac27",
1294 [CS420X_IMAC27_122] = "imac27_122",
1293 [CS420X_APPLE] = "apple", 1295 [CS420X_APPLE] = "apple",
1294 [CS420X_AUTO] = "auto", 1296 [CS420X_AUTO] = "auto",
1295}; 1297};
@@ -1306,6 +1308,7 @@ static const struct snd_pci_quirk cs420x_cfg_tbl[] = {
1306}; 1308};
1307 1309
1308static const struct snd_pci_quirk cs420x_codec_cfg_tbl[] = { 1310static const struct snd_pci_quirk cs420x_codec_cfg_tbl[] = {
1311 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
1309 SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), 1312 SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE),
1310 {} /* terminator */ 1313 {} /* terminator */
1311}; 1314};
@@ -1405,6 +1408,12 @@ static int patch_cs420x(struct hda_codec *codec)
1405 spec->gpio_mask = spec->gpio_dir = 1408 spec->gpio_mask = spec->gpio_dir =
1406 spec->gpio_eapd_hp | spec->gpio_eapd_speaker; 1409 spec->gpio_eapd_hp | spec->gpio_eapd_speaker;
1407 break; 1410 break;
1411 case CS420X_IMAC27_122:
1412 spec->gpio_eapd_hp = 4; /* GPIO2 = headphones */
1413 spec->gpio_eapd_speaker = 8; /* GPIO3 = speakers */
1414 spec->gpio_mask = spec->gpio_dir =
1415 spec->gpio_eapd_hp | spec->gpio_eapd_speaker;
1416 break;
1408 } 1417 }
1409 1418
1410 err = cs_parse_auto_config(codec); 1419 err = cs_parse_auto_config(codec);