Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375235
b: refs/heads/master
c: ff359b1
h: refs/heads/master
i:
  375233: 230539e
  375231: b779463
v: v3
  • Loading branch information
Takashi Iwai committed May 4, 2013
1 parent e4c80bb commit 4fcae74
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4702b189c6b951c1cb3260036ff998f719bfb62
refs/heads/master: ff359b14919c379a365233aa2e1dd469efac8ce8
17 changes: 14 additions & 3 deletions trunk/sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct conexant_spec {
/* extra EAPD pins */
unsigned int num_eapds;
hda_nid_t eapds[4];
bool dynamic_eapd;

#ifdef ENABLE_CXT_STATIC_QUIRKS
const struct snd_kcontrol_new *mixers[5];
Expand Down Expand Up @@ -3155,7 +3156,7 @@ static void cx_auto_parse_eapd(struct hda_codec *codec)
* thus it might control over all pins.
*/
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,
Expand Down Expand Up @@ -3194,10 +3195,19 @@ static int cx_auto_build_controls(struct hda_codec *codec)
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 = {
.build_controls = cx_auto_build_controls,
.build_pcms = snd_hda_gen_build_pcms,
.init = snd_hda_gen_init,
.init = cx_auto_init,
.free = snd_hda_gen_free,
.unsol_event = snd_hda_jack_unsol_event,
#ifdef CONFIG_PM
Expand Down Expand Up @@ -3348,7 +3358,8 @@ static int patch_conexant_auto(struct hda_codec *codec)

cx_auto_parse_beep(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;

switch (codec->vendor_id) {
Expand Down

0 comments on commit 4fcae74

Please sign in to comment.