diff options
author | Stelian Pop <stelian@popies.net> | 2009-07-30 08:44:27 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-07-30 08:57:25 -0400 |
commit | 3a38516750e176a18f76d605b401fbab2c72d648 (patch) | |
tree | 25ddeb33ebe7b0afdd99cf115a410348aa4f538c /sound | |
parent | 63b2413b2ff446e30286c2bd775fd10b12d188c6 (diff) |
ALSA: hda - Enable HP output with Macbook Pro 5, 5
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 <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index f5527380a245..8ba306856d38 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -832,6 +832,11 @@ static void cs_automute(struct hda_codec *codec) | |||
832 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 832 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
833 | hp_present ? 0 : PIN_OUT); | 833 | hp_present ? 0 : PIN_OUT); |
834 | } | 834 | } |
835 | if (spec->board_config == CS420X_MBP55) { | ||
836 | unsigned int gpio = hp_present ? 0x02 : 0x08; | ||
837 | snd_hda_codec_write(codec, 0x01, 0, | ||
838 | AC_VERB_SET_GPIO_DATA, gpio); | ||
839 | } | ||
835 | } | 840 | } |
836 | 841 | ||
837 | static void cs_automic(struct hda_codec *codec) | 842 | static void cs_automic(struct hda_codec *codec) |
@@ -1133,10 +1138,10 @@ static int patch_cs420x(struct hda_codec *codec) | |||
1133 | 1138 | ||
1134 | switch (spec->board_config) { | 1139 | switch (spec->board_config) { |
1135 | case CS420X_MBP55: | 1140 | case CS420X_MBP55: |
1136 | /* GPIO3 = EAPD? */ | 1141 | /* GPIO1 = headphones */ |
1137 | spec->gpio_mask = 0x08; | 1142 | /* GPIO3 = speakers */ |
1138 | spec->gpio_dir = 0x08; | 1143 | spec->gpio_mask = 0x0a; |
1139 | spec->gpio_data = 0x08; | 1144 | spec->gpio_dir = 0x0a; |
1140 | break; | 1145 | break; |
1141 | } | 1146 | } |
1142 | 1147 | ||