diff options
author | Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> | 2011-12-12 17:35:13 -0600 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-12-13 10:22:29 +0100 |
commit | 6a557c94737a261f1b78767c7c41406206dd25c8 (patch) | |
tree | 99d961cd0fc6650fd95bf0a5daec2fc5bc65df53 /sound/pci | |
parent | fde48a1f808e2bb6aaad5709d2470d814a157c86 (diff) | |
download | op-kernel-dev-6a557c94737a261f1b78767c7c41406206dd25c8.zip op-kernel-dev-6a557c94737a261f1b78767c7c41406206dd25c8.tar.gz |
ALSA: hda - GPIO to control mute LED may be enabled on HP systems with no such HW
This may lead to problems (like loss of sound) as GPIO pin may be used
for different function (SPDIF OUT, EAPD etc) on those systems. This patch
disables default mute LED GPIO configuration on all new codecs as all new
HP systems are expected to provide explicit mute LED configuration in SMBIOS.
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index eeb25d52..85740e0 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4903,7 +4903,7 @@ static void set_hp_led_gpio(struct hda_codec *codec) * Need more information on whether it is true across the entire series. * -- kunal */ -static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity) +static int find_mute_led_cfg(struct hda_codec *codec, int default_polarity) { struct sigmatel_spec *spec = codec->spec; const struct dmi_device *dev = NULL; @@ -4933,9 +4933,11 @@ static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity) /* * Fallback case - if we don't find the DMI strings, - * we statically set the GPIO - if not a B-series system. + * we statically set the GPIO - if not a B-series system + * and default polarity is provided */ - if (!hp_blike_system(codec->subsystem_id)) { + if (!hp_blike_system(codec->subsystem_id) && + (default_polarity == 0 || default_polarity == 1)) { set_hp_led_gpio(codec); spec->gpio_led_polarity = default_polarity; return 1; @@ -5645,7 +5647,7 @@ again: codec->patch_ops = stac92xx_patch_ops; - if (find_mute_led_gpio(codec, 0)) + if (find_mute_led_cfg(codec, -1/*no default cfg*/)) snd_printd("mute LED gpio %d polarity %d\n", spec->gpio_led, spec->gpio_led_polarity); @@ -5958,7 +5960,7 @@ again: } } - if (find_mute_led_gpio(codec, 1)) + if (find_mute_led_cfg(codec, 1)) snd_printd("mute LED gpio %d polarity %d\n", spec->gpio_led, spec->gpio_led_polarity); |