* Macmini pins in sigmatel_audio [not found] ` <20070315185433.GA10186@dose.home.local> @ 2007-03-16 9:50 ` Nicolas Boichat 2007-03-16 11:08 ` Takashi Iwai 0 siblings, 1 reply; 4+ messages in thread From: Nicolas Boichat @ 2007-03-16 9:50 UTC (permalink / raw) To: tiwai; +Cc: alsa-devel, mactel-linux-devel, Tino Keitel 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 <nicolas@boichat.ch> --- 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Macmini pins in sigmatel_audio 2007-03-16 9:50 ` Macmini pins in sigmatel_audio Nicolas Boichat @ 2007-03-16 11:08 ` Takashi Iwai 2007-03-16 14:28 ` [Alsa-devel] " Takashi Iwai 2007-03-17 5:58 ` Nicolas Boichat 0 siblings, 2 replies; 4+ messages in thread From: Takashi Iwai @ 2007-03-16 11:08 UTC (permalink / raw) To: Nicolas Boichat; +Cc: alsa-devel, mactel-linux-devel, Tino Keitel At Fri, 16 Mar 2007 17:50:33 +0800, Nicolas Boichat wrote: > > 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, Grrr, someone should have informed us. I didn't know of this. > 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 > > Best regards, > > Nicolas > > Fix audio on Macmini and Macbook. > > Signed-off-by: Nicolas Boichat <nicolas@boichat.ch> > > --- > > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Alsa-devel] Macmini pins in sigmatel_audio 2007-03-16 11:08 ` Takashi Iwai @ 2007-03-16 14:28 ` Takashi Iwai 2007-03-17 5:58 ` Nicolas Boichat 1 sibling, 0 replies; 4+ messages in thread From: Takashi Iwai @ 2007-03-16 14:28 UTC (permalink / raw) To: Nicolas Boichat; +Cc: Tino Keitel, mactel-linux-devel, alsa-devel At Fri, 16 Mar 2007 12:08:08 +0100, I wrote: > > At Fri, 16 Mar 2007 17:50:33 +0800, > Nicolas Boichat wrote: > > > > 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, > > Grrr, someone should have informed us. I didn't know of this. > > > 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? 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 diff -r 530b211fffdb pci/hda/patch_sigmatel.c --- a/pci/hda/patch_sigmatel.c Fri Mar 16 15:01:36 2007 +0100 +++ b/pci/hda/patch_sigmatel.c Fri Mar 16 15:04:06 2007 +0100 @@ -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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Macmini pins in sigmatel_audio 2007-03-16 11:08 ` Takashi Iwai 2007-03-16 14:28 ` [Alsa-devel] " Takashi Iwai @ 2007-03-17 5:58 ` Nicolas Boichat 1 sibling, 0 replies; 4+ messages in thread From: Nicolas Boichat @ 2007-03-17 5:58 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel, mactel-linux-devel, Tino Keitel Hi, Takashi Iwai wrote: > At Fri, 16 Mar 2007 17:50:33 +0800, > Nicolas Boichat wrote: >> 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, > > 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... >> 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. > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-03-17 5:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1HRY1h-0003Y6-2M@sc8-pr-svn1.sourceforge.net>
[not found] ` <20070314192940.GA18255@dose.home.local>
[not found] ` <45F8DD78.9020508@boichat.ch>
[not found] ` <20070315080134.GA22654@dose.home.local>
[not found] ` <45F91C0E.7020600@boichat.ch>
[not found] ` <20070315185433.GA10186@dose.home.local>
2007-03-16 9:50 ` Macmini pins in sigmatel_audio Nicolas Boichat
2007-03-16 11:08 ` Takashi Iwai
2007-03-16 14:28 ` [Alsa-devel] " Takashi Iwai
2007-03-17 5:58 ` Nicolas Boichat
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox