Commit ff359b14 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecs

The older Conexant codecs have up to two EAPDs and these are supposed
to be rather statically turned on.  The new generic parser code
assumes the dynamic on/off per path usage, thus it resulted in the
silent output on some machines.

This patch fixes the problem by simply assuming the static EAPD on for
such old Conexant codecs as we did until 3.8 kernel.
Reported-and-tested-by: default avatarChristopher K. <c.krooss@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d4702b18
...@@ -64,6 +64,7 @@ struct conexant_spec { ...@@ -64,6 +64,7 @@ struct conexant_spec {
/* extra EAPD pins */ /* extra EAPD pins */
unsigned int num_eapds; unsigned int num_eapds;
hda_nid_t eapds[4]; hda_nid_t eapds[4];
bool dynamic_eapd;
#ifdef ENABLE_CXT_STATIC_QUIRKS #ifdef ENABLE_CXT_STATIC_QUIRKS
const struct snd_kcontrol_new *mixers[5]; const struct snd_kcontrol_new *mixers[5];
...@@ -3155,7 +3156,7 @@ static void cx_auto_parse_eapd(struct hda_codec *codec) ...@@ -3155,7 +3156,7 @@ static void cx_auto_parse_eapd(struct hda_codec *codec)
* thus it might control over all pins. * thus it might control over all pins.
*/ */
if (spec->num_eapds > 2) if (spec->num_eapds > 2)
spec->gen.own_eapd_ctl = 1; spec->dynamic_eapd = 1;
} }
static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins, static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins,
...@@ -3194,10 +3195,19 @@ static int cx_auto_build_controls(struct hda_codec *codec) ...@@ -3194,10 +3195,19 @@ static int cx_auto_build_controls(struct hda_codec *codec)
return 0; return 0;
} }
static int cx_auto_init(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
snd_hda_gen_init(codec);
if (!spec->dynamic_eapd)
cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
return 0;
}
static const struct hda_codec_ops cx_auto_patch_ops = { static const struct hda_codec_ops cx_auto_patch_ops = {
.build_controls = cx_auto_build_controls, .build_controls = cx_auto_build_controls,
.build_pcms = snd_hda_gen_build_pcms, .build_pcms = snd_hda_gen_build_pcms,
.init = snd_hda_gen_init, .init = cx_auto_init,
.free = snd_hda_gen_free, .free = snd_hda_gen_free,
.unsol_event = snd_hda_jack_unsol_event, .unsol_event = snd_hda_jack_unsol_event,
#ifdef CONFIG_PM #ifdef CONFIG_PM
...@@ -3348,7 +3358,8 @@ static int patch_conexant_auto(struct hda_codec *codec) ...@@ -3348,7 +3358,8 @@ static int patch_conexant_auto(struct hda_codec *codec)
cx_auto_parse_beep(codec); cx_auto_parse_beep(codec);
cx_auto_parse_eapd(codec); cx_auto_parse_eapd(codec);
if (spec->gen.own_eapd_ctl) spec->gen.own_eapd_ctl = 1;
if (spec->dynamic_eapd)
spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook; spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook;
switch (codec->vendor_id) { switch (codec->vendor_id) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment