All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Enable HP output on nVidia Corporation MCP79 HDA (rev b1) (Macbook Pro 5, 5)
@ 2009-07-30 12:44 Stelian Pop
  2009-07-30 12:49 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Stelian Pop @ 2009-07-30 12:44 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Andreas Nüßlein, alsa-devel

Hi,

The patch below, to be applied on the latest sound-unstable-2.6.git,
enables headphones output on my MacBookPro 5,5, together with the
automuting feature.

Here is the exact soundcard id:
	Vendor Id: 0x10134206
	Subsystem Id: 0x106b4d00
	Revision Id: 0x100301

Thanks for the previous efforts to make this work !

Stelian.

diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index f552738..09be633 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -832,6 +832,12 @@ static void cs_automute(struct hda_codec *codec)
 				    AC_VERB_SET_PIN_WIDGET_CONTROL,
 				    hp_present ? 0 : PIN_OUT);
 	}
+	if (spec->board_config == CS420X_MBP55) {
+		if (hp_present)
+			snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 0x2);
+		else
+			snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 0x8);
+	}
 }
 
 static void cs_automic(struct hda_codec *codec)
@@ -1133,10 +1139,10 @@ static int patch_cs420x(struct hda_codec *codec)
 
 	switch (spec->board_config) {
 	case CS420X_MBP55:
-		/* GPIO3 = EAPD? */
-		spec->gpio_mask = 0x08;
-		spec->gpio_dir = 0x08;
-		spec->gpio_data = 0x08;
+		/* GPIO1 = headphones */
+		/* GPIO3 = speakers */
+		spec->gpio_mask = 0x0a;
+		spec->gpio_dir = 0x0a;
 		break;
 	}
 

-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Enable HP output on nVidia Corporation MCP79 HDA (rev b1) (Macbook Pro 5, 5)
  2009-07-30 12:44 [PATCH] Enable HP output on nVidia Corporation MCP79 HDA (rev b1) (Macbook Pro 5, 5) Stelian Pop
@ 2009-07-30 12:49 ` Takashi Iwai
  2009-07-30 13:05   ` Stelian Pop
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2009-07-30 12:49 UTC (permalink / raw)
  To: Stelian Pop; +Cc: Andreas Nüßlein, alsa-devel

At Thu, 30 Jul 2009 14:44:27 +0200,
Stelian Pop wrote:
> 
> Hi,
> 
> The patch below, to be applied on the latest sound-unstable-2.6.git,
> enables headphones output on my MacBookPro 5,5, together with the
> automuting feature.
> 
> Here is the exact soundcard id:
> 	Vendor Id: 0x10134206
> 	Subsystem Id: 0x106b4d00
> 	Revision Id: 0x100301
> 
> Thanks for the previous efforts to make this work !

Great, this is *the* missing piece!

I'm going to merge the hda-cirrus patch back to the (stable) sound GIT
tree so that it'll be merged into the next 2.6.32 kernel.


Thanks!

Takashi


> 
> Stelian.
> 
> diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
> index f552738..09be633 100644
> --- a/sound/pci/hda/patch_cirrus.c
> +++ b/sound/pci/hda/patch_cirrus.c
> @@ -832,6 +832,12 @@ static void cs_automute(struct hda_codec *codec)
>  				    AC_VERB_SET_PIN_WIDGET_CONTROL,
>  				    hp_present ? 0 : PIN_OUT);
>  	}
> +	if (spec->board_config == CS420X_MBP55) {
> +		if (hp_present)
> +			snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 0x2);
> +		else
> +			snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 0x8);
> +	}
>  }
>  
>  static void cs_automic(struct hda_codec *codec)
> @@ -1133,10 +1139,10 @@ static int patch_cs420x(struct hda_codec *codec)
>  
>  	switch (spec->board_config) {
>  	case CS420X_MBP55:
> -		/* GPIO3 = EAPD? */
> -		spec->gpio_mask = 0x08;
> -		spec->gpio_dir = 0x08;
> -		spec->gpio_data = 0x08;
> +		/* GPIO1 = headphones */
> +		/* GPIO3 = speakers */
> +		spec->gpio_mask = 0x0a;
> +		spec->gpio_dir = 0x0a;
>  		break;
>  	}
>  
> 
> -- 
> Stelian Pop <stelian@popies.net>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Enable HP output on nVidia Corporation MCP79 HDA (rev b1) (Macbook Pro 5, 5)
  2009-07-30 12:49 ` Takashi Iwai
@ 2009-07-30 13:05   ` Stelian Pop
  2009-07-30 13:07     ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Stelian Pop @ 2009-07-30 13:05 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Andreas Nüßlein, alsa-devel

