[ALSA] hda-codec - Don't create multiple capture streams for single inputs
authorTakashi Iwai <tiwai@suse.de>
Tue, 19 Feb 2008 14:03:57 +0000 (15:03 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:00:13 +0000 (12:00 +0200)
When the device has only one input source, it makes no sense to have
multiple capture streams.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c

index 630c7b22542aec59c6e425706a6be88687c77c79..2100ee480809813feb69bee23b89f5613b43cb60 100644 (file)
@@ -4950,7 +4950,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec)
        /* check whether NID 0x04 is valid */
        wcap = get_wcaps(codec, 0x04);
        wcap = (wcap & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; /* get type */
-       if (wcap != AC_WID_AUD_IN) {
+       if (wcap != AC_WID_AUD_IN || spec->input_mux->num_items == 1) {
                spec->adc_nids = alc260_adc_nids_alt;
                spec->num_adc_nids = ARRAY_SIZE(alc260_adc_nids_alt);
                spec->mixers[spec->num_mixers] = alc260_capture_alt_mixer;
@@ -10276,7 +10276,7 @@ static int patch_alc268(struct hda_codec *codec)
 
                /* get type */
                wcap = (wcap & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
-               if (wcap != AC_WID_AUD_IN) {
+               if (wcap != AC_WID_AUD_IN || spec->input_mux->num_items == 1) {
                        spec->adc_nids = alc268_adc_nids_alt;
                        spec->num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt);
                        spec->mixers[spec->num_mixers] =