Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7debbe51cc001a6deb549999f9d8f53d99c6fd9e
Commit:     7debbe51cc001a6deb549999f9d8f53d99c6fd9e
Parent:     d273809e2e512d0638d443dce408ac0342ab73cf
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 16 15:01:03 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 15:59:04 2007 +0200

    [ALSA] hda-codec - Fix PM on ALC885 Intel Macs
    
    Fix power-management on ALC885 Intel Macs.
    It fixes the problem with power-saving mode, too.
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/patch_realtek.c |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b47934f..b63d185 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5276,6 +5276,20 @@ static void alc882_gpio_mute(struct hda_codec *codec, 
int pin, int muted)
                            AC_VERB_SET_GPIO_DATA, gpiostate);
 }
 
+/* set up GPIO at initialization */
+static void alc885_macpro_init_hook(struct hda_codec *codec)
+{
+       alc882_gpio_mute(codec, 0, 0);
+       alc882_gpio_mute(codec, 1, 0);
+}
+
+/* set up GPIO and update auto-muting at initialization */
+static void alc885_imac24_init_hook(struct hda_codec *codec)
+{
+       alc885_macpro_init_hook(codec);
+       alc885_imac24_automute(codec);
+}
+
 /*
  * generic initialization of ADC, input mixers and output mixers
  */
@@ -5480,6 +5494,7 @@ static struct alc_config_preset alc882_presets[] = {
                .num_channel_mode = ARRAY_SIZE(alc882_ch_modes),
                .channel_mode = alc882_ch_modes,
                .input_mux = &alc882_capture_source,
+               .init_hook = alc885_macpro_init_hook,
        },
        [ALC885_IMAC24] = {
                .mixers = { alc885_imac24_mixer },
@@ -5492,7 +5507,7 @@ static struct alc_config_preset alc882_presets[] = {
                .channel_mode = alc882_ch_modes,
                .input_mux = &alc882_capture_source,
                .unsol_event = alc885_imac24_unsol_event,
-               .init_hook = alc885_imac24_automute,
+               .init_hook = alc885_imac24_init_hook,
        },
        [ALC882_TARGA] = {
                .mixers = { alc882_targa_mixer, alc882_chmode_mixer,
@@ -5695,11 +5710,6 @@ static int patch_alc882(struct hda_codec *codec)
        if (board_config != ALC882_AUTO)
                setup_preset(spec, &alc882_presets[board_config]);
 
-       if (board_config == ALC885_MACPRO || board_config == ALC885_IMAC24) {
-               alc882_gpio_mute(codec, 0, 0);
-               alc882_gpio_mute(codec, 1, 0);
-       }
-
        spec->stream_name_analog = "ALC882 Analog";
        spec->stream_analog_playback = &alc882_pcm_analog_playback;
        spec->stream_analog_capture = &alc882_pcm_analog_capture;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to