On Thu, Jul 30, 2009 at 02:49:20PM +0200, Takashi Iwai wrote:

> Great, this is *the* missing piece!

Yup. Everything seems to work fine now.

> I'm going to merge the hda-cirrus patch back to the (stable) sound GIT
> tree so that it'll be merged into the next 2.6.32 kernel.

Cool. Thanks !

Stelian.
-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Enable HP output on nVidia Corporation MCP79 HDA (rev b1) (Macbook Pro 5, 5)
  2009-07-30 13:05   ` Stelian Pop
@ 2009-07-30 13:07     ` Takashi Iwai
  2009-07-30 16:19       ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2009-07-30 13:07 UTC (permalink / raw)
  To: Stelian Pop; +Cc: Andreas Nüßlein, alsa-devel

At Thu, 30 Jul 2009 15:05:43 +0200,
Stelian Pop wrote:
> 
> On Thu, Jul 30, 2009 at 02:49:20PM +0200, Takashi Iwai wrote:
> 
> > Great, this is *the* missing piece!
> 
> Yup. Everything seems to work fine now.
> 
> > I'm going to merge the hda-cirrus patch back to the (stable) sound GIT
> > tree so that it'll be merged into the next 2.6.32 kernel.
> 
> Cool. Thanks !

Now it's done.  You can use alsa-driver-snapshot (not unstable one)
from now on.  It might take some time until the server is sync'ed.
But it's already out from my local machine :)


thanks,

Takashi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Enable HP output on nVidia Corporation MCP79 HDA (rev b1) (Macbook Pro 5, 5)
  2009-07-30 13:07     ` Takashi Iwai
@ 2009-07-30 16:19       ` Takashi Iwai
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2009-07-30 16:19 UTC (permalink / raw)
  To: Stelian Pop; +Cc: Andreas Nüßlein, alsa-devel

At Thu, 30 Jul 2009 15:07:39 +0200,
I wrote:
> 
> At Thu, 30 Jul 2009 15:05:43 +0200,
> Stelian Pop wrote:
> > 
> > On Thu, Jul 30, 2009 at 02:49:20PM +0200, Takashi Iwai wrote:
> > 
> > > Great, this is *the* missing piece!
> > 
> > Yup. Everything seems to work fine now.
> > 
> > > I'm going to merge the hda-cirrus patch back to the (stable) sound GIT
> > > tree so that it'll be merged into the next 2.6.32 kernel.
> > 
> > Cool. Thanks !
> 
> Now it's done.  You can use alsa-driver-snapshot (not unstable one)
> from now on.  It might take some time until the server is sync'ed.
> But it's already out from my local machine :)

Oops, I forgot to update alsa-driver-build GIT tree, thus the snapshot
tarball failed to build.  Fixed now.  Let me know if you still see
the problems.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-30 16:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 12:44 [PATCH] Enable HP output on nVidia Corporation MCP79 HDA (rev b1) (Macbook Pro 5, 5) Stelian Pop
2009-07-30 12:49 ` Takashi Iwai
2009-07-30 13:05   ` Stelian Pop
2009-07-30 13:07     ` Takashi Iwai
2009-07-30 16:19       ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.