提交 6a557c94 编写于 作者: V Vitaliy Kulikov 提交者: Takashi Iwai

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: NVitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 fde48a1f
...@@ -4903,7 +4903,7 @@ static void set_hp_led_gpio(struct hda_codec *codec) ...@@ -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. * Need more information on whether it is true across the entire series.
* -- kunal * -- 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; struct sigmatel_spec *spec = codec->spec;
const struct dmi_device *dev = NULL; const struct dmi_device *dev = NULL;
...@@ -4933,9 +4933,11 @@ static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity) ...@@ -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, * 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); set_hp_led_gpio(codec);
spec->gpio_led_polarity = default_polarity; spec->gpio_led_polarity = default_polarity;
return 1; return 1;
...@@ -5645,7 +5647,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) ...@@ -5645,7 +5647,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
codec->patch_ops = stac92xx_patch_ops; 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", snd_printd("mute LED gpio %d polarity %d\n",
spec->gpio_led, spec->gpio_led,
spec->gpio_led_polarity); spec->gpio_led_polarity);
...@@ -5958,7 +5960,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) ...@@ -5958,7 +5960,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
} }
} }
if (find_mute_led_gpio(codec, 1)) if (find_mute_led_cfg(codec, 1))
snd_printd("mute LED gpio %d polarity %d\n", snd_printd("mute LED gpio %d polarity %d\n",
spec->gpio_led, spec->gpio_led,
spec->gpio_led_polarity); spec->gpio_led_polarity);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册