Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206493
b: refs/heads/master
c: 748cce4
h: refs/heads/master
i:
  206491: 61c6ff4
v: v3
  • Loading branch information
Takashi Iwai committed Aug 4, 2010
1 parent 5f6abde commit 5f5b1a6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 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: e096c8e6d5ed965f346d94befbbec2275dde3621
refs/heads/master: 748cce431eb413e794c8f1d1974b78b47a6174ef
27 changes: 16 additions & 11 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -5166,6 +5166,19 @@ static void fixup_automic_adc(struct hda_codec *codec)
spec->auto_mic = 0; /* disable auto-mic to be sure */
}

/* select or unmute the given capsrc route */
static void select_or_unmute_capsrc(struct hda_codec *codec, hda_nid_t cap,
int idx)
{
if (get_wcaps_type(get_wcaps(codec, cap)) == AC_WID_AUD_MIX) {
snd_hda_codec_amp_stereo(codec, cap, HDA_INPUT, idx,
HDA_AMP_MUTE, 0);
} else {
snd_hda_codec_write_cache(codec, cap, 0,
AC_VERB_SET_CONNECT_SEL, idx);
}
}

/* set the default connection to that pin */
static int init_capsrc_for_pin(struct hda_codec *codec, hda_nid_t pin)
{
Expand All @@ -5180,14 +5193,7 @@ static int init_capsrc_for_pin(struct hda_codec *codec, hda_nid_t pin)
idx = get_connection_index(codec, cap, pin);
if (idx < 0)
continue;
/* select or unmute this route */
if (get_wcaps_type(get_wcaps(codec, cap)) == AC_WID_AUD_MIX) {
snd_hda_codec_amp_stereo(codec, cap, HDA_INPUT, idx,
HDA_AMP_MUTE, 0);
} else {
snd_hda_codec_write_cache(codec, cap, 0,
AC_VERB_SET_CONNECT_SEL, idx);
}
select_or_unmute_capsrc(codec, cap, idx);
return i; /* return the found index */
}
return -1; /* not found */
Expand Down Expand Up @@ -14364,9 +14370,8 @@ static int alc269_parse_auto_config(struct hda_codec *codec)

/* set default input source */
if (!spec->dual_adc_switch)
snd_hda_codec_write_cache(codec, spec->capsrc_nids[0],
0, AC_VERB_SET_CONNECT_SEL,
spec->input_mux->items[0].index);
select_or_unmute_capsrc(codec, spec->capsrc_nids[0],
spec->input_mux->items[0].index);

err = alc_auto_add_mic_boost(codec);
if (err < 0)
Expand Down

0 comments on commit 5f5b1a6

Please sign in to comment.