Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216701
b: refs/heads/master
c: f6837bb
h: refs/heads/master
i:
  216699: 6bf8b16
v: v3
  • Loading branch information
Takashi Iwai committed Sep 20, 2010
1 parent 6fb5172 commit 5c0d90a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84eb01be18df7012ac31bf678da5aaf1accc6a77
refs/heads/master: f6837bbd599c2a4e1f621441f84286434bcc91ae
24 changes: 24 additions & 0 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,28 @@ static void alc_set_input_pin(struct hda_codec *codec, hda_nid_t nid,
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, val);
}

static void alc_fixup_autocfg_pin_nums(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;

if (!cfg->line_outs) {
while (cfg->line_outs < AUTO_CFG_MAX_OUTS &&
cfg->line_out_pins[cfg->line_outs])
cfg->line_outs++;
}
if (!cfg->speaker_outs) {
while (cfg->speaker_outs < AUTO_CFG_MAX_OUTS &&
cfg->speaker_pins[cfg->speaker_outs])
cfg->speaker_outs++;
}
if (!cfg->hp_outs) {
while (cfg->hp_outs < AUTO_CFG_MAX_OUTS &&
cfg->hp_pins[cfg->hp_outs])
cfg->hp_outs++;
}
}

/*
*/
static void add_mixer(struct alc_spec *spec, struct snd_kcontrol_new *mix)
Expand Down Expand Up @@ -944,6 +966,8 @@ static void setup_preset(struct hda_codec *codec,

if (preset->setup)
preset->setup(codec);

alc_fixup_autocfg_pin_nums(codec);
}

/* Enable GPIO mask and set output */
Expand Down

0 comments on commit 5c0d90a

Please sign in to comment.