]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - sound/pci/hda/patch_realtek.c
ALSA: hda - Fix creation of automatic capture mixers
[mirror_ubuntu-bionic-kernel.git] / sound / pci / hda / patch_realtek.c
index 8477d6d46880ddb80dea1adb77229b783811c345..9cd2545d988e94872e22bceb60ebf86428062cea 100644 (file)
@@ -114,6 +114,7 @@ enum {
        ALC268_3ST,
        ALC268_TOSHIBA,
        ALC268_ACER,
+       ALC268_ACER_DMIC,
        ALC268_ACER_ASPIRE_ONE,
        ALC268_DELL,
        ALC268_ZEPTO,
@@ -130,6 +131,8 @@ enum {
        ALC269_QUANTA_FL1,
        ALC269_ASUS_EEEPC_P703,
        ALC269_ASUS_EEEPC_P901,
+       ALC269_FUJITSU,
+       ALC269_LIFEBOOK,
        ALC269_AUTO,
        ALC269_MODEL_LAST /* last tag */
 };
@@ -152,6 +155,7 @@ enum {
 enum {
        ALC660VD_3ST,
        ALC660VD_3ST_DIG,
+       ALC660VD_ASUS_V1S,
        ALC861VD_3ST,
        ALC861VD_3ST_DIG,
        ALC861VD_6ST_DIG,
@@ -212,6 +216,7 @@ enum {
        ALC883_TARGA_2ch_DIG,
        ALC883_ACER,
        ALC883_ACER_ASPIRE,
+       ALC888_ACER_ASPIRE_4930G,
        ALC883_MEDION,
        ALC883_MEDION_MD2,
        ALC883_LAPTOP_EAPD,
@@ -225,9 +230,11 @@ enum {
        ALC883_MITAC,
        ALC883_CLEVO_M720,
        ALC883_FUJITSU_PI2515,
+       ALC888_FUJITSU_XA3530,
        ALC883_3ST_6ch_INTEL,
        ALC888_ASUS_M90V,
        ALC888_ASUS_EEE1601,
+       ALC1200_ASUS_P5Q,
        ALC883_AUTO,
        ALC883_MODEL_LAST,
 };
@@ -239,6 +246,7 @@ struct alc_spec {
        /* codec parameterization */
        struct snd_kcontrol_new *mixers[5];     /* mixer arrays */
        unsigned int num_mixers;
+       struct snd_kcontrol_new *cap_mixer;     /* capture mixer */
 
        const struct hda_verb *init_verbs[5];   /* initialization verbs
                                                 * don't forget NULL
@@ -323,6 +331,7 @@ struct alc_config_preset {
        struct snd_kcontrol_new *mixers[5]; /* should be identical size
                                             * with spec
                                             */
+       struct snd_kcontrol_new *cap_mixer; /* capture mixer */
        const struct hda_verb *init_verbs[5];
        unsigned int num_dacs;
        hda_nid_t *dac_nids;
@@ -375,11 +384,15 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol,
 {
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
        struct alc_spec *spec = codec->spec;
-       const struct hda_input_mux *imux = spec->input_mux;
+       const struct hda_input_mux *imux;
        unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+       unsigned int mux_idx;
        hda_nid_t nid = spec->capsrc_nids ?
                spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx];
 
+       mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx;
+       imux = &spec->input_mux[mux_idx];
+
        if (spec->is_mix_capture) {
                /* Matrix-mixer style (e.g. ALC882) */
                unsigned int *cur_val = &spec->cur_mux[adc_idx];
@@ -400,10 +413,7 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol,
                return 1;
        } else {
                /* MUX style (e.g. ALC880) */
-               unsigned int mux_idx;
-               mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx;
-               return snd_hda_input_mux_put(codec, &spec->input_mux[mux_idx],
-                                            ucontrol, nid,
+               return snd_hda_input_mux_put(codec, imux, ucontrol, nid,
                                             &spec->cur_mux[adc_idx]);
        }
 }
@@ -766,6 +776,7 @@ static void setup_preset(struct alc_spec *spec,
 
        for (i = 0; i < ARRAY_SIZE(preset->mixers) && preset->mixers[i]; i++)
                add_mixer(spec, preset->mixers[i]);
+       spec->cap_mixer = preset->cap_mixer;
        for (i = 0; i < ARRAY_SIZE(preset->init_verbs) && preset->init_verbs[i];
             i++)
                add_verb(spec, preset->init_verbs[i]);
@@ -1145,6 +1156,226 @@ static void alc_fix_pincfg(struct hda_codec *codec,
        }
 }
 
+/*
+ * ALC888
+ */
+
+/*
+ * 2ch mode
+ */
+static struct hda_verb alc888_4ST_ch2_intel_init[] = {
+/* Mic-in jack as mic in */
+       { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
+       { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
+/* Line-in jack as Line in */
+       { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
+       { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
+/* Line-Out as Front */
+       { 0x17, AC_VERB_SET_CONNECT_SEL, 0x00},
+       { } /* end */
+};
+
+/*
+ * 4ch mode
+ */
+static struct hda_verb alc888_4ST_ch4_intel_init[] = {
+/* Mic-in jack as mic in */
+       { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
+       { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
+/* Line-in jack as Surround */
+       { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+       { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
+/* Line-Out as Front */
+       { 0x17, AC_VERB_SET_CONNECT_SEL, 0x00},
+       { } /* end */
+};
+
+/*
+ * 6ch mode
+ */
+static struct hda_verb alc888_4ST_ch6_intel_init[] = {
+/* Mic-in jack as CLFE */
+       { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+       { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
+/* Line-in jack as Surround */
+       { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+       { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
+/* Line-Out as CLFE (workaround because Mic-in is not loud enough) */
+       { 0x17, AC_VERB_SET_CONNECT_SEL, 0x03},
+       { } /* end */
+};
+
+/*
+ * 8ch mode
+ */
+static struct hda_verb alc888_4ST_ch8_intel_init[] = {
+/* Mic-in jack as CLFE */
+       { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+       { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
+/* Line-in jack as Surround */
+       { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+       { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
+/* Line-Out as Side */
+       { 0x17, AC_VERB_SET_CONNECT_SEL, 0x03},
+       { } /* end */
+};
+
+static struct hda_channel_mode alc888_4ST_8ch_intel_modes[4] = {
+       { 2, alc888_4ST_ch2_intel_init },
+       { 4, alc888_4ST_ch4_intel_init },
+       { 6, alc888_4ST_ch6_intel_init },
+       { 8, alc888_4ST_ch8_intel_init },
+};
+
+/*
+ * ALC888 Fujitsu Siemens Amillo xa3530
+ */
+
+static struct hda_verb alc888_fujitsu_xa3530_verbs[] = {
+/* Front Mic: set to PIN_IN (empty by default) */
+       {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+/* Connect Internal HP to Front */
+       {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+       {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
+/* Connect Bass HP to Front */
+       {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+       {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
+/* Connect Line-Out side jack (SPDIF) to Side */
+       {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+       {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x17, AC_VERB_SET_CONNECT_SEL, 0x03},
+/* Connect Mic jack to CLFE */
+       {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+       {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x18, AC_VERB_SET_CONNECT_SEL, 0x02},
+/* Connect Line-in jack to Surround */
+       {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+       {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01},
+/* Connect HP out jack to Front */
+       {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+       {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
+/* Enable unsolicited event for HP jack and Line-out jack */
+       {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+       {0x17, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+       {}
+};
+
+static void alc888_fujitsu_xa3530_automute(struct hda_codec *codec)
+{
+       unsigned int present;
+       unsigned int bits;
+       /* Line out presence */
+       present = snd_hda_codec_read(codec, 0x17, 0,
+                                    AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+       /* HP out presence */
+       present = present || snd_hda_codec_read(codec, 0x1b, 0,
+                                    AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+       bits = present ? HDA_AMP_MUTE : 0;
+       /* Toggle internal speakers muting */
+       snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
+                                HDA_AMP_MUTE, bits);
+       /* Toggle internal bass muting */
+       snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
+                                HDA_AMP_MUTE, bits);
+}
+
+static void alc888_fujitsu_xa3530_unsol_event(struct hda_codec *codec,
+               unsigned int res)
+{
+       if (res >> 26 == ALC880_HP_EVENT)
+               alc888_fujitsu_xa3530_automute(codec);
+}
+
+
+/*
+ * ALC888 Acer Aspire 4930G model
+ */
+
+static struct hda_verb alc888_acer_aspire_4930g_verbs[] = {
+/* Front Mic: set to PIN_IN (empty by default) */
+       {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+/* Unselect Front Mic by default in input mixer 3 */
+       {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0xb)},
+/* Enable unsolicited event for HP jack */
+       {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+/* Connect Internal HP to front */
+       {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+       {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
+/* Connect HP out to front */
+       {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+       {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
+       { }
+};
+
+static struct hda_input_mux alc888_2_capture_sources[2] = {
+       /* Front mic only available on one ADC */
+       {
+               .num_items = 4,
+               .items = {
+                       { "Mic", 0x0 },
+                       { "Line", 0x2 },
+                       { "CD", 0x4 },
+                       { "Front Mic", 0xb },
+               },
+       },
+       {
+               .num_items = 3,
+               .items = {
+                       { "Mic", 0x0 },
+                       { "Line", 0x2 },
+                       { "CD", 0x4 },
+               },
+       }
+};
+
+static struct snd_kcontrol_new alc888_base_mixer[] = {
+       HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
+       HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
+       HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
+       HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT),
+       HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0,
+               HDA_OUTPUT),
+       HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
+       HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
+       HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
+       HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
+       HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT),
+       HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
+       HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
+       HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
+       HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
+       HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
+       HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
+       HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
+       { } /* end */
+};
+
+static void alc888_acer_aspire_4930g_automute(struct hda_codec *codec)
+{
+       unsigned int present;
+       unsigned int bits;
+       present = snd_hda_codec_read(codec, 0x15, 0,
+                                    AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+       bits = present ? HDA_AMP_MUTE : 0;
+       snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
+                                HDA_AMP_MUTE, bits);
+}
+
+static void alc888_acer_aspire_4930g_unsol_event(struct hda_codec *codec,
+               unsigned int res)
+{
+       if (res >> 26 == ALC880_HP_EVENT)
+               alc888_acer_aspire_4930g_automute(codec);
+}
+
 /*
  * ALC880 3-stack model
  *
@@ -1244,48 +1475,126 @@ static struct snd_kcontrol_new alc880_three_stack_mixer[] = {
 };
 
 /* capture mixer elements */
-static struct snd_kcontrol_new alc880_capture_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x07, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x07, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 2, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 2, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 3,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
-       { } /* end */
-};
+static int alc_cap_vol_info(struct snd_kcontrol *kcontrol,
+                           struct snd_ctl_elem_info *uinfo)
+{
+       struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+       struct alc_spec *spec = codec->spec;
+       int err;
 
-/* capture mixer elements (in case NID 0x07 not available) */
-static struct snd_kcontrol_new alc880_capture_alt_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
-};
+       mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */
+       kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[0], 3, 0,
+                                                     HDA_INPUT);
+       err = snd_hda_mixer_amp_volume_info(kcontrol, uinfo);
+       mutex_unlock(&codec->spdif_mutex); /* reuse spdif_mutex */
+       return err;
+}
 
+static int alc_cap_vol_tlv(struct snd_kcontrol *kcontrol, int op_flag,
+                          unsigned int size, unsigned int __user *tlv)
+{
+       struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+       struct alc_spec *spec = codec->spec;
+       int err;
+
+       mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */
+       kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[0], 3, 0,
+                                                     HDA_INPUT);
+       err = snd_hda_mixer_amp_tlv(kcontrol, op_flag, size, tlv);
+       mutex_unlock(&codec->spdif_mutex); /* reuse spdif_mutex */
+       return err;
+}
+
+typedef int (*getput_call_t)(struct snd_kcontrol *kcontrol,
+                            struct snd_ctl_elem_value *ucontrol);
+
+static int alc_cap_getput_caller(struct snd_kcontrol *kcontrol,
+                                struct snd_ctl_elem_value *ucontrol,
+                                getput_call_t func)
+{
+       struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+       struct alc_spec *spec = codec->spec;
+       unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+       int err;
+
+       mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */
+       kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[adc_idx],
+                                                     3, 0, HDA_INPUT);
+       err = func(kcontrol, ucontrol);
+       mutex_unlock(&codec->spdif_mutex); /* reuse spdif_mutex */
+       return err;
+}
+
+static int alc_cap_vol_get(struct snd_kcontrol *kcontrol,
+                          struct snd_ctl_elem_value *ucontrol)
+{
+       return alc_cap_getput_caller(kcontrol, ucontrol,
+                                    snd_hda_mixer_amp_volume_get);
+}
+
+static int alc_cap_vol_put(struct snd_kcontrol *kcontrol,
+                          struct snd_ctl_elem_value *ucontrol)
+{
+       return alc_cap_getput_caller(kcontrol, ucontrol,
+                                    snd_hda_mixer_amp_volume_put);
+}
+
+/* capture mixer elements */
+#define alc_cap_sw_info                snd_ctl_boolean_stereo_info
+
+static int alc_cap_sw_get(struct snd_kcontrol *kcontrol,
+                         struct snd_ctl_elem_value *ucontrol)
+{
+       return alc_cap_getput_caller(kcontrol, ucontrol,
+                                    snd_hda_mixer_amp_switch_get);
+}
+
+static int alc_cap_sw_put(struct snd_kcontrol *kcontrol,
+                         struct snd_ctl_elem_value *ucontrol)
+{
+       return alc_cap_getput_caller(kcontrol, ucontrol,
+                                    snd_hda_mixer_amp_switch_put);
+}
+
+#define DEFINE_CAPMIX(num) \
+static struct snd_kcontrol_new alc_capture_mixer ## num[] = { \
+       { \
+               .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+               .name = "Capture Switch", \
+               .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, \
+               .count = num, \
+               .info = alc_cap_sw_info, \
+               .get = alc_cap_sw_get, \
+               .put = alc_cap_sw_put, \
+       }, \
+       { \
+               .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+               .name = "Capture Volume", \
+               .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | \
+                          SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
+                          SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK), \
+               .count = num, \
+               .info = alc_cap_vol_info, \
+               .get = alc_cap_vol_get, \
+               .put = alc_cap_vol_put, \
+               .tlv = { .c = alc_cap_vol_tlv }, \
+       }, \
+       { \
+               .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+               /* .name = "Capture Source", */ \
+               .name = "Input Source", \
+               .count = num, \
+               .info = alc_mux_enum_info, \
+               .get = alc_mux_enum_get, \
+               .put = alc_mux_enum_put, \
+       }, \
+       { } /* end */ \
+}
+
+/* up to three ADCs */
+DEFINE_CAPMIX(1);
+DEFINE_CAPMIX(2);
+DEFINE_CAPMIX(3);
 
 
 /*
@@ -1571,18 +1880,6 @@ static struct snd_kcontrol_new alc880_tcl_s700_mixer[] = {
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0B, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -1657,6 +1954,7 @@ static const char *alc_slave_vols[] = {
        "Speaker Playback Volume",
        "Mono Playback Volume",
        "Line-Out Playback Volume",
+       "PCM Playback Volume",
        NULL,
 };
 
@@ -1690,7 +1988,11 @@ static int alc_build_controls(struct hda_codec *codec)
                if (err < 0)
                        return err;
        }
-
+       if (spec->cap_mixer) {
+               err = snd_hda_add_new_ctls(codec, spec->cap_mixer);
+               if (err < 0)
+                       return err;
+       }
        if (spec->multiout.dig_out_nid) {
                err = snd_hda_create_spdif_out_ctls(codec,
                                                    spec->multiout.dig_out_nid);
@@ -3318,6 +3620,8 @@ static struct alc_config_preset alc880_presets[] = {
                                alc880_gpio2_init_verbs },
                .num_dacs = ARRAY_SIZE(alc880_dac_nids),
                .dac_nids = alc880_dac_nids,
+               .adc_nids = alc880_adc_nids_alt, /* FIXME: correct? */
+               .num_adc_nids = 1, /* single ADC */
                .hp_nid = 0x03,
                .num_channel_mode = ARRAY_SIZE(alc880_2_jack_modes),
                .channel_mode = alc880_2_jack_modes,
@@ -3958,6 +4262,17 @@ static void alc880_auto_init(struct hda_codec *codec)
  * OK, here we have finally the patch for ALC880
  */
 
+static void set_capture_mixer(struct alc_spec *spec)
+{
+       static struct snd_kcontrol_new *caps[3] = {
+               alc_capture_mixer1,
+               alc_capture_mixer2,
+               alc_capture_mixer3,
+       };
+       if (spec->num_adc_nids > 0 && spec->num_adc_nids <= 3)
+               spec->cap_mixer = caps[spec->num_adc_nids - 1];
+}
+
 static int patch_alc880(struct hda_codec *codec)
 {
        struct alc_spec *spec;
@@ -4013,13 +4328,12 @@ static int patch_alc880(struct hda_codec *codec)
                if (wcap != AC_WID_AUD_IN) {
                        spec->adc_nids = alc880_adc_nids_alt;
                        spec->num_adc_nids = ARRAY_SIZE(alc880_adc_nids_alt);
-                       add_mixer(spec, alc880_capture_alt_mixer);
                } else {
                        spec->adc_nids = alc880_adc_nids;
                        spec->num_adc_nids = ARRAY_SIZE(alc880_adc_nids);
-                       add_mixer(spec, alc880_capture_mixer);
                }
        }
+       set_capture_mixer(spec);
 
        spec->vmaster_nid = 0x0c;
 
@@ -4054,11 +4368,6 @@ static hda_nid_t alc260_adc_nids_alt[1] = {
        0x05,
 };
 
-static hda_nid_t alc260_hp_adc_nids[2] = {
-       /* ADC1, 0 */
-       0x05, 0x04
-};
-
 /* NIDs used when simultaneous access to both ADCs makes sense.  Note that
  * alc260_capture_mixer assumes ADC0 (nid 0x04) is the first ADC.
  */
@@ -4187,13 +4496,13 @@ static void alc260_hp_master_update(struct hda_codec *codec,
        struct alc_spec *spec = codec->spec;
        unsigned int val = spec->master_sw ? PIN_HP : 0;
        /* change HP and line-out pins */
-       snd_hda_codec_write(codec, 0x0f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
+       snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
                            val);
-       snd_hda_codec_write(codec, 0x10, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
+       snd_hda_codec_write(codec, line, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
                            val);
        /* mono (speaker) depending on the HP jack sense */
        val = (val && !spec->jack_present) ? PIN_OUT : 0;
-       snd_hda_codec_write(codec, 0x11, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
+       snd_hda_codec_write(codec, mono, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
                            val);
 }
 
@@ -4272,7 +4581,7 @@ static struct snd_kcontrol_new alc260_hp_3013_mixer[] = {
                .info = snd_ctl_boolean_mono_info,
                .get = alc260_hp_master_sw_get,
                .put = alc260_hp_master_sw_put,
-               .private_value = (0x10 << 16) | (0x15 << 8) | 0x11
+               .private_value = (0x15 << 16) | (0x10 << 8) | 0x11
        },
        HDA_CODEC_VOLUME("Front Playback Volume", 0x09, 0x0, HDA_OUTPUT),
        HDA_CODEC_MUTE("Front Playback Switch", 0x10, 0x0, HDA_OUTPUT),
@@ -4325,7 +4634,7 @@ static void alc260_hp_3013_automute(struct hda_codec *codec)
        present = snd_hda_codec_read(codec, 0x15, 0,
                                     AC_VERB_GET_PIN_SENSE, 0);
        spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0;
-       alc260_hp_master_update(codec, 0x10, 0x15, 0x11);
+       alc260_hp_master_update(codec, 0x15, 0x10, 0x11);
 }
 
 static void alc260_hp_3013_unsol_event(struct hda_codec *codec,
@@ -4445,54 +4754,15 @@ static struct snd_kcontrol_new alc260_will_mixer[] = {
  */
 static struct snd_kcontrol_new alc260_replacer_672v_mixer[] = {
        HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT),
-       HDA_BIND_MUTE("Master Playback Switch", 0x08, 0x2, HDA_INPUT),
-       HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT),
-       ALC_PIN_MODE("Mic Jack Mode", 0x12, ALC_PIN_DIR_IN),
-       HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x07, 0x1, HDA_INPUT),
-       HDA_CODEC_MUTE("ATATI Mic Playback Switch", 0x07, 0x1, HDA_INPUT),
-       HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT),
-       HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT),
-       ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT),
-       { } /* end */
-};
-
-/* capture mixer elements */
-static struct snd_kcontrol_new alc260_capture_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x05, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x05, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
-       { } /* end */
-};
-
-static struct snd_kcontrol_new alc260_capture_alt_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x05, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x05, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
+       HDA_BIND_MUTE("Master Playback Switch", 0x08, 0x2, HDA_INPUT),
+       HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT),
+       HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT),
+       ALC_PIN_MODE("Mic Jack Mode", 0x12, ALC_PIN_DIR_IN),
+       HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x07, 0x1, HDA_INPUT),
+       HDA_CODEC_MUTE("ATATI Mic Playback Switch", 0x07, 0x1, HDA_INPUT),
+       HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT),
+       HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT),
+       ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT),
        { } /* end */
 };
 
@@ -5312,7 +5582,6 @@ static struct hda_verb alc260_volume_init_verbs[] = {
 static int alc260_parse_auto_config(struct hda_codec *codec)
 {
        struct alc_spec *spec = codec->spec;
-       unsigned int wcap;
        int err;
        static hda_nid_t alc260_ignore[] = { 0x17, 0 };
 
@@ -5341,19 +5610,6 @@ static int alc260_parse_auto_config(struct hda_codec *codec)
        spec->num_mux_defs = 1;
        spec->input_mux = &spec->private_imux;
 
-       /* 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 || spec->input_mux->num_items == 1) {
-               spec->adc_nids = alc260_adc_nids_alt;
-               spec->num_adc_nids = ARRAY_SIZE(alc260_adc_nids_alt);
-               add_mixer(spec, alc260_capture_alt_mixer);
-       } else {
-               spec->adc_nids = alc260_adc_nids;
-               spec->num_adc_nids = ARRAY_SIZE(alc260_adc_nids);
-               add_mixer(spec, alc260_capture_mixer);
-       }
-
        store_pin_configs(codec);
        return 1;
 }
@@ -5423,12 +5679,11 @@ static struct alc_config_preset alc260_presets[] = {
        [ALC260_BASIC] = {
                .mixers = { alc260_base_output_mixer,
                            alc260_input_mixer,
-                           alc260_pc_beep_mixer,
-                           alc260_capture_mixer },
+                           alc260_pc_beep_mixer },
                .init_verbs = { alc260_init_verbs },
                .num_dacs = ARRAY_SIZE(alc260_dac_nids),
                .dac_nids = alc260_dac_nids,
-               .num_adc_nids = ARRAY_SIZE(alc260_adc_nids),
+               .num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids),
                .adc_nids = alc260_adc_nids,
                .num_channel_mode = ARRAY_SIZE(alc260_modes),
                .channel_mode = alc260_modes,
@@ -5436,14 +5691,13 @@ static struct alc_config_preset alc260_presets[] = {
        },
        [ALC260_HP] = {
                .mixers = { alc260_hp_output_mixer,
-                           alc260_input_mixer,
-                           alc260_capture_alt_mixer },
+                           alc260_input_mixer },
                .init_verbs = { alc260_init_verbs,
                                alc260_hp_unsol_verbs },
                .num_dacs = ARRAY_SIZE(alc260_dac_nids),
                .dac_nids = alc260_dac_nids,
-               .num_adc_nids = ARRAY_SIZE(alc260_hp_adc_nids),
-               .adc_nids = alc260_hp_adc_nids,
+               .num_adc_nids = ARRAY_SIZE(alc260_adc_nids_alt),
+               .adc_nids = alc260_adc_nids_alt,
                .num_channel_mode = ARRAY_SIZE(alc260_modes),
                .channel_mode = alc260_modes,
                .input_mux = &alc260_capture_source,
@@ -5452,14 +5706,13 @@ static struct alc_config_preset alc260_presets[] = {
        },
        [ALC260_HP_DC7600] = {
                .mixers = { alc260_hp_dc7600_mixer,
-                           alc260_input_mixer,
-                           alc260_capture_alt_mixer },
+                           alc260_input_mixer },
                .init_verbs = { alc260_init_verbs,
                                alc260_hp_dc7600_verbs },
                .num_dacs = ARRAY_SIZE(alc260_dac_nids),
                .dac_nids = alc260_dac_nids,
-               .num_adc_nids = ARRAY_SIZE(alc260_hp_adc_nids),
-               .adc_nids = alc260_hp_adc_nids,
+               .num_adc_nids = ARRAY_SIZE(alc260_adc_nids_alt),
+               .adc_nids = alc260_adc_nids_alt,
                .num_channel_mode = ARRAY_SIZE(alc260_modes),
                .channel_mode = alc260_modes,
                .input_mux = &alc260_capture_source,
@@ -5468,14 +5721,13 @@ static struct alc_config_preset alc260_presets[] = {
        },
        [ALC260_HP_3013] = {
                .mixers = { alc260_hp_3013_mixer,
-                           alc260_input_mixer,
-                           alc260_capture_alt_mixer },
+                           alc260_input_mixer },
                .init_verbs = { alc260_hp_3013_init_verbs,
                                alc260_hp_3013_unsol_verbs },
                .num_dacs = ARRAY_SIZE(alc260_dac_nids),
                .dac_nids = alc260_dac_nids,
-               .num_adc_nids = ARRAY_SIZE(alc260_hp_adc_nids),
-               .adc_nids = alc260_hp_adc_nids,
+               .num_adc_nids = ARRAY_SIZE(alc260_adc_nids_alt),
+               .adc_nids = alc260_adc_nids_alt,
                .num_channel_mode = ARRAY_SIZE(alc260_modes),
                .channel_mode = alc260_modes,
                .input_mux = &alc260_capture_source,
@@ -5483,8 +5735,7 @@ static struct alc_config_preset alc260_presets[] = {
                .init_hook = alc260_hp_3013_automute,
        },
        [ALC260_FUJITSU_S702X] = {
-               .mixers = { alc260_fujitsu_mixer,
-                           alc260_capture_mixer },
+               .mixers = { alc260_fujitsu_mixer },
                .init_verbs = { alc260_fujitsu_init_verbs },
                .num_dacs = ARRAY_SIZE(alc260_dac_nids),
                .dac_nids = alc260_dac_nids,
@@ -5496,8 +5747,7 @@ static struct alc_config_preset alc260_presets[] = {
                .input_mux = alc260_fujitsu_capture_sources,
        },
        [ALC260_ACER] = {
-               .mixers = { alc260_acer_mixer,
-                           alc260_capture_mixer },
+               .mixers = { alc260_acer_mixer },
                .init_verbs = { alc260_acer_init_verbs },
                .num_dacs = ARRAY_SIZE(alc260_dac_nids),
                .dac_nids = alc260_dac_nids,
@@ -5509,8 +5759,7 @@ static struct alc_config_preset alc260_presets[] = {
                .input_mux = alc260_acer_capture_sources,
        },
        [ALC260_WILL] = {
-               .mixers = { alc260_will_mixer,
-                           alc260_capture_mixer },
+               .mixers = { alc260_will_mixer },
                .init_verbs = { alc260_init_verbs, alc260_will_verbs },
                .num_dacs = ARRAY_SIZE(alc260_dac_nids),
                .dac_nids = alc260_dac_nids,
@@ -5522,8 +5771,7 @@ static struct alc_config_preset alc260_presets[] = {
                .input_mux = &alc260_capture_source,
        },
        [ALC260_REPLACER_672V] = {
-               .mixers = { alc260_replacer_672v_mixer,
-                           alc260_capture_mixer },
+               .mixers = { alc260_replacer_672v_mixer },
                .init_verbs = { alc260_init_verbs, alc260_replacer_672v_verbs },
                .num_dacs = ARRAY_SIZE(alc260_dac_nids),
                .dac_nids = alc260_dac_nids,
@@ -5538,8 +5786,7 @@ static struct alc_config_preset alc260_presets[] = {
        },
 #ifdef CONFIG_SND_DEBUG
        [ALC260_TEST] = {
-               .mixers = { alc260_test_mixer,
-                           alc260_capture_mixer },
+               .mixers = { alc260_test_mixer },
                .init_verbs = { alc260_test_init_verbs },
                .num_dacs = ARRAY_SIZE(alc260_test_dac_nids),
                .dac_nids = alc260_test_dac_nids,
@@ -5598,6 +5845,21 @@ static int patch_alc260(struct hda_codec *codec)
        spec->stream_digital_playback = &alc260_pcm_digital_playback;
        spec->stream_digital_capture = &alc260_pcm_digital_capture;
 
+       if (!spec->adc_nids && spec->input_mux) {
+               /* check whether NID 0x04 is valid */
+               unsigned int wcap = get_wcaps(codec, 0x04);
+               wcap = (wcap & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
+               /* get type */
+               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);
+               } else {
+                       spec->adc_nids = alc260_adc_nids;
+                       spec->num_adc_nids = ARRAY_SIZE(alc260_adc_nids);
+               }
+       }
+       set_capture_mixer(spec);
+
        spec->vmaster_nid = 0x08;
 
        codec->patch_ops = alc_patch_ops;
@@ -6336,9 +6598,6 @@ static struct hda_verb alc882_auto_init_verbs[] = {
        { }
 };
 
-#define alc882_capture_alt_mixer       alc880_capture_alt_mixer
-#define alc882_capture_mixer           alc880_capture_mixer
-
 #ifdef CONFIG_SND_HDA_POWER_SAVE
 #define alc882_loopbacks       alc880_loopbacks
 #endif
@@ -6467,8 +6726,7 @@ static struct alc_config_preset alc882_presets[] = {
                .init_hook = alc885_imac24_init_hook,
        },
        [ALC882_TARGA] = {
-               .mixers = { alc882_targa_mixer, alc882_chmode_mixer,
-                           alc882_capture_mixer },
+               .mixers = { alc882_targa_mixer, alc882_chmode_mixer },
                .init_verbs = { alc882_init_verbs, alc882_targa_verbs},
                .num_dacs = ARRAY_SIZE(alc882_dac_nids),
                .dac_nids = alc882_dac_nids,
@@ -6484,8 +6742,7 @@ static struct alc_config_preset alc882_presets[] = {
                .init_hook = alc882_targa_automute,
        },
        [ALC882_ASUS_A7J] = {
-               .mixers = { alc882_asus_a7j_mixer, alc882_chmode_mixer,
-                           alc882_capture_mixer },
+               .mixers = { alc882_asus_a7j_mixer, alc882_chmode_mixer },
                .init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs},
                .num_dacs = ARRAY_SIZE(alc882_dac_nids),
                .dac_nids = alc882_dac_nids,
@@ -6800,14 +7057,13 @@ static int patch_alc882(struct hda_codec *codec)
                        spec->adc_nids = alc882_adc_nids_alt;
                        spec->num_adc_nids = ARRAY_SIZE(alc882_adc_nids_alt);
                        spec->capsrc_nids = alc882_capsrc_nids_alt;
-                       add_mixer(spec, alc882_capture_alt_mixer);
                } else {
                        spec->adc_nids = alc882_adc_nids;
                        spec->num_adc_nids = ARRAY_SIZE(alc882_adc_nids);
                        spec->capsrc_nids = alc882_capsrc_nids;
-                       add_mixer(spec, alc882_capture_mixer);
                }
        }
+       set_capture_mixer(spec);
 
        spec->vmaster_nid = 0x0c;
 
@@ -6836,6 +7092,8 @@ static int patch_alc882(struct hda_codec *codec)
 #define ALC883_DIGOUT_NID      0x06
 #define ALC883_DIGIN_NID       0x0a
 
+#define ALC1200_DIGOUT_NID     0x10
+
 static hda_nid_t alc883_dac_nids[4] = {
        /* front, rear, clfe, rear_surr */
        0x02, 0x03, 0x04, 0x05
@@ -6846,8 +7104,20 @@ static hda_nid_t alc883_adc_nids[2] = {
        0x08, 0x09,
 };
 
+static hda_nid_t alc883_adc_nids_alt[1] = {
+       /* ADC1 */
+       0x08,
+};
+
+static hda_nid_t alc883_adc_nids_rev[2] = {
+       /* ADC2-1 */
+       0x09, 0x08
+};
+
 static hda_nid_t alc883_capsrc_nids[2] = { 0x23, 0x22 };
 
+static hda_nid_t alc883_capsrc_nids_rev[2] = { 0x22, 0x23 };
+
 /* input MUX */
 /* FIXME: should be a matrix-type input source selection */
 
@@ -7067,19 +7337,6 @@ static struct snd_kcontrol_new alc883_base_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
        HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7097,19 +7354,6 @@ static struct snd_kcontrol_new alc883_mitac_mixer[] = {
        HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7124,19 +7368,6 @@ static struct snd_kcontrol_new alc883_clevo_m720_mixer[] = {
        HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7151,19 +7382,6 @@ static struct snd_kcontrol_new alc883_2ch_fujitsu_pi2515_mixer[] = {
        HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7183,19 +7401,6 @@ static struct snd_kcontrol_new alc883_3ST_2ch_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
        HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7221,17 +7426,6 @@ static struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
        HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7258,19 +7452,6 @@ static struct snd_kcontrol_new alc883_3ST_6ch_intel_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
        HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7296,18 +7477,6 @@ static struct snd_kcontrol_new alc883_fivestack_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
        HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7328,19 +7497,6 @@ static struct snd_kcontrol_new alc883_tagra_mixer[] = {
        HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7356,19 +7512,6 @@ static struct snd_kcontrol_new alc883_tagra_2ch_mixer[] = {
        HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7381,17 +7524,6 @@ static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = {
        HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7405,19 +7537,6 @@ static struct snd_kcontrol_new alc883_lenovo_nb0763_mixer[] = {
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("iMic Playback Volume", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_MUTE("iMic Playback Switch", 0x0b, 0x1, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7431,19 +7550,6 @@ static struct snd_kcontrol_new alc883_medion_md2_mixer[] = {
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
        HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7456,19 +7562,6 @@ static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
        HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7496,19 +7589,6 @@ static struct snd_kcontrol_new alc888_lenovo_sky_mixer[] = {
        HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
        HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 2,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -7539,6 +7619,10 @@ static struct snd_kcontrol_new alc883_asus_eee1601_mixer[] = {
        HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
+       { } /* end */
+};
+
+static struct snd_kcontrol_new alc883_asus_eee1601_cap_mixer[] = {
        HDA_BIND_VOL("Capture Volume", &alc883_bind_cap_vol),
        HDA_BIND_SW("Capture Switch", &alc883_bind_cap_switch),
        {
@@ -8203,9 +8287,6 @@ static struct hda_verb alc883_auto_init_verbs[] = {
        { }
 };
 
-/* capture mixer elements */
-#define alc883_capture_mixer   alc880_capture_alt_mixer        /* 2 ADC ver */
-
 static struct hda_verb alc888_asus_m90v_verbs[] = {
        {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
        {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
@@ -8328,6 +8409,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = {
        [ALC883_TARGA_2ch_DIG]  = "targa-2ch-dig",
        [ALC883_ACER]           = "acer",
        [ALC883_ACER_ASPIRE]    = "acer-aspire",
+       [ALC888_ACER_ASPIRE_4930G]      = "acer-aspire-4930g",
        [ALC883_MEDION]         = "medion",
        [ALC883_MEDION_MD2]     = "medion-md2",
        [ALC883_LAPTOP_EAPD]    = "laptop-eapd",
@@ -8341,16 +8423,21 @@ static const char *alc883_models[ALC883_MODEL_LAST] = {
        [ALC883_MITAC]          = "mitac",
        [ALC883_CLEVO_M720]     = "clevo-m720",
        [ALC883_FUJITSU_PI2515] = "fujitsu-pi2515",
+       [ALC888_FUJITSU_XA3530] = "fujitsu-xa3530",
        [ALC883_3ST_6ch_INTEL]  = "3stack-6ch-intel",
+       [ALC1200_ASUS_P5Q]      = "asus-p5q",
        [ALC883_AUTO]           = "auto",
 };
 
 static struct snd_pci_quirk alc883_cfg_tbl[] = {
        SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC883_3ST_6ch_DIG),
        SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_ACER_ASPIRE),
+       SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_ACER_ASPIRE),
        SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE),
        SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_ACER_ASPIRE),
        SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_ACER_ASPIRE),
+       SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G",
+               ALC888_ACER_ASPIRE_4930G),
        SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */
        SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL),
        SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG),
@@ -8359,6 +8446,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
        SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V),
        SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG),
+       SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q),
        SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601),
        SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG),
@@ -8385,6 +8473,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
        SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x1462, 0x7187, "MSI", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x1462, 0x7250, "MSI", ALC883_6ST_DIG),
+       SND_PCI_QUIRK(0x1462, 0x7260, "MSI 7260", ALC883_TARGA_DIG),
        SND_PCI_QUIRK(0x1462, 0x7267, "MSI", ALC883_3ST_6ch_DIG),
        SND_PCI_QUIRK(0x1462, 0x7280, "MSI", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x1462, 0x7327, "MSI", ALC883_6ST_DIG),
@@ -8396,12 +8485,15 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
        SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch),
        SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION),
        SND_PCI_QUIRK(0x1734, 0x1108, "Fujitsu AMILO Pi2515", ALC883_FUJITSU_PI2515),
+       SND_PCI_QUIRK(0x1734, 0x113d, "Fujitsu AMILO Xa3530",
+               ALC888_FUJITSU_XA3530),
        SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo 101e", ALC883_LENOVO_101E_2ch),
        SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763),
        SND_PCI_QUIRK(0x17aa, 0x3bfc, "Lenovo NB0763", ALC883_LENOVO_NB0763),
        SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763),
        SND_PCI_QUIRK(0x17aa, 0x101d, "Lenovo Sky", ALC888_LENOVO_SKY),
        SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
+       SND_PCI_QUIRK(0x17c0, 0x4085, "MEDION MD96630", ALC888_LENOVO_MS7195_DIG),
        SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG),
        SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66),
        SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL),
@@ -8485,6 +8577,8 @@ static struct alc_config_preset alc883_presets[] = {
                .init_verbs = { alc883_init_verbs, alc883_tagra_verbs},
                .num_dacs = ARRAY_SIZE(alc883_dac_nids),
                .dac_nids = alc883_dac_nids,
+               .adc_nids = alc883_adc_nids_alt,
+               .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt),
                .dig_out_nid = ALC883_DIGOUT_NID,
                .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
                .channel_mode = alc883_3ST_2ch_modes,
@@ -8518,6 +8612,26 @@ static struct alc_config_preset alc883_presets[] = {
                .unsol_event = alc883_acer_aspire_unsol_event,
                .init_hook = alc883_acer_aspire_automute,
        },
+       [ALC888_ACER_ASPIRE_4930G] = {
+               .mixers = { alc888_base_mixer,
+                               alc883_chmode_mixer },
+               .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs,
+                               alc888_acer_aspire_4930g_verbs },
+               .num_dacs = ARRAY_SIZE(alc883_dac_nids),
+               .dac_nids = alc883_dac_nids,
+               .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_rev),
+               .adc_nids = alc883_adc_nids_rev,
+               .capsrc_nids = alc883_capsrc_nids_rev,
+               .dig_out_nid = ALC883_DIGOUT_NID,
+               .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes),
+               .channel_mode = alc883_3ST_6ch_modes,
+               .need_dac_fix = 1,
+               .num_mux_defs =
+                       ARRAY_SIZE(alc888_2_capture_sources),
+               .input_mux = alc888_2_capture_sources,
+               .unsol_event = alc888_acer_aspire_4930g_unsol_event,
+               .init_hook = alc888_acer_aspire_4930g_automute,
+       },
        [ALC883_MEDION] = {
                .mixers = { alc883_fivestack_mixer,
                            alc883_chmode_mixer },
@@ -8525,6 +8639,8 @@ static struct alc_config_preset alc883_presets[] = {
                                alc883_medion_eapd_verbs },
                .num_dacs = ARRAY_SIZE(alc883_dac_nids),
                .dac_nids = alc883_dac_nids,
+               .adc_nids = alc883_adc_nids_alt,
+               .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt),
                .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes),
                .channel_mode = alc883_sixstack_modes,
                .input_mux = &alc883_capture_source,
@@ -8567,6 +8683,8 @@ static struct alc_config_preset alc883_presets[] = {
                .init_verbs = { alc883_init_verbs, alc883_lenovo_101e_verbs},
                .num_dacs = ARRAY_SIZE(alc883_dac_nids),
                .dac_nids = alc883_dac_nids,
+               .adc_nids = alc883_adc_nids_alt,
+               .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_alt),
                .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
                .channel_mode = alc883_3ST_2ch_modes,
                .input_mux = &alc883_lenovo_101e_capture_source,
@@ -8657,14 +8775,30 @@ static struct alc_config_preset alc883_presets[] = {
                .unsol_event = alc883_2ch_fujitsu_pi2515_unsol_event,
                .init_hook = alc883_2ch_fujitsu_pi2515_automute,
        },
+       [ALC888_FUJITSU_XA3530] = {
+               .mixers = { alc888_base_mixer, alc883_chmode_mixer },
+               .init_verbs = { alc883_init_verbs,
+                       alc888_fujitsu_xa3530_verbs },
+               .num_dacs = ARRAY_SIZE(alc883_dac_nids),
+               .dac_nids = alc883_dac_nids,
+               .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_rev),
+               .adc_nids = alc883_adc_nids_rev,
+               .capsrc_nids = alc883_capsrc_nids_rev,
+               .dig_out_nid = ALC883_DIGOUT_NID,
+               .num_channel_mode = ARRAY_SIZE(alc888_4ST_8ch_intel_modes),
+               .channel_mode = alc888_4ST_8ch_intel_modes,
+               .num_mux_defs =
+                       ARRAY_SIZE(alc888_2_capture_sources),
+               .input_mux = alc888_2_capture_sources,
+               .unsol_event = alc888_fujitsu_xa3530_unsol_event,
+               .init_hook = alc888_fujitsu_xa3530_automute,
+       },
        [ALC888_LENOVO_SKY] = {
                .mixers = { alc888_lenovo_sky_mixer, alc883_chmode_mixer },
                .init_verbs = { alc883_init_verbs, alc888_lenovo_sky_verbs},
                .num_dacs = ARRAY_SIZE(alc883_dac_nids),
                .dac_nids = alc883_dac_nids,
                .dig_out_nid = ALC883_DIGOUT_NID,
-               .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
-               .adc_nids = alc883_adc_nids,
                .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes),
                .channel_mode = alc883_sixstack_modes,
                .need_dac_fix = 1,
@@ -8688,6 +8822,7 @@ static struct alc_config_preset alc883_presets[] = {
        },
        [ALC888_ASUS_EEE1601] = {
                .mixers = { alc883_asus_eee1601_mixer },
+               .cap_mixer = alc883_asus_eee1601_cap_mixer,
                .init_verbs = { alc883_init_verbs, alc888_asus_eee1601_verbs },
                .num_dacs = ARRAY_SIZE(alc883_dac_nids),
                .dac_nids = alc883_dac_nids,
@@ -8700,6 +8835,17 @@ static struct alc_config_preset alc883_presets[] = {
                .unsol_event = alc883_eee1601_unsol_event,
                .init_hook = alc883_eee1601_inithook,
        },
+       [ALC1200_ASUS_P5Q] = {
+               .mixers = { alc883_base_mixer, alc883_chmode_mixer },
+               .init_verbs = { alc883_init_verbs },
+               .num_dacs = ARRAY_SIZE(alc883_dac_nids),
+               .dac_nids = alc883_dac_nids,
+               .dig_out_nid = ALC1200_DIGOUT_NID,
+               .dig_in_nid = ALC883_DIGIN_NID,
+               .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes),
+               .channel_mode = alc883_sixstack_modes,
+               .input_mux = &alc883_capture_source,
+       },
 };
 
 
@@ -8794,7 +8940,6 @@ static int alc883_parse_auto_config(struct hda_codec *codec)
 
        /* hack - override the init verbs */
        spec->init_verbs[0] = alc883_auto_init_verbs;
-       add_mixer(spec, alc883_capture_mixer);
 
        return 1; /* config found */
 }
@@ -8877,10 +9022,15 @@ static int patch_alc883(struct hda_codec *codec)
        spec->stream_digital_playback = &alc883_pcm_digital_playback;
        spec->stream_digital_capture = &alc883_pcm_digital_capture;
 
-       spec->num_adc_nids = ARRAY_SIZE(alc883_adc_nids);
-       spec->adc_nids = alc883_adc_nids;
-       spec->capsrc_nids = alc883_capsrc_nids;
+       if (!spec->num_adc_nids) {
+               spec->num_adc_nids = ARRAY_SIZE(alc883_adc_nids);
+               spec->adc_nids = alc883_adc_nids;
+       }
+       if (!spec->capsrc_nids)
+               spec->capsrc_nids = alc883_capsrc_nids;
        spec->is_mix_capture = 1; /* matrix-style capture */
+       if (!spec->cap_mixer)
+               set_capture_mixer(spec);
 
        spec->vmaster_nid = 0x0c;
 
@@ -9371,20 +9521,6 @@ static struct snd_kcontrol_new alc262_toshiba_s06_mixer[] = {
        HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
        HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
-       HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -10556,7 +10692,8 @@ static struct alc_config_preset alc262_presets[] = {
                .init_hook = alc262_hippo_automute,
        },
        [ALC262_ULTRA] = {
-               .mixers = { alc262_ultra_mixer, alc262_ultra_capture_mixer },
+               .mixers = { alc262_ultra_mixer },
+               .cap_mixer = alc262_ultra_capture_mixer,
                .init_verbs = { alc262_ultra_verbs },
                .num_dacs = ARRAY_SIZE(alc262_dac_nids),
                .dac_nids = alc262_dac_nids,
@@ -10693,14 +10830,14 @@ static int patch_alc262(struct hda_codec *codec)
                        spec->adc_nids = alc262_adc_nids_alt;
                        spec->num_adc_nids = ARRAY_SIZE(alc262_adc_nids_alt);
                        spec->capsrc_nids = alc262_capsrc_nids_alt;
-                       add_mixer(spec, alc262_capture_alt_mixer);
                } else {
                        spec->adc_nids = alc262_adc_nids;
                        spec->num_adc_nids = ARRAY_SIZE(alc262_adc_nids);
                        spec->capsrc_nids = alc262_capsrc_nids;
-                       add_mixer(spec, alc262_capture_mixer);
                }
        }
+       if (!spec->cap_mixer)
+               set_capture_mixer(spec);
 
        spec->vmaster_nid = 0x0c;
 
@@ -10872,6 +11009,22 @@ static struct snd_kcontrol_new alc268_acer_mixer[] = {
        { }
 };
 
+static struct snd_kcontrol_new alc268_acer_dmic_mixer[] = {
+       /* output mixer control */
+       HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
+       {
+               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+               .name = "Master Playback Switch",
+               .info = snd_hda_mixer_amp_switch_info,
+               .get = snd_hda_mixer_amp_switch_get,
+               .put = alc268_acer_master_sw_put,
+               .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
+       },
+       HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT),
+       { }
+};
+
 static struct hda_verb alc268_acer_aspire_one_verbs[] = {
        {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
@@ -11197,6 +11350,15 @@ static struct hda_input_mux alc268_capture_source = {
 };
 
 static struct hda_input_mux alc268_acer_capture_source = {
+       .num_items = 3,
+       .items = {
+               { "Mic", 0x0 },
+               { "Internal Mic", 0x1 },
+               { "Line", 0x2 },
+       },
+};
+
+static struct hda_input_mux alc268_acer_dmic_capture_source = {
        .num_items = 3,
        .items = {
                { "Mic", 0x0 },
@@ -11480,6 +11642,7 @@ static const char *alc268_models[ALC268_MODEL_LAST] = {
        [ALC268_3ST]            = "3stack",
        [ALC268_TOSHIBA]        = "toshiba",
        [ALC268_ACER]           = "acer",
+       [ALC268_ACER_DMIC]      = "acer-dmic",
        [ALC268_ACER_ASPIRE_ONE]        = "acer-aspire",
        [ALC268_DELL]           = "dell",
        [ALC268_ZEPTO]          = "zepto",
@@ -11575,6 +11738,23 @@ static struct alc_config_preset alc268_presets[] = {
                .unsol_event = alc268_acer_unsol_event,
                .init_hook = alc268_acer_init_hook,
        },
+       [ALC268_ACER_DMIC] = {
+               .mixers = { alc268_acer_dmic_mixer, alc268_capture_alt_mixer,
+                           alc268_beep_mixer },
+               .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
+                               alc268_acer_verbs },
+               .num_dacs = ARRAY_SIZE(alc268_dac_nids),
+               .dac_nids = alc268_dac_nids,
+               .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt),
+               .adc_nids = alc268_adc_nids_alt,
+               .capsrc_nids = alc268_capsrc_nids,
+               .hp_nid = 0x02,
+               .num_channel_mode = ARRAY_SIZE(alc268_modes),
+               .channel_mode = alc268_modes,
+               .input_mux = &alc268_acer_dmic_capture_source,
+               .unsol_event = alc268_acer_unsol_event,
+               .init_hook = alc268_acer_init_hook,
+       },
        [ALC268_ACER_ASPIRE_ONE] = {
                .mixers = { alc268_acer_aspire_one_mixer,
                                alc268_capture_alt_mixer },
@@ -11815,6 +11995,31 @@ static struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = {
        { }
 };
 
+static struct snd_kcontrol_new alc269_lifebook_mixer[] = {
+       /* output mixer control */
+       HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
+       {
+               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+               .name = "Master Playback Switch",
+               .info = snd_hda_mixer_amp_switch_info,
+               .get = snd_hda_mixer_amp_switch_get,
+               .put = alc268_acer_master_sw_put,
+               .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
+       },
+       HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
+       HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
+       HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Dock Mic Playback Volume", 0x0b, 0x03, HDA_INPUT),
+       HDA_CODEC_MUTE("Dock Mic Playback Switch", 0x0b, 0x03, HDA_INPUT),
+       HDA_CODEC_VOLUME("Dock Mic Boost", 0x1b, 0, HDA_INPUT),
+       HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x04, HDA_INPUT),
+       HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x04, HDA_INPUT),
+       { }
+};
+
 /* bind volumes of both NID 0x0c and 0x0d */
 static struct hda_bind_ctls alc269_epc_bind_vol = {
        .ops = &snd_hda_bind_vol,
@@ -11833,28 +12038,18 @@ static struct snd_kcontrol_new alc269_eeepc_mixer[] = {
 };
 
 /* capture mixer elements */
-static struct snd_kcontrol_new alc269_capture_mixer[] = {
+static struct snd_kcontrol_new alc269_epc_capture_mixer[] = {
        HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
+       HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
        { } /* end */
 };
 
-/* capture mixer elements */
-static struct snd_kcontrol_new alc269_epc_capture_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
+/* FSC amilo */
+static struct snd_kcontrol_new alc269_fujitsu_mixer[] = {
+       HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
+       HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
+       HDA_BIND_VOL("PCM Playback Volume", &alc269_epc_bind_vol),
        { } /* end */
 };
 
@@ -11875,6 +12070,20 @@ static struct hda_verb alc269_quanta_fl1_verbs[] = {
        { }
 };
 
+static struct hda_verb alc269_lifebook_verbs[] = {
+       {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
+       {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01},
+       {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+       {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+       {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+       {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+       {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
+       {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+       {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
+       {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+       { }
+};
+
 /* toggle speaker-output according to the hp-jack state */
 static void alc269_quanta_fl1_speaker_automute(struct hda_codec *codec)
 {
@@ -11900,6 +12109,37 @@ static void alc269_quanta_fl1_speaker_automute(struct hda_codec *codec)
                        AC_VERB_SET_PROC_COEF, 0x480);
 }
 
+/* toggle speaker-output according to the hp-jacks state */
+static void alc269_lifebook_speaker_automute(struct hda_codec *codec)
+{
+       unsigned int present;
+       unsigned char bits;
+
+       /* Check laptop headphone socket */
+       present = snd_hda_codec_read(codec, 0x15, 0,
+                       AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+
+       /* Check port replicator headphone socket */
+       present |= snd_hda_codec_read(codec, 0x1a, 0,
+                       AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+
+       bits = present ? AMP_IN_MUTE(0) : 0;
+       snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
+                       AMP_IN_MUTE(0), bits);
+       snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
+                       AMP_IN_MUTE(0), bits);
+
+       snd_hda_codec_write(codec, 0x20, 0,
+                       AC_VERB_SET_COEF_INDEX, 0x0c);
+       snd_hda_codec_write(codec, 0x20, 0,
+                       AC_VERB_SET_PROC_COEF, 0x680);
+
+       snd_hda_codec_write(codec, 0x20, 0,
+                       AC_VERB_SET_COEF_INDEX, 0x0c);
+       snd_hda_codec_write(codec, 0x20, 0,
+                       AC_VERB_SET_PROC_COEF, 0x480);
+}
+
 static void alc269_quanta_fl1_mic_automute(struct hda_codec *codec)
 {
        unsigned int present;
@@ -11910,6 +12150,29 @@ static void alc269_quanta_fl1_mic_automute(struct hda_codec *codec)
                            AC_VERB_SET_CONNECT_SEL, present ? 0x0 : 0x1);
 }
 
+static void alc269_lifebook_mic_autoswitch(struct hda_codec *codec)
+{
+       unsigned int present_laptop;
+       unsigned int present_dock;
+
+       present_laptop = snd_hda_codec_read(codec, 0x18, 0,
+                               AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+
+       present_dock = snd_hda_codec_read(codec, 0x1b, 0,
+                               AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+
+       /* Laptop mic port overrides dock mic port, design decision */
+       if (present_dock)
+               snd_hda_codec_write(codec, 0x23, 0,
+                               AC_VERB_SET_CONNECT_SEL, 0x3);
+       if (present_laptop)
+               snd_hda_codec_write(codec, 0x23, 0,
+                               AC_VERB_SET_CONNECT_SEL, 0x0);
+       if (!present_dock && !present_laptop)
+               snd_hda_codec_write(codec, 0x23, 0,
+                               AC_VERB_SET_CONNECT_SEL, 0x1);
+}
+
 static void alc269_quanta_fl1_unsol_event(struct hda_codec *codec,
                                    unsigned int res)
 {
@@ -11919,12 +12182,27 @@ static void alc269_quanta_fl1_unsol_event(struct hda_codec *codec,
                alc269_quanta_fl1_mic_automute(codec);
 }
 
+static void alc269_lifebook_unsol_event(struct hda_codec *codec,
+                                       unsigned int res)
+{
+       if ((res >> 26) == ALC880_HP_EVENT)
+               alc269_lifebook_speaker_automute(codec);
+       if ((res >> 26) == ALC880_MIC_EVENT)
+               alc269_lifebook_mic_autoswitch(codec);
+}
+
 static void alc269_quanta_fl1_init_hook(struct hda_codec *codec)
 {
        alc269_quanta_fl1_speaker_automute(codec);
        alc269_quanta_fl1_mic_automute(codec);
 }
 
+static void alc269_lifebook_init_hook(struct hda_codec *codec)
+{
+       alc269_lifebook_speaker_automute(codec);
+       alc269_lifebook_mic_autoswitch(codec);
+}
+
 static struct hda_verb alc269_eeepc_dmic_init_verbs[] = {
        {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
        {0x23, AC_VERB_SET_CONNECT_SEL, 0x05},
@@ -12247,7 +12525,8 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
        if (err < 0)
                return err;
 
-       add_mixer(spec, alc269_capture_mixer);
+       if (!spec->cap_mixer)
+               set_capture_mixer(spec);
 
        store_pin_configs(codec);
        return 1;
@@ -12276,7 +12555,9 @@ static const char *alc269_models[ALC269_MODEL_LAST] = {
        [ALC269_BASIC]                  = "basic",
        [ALC269_QUANTA_FL1]             = "quanta",
        [ALC269_ASUS_EEEPC_P703]        = "eeepc-p703",
-       [ALC269_ASUS_EEEPC_P901]        = "eeepc-p901"
+       [ALC269_ASUS_EEEPC_P901]        = "eeepc-p901",
+       [ALC269_FUJITSU]                = "fujitsu",
+       [ALC269_LIFEBOOK]               = "lifebook"
 };
 
 static struct snd_pci_quirk alc269_cfg_tbl[] = {
@@ -12287,12 +12568,14 @@ static struct snd_pci_quirk alc269_cfg_tbl[] = {
                      ALC269_ASUS_EEEPC_P901),
        SND_PCI_QUIRK(0x1043, 0x834a, "ASUS Eeepc S101",
                      ALC269_ASUS_EEEPC_P901),
+       SND_PCI_QUIRK(0x1734, 0x115d, "FSC Amilo", ALC269_FUJITSU),
+       SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK),
        {}
 };
 
 static struct alc_config_preset alc269_presets[] = {
        [ALC269_BASIC] = {
-               .mixers = { alc269_base_mixer, alc269_capture_mixer },
+               .mixers = { alc269_base_mixer },
                .init_verbs = { alc269_init_verbs },
                .num_dacs = ARRAY_SIZE(alc269_dac_nids),
                .dac_nids = alc269_dac_nids,
@@ -12314,7 +12597,8 @@ static struct alc_config_preset alc269_presets[] = {
                .init_hook = alc269_quanta_fl1_init_hook,
        },
        [ALC269_ASUS_EEEPC_P703] = {
-               .mixers = { alc269_eeepc_mixer, alc269_epc_capture_mixer },
+               .mixers = { alc269_eeepc_mixer },
+               .cap_mixer = alc269_epc_capture_mixer,
                .init_verbs = { alc269_init_verbs,
                                alc269_eeepc_amic_init_verbs },
                .num_dacs = ARRAY_SIZE(alc269_dac_nids),
@@ -12327,7 +12611,22 @@ static struct alc_config_preset alc269_presets[] = {
                .init_hook = alc269_eeepc_amic_inithook,
        },
        [ALC269_ASUS_EEEPC_P901] = {
-               .mixers = { alc269_eeepc_mixer, alc269_epc_capture_mixer},
+               .mixers = { alc269_eeepc_mixer },
+               .cap_mixer = alc269_epc_capture_mixer,
+               .init_verbs = { alc269_init_verbs,
+                               alc269_eeepc_dmic_init_verbs },
+               .num_dacs = ARRAY_SIZE(alc269_dac_nids),
+               .dac_nids = alc269_dac_nids,
+               .hp_nid = 0x03,
+               .num_channel_mode = ARRAY_SIZE(alc269_modes),
+               .channel_mode = alc269_modes,
+               .input_mux = &alc269_eeepc_dmic_capture_source,
+               .unsol_event = alc269_eeepc_dmic_unsol_event,
+               .init_hook = alc269_eeepc_dmic_inithook,
+       },
+       [ALC269_FUJITSU] = {
+               .mixers = { alc269_fujitsu_mixer, alc269_beep_mixer },
+               .cap_mixer = alc269_epc_capture_mixer,
                .init_verbs = { alc269_init_verbs,
                                alc269_eeepc_dmic_init_verbs },
                .num_dacs = ARRAY_SIZE(alc269_dac_nids),
@@ -12339,6 +12638,18 @@ static struct alc_config_preset alc269_presets[] = {
                .unsol_event = alc269_eeepc_dmic_unsol_event,
                .init_hook = alc269_eeepc_dmic_inithook,
        },
+       [ALC269_LIFEBOOK] = {
+               .mixers = { alc269_lifebook_mixer },
+               .init_verbs = { alc269_init_verbs, alc269_lifebook_verbs },
+               .num_dacs = ARRAY_SIZE(alc269_dac_nids),
+               .dac_nids = alc269_dac_nids,
+               .hp_nid = 0x03,
+               .num_channel_mode = ARRAY_SIZE(alc269_modes),
+               .channel_mode = alc269_modes,
+               .input_mux = &alc269_capture_source,
+               .unsol_event = alc269_lifebook_unsol_event,
+               .init_hook = alc269_lifebook_init_hook,
+       },
 };
 
 static int patch_alc269(struct hda_codec *codec)
@@ -12393,6 +12704,8 @@ static int patch_alc269(struct hda_codec *codec)
        spec->adc_nids = alc269_adc_nids;
        spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids);
        spec->capsrc_nids = alc269_capsrc_nids;
+       if (!spec->cap_mixer)
+               set_capture_mixer(spec);
 
        codec->patch_ops = alc_patch_ops;
        if (board_config == ALC269_AUTO)
@@ -12533,17 +12846,6 @@ static struct snd_kcontrol_new alc861_base_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT),
        HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_INPUT),
 
-        /* Capture mixer control */
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               .name = "Capture Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        { } /* end */
 };
 
@@ -12567,17 +12869,6 @@ static struct snd_kcontrol_new alc861_3ST_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT),
        HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_INPUT),
 
-       /* Capture mixer control */
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               .name = "Capture Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
                .name = "Channel Mode",
@@ -12595,18 +12886,6 @@ static struct snd_kcontrol_new alc861_toshiba_mixer[] = {
        HDA_CODEC_VOLUME("Mic Playback Volume", 0x15, 0x01, HDA_INPUT),
        HDA_CODEC_MUTE("Mic Playback Switch", 0x15, 0x01, HDA_INPUT),
 
-        /*Capture mixer control */
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               .name = "Capture Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
-
        { } /* end */
 };
 
@@ -12630,17 +12909,6 @@ static struct snd_kcontrol_new alc861_uniwill_m31_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT),
        HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_INPUT),
 
-       /* Capture mixer control */
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               .name = "Capture Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
                .name = "Channel Mode",
@@ -12672,17 +12940,6 @@ static struct snd_kcontrol_new alc861_asus_mixer[] = {
        HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT),
        HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_OUTPUT),
 
-       /* Capture mixer control */
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               .name = "Capture Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
        {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
                .name = "Channel Mode",
@@ -13214,25 +13471,6 @@ static int alc861_auto_create_analog_input_ctls(struct alc_spec *spec,
        return 0;
 }
 
-static struct snd_kcontrol_new alc861_capture_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
-
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
-       { } /* end */
-};
-
 static void alc861_auto_set_output_and_unmute(struct hda_codec *codec,
                                              hda_nid_t nid,
                                              int pin_type, int dac_idx)
@@ -13333,7 +13571,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec)
 
        spec->adc_nids = alc861_adc_nids;
        spec->num_adc_nids = ARRAY_SIZE(alc861_adc_nids);
-       add_mixer(spec, alc861_capture_mixer);
+       set_capture_mixer(spec);
 
        store_pin_configs(codec);
        return 1;
@@ -13674,25 +13912,6 @@ static struct snd_kcontrol_new alc861vd_chmode_mixer[] = {
        { } /* end */
 };
 
-static struct snd_kcontrol_new alc861vd_capture_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
-
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
-       { } /* end */
-};
-
 /* Pin assignment: Front=0x14, Rear=0x15, CLFE=0x16, Side=0x17
  *                 Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b
  */
@@ -14084,6 +14303,7 @@ static void alc861vd_dallas_unsol_event(struct hda_codec *codec, unsigned int re
 static const char *alc861vd_models[ALC861VD_MODEL_LAST] = {
        [ALC660VD_3ST]          = "3stack-660",
        [ALC660VD_3ST_DIG]      = "3stack-660-digout",
+       [ALC660VD_ASUS_V1S]     = "asus-v1s",
        [ALC861VD_3ST]          = "3stack",
        [ALC861VD_3ST_DIG]      = "3stack-digout",
        [ALC861VD_6ST_DIG]      = "6stack-digout",
@@ -14098,7 +14318,7 @@ static struct snd_pci_quirk alc861vd_cfg_tbl[] = {
        SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_HP),
        SND_PCI_QUIRK(0x1043, 0x12e2, "Asus z35m", ALC660VD_3ST),
        SND_PCI_QUIRK(0x1043, 0x1339, "Asus G1", ALC660VD_3ST),
-       SND_PCI_QUIRK(0x1043, 0x1633, "Asus V1Sn", ALC861VD_LENOVO),
+       SND_PCI_QUIRK(0x1043, 0x1633, "Asus V1Sn", ALC660VD_ASUS_V1S),
        SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS", ALC660VD_3ST_DIG),
        SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST),
        SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba A135", ALC861VD_LENOVO),
@@ -14205,6 +14425,21 @@ static struct alc_config_preset alc861vd_presets[] = {
                .unsol_event = alc861vd_dallas_unsol_event,
                .init_hook = alc861vd_dallas_automute,
        },
+       [ALC660VD_ASUS_V1S] = {
+               .mixers = { alc861vd_lenovo_mixer },
+               .init_verbs = { alc861vd_volume_init_verbs,
+                               alc861vd_3stack_init_verbs,
+                               alc861vd_eapd_verbs,
+                               alc861vd_lenovo_unsol_verbs },
+               .num_dacs = ARRAY_SIZE(alc660vd_dac_nids),
+               .dac_nids = alc660vd_dac_nids,
+               .dig_out_nid = ALC861VD_DIGOUT_NID,
+               .num_channel_mode = ARRAY_SIZE(alc861vd_3stack_2ch_modes),
+               .channel_mode = alc861vd_3stack_2ch_modes,
+               .input_mux = &alc861vd_capture_source,
+               .unsol_event = alc861vd_lenovo_unsol_event,
+               .init_hook = alc861vd_lenovo_automute,
+       },
 };
 
 /*
@@ -14516,7 +14751,7 @@ static int patch_alc861vd(struct hda_codec *codec)
        spec->capsrc_nids = alc861vd_capsrc_nids;
        spec->is_mix_capture = 1;
 
-       add_mixer(spec, alc861vd_capture_mixer);
+       set_capture_mixer(spec);
 
        spec->vmaster_nid = 0x02;
 
@@ -15188,25 +15423,6 @@ static struct hda_verb alc662_ecs_init_verbs[] = {
        {}
 };
 
-/* capture mixer elements */
-static struct snd_kcontrol_new alc662_capture_mixer[] = {
-       HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
-       HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
-       {
-               .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-               /* The multiple "Capture Source" controls confuse alsamixer
-                * So call somewhat different..
-                */
-               /* .name = "Capture Source", */
-               .name = "Input Source",
-               .count = 1,
-               .info = alc_mux_enum_info,
-               .get = alc_mux_enum_get,
-               .put = alc_mux_enum_put,
-       },
-       { } /* end */
-};
-
 static struct snd_kcontrol_new alc662_auto_capture_mixer[] = {
        HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
@@ -15778,7 +15994,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = {
 
 static struct alc_config_preset alc662_presets[] = {
        [ALC662_3ST_2ch_DIG] = {
-               .mixers = { alc662_3ST_2ch_mixer, alc662_capture_mixer },
+               .mixers = { alc662_3ST_2ch_mixer },
                .init_verbs = { alc662_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15789,8 +16005,7 @@ static struct alc_config_preset alc662_presets[] = {
                .input_mux = &alc662_capture_source,
        },
        [ALC662_3ST_6ch_DIG] = {
-               .mixers = { alc662_3ST_6ch_mixer, alc662_chmode_mixer,
-                           alc662_capture_mixer },
+               .mixers = { alc662_3ST_6ch_mixer, alc662_chmode_mixer },
                .init_verbs = { alc662_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15802,8 +16017,7 @@ static struct alc_config_preset alc662_presets[] = {
                .input_mux = &alc662_capture_source,
        },
        [ALC662_3ST_6ch] = {
-               .mixers = { alc662_3ST_6ch_mixer, alc662_chmode_mixer,
-                           alc662_capture_mixer },
+               .mixers = { alc662_3ST_6ch_mixer, alc662_chmode_mixer },
                .init_verbs = { alc662_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15813,8 +16027,7 @@ static struct alc_config_preset alc662_presets[] = {
                .input_mux = &alc662_capture_source,
        },
        [ALC662_5ST_DIG] = {
-               .mixers = { alc662_base_mixer, alc662_chmode_mixer,
-                           alc662_capture_mixer },
+               .mixers = { alc662_base_mixer, alc662_chmode_mixer },
                .init_verbs = { alc662_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15825,7 +16038,7 @@ static struct alc_config_preset alc662_presets[] = {
                .input_mux = &alc662_capture_source,
        },
        [ALC662_LENOVO_101E] = {
-               .mixers = { alc662_lenovo_101e_mixer, alc662_capture_mixer },
+               .mixers = { alc662_lenovo_101e_mixer },
                .init_verbs = { alc662_init_verbs, alc662_sue_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15836,7 +16049,7 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc662_lenovo_101e_all_automute,
        },
        [ALC662_ASUS_EEEPC_P701] = {
-               .mixers = { alc662_eeepc_p701_mixer, alc662_capture_mixer },
+               .mixers = { alc662_eeepc_p701_mixer },
                .init_verbs = { alc662_init_verbs,
                                alc662_eeepc_sue_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
@@ -15848,7 +16061,7 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc662_eeepc_inithook,
        },
        [ALC662_ASUS_EEEPC_EP20] = {
-               .mixers = { alc662_eeepc_ep20_mixer, alc662_capture_mixer,
+               .mixers = { alc662_eeepc_ep20_mixer,
                            alc662_chmode_mixer },
                .init_verbs = { alc662_init_verbs,
                                alc662_eeepc_ep20_sue_init_verbs },
@@ -15861,7 +16074,7 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc662_eeepc_ep20_inithook,
        },
        [ALC662_ECS] = {
-               .mixers = { alc662_ecs_mixer, alc662_capture_mixer },
+               .mixers = { alc662_ecs_mixer },
                .init_verbs = { alc662_init_verbs,
                                alc662_ecs_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
@@ -15873,7 +16086,7 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc662_eeepc_inithook,
        },
        [ALC663_ASUS_M51VA] = {
-               .mixers = { alc663_m51va_mixer, alc662_capture_mixer},
+               .mixers = { alc663_m51va_mixer },
                .init_verbs = { alc662_init_verbs, alc663_m51va_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15885,7 +16098,7 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc663_m51va_inithook,
        },
        [ALC663_ASUS_G71V] = {
-               .mixers = { alc663_g71v_mixer, alc662_capture_mixer},
+               .mixers = { alc663_g71v_mixer },
                .init_verbs = { alc662_init_verbs, alc663_g71v_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15897,7 +16110,7 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc663_g71v_inithook,
        },
        [ALC663_ASUS_H13] = {
-               .mixers = { alc663_m51va_mixer, alc662_capture_mixer},
+               .mixers = { alc663_m51va_mixer },
                .init_verbs = { alc662_init_verbs, alc663_m51va_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15908,7 +16121,7 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc663_m51va_inithook,
        },
        [ALC663_ASUS_G50V] = {
-               .mixers = { alc663_g50v_mixer, alc662_capture_mixer},
+               .mixers = { alc663_g50v_mixer },
                .init_verbs = { alc662_init_verbs, alc663_g50v_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
                .dac_nids = alc662_dac_nids,
@@ -15920,7 +16133,8 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc663_g50v_inithook,
        },
        [ALC663_ASUS_MODE1] = {
-               .mixers = { alc663_m51va_mixer, alc662_auto_capture_mixer },
+               .mixers = { alc663_m51va_mixer },
+               .cap_mixer = alc662_auto_capture_mixer,
                .init_verbs = { alc662_init_verbs,
                                alc663_21jd_amic_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
@@ -15934,7 +16148,8 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc663_mode1_inithook,
        },
        [ALC662_ASUS_MODE2] = {
-               .mixers = { alc662_1bjd_mixer, alc662_auto_capture_mixer },
+               .mixers = { alc662_1bjd_mixer },
+               .cap_mixer = alc662_auto_capture_mixer,
                .init_verbs = { alc662_init_verbs,
                                alc662_1bjd_amic_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
@@ -15947,7 +16162,8 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc662_mode2_inithook,
        },
        [ALC663_ASUS_MODE3] = {
-               .mixers = { alc663_two_hp_m1_mixer, alc662_auto_capture_mixer },
+               .mixers = { alc663_two_hp_m1_mixer },
+               .cap_mixer = alc662_auto_capture_mixer,
                .init_verbs = { alc662_init_verbs,
                                alc663_two_hp_amic_m1_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
@@ -15961,8 +16177,8 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc663_mode3_inithook,
        },
        [ALC663_ASUS_MODE4] = {
-               .mixers = { alc663_asus_21jd_clfe_mixer,
-                               alc662_auto_capture_mixer},
+               .mixers = { alc663_asus_21jd_clfe_mixer },
+               .cap_mixer = alc662_auto_capture_mixer,
                .init_verbs = { alc662_init_verbs,
                                alc663_21jd_amic_init_verbs},
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
@@ -15976,8 +16192,8 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc663_mode4_inithook,
        },
        [ALC663_ASUS_MODE5] = {
-               .mixers = { alc663_asus_15jd_clfe_mixer,
-                               alc662_auto_capture_mixer },
+               .mixers = { alc663_asus_15jd_clfe_mixer },
+               .cap_mixer = alc662_auto_capture_mixer,
                .init_verbs = { alc662_init_verbs,
                                alc663_15jd_amic_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
@@ -15991,7 +16207,8 @@ static struct alc_config_preset alc662_presets[] = {
                .init_hook = alc663_mode5_inithook,
        },
        [ALC663_ASUS_MODE6] = {
-               .mixers = { alc663_two_hp_m2_mixer, alc662_auto_capture_mixer },
+               .mixers = { alc663_two_hp_m2_mixer },
+               .cap_mixer = alc662_auto_capture_mixer,
                .init_verbs = { alc662_init_verbs,
                                alc663_two_hp_amic_m2_init_verbs },
                .num_dacs = ARRAY_SIZE(alc662_dac_nids),
@@ -16266,8 +16483,6 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
        if (err < 0)
                return err;
 
-       add_mixer(spec, alc662_capture_mixer);
-
        store_pin_configs(codec);
        return 1;
 }
@@ -16345,6 +16560,9 @@ static int patch_alc662(struct hda_codec *codec)
        spec->capsrc_nids = alc662_capsrc_nids;
        spec->is_mix_capture = 1;
 
+       if (!spec->cap_mixer)
+               set_capture_mixer(spec);
+
        spec->vmaster_nid = 0x02;
 
        codec->patch_ops = alc_patch_ops;