Macmini pins in sigmatel_audio
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
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)
Quoted 30 lines · Tino Keitel
On Thu, Mar 15, 2007 at 18:12:30 +0800, Nicolas Boichat wrote:
[...]
Quoted 3 lines
Considered it worked with the mactel patches, you should try
STAC_MACBOOK_PRO_V1first....You are right, with
STAC_MACBOOK_PRO_V1I 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:
Quoted 8 lines
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.
---
Documentation/sound/alsa/ALSA-Configuration.txt | 5 ++-- sound/pci/hda/patch_sigmatel.c | 27 +++++------------------ 2 files changed, 8 insertions(+), 24 deletions(-)
Documentation/sound/alsa/ALSA-Configuration.txt +2 -3
@@ -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
sound/pci/hda/patch_sigmatel.c +6 -21
@@ -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
At Fri, 16 Mar 2007 17:50:33 +0800,
Quoted 43 lines · Nicolas Boichat
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)Quoted 35 lines · Tino Keitel
On Thu, Mar 15, 2007 at 18:12:30 +0800, Nicolas Boichat wrote:
[...]
Quoted 3 lines
Considered it worked with the mactel patches, you should try
STAC_MACBOOK_PRO_V1first....You are right, with
STAC_MACBOOK_PRO_V1I 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.
Quoted 4 lines
Quoted 3 lines
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,
Grrr, someone should have informed us. I didn't know of this.
Quoted 3 lines
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).
But the glitches above don't appear on your macbook-pro-v1, right? Then I suppose macmini requires slightly different pin configs for inputs. As for now, I think it's OK to use macbook-pro-v1 pin configs for macmini since it's much better. So, how about to just keep the models and change the pin definitions to use the same table?
thanks,
Takashi
Quoted 102 lines
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(-)Documentation/sound/alsa/ALSA-Configuration.txt +2
-3@@ -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/9251sound/pci/hda/patch_sigmatel.c +6
-18@@ -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
sound/pci/hda/patch_sigmatel.c static int patch_stac922x(struct hda_codec *codec) · line 1893
Quoted 10 lines
sound/pci/hda/patch_sigmatel.c +0
-3* 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
At Fri, 16 Mar 2007 12:08:08 +0100,
Quoted 57 lines · I wrote:
At Fri, 16 Mar 2007 17:50:33 +0800,
Quoted 43 lines · Nicolas Boichat
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)Quoted 35 lines · Tino Keitel
On Thu, Mar 15, 2007 at 18:12:30 +0800, Nicolas Boichat wrote:
[...]
Quoted 3 lines
Considered it worked with the mactel patches, you should try
STAC_MACBOOK_PRO_V1first....You are right, with
STAC_MACBOOK_PRO_V1I 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.
Quoted 4 lines
Quoted 3 lines
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,
Grrr, someone should have informed us. I didn't know of this.
Quoted 3 lines
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).
Quoted 5 lines
But the glitches above don't appear on your macbook-pro-v1, right? Then I suppose macmini requires slightly different pin configs for inputs. As for now, I think it's OK to use macbook-pro-v1 pin configs for macmini since it's much better. So, how about to just keep the models and change the pin definitions to use the same table?
Well, what I meant is simpler fix like below.
In case, macmini or macbook has any slightly incompatible pin configs, it can have again its own pin config table easily.
Takashi
pci/hda/patch_sigmatel.c +2 -8
@@ -524,12 +524,6 @@ static unsigned int d945gtp5_pin_configs 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 ] = {0x0321e230 ,0x03a1e020 ,0x9017e110 ,0x01014010 ,0x01a19021 ,0x0381e021 ,0x1345e240 ,0x13c5e22e ,
@@ -546,8 +540,8 @@ 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] = d945gtp5_pin_configs, - [STAC_MACBOOK] = macbook_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, };
-------------------------------------------------------------------------
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
Hi,
Quoted 43 lines · Takashi Iwai
At Fri, 16 Mar 2007 17:50:33 +0800,
Quoted 41 lines · Nicolas Boichat
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)Quoted 34 lines · Tino Keitel
On Thu, Mar 15, 2007 at 18:12:30 +0800, Nicolas Boichat wrote:
[...]
Quoted 3 lines
Considered it worked with the mactel patches, you should try
STAC_MACBOOK_PRO_V1first....You are right, with
STAC_MACBOOK_PRO_V1I 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.
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
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,
Grrr, someone should have informed us. I didn't know of this.
Sorry... Was quite busy recently, and I'm trying to get all our patches upstream now...
Quoted 5 lines
Quoted 3 lines
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).
But the glitches above don't appear on your macbook-pro-v1, right?
Yeah I have some glitches too... For "Input source" I have "Front Mic", "Mic" and "Line", while only "Mic" and "Line" are useful. I also have a Mic as Output which is not relevant (no Mic jack)... I'll try to have a look at this.
Also, to get the Mic to work, even if the "Input Source" is set to Mic at boot time, I have to switch to Line or Front Mic and then back to Mic.
Quoted 4 lines
Then I suppose macmini requires slightly different pin configs for inputs. As for now, I think it's OK to use macbook-pro-v1 pin configs for macmini since it's much better. So, how about to just keep the models and change the pin definitions to use the same table?
I saw your patch. Thx.
Best regards,
Nicolas
-------------------------------------------------------------------------
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