changelog shortlog tags manifest raw

changeset: hda-codec - Fix ALC268 capture source

changeset 5878: d330074658fb
parent 5877:b87cbcc974d1
child 5879:6b53fa114faa
author: tiwai
date: Tue Feb 19 15:00:15 2008 +0100 (16 months ago)
files: pci/hda/patch_realtek.c
description: hda-codec - Fix ALC268 capture source

Initialize the capture source properly for auto model.
It's especially important for cases that only mic is detected.
--- a/pci/hda/patch_realtek.c	Tue Feb 19 13:16:41 2008 +0100
+++ b/pci/hda/patch_realtek.c	Tue Feb 19 15:00:15 2008 +0100
@@ -10271,6 +10271,7 @@ static int patch_alc268(struct hda_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;
@@ -10288,6 +10289,11 @@ static int patch_alc268(struct hda_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;