Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Christopher K. <c.krooss@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+14 -3
+14 -3
sound/pci/hda/patch_conexant.c
··· 64 64 /* extra EAPD pins */ 65 65 unsigned int num_eapds; 66 66 hda_nid_t eapds[4]; 67 + bool dynamic_eapd; 67 68 68 69 #ifdef ENABLE_CXT_STATIC_QUIRKS 69 70 const struct snd_kcontrol_new *mixers[5]; ··· 3156 3155 * thus it might control over all pins. 3157 3156 */ 3158 3157 if (spec->num_eapds > 2) 3159 - spec->gen.own_eapd_ctl = 1; 3158 + spec->dynamic_eapd = 1; 3160 3159 } 3161 3160 3162 3161 static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins, ··· 3195 3194 return 0; 3196 3195 } 3197 3196 3197 + static int cx_auto_init(struct hda_codec *codec) 3198 + { 3199 + struct conexant_spec *spec = codec->spec; 3200 + snd_hda_gen_init(codec); 3201 + if (!spec->dynamic_eapd) 3202 + cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true); 3203 + return 0; 3204 + } 3205 + 3198 3206 static const struct hda_codec_ops cx_auto_patch_ops = { 3199 3207 .build_controls = cx_auto_build_controls, 3200 3208 .build_pcms = snd_hda_gen_build_pcms, 3201 - .init = snd_hda_gen_init, 3209 + .init = cx_auto_init, 3202 3210 .free = snd_hda_gen_free, 3203 3211 .unsol_event = snd_hda_jack_unsol_event, 3204 3212 #ifdef CONFIG_PM ··· 3358 3348 3359 3349 cx_auto_parse_beep(codec); 3360 3350 cx_auto_parse_eapd(codec); 3361 - if (spec->gen.own_eapd_ctl) 3351 + spec->gen.own_eapd_ctl = 1; 3352 + if (spec->dynamic_eapd) 3362 3353 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook; 3363 3354 3364 3355 switch (codec->vendor_id) {