Hi,
I just got this input from a Macmini user (subsys id: 0x106b0800), after
asking him to try different pins settings. (the sound doesn't work
properly with a vanilla 2.6.21-rc3 kernel)
Tino Keitel wrote:
> On Thu, Mar 15, 2007 at 18:12:30 +0800, Nicolas Boichat wrote:
>
> [...]
>
>
>> Considered it worked with the mactel patches, you should try
>> STAC_MACBOOK_PRO_V1 first....
>>
>
> You are right, with STAC_MACBOOK_PRO_V1 I can use all required
> features. Here are the results:
>
> - analog line in works, if "Line In as Output" is muted
>
> - analog line out works, it is controlled by the "Front" channel in
> alsamixer
>
> - digital line out works
>
> - the internal speaker works, it is controlled by the "Master" channel
> in alsamixer
>
> - the internal speaker is silent if there is an analog plug in line out
>
> - the internal speker still works if a (optical) digital cable is
> plugged in line out, I guess because the optical plastic cable
> doesn't short circuit the line out plug
>
> Minor glitches:
>
> There is an input selector that has the options "Line", "Mic" and
> "Front Mic". However, I think that only "Line" is really usable, as I
> had so signal when I connected a Mic to line in and a "Front Mic" is
> also not present in the mini.
>
> There is a "Mic as output" switch in alsamixer, but there is not "Mic"
> jack.
>
Considering these pins have been used for a long time on mactel-linux,
and that they are working fine with MacBook (1st generation at least),
Macmini and Macbook Pro (1st generation only), I think the following
patch is appropriate (please apply it after the patch sent yesterday).
Best regards,
Nicolas
Fix audio on Macmini and Macbook.
Signed-off-by: Nicolas Boichat <[EMAIL PROTECTED]>
---
Documentation/sound/alsa/ALSA-Configuration.txt | 5 ++--
sound/pci/hda/patch_sigmatel.c | 27 +++++------------------
2 files changed, 8 insertions(+), 24 deletions(-)
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt
b/Documentation/sound/alsa/ALSA-Configuration.txt
index 438f3fe..c13885a 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -904,9 +904,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This
was removed.
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
+ mac Intel Mac
+ (Mac Mini, Mac Book, Mac Book Pro 1st generation)
macbook-pro Intel Mac Book Pro 2nd generation
STAC9202/9250/9251
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 2d78a9f..1293632 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -58,9 +58,7 @@ enum {
STAC_D945_REF,
STAC_D945GTP3,
STAC_D945GTP5,
- STAC_MACMINI,
- STAC_MACBOOK,
- STAC_MACBOOK_PRO_V1,
+ STAC_MAC,
STAC_MACBOOK_PRO_V2,
STAC_922X_MODELS
};
@@ -524,13 +522,7 @@ static unsigned int d945gtp5_pin_configs[10] = {
0x02a19320, 0x40000100,
};
-static unsigned int macbook_pin_configs[10] = {
- 0x0321e230, 0x03a1e020, 0x400000fd, 0x9017e110,
- 0x400000fe, 0x0381e021, 0x1345e240, 0x13c5e22e,
- 0x400000fc, 0x400000fb,
-};
-
-static unsigned int macbook_pro_v1_pin_configs[10] = {
+static unsigned int mac_pin_configs[10] = {
0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010,
0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e,
0x02a19320, 0x400000fb
@@ -546,9 +538,7 @@ 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] = d945gtp5_pin_configs,
- [STAC_MACBOOK] = macbook_pin_configs,
- [STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs,
+ [STAC_MAC] = mac_pin_configs,
[STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs,
};
@@ -556,9 +546,7 @@ 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_MAC] = "mac",
[STAC_MACBOOK_PRO_V2] = "macbook-pro",
};
@@ -622,7 +610,7 @@ static struct snd_pci_quirk stac922x_cfg_tbl[] = {
/* other systems */
/* Apple Mac Mini (early 2006) */
SND_PCI_QUIRK(0x8384, 0x7680,
- "Mac Mini", STAC_MACMINI),
+ "Intel Mac", STAC_MAC),
{} /* terminator */
};
@@ -1893,16 +1881,13 @@ static int patch_stac922x(struct hda_codec *codec)
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_MAC) {
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 0x106b0200: /* MacBook Pro first generation */
- spec->board_config = STAC_MACBOOK_PRO_V1;
- break;
case 0x106b1e00: /* MacBook Pro second generation */
spec->board_config = STAC_MACBOOK_PRO_V2;
break;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mactel-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel