diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 97 |
1 files changed, 65 insertions, 32 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3653f57b7f69..dd005ed89f0b 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -59,6 +59,12 @@ enum { | |||
59 | STAC_D945_REF, | 59 | STAC_D945_REF, |
60 | STAC_D945GTP3, | 60 | STAC_D945GTP3, |
61 | STAC_D945GTP5, | 61 | STAC_D945GTP5, |
62 | STAC_INTEL_MAC_V1, | ||
63 | STAC_INTEL_MAC_V2, | ||
64 | STAC_INTEL_MAC_V3, | ||
65 | STAC_INTEL_MAC_V4, | ||
66 | STAC_INTEL_MAC_V5, | ||
67 | /* for backward compitability */ | ||
62 | STAC_MACMINI, | 68 | STAC_MACMINI, |
63 | STAC_MACBOOK, | 69 | STAC_MACBOOK, |
64 | STAC_MACBOOK_PRO_V1, | 70 | STAC_MACBOOK_PRO_V1, |
@@ -550,46 +556,64 @@ static unsigned int d945gtp5_pin_configs[10] = { | |||
550 | 0x02a19320, 0x40000100, | 556 | 0x02a19320, 0x40000100, |
551 | }; | 557 | }; |
552 | 558 | ||
553 | static unsigned int macbook_pro_v1_pin_configs[10] = { | 559 | static unsigned int intel_mac_v1_pin_configs[10] = { |
554 | 0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010, | 560 | 0x0121e21f, 0x400000ff, 0x9017e110, 0x400000fd, |
555 | 0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e, | 561 | 0x400000fe, 0x0181e020, 0x1145e030, 0x11c5e240, |
556 | 0x02a19320, 0x400000fb | 562 | 0x400000fc, 0x400000fb, |
563 | }; | ||
564 | |||
565 | static unsigned int intel_mac_v2_pin_configs[10] = { | ||
566 | 0x0121e21f, 0x90a7012e, 0x9017e110, 0x400000fd, | ||
567 | 0x400000fe, 0x0181e020, 0x1145e230, 0x500000fa, | ||
568 | 0x400000fc, 0x400000fb, | ||
557 | }; | 569 | }; |
558 | 570 | ||
559 | static unsigned int macbook_pro_v2_pin_configs[10] = { | 571 | static unsigned int intel_mac_v3_pin_configs[10] = { |
560 | 0x0221401f, 0x90a70120, 0x01813024, 0x01014010, | 572 | 0x0121e21f, 0x90a7012e, 0x9017e110, 0x400000fd, |
561 | 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e, | 573 | 0x400000fe, 0x0181e020, 0x1145e230, 0x11c5e240, |
562 | 0x400000fc, 0x400000fb, | 574 | 0x400000fc, 0x400000fb, |
563 | }; | 575 | }; |
564 | 576 | ||
565 | static unsigned int imac_intel_pin_configs[10] = { | 577 | static unsigned int intel_mac_v4_pin_configs[10] = { |
566 | 0x0121e230, 0x90a70120, 0x9017e110, 0x400000fe, | 578 | 0x0321e21f, 0x03a1e02e, 0x9017e110, 0x9017e11f, |
567 | 0x400000fd, 0x0181e021, 0x1145e040, 0x400000fa, | 579 | 0x400000fe, 0x0381e020, 0x1345e230, 0x13c5e240, |
568 | 0x400000fc, 0x400000fb, | 580 | 0x400000fc, 0x400000fb, |
569 | }; | 581 | }; |
570 | 582 | ||
571 | static unsigned int imac_intel_20_pin_configs[10] = { | 583 | static unsigned int intel_mac_v5_pin_configs[10] = { |
572 | 0x0121E21F, 0x90A7012E, 0x9017E110, 0x400000FD, | 584 | 0x0321e21f, 0x03a1e02e, 0x9017e110, 0x9017e11f, |
573 | 0x400000FE, 0x0181E020, 0x1145E230, 0x11C5E240, | 585 | 0x400000fe, 0x0381e020, 0x1345e230, 0x13c5e240, |
574 | 0x400000FC, 0x400000FB, | 586 | 0x400000fc, 0x400000fb, |
575 | }; | 587 | }; |
576 | 588 | ||
577 | static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { | 589 | static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { |
578 | [STAC_D945_REF] = ref922x_pin_configs, | 590 | [STAC_D945_REF] = ref922x_pin_configs, |
579 | [STAC_D945GTP3] = d945gtp3_pin_configs, | 591 | [STAC_D945GTP3] = d945gtp3_pin_configs, |
580 | [STAC_D945GTP5] = d945gtp5_pin_configs, | 592 | [STAC_D945GTP5] = d945gtp5_pin_configs, |
581 | [STAC_MACMINI] = macbook_pro_v1_pin_configs, | 593 | [STAC_INTEL_MAC_V1] = intel_mac_v1_pin_configs, |
582 | [STAC_MACBOOK] = macbook_pro_v1_pin_configs, | 594 | [STAC_INTEL_MAC_V2] = intel_mac_v2_pin_configs, |
583 | [STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs, | 595 | [STAC_INTEL_MAC_V3] = intel_mac_v3_pin_configs, |
584 | [STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs, | 596 | [STAC_INTEL_MAC_V4] = intel_mac_v4_pin_configs, |
585 | [STAC_IMAC_INTEL] = imac_intel_pin_configs, | 597 | [STAC_INTEL_MAC_V5] = intel_mac_v5_pin_configs, |
586 | [STAC_IMAC_INTEL_20] = imac_intel_20_pin_configs, | 598 | /* for backward compitability */ |
599 | [STAC_MACMINI] = intel_mac_v3_pin_configs, | ||
600 | [STAC_MACBOOK] = intel_mac_v5_pin_configs, | ||
601 | [STAC_MACBOOK_PRO_V1] = intel_mac_v3_pin_configs, | ||
602 | [STAC_MACBOOK_PRO_V2] = intel_mac_v3_pin_configs, | ||
603 | [STAC_IMAC_INTEL] = intel_mac_v2_pin_configs, | ||
604 | [STAC_IMAC_INTEL_20] = intel_mac_v3_pin_configs, | ||
587 | }; | 605 | }; |
588 | 606 | ||
589 | static const char *stac922x_models[STAC_922X_MODELS] = { | 607 | static const char *stac922x_models[STAC_922X_MODELS] = { |
590 | [STAC_D945_REF] = "ref", | 608 | [STAC_D945_REF] = "ref", |
591 | [STAC_D945GTP5] = "5stack", | 609 | [STAC_D945GTP5] = "5stack", |
592 | [STAC_D945GTP3] = "3stack", | 610 | [STAC_D945GTP3] = "3stack", |
611 | [STAC_INTEL_MAC_V1] = "intel-mac-v1", | ||
612 | [STAC_INTEL_MAC_V2] = "intel-mac-v2", | ||
613 | [STAC_INTEL_MAC_V3] = "intel-mac-v3", | ||
614 | [STAC_INTEL_MAC_V4] = "intel-mac-v4", | ||
615 | [STAC_INTEL_MAC_V5] = "intel-mac-v5", | ||
616 | /* for backward compitability */ | ||
593 | [STAC_MACMINI] = "macmini", | 617 | [STAC_MACMINI] = "macmini", |
594 | [STAC_MACBOOK] = "macbook", | 618 | [STAC_MACBOOK] = "macbook", |
595 | [STAC_MACBOOK_PRO_V1] = "macbook-pro-v1", | 619 | [STAC_MACBOOK_PRO_V1] = "macbook-pro-v1", |
@@ -658,7 +682,7 @@ static struct snd_pci_quirk stac922x_cfg_tbl[] = { | |||
658 | /* other systems */ | 682 | /* other systems */ |
659 | /* Apple Mac Mini (early 2006) */ | 683 | /* Apple Mac Mini (early 2006) */ |
660 | SND_PCI_QUIRK(0x8384, 0x7680, | 684 | SND_PCI_QUIRK(0x8384, 0x7680, |
661 | "Mac Mini", STAC_MACMINI), | 685 | "Mac Mini", STAC_INTEL_MAC_V3), |
662 | {} /* terminator */ | 686 | {} /* terminator */ |
663 | }; | 687 | }; |
664 | 688 | ||
@@ -2027,27 +2051,36 @@ static int patch_stac922x(struct hda_codec *codec) | |||
2027 | spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS, | 2051 | spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS, |
2028 | stac922x_models, | 2052 | stac922x_models, |
2029 | stac922x_cfg_tbl); | 2053 | stac922x_cfg_tbl); |
2030 | if (spec->board_config == STAC_MACMINI) { | 2054 | if (spec->board_config == STAC_INTEL_MAC_V3) { |
2031 | spec->gpio_mute = 1; | 2055 | spec->gpio_mute = 1; |
2032 | /* Intel Macs have all same PCI SSID, so we need to check | 2056 | /* Intel Macs have all same PCI SSID, so we need to check |
2033 | * codec SSID to distinguish the exact models | 2057 | * codec SSID to distinguish the exact models |
2034 | */ | 2058 | */ |
2035 | printk(KERN_INFO "hda_codec: STAC922x, Apple subsys_id=%x\n", codec->subsystem_id); | 2059 | printk(KERN_INFO "hda_codec: STAC922x, Apple subsys_id=%x\n", codec->subsystem_id); |
2036 | switch (codec->subsystem_id) { | 2060 | switch (codec->subsystem_id) { |
2037 | case 0x106b0a00: /* MacBook First generatoin */ | 2061 | |
2038 | spec->board_config = STAC_MACBOOK; | 2062 | case 0x106b0800: |
2063 | spec->board_config = STAC_INTEL_MAC_V1; | ||
2039 | break; | 2064 | break; |
2040 | case 0x106b0200: /* MacBook Pro first generation */ | 2065 | case 0x106b0600: |
2041 | spec->board_config = STAC_MACBOOK_PRO_V1; | 2066 | case 0x106b0700: |
2067 | spec->board_config = STAC_INTEL_MAC_V2; | ||
2042 | break; | 2068 | break; |
2043 | case 0x106b1e00: /* MacBook Pro second generation */ | 2069 | case 0x106b0e00: |
2044 | spec->board_config = STAC_MACBOOK_PRO_V2; | 2070 | case 0x106b0f00: |
2071 | case 0x106b1600: | ||
2072 | case 0x106b1700: | ||
2073 | case 0x106b0200: | ||
2074 | case 0x106b1e00: | ||
2075 | spec->board_config = STAC_INTEL_MAC_V3; | ||
2045 | break; | 2076 | break; |
2046 | case 0x106b0700: /* Intel-based iMac */ | 2077 | case 0x106b1a00: |
2047 | spec->board_config = STAC_IMAC_INTEL; | 2078 | case 0x00000100: |
2079 | spec->board_config = STAC_INTEL_MAC_V4; | ||
2048 | break; | 2080 | break; |
2049 | case 0x106b1700: /* Intel iMac 20 */ | 2081 | case 0x106b0a00: |
2050 | spec->board_config = STAC_IMAC_INTEL_20; | 2082 | case 0x106b2200: |
2083 | spec->board_config = STAC_INTEL_MAC_V5; | ||
2051 | break; | 2084 | break; |
2052 | } | 2085 | } |
2053 | } | 2086 | } |