aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorVitaliy Kulikov <Vitaliy.Kulikov@idt.com>2011-12-12 18:35:13 -0500
committerTakashi Iwai <tiwai@suse.de>2011-12-13 04:22:29 -0500
commit6a557c94737a261f1b78767c7c41406206dd25c8 (patch)
tree99d961cd0fc6650fd95bf0a5daec2fc5bc65df53 /sound/pci
parentfde48a1f808e2bb6aaad5709d2470d814a157c86 (diff)
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.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index eeb25d529e30..85740e0849d5 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)
4903 * Need more information on whether it is true across the entire series. 4903 * Need more information on whether it is true across the entire series.
4904 * -- kunal 4904 * -- kunal
4905 */ 4905 */
4906static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity) 4906static int find_mute_led_cfg(struct hda_codec *codec, int default_polarity)
4907{ 4907{
4908 struct sigmatel_spec *spec = codec->spec; 4908 struct sigmatel_spec *spec = codec->spec;
4909 const struct dmi_device *dev = NULL; 4909 const struct dmi_device *dev = NULL;
@@ -4933,9 +4933,11 @@ static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity)
4933 4933
4934 /* 4934 /*
4935 * Fallback case - if we don't find the DMI strings, 4935 * Fallback case - if we don't find the DMI strings,
4936 * we statically set the GPIO - if not a B-series system. 4936 * we statically set the GPIO - if not a B-series system
4937 * and default polarity is provided
4937 */ 4938 */
4938 if (!hp_blike_system(codec->subsystem_id)) { 4939 if (!hp_blike_system(codec->subsystem_id) &&
4940 (default_polarity == 0 || default_polarity == 1)) {
4939 set_hp_led_gpio(codec); 4941 set_hp_led_gpio(codec);
4940 spec->gpio_led_polarity = default_polarity; 4942 spec->gpio_led_polarity = default_polarity;
4941 return 1; 4943 return 1;
@@ -5645,7 +5647,7 @@ again:
5645 5647
5646 codec->patch_ops = stac92xx_patch_ops; 5648 codec->patch_ops = stac92xx_patch_ops;
5647 5649
5648 if (find_mute_led_gpio(codec, 0)) 5650 if (find_mute_led_cfg(codec, -1/*no default cfg*/))
5649 snd_printd("mute LED gpio %d polarity %d\n", 5651 snd_printd("mute LED gpio %d polarity %d\n",
5650 spec->gpio_led, 5652 spec->gpio_led,
5651 spec->gpio_led_polarity); 5653 spec->gpio_led_polarity);
@@ -5958,7 +5960,7 @@ again:
5958 } 5960 }
5959 } 5961 }
5960 5962
5961 if (find_mute_led_gpio(codec, 1)) 5963 if (find_mute_led_cfg(codec, 1))
5962 snd_printd("mute LED gpio %d polarity %d\n", 5964 snd_printd("mute LED gpio %d polarity %d\n",
5963 spec->gpio_led, 5965 spec->gpio_led,
5964 spec->gpio_led_polarity); 5966 spec->gpio_led_polarity);