1 From ff359b14919c379a365233aa2e1dd469efac8ce8 Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Sat, 4 May 2013 10:57:16 +0200
4 Subject: ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecs
6 From: Takashi Iwai <tiwai@suse.de>
8 commit ff359b14919c379a365233aa2e1dd469efac8ce8 upstream.
10 The older Conexant codecs have up to two EAPDs and these are supposed
11 to be rather statically turned on. The new generic parser code
12 assumes the dynamic on/off per path usage, thus it resulted in the
13 silent output on some machines.
15 This patch fixes the problem by simply assuming the static EAPD on for
16 such old Conexant codecs as we did until 3.8 kernel.
18 Reported-and-tested-by: Christopher K. <c.krooss@gmail.com>
19 Signed-off-by: Takashi Iwai <tiwai@suse.de>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 sound/pci/hda/patch_conexant.c | 17 ++++++++++++++---
24 1 file changed, 14 insertions(+), 3 deletions(-)
26 --- a/sound/pci/hda/patch_conexant.c
27 +++ b/sound/pci/hda/patch_conexant.c
28 @@ -64,6 +64,7 @@ struct conexant_spec {
30 unsigned int num_eapds;
34 #ifdef ENABLE_CXT_STATIC_QUIRKS
35 const struct snd_kcontrol_new *mixers[5];
36 @@ -3152,7 +3153,7 @@ static void cx_auto_parse_eapd(struct hd
37 * thus it might control over all pins.
39 if (spec->num_eapds > 2)
40 - spec->gen.own_eapd_ctl = 1;
41 + spec->dynamic_eapd = 1;
44 static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins,
45 @@ -3191,6 +3192,15 @@ static int cx_auto_build_controls(struct
49 +static int cx_auto_init(struct hda_codec *codec)
51 + struct conexant_spec *spec = codec->spec;
52 + snd_hda_gen_init(codec);
53 + if (!spec->dynamic_eapd)
54 + cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
58 static void cx_auto_free(struct hda_codec *codec)
60 snd_hda_detach_beep_device(codec);
61 @@ -3200,7 +3210,7 @@ static void cx_auto_free(struct hda_code
62 static const struct hda_codec_ops cx_auto_patch_ops = {
63 .build_controls = cx_auto_build_controls,
64 .build_pcms = snd_hda_gen_build_pcms,
65 - .init = snd_hda_gen_init,
66 + .init = cx_auto_init,
68 .unsol_event = snd_hda_jack_unsol_event,
70 @@ -3350,7 +3360,8 @@ static int patch_conexant_auto(struct hd
72 cx_auto_parse_beep(codec);
73 cx_auto_parse_eapd(codec);
74 - if (spec->gen.own_eapd_ctl)
75 + spec->gen.own_eapd_ctl = 1;
76 + if (spec->dynamic_eapd)
77 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook;
79 switch (codec->vendor_id) {