Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07f80449 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Detect HP mute-LED GPIO setup from GPIO counts



The GPIO pin number for the mute LED control on HP laptops can be
determined more easily by checking the number of available GPIO pins
of the codec chip.  On a small package with up to 3 GPIOs, GPIO 0 is
used while GPIO 3 is used for others.

This fixes the missing mute GPIO for some HP laptops with new codecs.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 794d6206
Loading
Loading
Loading
Loading
+8 −13
Original line number Original line Diff line number Diff line
@@ -4754,19 +4754,14 @@ static int hp_blike_system(u32 subsystem_id);
static void set_hp_led_gpio(struct hda_codec *codec)
static void set_hp_led_gpio(struct hda_codec *codec)
{
{
	struct sigmatel_spec *spec = codec->spec;
	struct sigmatel_spec *spec = codec->spec;
	switch (codec->vendor_id) {
	unsigned int gpio;
	case 0x111d7608:

		/* GPIO 0 */
	gpio = snd_hda_param_read(codec, codec->afg, AC_PAR_GPIO_CAP);
		spec->gpio_led = 0x01;
	gpio &= AC_GPIO_IO_COUNT;
		break;
	if (gpio > 3)
	case 0x111d7600:
		spec->gpio_led = 0x08; /* GPIO 3 */
	case 0x111d7601:
	else
	case 0x111d7602:
		spec->gpio_led = 0x01; /* GPIO 0 */
	case 0x111d7603:
		/* GPIO 3 */
		spec->gpio_led = 0x08;
		break;
	}
}
}


/*
/*