diff options
author | Jérémy Lal <kapouer@melix.org> | 2012-01-09 17:19:45 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-01-09 17:26:25 +0100 |
commit | 7e5bea19aed376855eb2928c6d3c9ab0b35b5af7 (patch) | |
tree | 7c12199f39c05cbdd511d128535cd8f724e2b982 /sound/pci/hda/patch_cirrus.c | |
parent | f16c2cc3c40ea8b7860f3abb9c7bb887a1bdd703 (diff) | |
download | linux-7e5bea19aed376855eb2928c6d3c9ab0b35b5af7.tar.bz2 |
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/pci/hda/patch_cirrus.c')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 9 |
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 { CS420X_MBP53, CS420X_MBP55, CS420X_IMAC27, + CS420X_IMAC27_122, CS420X_APPLE, CS420X_AUTO, CS420X_MODELS @@ -1290,6 +1291,7 @@ static const char * const cs420x_models[CS420X_MODELS] = { [CS420X_MBP53] = "mbp53", [CS420X_MBP55] = "mbp55", [CS420X_IMAC27] = "imac27", + [CS420X_IMAC27_122] = "imac27_122", [CS420X_APPLE] = "apple", [CS420X_AUTO] = "auto", }; @@ -1306,6 +1308,7 @@ static const struct snd_pci_quirk cs420x_cfg_tbl[] = { }; static const struct snd_pci_quirk cs420x_codec_cfg_tbl[] = { + SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), {} /* terminator */ }; @@ -1405,6 +1408,12 @@ static int patch_cs420x(struct hda_codec *codec) spec->gpio_mask = spec->gpio_dir = spec->gpio_eapd_hp | spec->gpio_eapd_speaker; break; + case CS420X_IMAC27_122: + spec->gpio_eapd_hp = 4; /* GPIO2 = headphones */ + spec->gpio_eapd_speaker = 8; /* GPIO3 = speakers */ + spec->gpio_mask = spec->gpio_dir = + spec->gpio_eapd_hp | spec->gpio_eapd_speaker; + break; } err = cs_parse_auto_config(codec); |