Skip to content

Commit

Permalink
[ALSA] hda-codec - Fix ALC268 capture source
Browse files Browse the repository at this point in the history
Initialize the capture source properly for auto model.
It's especially important for cases that only mic is detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Apr 24, 2008
1 parent aef9d31 commit 85860c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -10272,6 +10272,7 @@ static int patch_alc268(struct hda_codec *codec)
if (!spec->adc_nids && spec->input_mux) {
/* check whether NID 0x07 is valid */
unsigned int wcap = get_wcaps(codec, 0x07);
int i;

/* get type */
wcap = (wcap & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
Expand All @@ -10289,6 +10290,11 @@ static int patch_alc268(struct hda_codec *codec)
spec->num_mixers++;
}
spec->capsrc_nids = alc268_capsrc_nids;
/* set default input source */
for (i = 0; i < spec->num_adc_nids; i++)
snd_hda_codec_write_cache(codec, alc268_capsrc_nids[i],
0, AC_VERB_SET_CONNECT_SEL,
spec->input_mux->items[0].index);
}

spec->vmaster_nid = 0x02;
Expand Down

0 comments on commit 85860c0

Please sign in to comment.