Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316146
b: refs/heads/master
c: 5780b62
h: refs/heads/master
v: v3
  • Loading branch information
David Henningsson authored and Takashi Iwai committed Jun 27, 2012
1 parent 76669b0 commit dc13b76
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 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: 00227f15a0ad8401d2b0b67905da63e75b544895
refs/heads/master: 5780b627e24113323427c102175296ae43dfb9d7
22 changes: 20 additions & 2 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -2001,13 +2001,31 @@ static int __alc_build_controls(struct hda_codec *codec)
return 0;
}

static int alc_build_controls(struct hda_codec *codec)
static int alc_build_jacks(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;

if (spec->shared_mic_hp) {
int err;
int nid = spec->autocfg.inputs[1].pin;
err = snd_hda_jack_add_kctl(codec, nid, "Headphone Mic", 0);
if (err < 0)
return err;
err = snd_hda_jack_detect_enable(codec, nid, 0);
if (err < 0)
return err;
}

return snd_hda_jack_add_kctls(codec, &spec->autocfg);
}

static int alc_build_controls(struct hda_codec *codec)
{
int err = __alc_build_controls(codec);
if (err < 0)
return err;
err = snd_hda_jack_add_kctls(codec, &spec->autocfg);

err = alc_build_jacks(codec);
if (err < 0)
return err;
alc_apply_fixup(codec, ALC_FIXUP_ACT_BUILD);
Expand Down

0 comments on commit dc13b76

Please sign in to comment.