Skip to content

Commit

Permalink
ALSA: hda - Enable HP output with Macbook Pro 5, 5
Browse files Browse the repository at this point in the history
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

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
stelian42 authored and tiwai committed Jul 30, 2009
1 parent 63b2413 commit 3a38516
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions sound/pci/hda/patch_cirrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,11 @@ 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) {
unsigned int gpio = hp_present ? 0x02 : 0x08;
snd_hda_codec_write(codec, 0x01, 0,
AC_VERB_SET_GPIO_DATA, gpio);
}
}

static void cs_automic(struct hda_codec *codec)
Expand Down Expand Up @@ -1133,10 +1138,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;
}

Expand Down

0 comments on commit 3a38516

Please sign in to comment.