aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-05-04 04:57:16 -0400
committerTakashi Iwai <tiwai@suse.de>2013-05-04 04:57:16 -0400
commitff359b14919c379a365233aa2e1dd469efac8ce8 (patch)
tree5bc5f3434a81d77bc8139c59ade6383b550806d9 /sound
parentd4702b189c6b951c1cb3260036ff998f719bfb62 (diff)
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_conexant.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 84b81c874a4a..b314d3e6d7fa 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -64,6 +64,7 @@ struct conexant_spec {
64 /* extra EAPD pins */ 64 /* extra EAPD pins */
65 unsigned int num_eapds; 65 unsigned int num_eapds;
66 hda_nid_t eapds[4]; 66 hda_nid_t eapds[4];
67 bool dynamic_eapd;
67 68
68#ifdef ENABLE_CXT_STATIC_QUIRKS 69#ifdef ENABLE_CXT_STATIC_QUIRKS
69 const struct snd_kcontrol_new *mixers[5]; 70 const struct snd_kcontrol_new *mixers[5];
@@ -3155,7 +3156,7 @@ static void cx_auto_parse_eapd(struct hda_codec *codec)
3155 * thus it might control over all pins. 3156 * thus it might control over all pins.
3156 */ 3157 */
3157 if (spec->num_eapds > 2) 3158 if (spec->num_eapds > 2)
3158 spec->gen.own_eapd_ctl = 1; 3159 spec->dynamic_eapd = 1;
3159} 3160}
3160 3161
3161static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins, 3162static 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 return 0; 3195 return 0;
3195} 3196}
3196 3197
3198static int cx_auto_init(struct hda_codec *codec)
3199{
3200 struct conexant_spec *spec = codec->spec;
3201 snd_hda_gen_init(codec);
3202 if (!spec->dynamic_eapd)
3203 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
3204 return 0;
3205}
3206
3197static const struct hda_codec_ops cx_auto_patch_ops = { 3207static const struct hda_codec_ops cx_auto_patch_ops = {
3198 .build_controls = cx_auto_build_controls, 3208 .build_controls = cx_auto_build_controls,
3199 .build_pcms = snd_hda_gen_build_pcms, 3209 .build_pcms = snd_hda_gen_build_pcms,
3200 .init = snd_hda_gen_init, 3210 .init = cx_auto_init,
3201 .free = snd_hda_gen_free, 3211 .free = snd_hda_gen_free,
3202 .unsol_event = snd_hda_jack_unsol_event, 3212 .unsol_event = snd_hda_jack_unsol_event,
3203#ifdef CONFIG_PM 3213#ifdef CONFIG_PM
@@ -3348,7 +3358,8 @@ static int patch_conexant_auto(struct hda_codec *codec)
3348 3358
3349 cx_auto_parse_beep(codec); 3359 cx_auto_parse_beep(codec);
3350 cx_auto_parse_eapd(codec); 3360 cx_auto_parse_eapd(codec);
3351 if (spec->gen.own_eapd_ctl) 3361 spec->gen.own_eapd_ctl = 1;
3362 if (spec->dynamic_eapd)
3352 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook; 3363 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook;
3353 3364
3354 switch (codec->vendor_id) { 3365 switch (codec->vendor_id) {