aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 4c7b03996be9..c94291bc5367 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -60,7 +60,8 @@ enum {
60 STAC_D945GTP5, 60 STAC_D945GTP5,
61 STAC_MACMINI, 61 STAC_MACMINI,
62 STAC_MACBOOK, 62 STAC_MACBOOK,
63 STAC_MACBOOK_PRO, 63 STAC_MACBOOK_PRO_V1,
64 STAC_MACBOOK_PRO_V2,
64 STAC_922X_MODELS 65 STAC_922X_MODELS
65}; 66};
66 67
@@ -529,7 +530,13 @@ static unsigned int macbook_pin_configs[10] = {
529 0x400000fc, 0x400000fb, 530 0x400000fc, 0x400000fb,
530}; 531};
531 532
532static unsigned int macbook_pro_pin_configs[10] = { 533static unsigned int macbook_pro_v1_pin_configs[10] = {
534 0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010,
535 0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e,
536 0x02a19320, 0x400000fb
537};
538
539static unsigned int macbook_pro_v2_pin_configs[10] = {
533 0x0221401f, 0x90a70120, 0x01813024, 0x01014010, 540 0x0221401f, 0x90a70120, 0x01813024, 0x01014010,
534 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e, 541 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e,
535 0x400000fc, 0x400000fb, 542 0x400000fc, 0x400000fb,
@@ -541,7 +548,8 @@ static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
541 [STAC_D945GTP5] = d945gtp5_pin_configs, 548 [STAC_D945GTP5] = d945gtp5_pin_configs,
542 [STAC_MACMINI] = d945gtp5_pin_configs, 549 [STAC_MACMINI] = d945gtp5_pin_configs,
543 [STAC_MACBOOK] = macbook_pin_configs, 550 [STAC_MACBOOK] = macbook_pin_configs,
544 [STAC_MACBOOK_PRO] = macbook_pro_pin_configs, 551 [STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs,
552 [STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs,
545}; 553};
546 554
547static const char *stac922x_models[STAC_922X_MODELS] = { 555static const char *stac922x_models[STAC_922X_MODELS] = {
@@ -550,7 +558,8 @@ static const char *stac922x_models[STAC_922X_MODELS] = {
550 [STAC_D945GTP3] = "3stack", 558 [STAC_D945GTP3] = "3stack",
551 [STAC_MACMINI] = "macmini", 559 [STAC_MACMINI] = "macmini",
552 [STAC_MACBOOK] = "macbook", 560 [STAC_MACBOOK] = "macbook",
553 [STAC_MACBOOK_PRO] = "macbook-pro", 561 [STAC_MACBOOK_PRO_V1] = "macbook-pro-v1",
562 [STAC_MACBOOK_PRO_V2] = "macbook-pro",
554}; 563};
555 564
556static struct snd_pci_quirk stac922x_cfg_tbl[] = { 565static struct snd_pci_quirk stac922x_cfg_tbl[] = {
@@ -1600,6 +1609,11 @@ static int stac92xx_init(struct hda_codec *codec)
1600 for (i = 0; i < cfg->hp_outs; i++) 1609 for (i = 0; i < cfg->hp_outs; i++)
1601 enable_pin_detect(codec, cfg->hp_pins[i], 1610 enable_pin_detect(codec, cfg->hp_pins[i],
1602 STAC_HP_EVENT); 1611 STAC_HP_EVENT);
1612 /* force to enable the first line-out; the others are set up
1613 * in unsol_event
1614 */
1615 stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0],
1616 AC_PINCTL_OUT_EN);
1603 stac92xx_auto_init_hp_out(codec); 1617 stac92xx_auto_init_hp_out(codec);
1604 /* fake event to set up pins */ 1618 /* fake event to set up pins */
1605 codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26); 1619 codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26);
@@ -1889,9 +1903,13 @@ static int patch_stac922x(struct hda_codec *codec)
1889 /* Intel Macs have all same PCI SSID, so we need to check 1903 /* Intel Macs have all same PCI SSID, so we need to check
1890 * codec SSID to distinguish the exact models 1904 * codec SSID to distinguish the exact models
1891 */ 1905 */
1906 printk(KERN_INFO "hda_codec: STAC922x, Apple subsys_id=%x\n", codec->subsystem_id);
1892 switch (codec->subsystem_id) { 1907 switch (codec->subsystem_id) {
1893 case 0x106b1e00: 1908 case 0x106b0200: /* MacBook Pro first generation */
1894 spec->board_config = STAC_MACBOOK_PRO; 1909 spec->board_config = STAC_MACBOOK_PRO_V1;
1910 break;
1911 case 0x106b1e00: /* MacBook Pro second generation */
1912 spec->board_config = STAC_MACBOOK_PRO_V2;
1895 break; 1913 break;
1896 } 1914 }
1897 } 1915 }