* [PATCH] Sigmatel STAC9221 - Add Configs for all Apple Intel Macs
@ 2007-05-27 21:59 Ivan N. Zlatev
2007-05-29 12:21 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Ivan N. Zlatev @ 2007-05-27 21:59 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
This patch:
* adds the pinconfigs for all 5 Apple boards and 14 Subsystem IDs
(support for possibly all iMac, Mac, MacMini etc etc)
* adds "intel-mac-v1" to v5 models which replace the current
* reflects changes in Alsa-Configuration.txt
Please review. Regards.
--
Ivan N. Zlatev
Web: http://www.i-nZ.net
"It's all some kind of whacked out conspiracy."
[-- Attachment #2: apple_alsa.patch --]
[-- Type: text/x-patch, Size: 6126 bytes --]
diff -r 337962e19de6 Documentation/ALSA-Configuration.txt
--- a/Documentation/ALSA-Configuration.txt Fri May 25 12:18:49 2007 +0200
+++ b/Documentation/ALSA-Configuration.txt Sun May 27 22:20:34 2007 +0100
@@ -923,12 +923,11 @@ Prior to version 0.9.0rc4 options had a
ref Reference board
3stack D945 3stack
5stack D945 5stack + SPDIF
- macmini Intel Mac Mini
- macbook Intel Mac Book
- macbook-pro-v1 Intel Mac Book Pro 1st generation
- macbook-pro Intel Mac Book Pro 2nd generation
- imac-intel Intel iMac
- imac-intel-20 Intel iMac (newer version)
+ intel-mac-v1 Intel Mac Type 1
+ intel-mac-v2 Intel Mac Type 2
+ intel-mac-v3 Intel Mac Type 3
+ intel-mac-v4 Intel Mac Type 4
+ intel-mac-v5 Intel Mac Type 5
STAC9202/9250/9251
ref Reference board, base config
diff -r 337962e19de6 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c Fri May 25 12:18:49 2007 +0200
+++ b/pci/hda/patch_sigmatel.c Sun May 27 22:19:14 2007 +0100
@@ -59,12 +59,11 @@ enum {
STAC_D945_REF,
STAC_D945GTP3,
STAC_D945GTP5,
- STAC_MACMINI,
- STAC_MACBOOK,
- STAC_MACBOOK_PRO_V1,
- STAC_MACBOOK_PRO_V2,
- STAC_IMAC_INTEL,
- STAC_IMAC_INTEL_20,
+ STAC_INTEL_MAC_V1,
+ STAC_INTEL_MAC_V2,
+ STAC_INTEL_MAC_V3,
+ STAC_INTEL_MAC_V4,
+ STAC_INTEL_MAC_V5,
STAC_922X_MODELS
};
@@ -550,27 +549,33 @@ static unsigned int d945gtp5_pin_configs
0x02a19320, 0x40000100,
};
-static unsigned int macbook_pro_v1_pin_configs[10] = {
- 0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010,
- 0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e,
- 0x02a19320, 0x400000fb
-};
-
-static unsigned int macbook_pro_v2_pin_configs[10] = {
- 0x0221401f, 0x90a70120, 0x01813024, 0x01014010,
- 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e,
- 0x400000fc, 0x400000fb,
-};
-
-static unsigned int imac_intel_pin_configs[10] = {
- 0x0121e230, 0x90a70120, 0x9017e110, 0x400000fe,
- 0x400000fd, 0x0181e021, 0x1145e040, 0x400000fa,
- 0x400000fc, 0x400000fb,
-};
-
-static unsigned int imac_intel_20_pin_configs[10] = {
+static unsigned int apple_mac_v1_pin_configs[10] = {
+ 0x0121E21F, 0x400000FF, 0x9017E110, 0x400000FD,
+ 0x400000FE, 0x0181E020, 0x1145E030, 0x11C5E240,
+ 0x400000FC, 0x400000FB,
+};
+
+static unsigned int apple_mac_v2_pin_configs[10] = {
+ 0x0121E21F, 0x90A7012E, 0x9017E110, 0x400000FD,
+ 0x400000FE, 0x0181E020, 0x1145E230, 0x500000FA,
+ 0x400000FC, 0x400000FB,
+};
+
+static unsigned int apple_mac_v3_pin_configs[10] = {
0x0121E21F, 0x90A7012E, 0x9017E110, 0x400000FD,
0x400000FE, 0x0181E020, 0x1145E230, 0x11C5E240,
+ 0x400000FC, 0x400000FB,
+};
+
+static unsigned int apple_mac_v4_pin_configs[10] = {
+ 0x0321E21F, 0x03A1E02E, 0x9017E110, 0x9017E11F,
+ 0x400000FE, 0x0381E020, 0x1345E230, 0x13C5E240,
+ 0x400000FC, 0x400000FB,
+};
+
+static unsigned int apple_mac_v5_pin_configs[10] = {
+ 0x0321E21F, 0x03A1E02E, 0x9017E110, 0x9017E11F,
+ 0x400000FE, 0x0381E020, 0x1345E230, 0x13C5E240,
0x400000FC, 0x400000FB,
};
@@ -578,24 +583,22 @@ static unsigned int *stac922x_brd_tbl[ST
[STAC_D945_REF] = ref922x_pin_configs,
[STAC_D945GTP3] = d945gtp3_pin_configs,
[STAC_D945GTP5] = d945gtp5_pin_configs,
- [STAC_MACMINI] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs,
- [STAC_IMAC_INTEL] = imac_intel_pin_configs,
- [STAC_IMAC_INTEL_20] = imac_intel_20_pin_configs,
+ [STAC_INTEL_MAC_V1] = apple_mac_v1_pin_configs,
+ [STAC_INTEL_MAC_V2] = apple_mac_v2_pin_configs,
+ [STAC_INTEL_MAC_V3] = apple_mac_v3_pin_configs,
+ [STAC_INTEL_MAC_V4] = apple_mac_v4_pin_configs,
+ [STAC_INTEL_MAC_V5] = apple_mac_v5_pin_configs,
};
static const char *stac922x_models[STAC_922X_MODELS] = {
[STAC_D945_REF] = "ref",
[STAC_D945GTP5] = "5stack",
[STAC_D945GTP3] = "3stack",
- [STAC_MACMINI] = "macmini",
- [STAC_MACBOOK] = "macbook",
- [STAC_MACBOOK_PRO_V1] = "macbook-pro-v1",
- [STAC_MACBOOK_PRO_V2] = "macbook-pro",
- [STAC_IMAC_INTEL] = "imac-intel",
- [STAC_IMAC_INTEL_20] = "imac-intel-20",
+ [STAC_INTEL_MAC_V1] = "intel-mac-v1",
+ [STAC_INTEL_MAC_V2] = "intel-mac-v2",
+ [STAC_INTEL_MAC_V3] = "intel-mac-v3",
+ [STAC_INTEL_MAC_V4] = "intel-mac-v4",
+ [STAC_INTEL_MAC_V5] = "intel-mac-v5",
};
static struct snd_pci_quirk stac922x_cfg_tbl[] = {
@@ -658,7 +661,7 @@ static struct snd_pci_quirk stac922x_cfg
/* other systems */
/* Apple Mac Mini (early 2006) */
SND_PCI_QUIRK(0x8384, 0x7680,
- "Mac Mini", STAC_MACMINI),
+ "Mac Mini", STAC_INTEL_MAC_V3),
{} /* terminator */
};
@@ -2012,27 +2015,36 @@ static int patch_stac922x(struct hda_cod
spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
stac922x_models,
stac922x_cfg_tbl);
- if (spec->board_config == STAC_MACMINI) {
+ if (spec->board_config == STAC_INTEL_MAC_V3) {
spec->gpio_mute = 1;
/* Intel Macs have all same PCI SSID, so we need to check
* codec SSID to distinguish the exact models
*/
printk(KERN_INFO "hda_codec: STAC922x, Apple subsys_id=%x\n", codec->subsystem_id);
switch (codec->subsystem_id) {
- case 0x106b0a00: /* MacBook First generatoin */
- spec->board_config = STAC_MACBOOK;
+
+ case 0x106B0800:
+ spec->board_config = STAC_INTEL_MAC_V1;
break;
- case 0x106b0200: /* MacBook Pro first generation */
- spec->board_config = STAC_MACBOOK_PRO_V1;
+ case 0x106B0600:
+ case 0x106B0700:
+ spec->board_config = STAC_INTEL_MAC_V2;
break;
- case 0x106b1e00: /* MacBook Pro second generation */
- spec->board_config = STAC_MACBOOK_PRO_V2;
+ case 0x106B0E00:
+ case 0x106B0F00:
+ case 0x106B1600:
+ case 0x106B1700:
+ case 0x106B0200:
+ case 0x106B1E00:
+ spec->board_config = STAC_INTEL_MAC_V3;
break;
- case 0x106b0700: /* Intel-based iMac */
- spec->board_config = STAC_IMAC_INTEL;
+ case 0x106B1A00:
+ case 0x00000100:
+ spec->board_config = STAC_INTEL_MAC_V4;
break;
- case 0x106b1700: /* Intel iMac 20 */
- spec->board_config = STAC_IMAC_INTEL_20;
+ case 0x106b0A00:
+ case 0x106B2200:
+ spec->board_config = STAC_INTEL_MAC_V5;
break;
}
}
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Sigmatel STAC9221 - Add Configs for all Apple Intel Macs
2007-05-27 21:59 [PATCH] Sigmatel STAC9221 - Add Configs for all Apple Intel Macs Ivan N. Zlatev
@ 2007-05-29 12:21 ` Takashi Iwai
2007-05-29 12:57 ` Ivan N. Zlatev
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2007-05-29 12:21 UTC (permalink / raw)
To: Ivan N. Zlatev; +Cc: alsa-devel
At Sun, 27 May 2007 22:59:41 +0100,
Ivan N. Zlatev wrote:
>
> This patch:
> * adds the pinconfigs for all 5 Apple boards and 14 Subsystem IDs
> (support for possibly all iMac, Mac, MacMini etc etc)
> * adds "intel-mac-v1" to v5 models which replace the current
> * reflects changes in Alsa-Configuration.txt
>
> Please review. Regards.
Thanks for the patch. The changes look good but the two things I
noticed:
- Please keep the old model names and make them aliases, just points
the same pin configs
Addition is good, but removal is not -- at least, if it already
eixsts in the earlier versions. Then it's a kind of regression.
- Try to keep the lower letters in hex numbers (abcdef)
Could you fix the above and repost?
Add my address to Cc at the next time so that it certainly reaches
me.
thanks,
Takashi
> --
> Ivan N. Zlatev
>
> Web: http://www.i-nZ.net
> "It's all some kind of whacked out conspiracy."
> [2 apple_alsa.patch <text/x-patch; ANSI_X3.4-1968 (base64)>]
> diff -r 337962e19de6 Documentation/ALSA-Configuration.txt
> --- a/Documentation/ALSA-Configuration.txt Fri May 25 12:18:49 2007 +0200
> +++ b/Documentation/ALSA-Configuration.txt Sun May 27 22:20:34 2007 +0100
> @@ -923,12 +923,11 @@ Prior to version 0.9.0rc4 options had a
> ref Reference board
> 3stack D945 3stack
> 5stack D945 5stack + SPDIF
> - macmini Intel Mac Mini
> - macbook Intel Mac Book
> - macbook-pro-v1 Intel Mac Book Pro 1st generation
> - macbook-pro Intel Mac Book Pro 2nd generation
> - imac-intel Intel iMac
> - imac-intel-20 Intel iMac (newer version)
> + intel-mac-v1 Intel Mac Type 1
> + intel-mac-v2 Intel Mac Type 2
> + intel-mac-v3 Intel Mac Type 3
> + intel-mac-v4 Intel Mac Type 4
> + intel-mac-v5 Intel Mac Type 5
>
> STAC9202/9250/9251
> ref Reference board, base config
> diff -r 337962e19de6 pci/hda/patch_sigmatel.c
> --- a/pci/hda/patch_sigmatel.c Fri May 25 12:18:49 2007 +0200
> +++ b/pci/hda/patch_sigmatel.c Sun May 27 22:19:14 2007 +0100
> @@ -59,12 +59,11 @@ enum {
> STAC_D945_REF,
> STAC_D945GTP3,
> STAC_D945GTP5,
> - STAC_MACMINI,
> - STAC_MACBOOK,
> - STAC_MACBOOK_PRO_V1,
> - STAC_MACBOOK_PRO_V2,
> - STAC_IMAC_INTEL,
> - STAC_IMAC_INTEL_20,
> + STAC_INTEL_MAC_V1,
> + STAC_INTEL_MAC_V2,
> + STAC_INTEL_MAC_V3,
> + STAC_INTEL_MAC_V4,
> + STAC_INTEL_MAC_V5,
> STAC_922X_MODELS
> };
>
> @@ -550,27 +549,33 @@ static unsigned int d945gtp5_pin_configs
> 0x02a19320, 0x40000100,
> };
>
> -static unsigned int macbook_pro_v1_pin_configs[10] = {
> - 0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010,
> - 0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e,
> - 0x02a19320, 0x400000fb
> -};
> -
> -static unsigned int macbook_pro_v2_pin_configs[10] = {
> - 0x0221401f, 0x90a70120, 0x01813024, 0x01014010,
> - 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e,
> - 0x400000fc, 0x400000fb,
> -};
> -
> -static unsigned int imac_intel_pin_configs[10] = {
> - 0x0121e230, 0x90a70120, 0x9017e110, 0x400000fe,
> - 0x400000fd, 0x0181e021, 0x1145e040, 0x400000fa,
> - 0x400000fc, 0x400000fb,
> -};
> -
> -static unsigned int imac_intel_20_pin_configs[10] = {
> +static unsigned int apple_mac_v1_pin_configs[10] = {
> + 0x0121E21F, 0x400000FF, 0x9017E110, 0x400000FD,
> + 0x400000FE, 0x0181E020, 0x1145E030, 0x11C5E240,
> + 0x400000FC, 0x400000FB,
> +};
> +
> +static unsigned int apple_mac_v2_pin_configs[10] = {
> + 0x0121E21F, 0x90A7012E, 0x9017E110, 0x400000FD,
> + 0x400000FE, 0x0181E020, 0x1145E230, 0x500000FA,
> + 0x400000FC, 0x400000FB,
> +};
> +
> +static unsigned int apple_mac_v3_pin_configs[10] = {
> 0x0121E21F, 0x90A7012E, 0x9017E110, 0x400000FD,
> 0x400000FE, 0x0181E020, 0x1145E230, 0x11C5E240,
> + 0x400000FC, 0x400000FB,
> +};
> +
> +static unsigned int apple_mac_v4_pin_configs[10] = {
> + 0x0321E21F, 0x03A1E02E, 0x9017E110, 0x9017E11F,
> + 0x400000FE, 0x0381E020, 0x1345E230, 0x13C5E240,
> + 0x400000FC, 0x400000FB,
> +};
> +
> +static unsigned int apple_mac_v5_pin_configs[10] = {
> + 0x0321E21F, 0x03A1E02E, 0x9017E110, 0x9017E11F,
> + 0x400000FE, 0x0381E020, 0x1345E230, 0x13C5E240,
> 0x400000FC, 0x400000FB,
> };
>
> @@ -578,24 +583,22 @@ static unsigned int *stac922x_brd_tbl[ST
> [STAC_D945_REF] = ref922x_pin_configs,
> [STAC_D945GTP3] = d945gtp3_pin_configs,
> [STAC_D945GTP5] = d945gtp5_pin_configs,
> - [STAC_MACMINI] = macbook_pro_v1_pin_configs,
> - [STAC_MACBOOK] = macbook_pro_v1_pin_configs,
> - [STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs,
> - [STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs,
> - [STAC_IMAC_INTEL] = imac_intel_pin_configs,
> - [STAC_IMAC_INTEL_20] = imac_intel_20_pin_configs,
> + [STAC_INTEL_MAC_V1] = apple_mac_v1_pin_configs,
> + [STAC_INTEL_MAC_V2] = apple_mac_v2_pin_configs,
> + [STAC_INTEL_MAC_V3] = apple_mac_v3_pin_configs,
> + [STAC_INTEL_MAC_V4] = apple_mac_v4_pin_configs,
> + [STAC_INTEL_MAC_V5] = apple_mac_v5_pin_configs,
> };
>
> static const char *stac922x_models[STAC_922X_MODELS] = {
> [STAC_D945_REF] = "ref",
> [STAC_D945GTP5] = "5stack",
> [STAC_D945GTP3] = "3stack",
> - [STAC_MACMINI] = "macmini",
> - [STAC_MACBOOK] = "macbook",
> - [STAC_MACBOOK_PRO_V1] = "macbook-pro-v1",
> - [STAC_MACBOOK_PRO_V2] = "macbook-pro",
> - [STAC_IMAC_INTEL] = "imac-intel",
> - [STAC_IMAC_INTEL_20] = "imac-intel-20",
> + [STAC_INTEL_MAC_V1] = "intel-mac-v1",
> + [STAC_INTEL_MAC_V2] = "intel-mac-v2",
> + [STAC_INTEL_MAC_V3] = "intel-mac-v3",
> + [STAC_INTEL_MAC_V4] = "intel-mac-v4",
> + [STAC_INTEL_MAC_V5] = "intel-mac-v5",
> };
>
> static struct snd_pci_quirk stac922x_cfg_tbl[] = {
> @@ -658,7 +661,7 @@ static struct snd_pci_quirk stac922x_cfg
> /* other systems */
> /* Apple Mac Mini (early 2006) */
> SND_PCI_QUIRK(0x8384, 0x7680,
> - "Mac Mini", STAC_MACMINI),
> + "Mac Mini", STAC_INTEL_MAC_V3),
> {} /* terminator */
> };
>
> @@ -2012,27 +2015,36 @@ static int patch_stac922x(struct hda_cod
> spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
> stac922x_models,
> stac922x_cfg_tbl);
> - if (spec->board_config == STAC_MACMINI) {
> + if (spec->board_config == STAC_INTEL_MAC_V3) {
> spec->gpio_mute = 1;
> /* Intel Macs have all same PCI SSID, so we need to check
> * codec SSID to distinguish the exact models
> */
> printk(KERN_INFO "hda_codec: STAC922x, Apple subsys_id=%x\n", codec->subsystem_id);
> switch (codec->subsystem_id) {
> - case 0x106b0a00: /* MacBook First generatoin */
> - spec->board_config = STAC_MACBOOK;
> +
> + case 0x106B0800:
> + spec->board_config = STAC_INTEL_MAC_V1;
> break;
> - case 0x106b0200: /* MacBook Pro first generation */
> - spec->board_config = STAC_MACBOOK_PRO_V1;
> + case 0x106B0600:
> + case 0x106B0700:
> + spec->board_config = STAC_INTEL_MAC_V2;
> break;
> - case 0x106b1e00: /* MacBook Pro second generation */
> - spec->board_config = STAC_MACBOOK_PRO_V2;
> + case 0x106B0E00:
> + case 0x106B0F00:
> + case 0x106B1600:
> + case 0x106B1700:
> + case 0x106B0200:
> + case 0x106B1E00:
> + spec->board_config = STAC_INTEL_MAC_V3;
> break;
> - case 0x106b0700: /* Intel-based iMac */
> - spec->board_config = STAC_IMAC_INTEL;
> + case 0x106B1A00:
> + case 0x00000100:
> + spec->board_config = STAC_INTEL_MAC_V4;
> break;
> - case 0x106b1700: /* Intel iMac 20 */
> - spec->board_config = STAC_IMAC_INTEL_20;
> + case 0x106b0A00:
> + case 0x106B2200:
> + spec->board_config = STAC_INTEL_MAC_V5;
> break;
> }
> }
> [3 <text/plain; us-ascii (7bit)>]
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Sigmatel STAC9221 - Add Configs for all Apple Intel Macs
2007-05-29 12:21 ` Takashi Iwai
@ 2007-05-29 12:57 ` Ivan N. Zlatev
2007-05-29 13:07 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Ivan N. Zlatev @ 2007-05-29 12:57 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
Patch updated not to remove old models, but to rather alias them with
lowercase pinconfigs.
Regards.
--
Ivan N. Zlatev
Web: http://www.i-nZ.net
"It's all some kind of whacked out conspiracy."
[-- Attachment #2: apple_alsa.patch --]
[-- Type: text/x-patch, Size: 5510 bytes --]
diff -r 337962e19de6 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c Fri May 25 12:18:49 2007 +0200
+++ b/pci/hda/patch_sigmatel.c Tue May 29 13:56:39 2007 +0100
@@ -59,6 +59,12 @@ enum {
STAC_D945_REF,
STAC_D945GTP3,
STAC_D945GTP5,
+ STAC_INTEL_MAC_V1,
+ STAC_INTEL_MAC_V2,
+ STAC_INTEL_MAC_V3,
+ STAC_INTEL_MAC_V4,
+ STAC_INTEL_MAC_V5,
+ /* for backward compitability */
STAC_MACMINI,
STAC_MACBOOK,
STAC_MACBOOK_PRO_V1,
@@ -550,46 +556,64 @@ static unsigned int d945gtp5_pin_configs
0x02a19320, 0x40000100,
};
-static unsigned int macbook_pro_v1_pin_configs[10] = {
- 0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010,
- 0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e,
- 0x02a19320, 0x400000fb
-};
-
-static unsigned int macbook_pro_v2_pin_configs[10] = {
- 0x0221401f, 0x90a70120, 0x01813024, 0x01014010,
- 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e,
+static unsigned int intel_mac_v1_pin_configs[10] = {
+ 0x0121e21f, 0x400000ff, 0x9017e110, 0x400000fd,
+ 0x400000fe, 0x0181e020, 0x1145e030, 0x11c5e240,
0x400000fc, 0x400000fb,
};
-static unsigned int imac_intel_pin_configs[10] = {
- 0x0121e230, 0x90a70120, 0x9017e110, 0x400000fe,
- 0x400000fd, 0x0181e021, 0x1145e040, 0x400000fa,
+static unsigned int intel_mac_v2_pin_configs[10] = {
+ 0x0121e21f, 0x90a7012e, 0x9017e110, 0x400000fd,
+ 0x400000fe, 0x0181e020, 0x1145e230, 0x500000fa,
0x400000fc, 0x400000fb,
};
-static unsigned int imac_intel_20_pin_configs[10] = {
- 0x0121E21F, 0x90A7012E, 0x9017E110, 0x400000FD,
- 0x400000FE, 0x0181E020, 0x1145E230, 0x11C5E240,
- 0x400000FC, 0x400000FB,
+static unsigned int intel_mac_v3_pin_configs[10] = {
+ 0x0121e21f, 0x90a7012e, 0x9017e110, 0x400000fd,
+ 0x400000fe, 0x0181e020, 0x1145e230, 0x11c5e240,
+ 0x400000fc, 0x400000fb,
+};
+
+static unsigned int intel_mac_v4_pin_configs[10] = {
+ 0x0321e21f, 0x03a1e02e, 0x9017e110, 0x9017e11f,
+ 0x400000fe, 0x0381e020, 0x1345e230, 0x13c5e240,
+ 0x400000fc, 0x400000fb,
+};
+
+static unsigned int intel_mac_v5_pin_configs[10] = {
+ 0x0321e21f, 0x03a1e02e, 0x9017e110, 0x9017e11f,
+ 0x400000fe, 0x0381e020, 0x1345e230, 0x13c5e240,
+ 0x400000fc, 0x400000fb,
};
static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
[STAC_D945_REF] = ref922x_pin_configs,
[STAC_D945GTP3] = d945gtp3_pin_configs,
[STAC_D945GTP5] = d945gtp5_pin_configs,
- [STAC_MACMINI] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs,
- [STAC_IMAC_INTEL] = imac_intel_pin_configs,
- [STAC_IMAC_INTEL_20] = imac_intel_20_pin_configs,
+ [STAC_INTEL_MAC_V1] = intel_mac_v1_pin_configs,
+ [STAC_INTEL_MAC_V2] = intel_mac_v2_pin_configs,
+ [STAC_INTEL_MAC_V3] = intel_mac_v3_pin_configs,
+ [STAC_INTEL_MAC_V4] = intel_mac_v4_pin_configs,
+ [STAC_INTEL_MAC_V5] = intel_mac_v5_pin_configs,
+ /* for backward compitability */
+ [STAC_MACMINI] = intel_mac_v3_pin_configs,
+ [STAC_MACBOOK] = intel_mac_v5_pin_configs,
+ [STAC_MACBOOK_PRO_V1] = intel_mac_v3_pin_configs,
+ [STAC_MACBOOK_PRO_V2] = intel_mac_v3_pin_configs,
+ [STAC_IMAC_INTEL] = intel_mac_v2_pin_configs,
+ [STAC_IMAC_INTEL_20] = intel_mac_v3_pin_configs,
};
static const char *stac922x_models[STAC_922X_MODELS] = {
[STAC_D945_REF] = "ref",
[STAC_D945GTP5] = "5stack",
[STAC_D945GTP3] = "3stack",
+ [STAC_INTEL_MAC_V1] = "intel-mac-v1",
+ [STAC_INTEL_MAC_V2] = "intel-mac-v2",
+ [STAC_INTEL_MAC_V3] = "intel-mac-v3",
+ [STAC_INTEL_MAC_V4] = "intel-mac-v4",
+ [STAC_INTEL_MAC_V5] = "intel-mac-v5",
+ /* for backward compitability */
[STAC_MACMINI] = "macmini",
[STAC_MACBOOK] = "macbook",
[STAC_MACBOOK_PRO_V1] = "macbook-pro-v1",
@@ -658,7 +682,7 @@ static struct snd_pci_quirk stac922x_cfg
/* other systems */
/* Apple Mac Mini (early 2006) */
SND_PCI_QUIRK(0x8384, 0x7680,
- "Mac Mini", STAC_MACMINI),
+ "Mac Mini", STAC_INTEL_MAC_V3),
{} /* terminator */
};
@@ -2012,27 +2036,36 @@ static int patch_stac922x(struct hda_cod
spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
stac922x_models,
stac922x_cfg_tbl);
- if (spec->board_config == STAC_MACMINI) {
+ if (spec->board_config == STAC_INTEL_MAC_V3) {
spec->gpio_mute = 1;
/* Intel Macs have all same PCI SSID, so we need to check
* codec SSID to distinguish the exact models
*/
printk(KERN_INFO "hda_codec: STAC922x, Apple subsys_id=%x\n", codec->subsystem_id);
switch (codec->subsystem_id) {
- case 0x106b0a00: /* MacBook First generatoin */
- spec->board_config = STAC_MACBOOK;
+
+ case 0x106B0800:
+ spec->board_config = STAC_INTEL_MAC_V1;
break;
- case 0x106b0200: /* MacBook Pro first generation */
- spec->board_config = STAC_MACBOOK_PRO_V1;
+ case 0x106B0600:
+ case 0x106B0700:
+ spec->board_config = STAC_INTEL_MAC_V2;
break;
- case 0x106b1e00: /* MacBook Pro second generation */
- spec->board_config = STAC_MACBOOK_PRO_V2;
+ case 0x106B0E00:
+ case 0x106B0F00:
+ case 0x106B1600:
+ case 0x106B1700:
+ case 0x106B0200:
+ case 0x106B1E00:
+ spec->board_config = STAC_INTEL_MAC_V3;
break;
- case 0x106b0700: /* Intel-based iMac */
- spec->board_config = STAC_IMAC_INTEL;
+ case 0x106B1A00:
+ case 0x00000100:
+ spec->board_config = STAC_INTEL_MAC_V4;
break;
- case 0x106b1700: /* Intel iMac 20 */
- spec->board_config = STAC_IMAC_INTEL_20;
+ case 0x106b0A00:
+ case 0x106B2200:
+ spec->board_config = STAC_INTEL_MAC_V5;
break;
}
}
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Sigmatel STAC9221 - Add Configs for all Apple Intel Macs
2007-05-29 12:57 ` Ivan N. Zlatev
@ 2007-05-29 13:07 ` Takashi Iwai
2007-05-29 13:38 ` Ivan N. Zlatev
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2007-05-29 13:07 UTC (permalink / raw)
To: Ivan N. Zlatev; +Cc: alsa-devel
At Tue, 29 May 2007 13:57:38 +0100,
Ivan N. Zlatev wrote:
>
> Patch updated not to remove old models, but to rather alias them with
> lowercase pinconfigs.
The patch looks good. Could you give a final changelog your sign-off?
(sorry I forgot to mention) It's a formal requirement for merging to
the upstream.
Thanks,
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Sigmatel STAC9221 - Add Configs for all Apple Intel Macs
2007-05-29 13:07 ` Takashi Iwai
@ 2007-05-29 13:38 ` Ivan N. Zlatev
2007-05-29 14:29 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Ivan N. Zlatev @ 2007-05-29 13:38 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
On 5/29/07, Takashi Iwai <tiwai@suse.de> wrote:
> At Tue, 29 May 2007 13:57:38 +0100,
> Ivan N. Zlatev wrote:
> >
> > Patch updated not to remove old models, but to rather alias them with
> > lowercase pinconfigs.
>
> The patch looks good. Could you give a final changelog your sign-off?
> (sorry I forgot to mention) It's a formal requirement for merging to
> the upstream.
>
Actually I forgot to lowercase the subystem ids and do diff the
ALSA-Configuration.txt. Also this time the patch is actually an "hg
export tip" one with a changelog entry and sign-off. I hope that's
what you wanted, else just to make sure:
This patch is contributed under the GPL license.
Signed-off-by: Ivan N. Zlatev <contact i-nz.net>
Regards.
--
Ivan N. Zlatev
Web: http://www.i-nZ.net
"It's all some kind of whacked out conspiracy."
[-- Attachment #2: apple_alsa.patch --]
[-- Type: text/x-patch, Size: 6449 bytes --]
# HG changeset patch
# User Ivan N. Zlatev <contact@i-nz.net>
# Date 1180445702 -3600
# Node ID d6aa28c114b6ede49dfa749ef4645b07da8b4cdc
# Parent e82e1f692927123843dadcfb1115c965bff2120d
hda-intel - Add support for many Intel Macs.
Signed-off-by: Ivan N. Zlatev <contact@i-nz.net>
diff -r e82e1f692927 -r d6aa28c114b6 Documentation/ALSA-Configuration.txt
--- a/Documentation/ALSA-Configuration.txt Mon May 21 12:41:29 2007 +0200
+++ b/Documentation/ALSA-Configuration.txt Tue May 29 14:35:02 2007 +0100
@@ -918,6 +918,11 @@ Prior to version 0.9.0rc4 options had a
ref Reference board
3stack D945 3stack
5stack D945 5stack + SPDIF
+ intel-mac-v1 Intel Mac Type 1
+ intel-mac-v2 Intel Mac Type 2
+ intel-mac-v3 Intel Mac Type 3
+ intel-mac-v4 Intel Mac Type 4
+ intel-mac-v5 Intel Mac Type 5
macmini Intel Mac Mini
macbook Intel Mac Book
macbook-pro-v1 Intel Mac Book Pro 1st generation
diff -r e82e1f692927 -r d6aa28c114b6 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c Mon May 21 12:41:29 2007 +0200
+++ b/pci/hda/patch_sigmatel.c Tue May 29 14:35:02 2007 +0100
@@ -59,6 +59,12 @@ enum {
STAC_D945_REF,
STAC_D945GTP3,
STAC_D945GTP5,
+ STAC_INTEL_MAC_V1,
+ STAC_INTEL_MAC_V2,
+ STAC_INTEL_MAC_V3,
+ STAC_INTEL_MAC_V4,
+ STAC_INTEL_MAC_V5,
+ /* for backward compitability */
STAC_MACMINI,
STAC_MACBOOK,
STAC_MACBOOK_PRO_V1,
@@ -550,46 +556,64 @@ static unsigned int d945gtp5_pin_configs
0x02a19320, 0x40000100,
};
-static unsigned int macbook_pro_v1_pin_configs[10] = {
- 0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010,
- 0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e,
- 0x02a19320, 0x400000fb
-};
-
-static unsigned int macbook_pro_v2_pin_configs[10] = {
- 0x0221401f, 0x90a70120, 0x01813024, 0x01014010,
- 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e,
+static unsigned int intel_mac_v1_pin_configs[10] = {
+ 0x0121e21f, 0x400000ff, 0x9017e110, 0x400000fd,
+ 0x400000fe, 0x0181e020, 0x1145e030, 0x11c5e240,
0x400000fc, 0x400000fb,
};
-static unsigned int imac_intel_pin_configs[10] = {
- 0x0121e230, 0x90a70120, 0x9017e110, 0x400000fe,
- 0x400000fd, 0x0181e021, 0x1145e040, 0x400000fa,
+static unsigned int intel_mac_v2_pin_configs[10] = {
+ 0x0121e21f, 0x90a7012e, 0x9017e110, 0x400000fd,
+ 0x400000fe, 0x0181e020, 0x1145e230, 0x500000fa,
0x400000fc, 0x400000fb,
};
-static unsigned int imac_intel_20_pin_configs[10] = {
- 0x0121E21F, 0x90A7012E, 0x9017E110, 0x400000FD,
- 0x400000FE, 0x0181E020, 0x1145E230, 0x11C5E240,
- 0x400000FC, 0x400000FB,
+static unsigned int intel_mac_v3_pin_configs[10] = {
+ 0x0121e21f, 0x90a7012e, 0x9017e110, 0x400000fd,
+ 0x400000fe, 0x0181e020, 0x1145e230, 0x11c5e240,
+ 0x400000fc, 0x400000fb,
+};
+
+static unsigned int intel_mac_v4_pin_configs[10] = {
+ 0x0321e21f, 0x03a1e02e, 0x9017e110, 0x9017e11f,
+ 0x400000fe, 0x0381e020, 0x1345e230, 0x13c5e240,
+ 0x400000fc, 0x400000fb,
+};
+
+static unsigned int intel_mac_v5_pin_configs[10] = {
+ 0x0321e21f, 0x03a1e02e, 0x9017e110, 0x9017e11f,
+ 0x400000fe, 0x0381e020, 0x1345e230, 0x13c5e240,
+ 0x400000fc, 0x400000fb,
};
static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
[STAC_D945_REF] = ref922x_pin_configs,
[STAC_D945GTP3] = d945gtp3_pin_configs,
[STAC_D945GTP5] = d945gtp5_pin_configs,
- [STAC_MACMINI] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs,
- [STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs,
- [STAC_IMAC_INTEL] = imac_intel_pin_configs,
- [STAC_IMAC_INTEL_20] = imac_intel_20_pin_configs,
+ [STAC_INTEL_MAC_V1] = intel_mac_v1_pin_configs,
+ [STAC_INTEL_MAC_V2] = intel_mac_v2_pin_configs,
+ [STAC_INTEL_MAC_V3] = intel_mac_v3_pin_configs,
+ [STAC_INTEL_MAC_V4] = intel_mac_v4_pin_configs,
+ [STAC_INTEL_MAC_V5] = intel_mac_v5_pin_configs,
+ /* for backward compitability */
+ [STAC_MACMINI] = intel_mac_v3_pin_configs,
+ [STAC_MACBOOK] = intel_mac_v5_pin_configs,
+ [STAC_MACBOOK_PRO_V1] = intel_mac_v3_pin_configs,
+ [STAC_MACBOOK_PRO_V2] = intel_mac_v3_pin_configs,
+ [STAC_IMAC_INTEL] = intel_mac_v2_pin_configs,
+ [STAC_IMAC_INTEL_20] = intel_mac_v3_pin_configs,
};
static const char *stac922x_models[STAC_922X_MODELS] = {
[STAC_D945_REF] = "ref",
[STAC_D945GTP5] = "5stack",
[STAC_D945GTP3] = "3stack",
+ [STAC_INTEL_MAC_V1] = "intel-mac-v1",
+ [STAC_INTEL_MAC_V2] = "intel-mac-v2",
+ [STAC_INTEL_MAC_V3] = "intel-mac-v3",
+ [STAC_INTEL_MAC_V4] = "intel-mac-v4",
+ [STAC_INTEL_MAC_V5] = "intel-mac-v5",
+ /* for backward compitability */
[STAC_MACMINI] = "macmini",
[STAC_MACBOOK] = "macbook",
[STAC_MACBOOK_PRO_V1] = "macbook-pro-v1",
@@ -658,7 +682,7 @@ static struct snd_pci_quirk stac922x_cfg
/* other systems */
/* Apple Mac Mini (early 2006) */
SND_PCI_QUIRK(0x8384, 0x7680,
- "Mac Mini", STAC_MACMINI),
+ "Mac Mini", STAC_INTEL_MAC_V3),
{} /* terminator */
};
@@ -2012,27 +2036,36 @@ static int patch_stac922x(struct hda_cod
spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
stac922x_models,
stac922x_cfg_tbl);
- if (spec->board_config == STAC_MACMINI) {
+ if (spec->board_config == STAC_INTEL_MAC_V3) {
spec->gpio_mute = 1;
/* Intel Macs have all same PCI SSID, so we need to check
* codec SSID to distinguish the exact models
*/
printk(KERN_INFO "hda_codec: STAC922x, Apple subsys_id=%x\n", codec->subsystem_id);
switch (codec->subsystem_id) {
- case 0x106b0a00: /* MacBook First generatoin */
- spec->board_config = STAC_MACBOOK;
+
+ case 0x106B0800:
+ spec->board_config = STAC_INTEL_MAC_V1;
break;
- case 0x106b0200: /* MacBook Pro first generation */
- spec->board_config = STAC_MACBOOK_PRO_V1;
+ case 0x106b0600:
+ case 0x106b0700:
+ spec->board_config = STAC_INTEL_MAC_V2;
break;
- case 0x106b1e00: /* MacBook Pro second generation */
- spec->board_config = STAC_MACBOOK_PRO_V2;
+ case 0x106b0e00:
+ case 0x106b0f00:
+ case 0x106b1600:
+ case 0x106b1700:
+ case 0x106b0200:
+ case 0x106b1e00:
+ spec->board_config = STAC_INTEL_MAC_V3;
break;
- case 0x106b0700: /* Intel-based iMac */
- spec->board_config = STAC_IMAC_INTEL;
+ case 0x106b1a00:
+ case 0x00000100:
+ spec->board_config = STAC_INTEL_MAC_V4;
break;
- case 0x106b1700: /* Intel iMac 20 */
- spec->board_config = STAC_IMAC_INTEL_20;
+ case 0x106b0a00:
+ case 0x106b2200:
+ spec->board_config = STAC_INTEL_MAC_V5;
break;
}
}
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Sigmatel STAC9221 - Add Configs for all Apple Intel Macs
2007-05-29 13:38 ` Ivan N. Zlatev
@ 2007-05-29 14:29 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2007-05-29 14:29 UTC (permalink / raw)
To: Ivan N. Zlatev; +Cc: alsa-devel
At Tue, 29 May 2007 14:38:54 +0100,
Ivan N. Zlatev wrote:
>
> On 5/29/07, Takashi Iwai <tiwai@suse.de> wrote:
> > At Tue, 29 May 2007 13:57:38 +0100,
> > Ivan N. Zlatev wrote:
> > >
> > > Patch updated not to remove old models, but to rather alias them with
> > > lowercase pinconfigs.
> >
> > The patch looks good. Could you give a final changelog your sign-off?
> > (sorry I forgot to mention) It's a formal requirement for merging to
> > the upstream.
> >
>
> Actually I forgot to lowercase the subystem ids and do diff the
> ALSA-Configuration.txt. Also this time the patch is actually an "hg
> export tip" one with a changelog entry and sign-off. I hope that's
> what you wanted, else just to make sure:
>
> This patch is contributed under the GPL license.
> Signed-off-by: Ivan N. Zlatev <contact i-nz.net>
Well, I meant a changelog as the list or description of changes you
made, like your first post :) Anyway, I gathered it from there,
tidied it up, and committed to ALSA tree now. Could you please check
the HG tree whether it works for you?
Thanks!
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-29 14:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-27 21:59 [PATCH] Sigmatel STAC9221 - Add Configs for all Apple Intel Macs Ivan N. Zlatev
2007-05-29 12:21 ` Takashi Iwai
2007-05-29 12:57 ` Ivan N. Zlatev
2007-05-29 13:07 ` Takashi Iwai
2007-05-29 13:38 ` Ivan N. Zlatev
2007-05-29 14:29 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).