ALSA: hda - Fix mute-LED GPIO pin for HP dv series
authorTakashi Iwai <tiwai@suse.de>
Tue, 11 May 2010 06:36:29 +0000 (08:36 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 11 May 2010 06:36:29 +0000 (08:36 +0200)
Old HP dv series seem to use the GPIO pin 0 for controlling the mute LED
although the pin is a large package, where the newer models use GPIO 3
in such a case.  For fixing the regression from the previous kernels,
set spec->gpio_led statically for these model quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_sigmatel.c

index 12825aa03106e6ab17d3252960f80cacb806ea64..eb4ea3df5d842f43fdbe6293c566089d67cc7201 100644 (file)
@@ -4766,6 +4766,9 @@ static void set_hp_led_gpio(struct hda_codec *codec)
        struct sigmatel_spec *spec = codec->spec;
        unsigned int gpio;
 
+       if (spec->gpio_led)
+               return;
+
        gpio = snd_hda_param_read(codec, codec->afg, AC_PAR_GPIO_CAP);
        gpio &= AC_GPIO_IO_COUNT;
        if (gpio > 3)
@@ -5683,11 +5686,13 @@ again:
                 * detection.
                 */
                spec->hp_detect = 1;
+               spec->gpio_led = 0x01;
                break;
        case STAC_HP_HDX:
                spec->num_dmics = 1;
                spec->num_dmuxes = 1;
                spec->num_smuxes = 1;
+               spec->gpio_led = 0x08;
                break;
        }