]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.39/patches.drivers/alsa-post-ga-hda-stac-automic
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / alsa-post-ga-hda-stac-automic
similarity index 92%
rename from src/patches/suse-2.6.27.31/patches.drivers/alsa-post-ga-hda-stac-automic
rename to src/patches/suse-2.6.27.39/patches.drivers/alsa-post-ga-hda-stac-automic
index a2cd15c5ee864f9a0272b7925cdad669dcb3d99d..880be51e1fe817e87ac5342b2800455065b34784 100644 (file)
@@ -39,7 +39,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        STAC_REF,
        STAC_9200_OQO,
        STAC_9200_DELL_D21,
-@@ -62,6 +65,7 @@
+@@ -62,6 +65,7 @@ enum {
  };
  
  enum {
@@ -47,7 +47,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        STAC_9205_REF,
        STAC_9205_DELL_M42,
        STAC_9205_DELL_M43,
-@@ -71,6 +75,7 @@
+@@ -71,6 +75,7 @@ enum {
  };
  
  enum {
@@ -55,7 +55,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        STAC_92HD73XX_NO_JD, /* no jack-detection */
        STAC_92HD73XX_REF,
        STAC_DELL_M6_AMIC,
-@@ -81,22 +86,28 @@
+@@ -81,22 +86,28 @@ enum {
  };
  
  enum {
@@ -84,7 +84,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        STAC_925x_REF,
        STAC_M1,
        STAC_M1_2,
-@@ -109,6 +120,7 @@
+@@ -109,6 +120,7 @@ enum {
  };
  
  enum {
@@ -92,7 +92,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        STAC_D945_REF,
        STAC_D945GTP3,
        STAC_D945GTP5,
-@@ -136,10 +148,12 @@
+@@ -136,10 +148,12 @@ enum {
  };
  
  enum {
@@ -105,7 +105,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        STAC_DELL_3ST,
        STAC_DELL_BIOS,
        STAC_927X_MODELS
-@@ -152,6 +166,18 @@
+@@ -152,6 +166,18 @@ struct sigmatel_event {
        int data;
  };
  
@@ -124,7 +124,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  struct sigmatel_spec {
        struct snd_kcontrol_new *mixers[4];
        unsigned int num_mixers;
-@@ -163,6 +189,7 @@
+@@ -163,6 +189,7 @@ struct sigmatel_spec {
        unsigned int hp_detect: 1;
        unsigned int spdif_mute: 1;
        unsigned int check_volume_offset:1;
@@ -132,7 +132,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        /* gpio lines */
        unsigned int eapd_mask;
-@@ -170,23 +197,22 @@
+@@ -170,23 +197,22 @@ struct sigmatel_spec {
        unsigned int gpio_dir;
        unsigned int gpio_data;
        unsigned int gpio_mute;
@@ -161,7 +161,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        /* playback */
        struct hda_input_mux *mono_mux;
-@@ -210,6 +236,15 @@
+@@ -210,6 +236,15 @@ struct sigmatel_spec {
        unsigned int num_dmuxes;
        hda_nid_t *smux_nids;
        unsigned int num_smuxes;
@@ -177,7 +177,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        const char **spdif_labels;
  
        hda_nid_t dig_in_nid;
-@@ -245,14 +280,12 @@
+@@ -245,14 +280,12 @@ struct sigmatel_spec {
        hda_nid_t line_switch;  /* shared line-in for input and output */
        hda_nid_t mic_switch;   /* shared mic-in for input and output */
        hda_nid_t hp_switch; /* NID of HP as line-out */
@@ -193,7 +193,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        struct hda_input_mux private_dimux;
        struct hda_input_mux private_imux;
        struct hda_input_mux private_smux;
-@@ -309,6 +342,13 @@
+@@ -309,6 +342,13 @@ static hda_nid_t stac92hd73xx_smux_nids[
        0x22, 0x23,
  };
  
@@ -207,7 +207,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  #define STAC92HD83XXX_NUM_DMICS       2
  static hda_nid_t stac92hd83xxx_dmic_nids[STAC92HD83XXX_NUM_DMICS + 1] = {
        0x11, 0x12, 0
-@@ -340,6 +380,13 @@
+@@ -340,6 +380,13 @@ static hda_nid_t stac92hd83xxx_amp_nids[
        0xc,
  };
  
@@ -221,7 +221,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static hda_nid_t stac92hd71bxx_pwr_nids[3] = {
        0x0a, 0x0d, 0x0f
  };
-@@ -369,6 +416,13 @@
+@@ -369,6 +416,13 @@ static hda_nid_t stac92hd71bxx_slave_dig
        0x22, 0
  };
  
@@ -235,7 +235,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static hda_nid_t stac925x_adc_nids[1] = {
          0x03,
  };
-@@ -390,6 +444,13 @@
+@@ -390,6 +444,13 @@ static hda_nid_t stac925x_dmux_nids[1] =
        0x14,
  };
  
@@ -249,7 +249,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static hda_nid_t stac922x_adc_nids[2] = {
          0x06, 0x07,
  };
-@@ -398,6 +459,17 @@
+@@ -398,6 +459,17 @@ static hda_nid_t stac922x_mux_nids[2] =
          0x12, 0x13,
  };
  
@@ -267,7 +267,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static hda_nid_t stac927x_adc_nids[3] = {
          0x07, 0x08, 0x09
  };
-@@ -423,6 +495,18 @@
+@@ -423,6 +495,18 @@ static hda_nid_t stac927x_dmic_nids[STAC
        0x13, 0x14, 0
  };
  
@@ -286,7 +286,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static const char *stac927x_spdif_labels[5] = {
        "Digital Playback", "ADAT", "Analog Mux 1",
        "Analog Mux 2", "Analog Mux 3"
-@@ -449,6 +533,16 @@
+@@ -449,6 +533,16 @@ static hda_nid_t stac9205_dmic_nids[STAC
          0x17, 0x18, 0
  };
  
@@ -303,7 +303,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static hda_nid_t stac9200_pin_nids[8] = {
        0x08, 0x09, 0x0d, 0x0e, 
        0x0f, 0x10, 0x11, 0x12,
-@@ -470,15 +564,21 @@
+@@ -470,15 +564,21 @@ static hda_nid_t stac92hd73xx_pin_nids[1
        0x14, 0x22, 0x23
  };
  
@@ -330,7 +330,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  };
  
  static hda_nid_t stac927x_pin_nids[14] = {
-@@ -521,36 +621,6 @@
+@@ -521,36 +621,6 @@ static int stac92xx_amp_volume_put(struc
        return snd_hda_mixer_amp_volume_put(kcontrol, ucontrol);
  }
  
@@ -367,7 +367,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static int stac92xx_smux_enum_info(struct snd_kcontrol *kcontrol,
                                   struct snd_ctl_elem_info *uinfo)
  {
-@@ -601,6 +671,40 @@
+@@ -601,6 +671,40 @@ static int stac92xx_smux_enum_put(struct
        return 0;
  }
  
@@ -408,7 +408,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
  {
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-@@ -623,9 +727,35 @@
+@@ -623,9 +727,35 @@ static int stac92xx_mux_enum_put(struct
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
        struct sigmatel_spec *spec = codec->spec;
        unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
@@ -446,7 +446,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  }
  
  static int stac92xx_mono_mux_enum_info(struct snd_kcontrol *kcontrol,
-@@ -691,60 +821,6 @@
+@@ -691,60 +821,6 @@ static int stac92xx_amp_mux_enum_put(str
                                     0, &spec->cur_amux);
  }
  
@@ -507,7 +507,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static struct hda_verb stac9200_core_init[] = {
        /* set dac0mux for dac converter */
        { 0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
-@@ -840,9 +916,9 @@
+@@ -840,9 +916,9 @@ static struct hda_verb stac92hd73xx_10ch
  };
  
  static struct hda_verb stac92hd83xxx_core_init[] = {
@@ -520,7 +520,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        /* power state controls amps */
        { 0x01, AC_VERB_SET_EAPD, 1 << 2},
-@@ -852,26 +928,12 @@
+@@ -852,26 +928,12 @@ static struct hda_verb stac92hd83xxx_cor
  static struct hda_verb stac92hd71bxx_core_init[] = {
        /* set master volume and direct control */
        { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
@@ -549,7 +549,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        {}
-@@ -952,31 +1014,20 @@
+@@ -952,31 +1014,20 @@ static struct hda_verb stac9205_core_ini
                .private_value = HDA_COMPOSE_AMP_VAL(nid, chs, idx, dir) \
        }
  
@@ -588,7 +588,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        HDA_CODEC_VOLUME("Capture Volume", 0x0a, 0, HDA_OUTPUT),
        HDA_CODEC_MUTE("Capture Switch", 0x0a, 0, HDA_OUTPUT),
        { } /* end */
-@@ -1001,26 +1052,10 @@
+@@ -1001,26 +1052,10 @@ static struct snd_kcontrol_new stac92hd7
        HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
        HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),
  
@@ -615,7 +615,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
  
-@@ -1039,14 +1074,6 @@
+@@ -1039,14 +1074,6 @@ static struct snd_kcontrol_new stac92hd7
  };
  
  static struct snd_kcontrol_new stac92hd73xx_10ch_mixer[] = {
@@ -630,7 +630,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
        HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),
  
-@@ -1066,12 +1093,6 @@
+@@ -1066,12 +1093,6 @@ static struct snd_kcontrol_new stac92hd7
  
  
  static struct snd_kcontrol_new stac92hd83xxx_mixer[] = {
@@ -643,7 +643,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        HDA_CODEC_VOLUME("DAC0 Capture Volume", 0x1b, 0x3, HDA_INPUT),
        HDA_CODEC_MUTE("DAC0 Capture Switch", 0x1b, 0x3, HDA_INPUT),
  
-@@ -1091,104 +1112,12 @@
+@@ -1091,104 +1112,12 @@ static struct snd_kcontrol_new stac92hd8
        { } /* end */
  };
  
@@ -748,7 +748,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static struct snd_kcontrol_new stac_smux_mixer = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "IEC958 Playback Source",
-@@ -1205,10 +1134,7 @@
+@@ -1205,10 +1134,7 @@ static const char *slave_vols[] = {
        "LFE Playback Volume",
        "Side Playback Volume",
        "Headphone Playback Volume",
@@ -759,7 +759,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        NULL
  };
  
-@@ -1219,33 +1145,27 @@
+@@ -1219,33 +1145,27 @@ static const char *slave_sws[] = {
        "LFE Playback Switch",
        "Side Playback Switch",
        "Headphone Playback Switch",
@@ -800,7 +800,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                if (err < 0)
                        return err;
        }
-@@ -1301,6 +1221,8 @@
+@@ -1301,6 +1221,8 @@ static int stac92xx_build_controls(struc
                        return err;
        }
  
@@ -809,7 +809,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        return 0;       
  }
  
-@@ -1454,6 +1376,7 @@
+@@ -1454,6 +1376,7 @@ static unsigned int *stac9200_brd_tbl[ST
  };
  
  static const char *stac9200_models[STAC_9200_MODELS] = {
@@ -817,7 +817,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        [STAC_REF] = "ref",
        [STAC_9200_OQO] = "oqo",
        [STAC_9200_DELL_D21] = "dell-d21",
-@@ -1471,10 +1394,16 @@
+@@ -1471,10 +1394,16 @@ static const char *stac9200_models[STAC_
        [STAC_9200_PANASONIC] = "panasonic",
  };
  
@@ -834,7 +834,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        /* Dell laptops have BIOS problem */
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01a8,
                      "unknown Dell", STAC_9200_DELL_D21),
-@@ -1597,6 +1526,7 @@
+@@ -1597,6 +1526,7 @@ static unsigned int *stac925x_brd_tbl[ST
  };
  
  static const char *stac925x_models[STAC_925x_MODELS] = {
@@ -842,7 +842,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        [STAC_REF] = "ref",
        [STAC_M1] = "m1",
        [STAC_M1_2] = "m1-2",
-@@ -1624,6 +1554,7 @@
+@@ -1624,6 +1554,7 @@ static struct snd_pci_quirk stac925x_cod
  static struct snd_pci_quirk stac925x_cfg_tbl[] = {
        /* SigmaTel reference board */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF),
@@ -850,7 +850,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF),
  
        /* Default table for unknown ID */
-@@ -1655,6 +1586,7 @@
+@@ -1655,6 +1586,7 @@ static unsigned int *stac92hd73xx_brd_tb
  };
  
  static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = {
@@ -858,7 +858,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        [STAC_92HD73XX_NO_JD] = "no-jd",
        [STAC_92HD73XX_REF] = "ref",
        [STAC_DELL_M6_AMIC] = "dell-m6-amic",
-@@ -1667,6 +1599,8 @@
+@@ -1667,6 +1599,8 @@ static struct snd_pci_quirk stac92hd73xx
        /* SigmaTel reference board */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                                "DFI LanParty", STAC_92HD73XX_REF),
@@ -867,7 +867,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254,
                                "Dell Studio 1535", STAC_DELL_M6_DMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0255,
-@@ -1687,55 +1621,73 @@
+@@ -1687,55 +1621,73 @@ static struct snd_pci_quirk stac92hd73xx
                                "Dell Studio 1537", STAC_DELL_M6_DMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0,
                                "Dell Studio 17", STAC_DELL_M6_DMIC),
@@ -951,7 +951,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  };
  
  static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = {
-@@ -1745,39 +1697,42 @@
+@@ -1745,39 +1697,42 @@ static unsigned int *stac92hd71bxx_brd_t
        [STAC_DELL_M4_3]        = dell_m4_3_pin_configs,
        [STAC_HP_M4]            = NULL,
        [STAC_HP_DV5]           = NULL,
@@ -1010,7 +1010,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
                                "unknown Dell", STAC_DELL_M4_1),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0234,
-@@ -1929,6 +1884,7 @@
+@@ -1929,6 +1884,7 @@ static unsigned int *stac922x_brd_tbl[ST
  };
  
  static const char *stac922x_models[STAC_922X_MODELS] = {
@@ -1018,7 +1018,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        [STAC_D945_REF] = "ref",
        [STAC_D945GTP5] = "5stack",
        [STAC_D945GTP3] = "3stack",
-@@ -1956,6 +1912,8 @@
+@@ -1956,6 +1912,8 @@ static struct snd_pci_quirk stac922x_cfg
        /* SigmaTel reference board */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                      "DFI LanParty", STAC_D945_REF),
@@ -1027,7 +1027,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        /* Intel 945G based systems */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x0101,
                      "Intel D945G", STAC_D945GTP3),
-@@ -2036,31 +1994,7 @@
+@@ -2036,31 +1994,7 @@ static struct snd_pci_quirk stac922x_cfg
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d7,
                      "Dell XPS M1210", STAC_922X_DELL_M82),
        /* ECS/PC Chips boards */
@@ -1060,7 +1060,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                      "ECS/PC chips", STAC_ECS_202),
        {} /* terminator */
  };
-@@ -2086,6 +2020,13 @@
+@@ -2086,6 +2020,13 @@ static unsigned int d965_5st_pin_configs
        0x40000100, 0x40000100
  };
  
@@ -1074,7 +1074,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static unsigned int dell_3st_pin_configs[14] = {
        0x02211230, 0x02a11220, 0x01a19040, 0x01114210,
        0x01111212, 0x01116211, 0x01813050, 0x01112214,
-@@ -2098,15 +2039,18 @@
+@@ -2098,15 +2039,18 @@ static unsigned int *stac927x_brd_tbl[ST
        [STAC_D965_REF]  = ref927x_pin_configs,
        [STAC_D965_3ST]  = d965_3st_pin_configs,
        [STAC_D965_5ST]  = d965_5st_pin_configs,
@@ -1093,7 +1093,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        [STAC_DELL_3ST]         = "dell-3stack",
        [STAC_DELL_BIOS]        = "dell-bios",
  };
-@@ -2115,26 +2059,16 @@
+@@ -2115,26 +2059,16 @@ static struct snd_pci_quirk stac927x_cfg
        /* SigmaTel reference board */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                      "DFI LanParty", STAC_D965_REF),
@@ -1126,7 +1126,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        /* Dell 3 stack systems */
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x01f7, "Dell XPS M1730", STAC_DELL_3ST),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x01dd, "Dell Dimension E520", STAC_DELL_3ST),
-@@ -2144,21 +2078,16 @@
+@@ -2144,21 +2078,16 @@ static struct snd_pci_quirk stac927x_cfg
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x0227, "Dell Vostro 1400  ", STAC_DELL_BIOS),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL,  0x022e, "Dell     ", STAC_DELL_BIOS),
@@ -1153,7 +1153,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        {} /* terminator */
  };
  
-@@ -2215,6 +2144,7 @@
+@@ -2215,6 +2144,7 @@ static unsigned int *stac9205_brd_tbl[ST
  };
  
  static const char *stac9205_models[STAC_9205_MODELS] = {
@@ -1161,7 +1161,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        [STAC_9205_REF] = "ref",
        [STAC_9205_DELL_M42] = "dell-m42",
        [STAC_9205_DELL_M43] = "dell-m43",
-@@ -2226,6 +2156,10 @@
+@@ -2226,6 +2156,10 @@ static struct snd_pci_quirk stac9205_cfg
        /* SigmaTel reference board */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                      "DFI LanParty", STAC_9205_REF),
@@ -1172,7 +1172,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        /* Dell */
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f1,
                      "unknown Dell", STAC_9205_DELL_M42),
-@@ -2258,6 +2192,7 @@
+@@ -2258,6 +2192,7 @@ static struct snd_pci_quirk stac9205_cfg
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228,
                      "Dell Vostro 1500", STAC_9205_DELL_M42),
        /* Gateway */
@@ -1180,7 +1180,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD),
        {} /* terminator */
  };
-@@ -2515,10 +2450,18 @@
+@@ -2515,10 +2450,18 @@ static int stac92xx_build_pcms(struct hd
        return 0;
  }
  
@@ -1202,7 +1202,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        pincap = (pincap & AC_PINCAP_VREF) >> AC_PINCAP_VREF_SHIFT;
        if (pincap & AC_PINCAP_VREF_100)
                return AC_PINCTL_VREF_100;
-@@ -2550,8 +2493,7 @@
+@@ -2550,8 +2493,7 @@ static int stac92xx_hp_switch_get(struct
        return 0;
  }
  
@@ -1212,14 +1212,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
  static int stac92xx_hp_switch_put(struct snd_kcontrol *kcontrol,
                        struct snd_ctl_elem_value *ucontrol)
-@@ -2559,25 +2501,119 @@
-       struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-       struct sigmatel_spec *spec = codec->spec;
-       int nid = kcontrol->private_value;
--
-+ 
-       spec->hp_switch = ucontrol->value.integer.value[0] ? nid : 0;
+@@ -2565,19 +2507,113 @@ static int stac92xx_hp_switch_put(struct
        /* check to be sure that the ports are upto date with
         * switch changes
         */
@@ -1337,7 +1330,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        return 0;
  }
  
-@@ -2585,9 +2621,9 @@
+@@ -2585,9 +2621,9 @@ static int stac92xx_io_switch_put(struct
  {
          struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
        struct sigmatel_spec *spec = codec->spec;
@@ -1350,7 +1343,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        spec->io_switch[io_idx] = val;
  
-@@ -2596,7 +2632,7 @@
+@@ -2596,7 +2632,7 @@ static int stac92xx_io_switch_put(struct
        else {
                unsigned int pinctl = AC_PINCTL_IN_EN;
                if (io_idx) /* set VREF for mic */
@@ -1359,7 +1352,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                stac92xx_auto_set_pinctl(codec, nid, pinctl);
        }
  
-@@ -2604,7 +2640,7 @@
+@@ -2604,7 +2640,7 @@ static int stac92xx_io_switch_put(struct
         * appropriately according to the pin direction
         */
        if (spec->hp_detect)
@@ -1368,7 +1361,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
          return 1;
  }
-@@ -2677,7 +2713,8 @@
+@@ -2677,7 +2713,8 @@ enum {
        STAC_CTL_WIDGET_AMP_VOL,
        STAC_CTL_WIDGET_HP_SWITCH,
        STAC_CTL_WIDGET_IO_SWITCH,
@@ -1378,7 +1371,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  };
  
  static struct snd_kcontrol_new stac92xx_control_templates[] = {
-@@ -2689,38 +2726,42 @@
+@@ -2689,38 +2726,42 @@ static struct snd_kcontrol_new stac92xx_
        STAC_CODEC_HP_SWITCH(NULL),
        STAC_CODEC_IO_SWITCH(NULL, 0),
        STAC_CODEC_CLFE_SWITCH(NULL, 0),
@@ -1443,11 +1436,12 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        return 0;
  }
  
-@@ -2741,7 +2782,60 @@
+@@ -2741,8 +2782,61 @@ static inline int stac92xx_add_control(s
        return stac92xx_add_control_idx(spec, type, 0, name, val);
  }
  
 -/* check whether the line-input can be used as line-out */
+-static hda_nid_t check_line_out_switch(struct hda_codec *codec)
 +static struct snd_kcontrol_new stac_input_src_temp = {
 +      .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
 +      .name = "Input Source",
@@ -1502,10 +1496,11 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
 +}
 +
 +/* check whether the line-input can be used as line-out */
- static hda_nid_t check_line_out_switch(struct hda_codec *codec)
++static hda_nid_t check_line_out_switch(struct hda_codec *codec)
  {
        struct sigmatel_spec *spec = codec->spec;
-@@ -2752,7 +2846,7 @@
+       struct auto_pin_cfg *cfg = &spec->autocfg;
+@@ -2752,7 +2846,7 @@ static hda_nid_t check_line_out_switch(s
        if (cfg->line_out_type != AUTO_PIN_LINE_OUT)
                return 0;
        nid = cfg->input_pins[AUTO_PIN_LINE];
@@ -1514,7 +1509,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        if (pincap & AC_PINCAP_OUT)
                return nid;
        return 0;
-@@ -2771,12 +2865,11 @@
+@@ -2771,12 +2865,11 @@ static hda_nid_t check_mic_out_switch(st
        mic_pin = AUTO_PIN_MIC;
        for (;;) {
                hda_nid_t nid = cfg->input_pins[mic_pin];
@@ -1529,7 +1524,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                        if (pincap & AC_PINCAP_OUT)
                                return nid;
                }
-@@ -2824,9 +2917,8 @@
+@@ -2824,9 +2917,8 @@ static hda_nid_t get_unassigned_dac(stru
        conn_len = snd_hda_get_connections(codec, nid, conn,
                                           HDA_MAX_CONNECTIONS);
        for (j = 0; j < conn_len; j++) {
@@ -1541,7 +1536,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                /* we check only analog outputs */
                if (wtype != AC_WID_AUD_OUT || (wcaps & AC_WCAP_DIGITAL))
                        continue;
-@@ -2840,6 +2932,16 @@
+@@ -2840,6 +2932,16 @@ static hda_nid_t get_unassigned_dac(stru
                        return conn[j];
                }
        }
@@ -1558,7 +1553,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        return 0;
  }
  
-@@ -2880,6 +2982,26 @@
+@@ -2880,6 +2982,26 @@ static int stac92xx_auto_fill_dac_nids(s
                add_spec_dacs(spec, dac);
        }
  
@@ -1585,7 +1580,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        /* add line-in as output */
        nid = check_line_out_switch(codec);
        if (nid) {
-@@ -2907,26 +3029,6 @@
+@@ -2907,26 +3029,6 @@ static int stac92xx_auto_fill_dac_nids(s
                }
        }
  
@@ -1612,7 +1607,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        snd_printd("stac92xx: dac_nids=%d (0x%x/0x%x/0x%x/0x%x/0x%x)\n",
                   spec->multiout.num_dacs,
                   spec->multiout.dac_nids[0],
-@@ -2939,8 +3041,8 @@
+@@ -2939,8 +3041,8 @@ static int stac92xx_auto_fill_dac_nids(s
  }
  
  /* create volume control/switch for the given prefx type */
@@ -1623,7 +1618,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  {
        struct sigmatel_spec *spec = codec->spec;
        char name[32];
-@@ -2964,19 +3066,22 @@
+@@ -2964,19 +3066,22 @@ static int create_controls(struct hda_co
        }
  
        sprintf(name, "%s Playback Volume", pfx);
@@ -1648,7 +1643,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static int add_spec_dacs(struct sigmatel_spec *spec, hda_nid_t nid)
  {
        if (spec->multiout.num_dacs > 4) {
-@@ -3014,12 +3119,6 @@
+@@ -3014,12 +3119,6 @@ static int create_multi_out_ctls(struct
        static const char *chname[4] = {
                "Front", "Surround", NULL /*CLFE*/, "Side"
        };
@@ -1661,7 +1656,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        hda_nid_t nid;
        int i, err;
        unsigned int wid_caps;
-@@ -3055,18 +3154,22 @@
+@@ -3055,18 +3154,22 @@ static int create_multi_out_ctls(struct
  
                } else {
                        const char *name;
@@ -1687,7 +1682,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                        if (err < 0)
                                return err;
                }
-@@ -3074,12 +3177,29 @@
+@@ -3074,12 +3177,29 @@ static int create_multi_out_ctls(struct
        return 0;
  }
  
@@ -1717,7 +1712,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        err = create_multi_out_ctls(codec, cfg->line_outs, cfg->line_out_pins,
                                    spec->multiout.dac_nids,
-@@ -3096,20 +3216,13 @@
+@@ -3096,20 +3216,13 @@ static int stac92xx_auto_create_multi_ou
                        return err;
        }
  
@@ -1745,7 +1740,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        }
  
        return 0;
-@@ -3152,7 +3265,7 @@
+@@ -3152,7 +3265,7 @@ static int stac92xx_auto_create_mono_out
                                spec->mono_nid,
                                con_lst,
                                HDA_MAX_NUM_INPUTS);
@@ -1754,7 +1749,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                return -EINVAL;
  
        for (i = 0; i < num_cons; i++) {
-@@ -3298,7 +3411,7 @@
+@@ -3298,7 +3411,7 @@ static int stac92xx_auto_create_spdif_mu
                                spec->smux_nids[0],
                                con_lst,
                                HDA_MAX_NUM_INPUTS);
@@ -1763,7 +1758,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                return -EINVAL;
  
        if (!labels)
-@@ -3319,53 +3432,66 @@
+@@ -3319,53 +3432,66 @@ static const char *stac92xx_dmic_labels[
        "Digital Mic 3", "Digital Mic 4"
  };
  
@@ -1852,7 +1847,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
                        err = stac92xx_add_control(spec,
                                STAC_CTL_WIDGET_VOL,
-@@ -3377,15 +3503,100 @@
+@@ -3377,15 +3503,100 @@ found:
                                return err;
                }
  
@@ -1955,7 +1950,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  /* create playback/capture controls for input pins */
  static int stac92xx_auto_create_analog_input_ctls(struct hda_codec *codec, const struct auto_pin_cfg *cfg)
  {
-@@ -3418,6 +3629,7 @@
+@@ -3418,6 +3629,7 @@ static int stac92xx_auto_create_analog_i
                imux->items[imux->num_items].index = index;
                imux->num_items++;
        }
@@ -1963,7 +1958,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        if (imux->num_items) {
                /*
-@@ -3469,7 +3681,7 @@
+@@ -3469,7 +3681,7 @@ static int stac92xx_parse_auto_config(st
  {
        struct sigmatel_spec *spec = codec->spec;
        int hp_swap = 0;
@@ -1972,7 +1967,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        if ((err = snd_hda_parse_pin_def_config(codec,
                                                &spec->autocfg,
-@@ -3509,11 +3721,10 @@
+@@ -3509,11 +3721,10 @@ static int stac92xx_parse_auto_config(st
                if (snd_hda_get_connections(codec,
                                spec->autocfg.mono_out_pin, conn_list, 1) &&
                                snd_hda_get_connections(codec, conn_list[0],
@@ -1986,7 +1981,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                                /* LR swap check, some stac925x have a mux that
                                 * changes the DACs output path instead of the
                                 * mono-mux path.
-@@ -3578,6 +3789,8 @@
+@@ -3578,6 +3789,8 @@ static int stac92xx_parse_auto_config(st
                err = snd_hda_attach_beep_device(codec, nid);
                if (err < 0)
                        return err;
@@ -1995,7 +1990,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                /* if no beep switch is available, make its own one */
                caps = query_amp_caps(codec, nid, HDA_OUTPUT);
                if (codec->beep &&
-@@ -3602,6 +3815,21 @@
+@@ -3602,6 +3815,21 @@ static int stac92xx_parse_auto_config(st
                spec->autocfg.line_outs = 0;
        }
  
@@ -2017,7 +2012,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        err = stac92xx_auto_create_analog_input_ctls(codec, &spec->autocfg);
        if (err < 0)
                return err;
-@@ -3631,6 +3859,10 @@
+@@ -3631,6 +3859,10 @@ static int stac92xx_parse_auto_config(st
                        return err;
        }
  
@@ -2028,7 +2023,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        spec->multiout.max_channels = spec->multiout.num_dacs * 2;
        if (spec->multiout.max_channels > 2)
                spec->surr_switch = 1;
-@@ -3640,8 +3872,8 @@
+@@ -3640,8 +3872,8 @@ static int stac92xx_parse_auto_config(st
        if (dig_in && spec->autocfg.dig_in_pin)
                spec->dig_in_nid = dig_in;
  
@@ -2039,7 +2034,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        spec->input_mux = &spec->private_imux;
        if (!spec->dinput_mux)
-@@ -3698,9 +3930,7 @@
+@@ -3698,9 +3930,7 @@ static int stac9200_auto_create_lfe_ctls
                for (i = 0; i < spec->autocfg.line_outs && lfe_pin == 0x0; i++) {
                        hda_nid_t pin = spec->autocfg.line_out_pins[i];
                        unsigned int defcfg;
@@ -2050,7 +2045,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                        if (get_defcfg_device(defcfg) == AC_JACK_SPEAKER) {
                                unsigned int wcaps = get_wcaps(codec, pin);
                                wcaps &= (AC_WCAP_STEREO | AC_WCAP_OUT_AMP);
-@@ -3744,13 +3974,17 @@
+@@ -3744,13 +3974,17 @@ static int stac9200_parse_auto_config(st
                        return err;
        }
  
@@ -2070,7 +2065,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        spec->input_mux = &spec->private_imux;
        spec->dinput_mux = &spec->private_dimux;
-@@ -3799,26 +4033,27 @@
+@@ -3799,26 +4033,27 @@ static int stac_add_event(struct sigmate
  {
        struct sigmatel_event *event;
  
@@ -2105,7 +2100,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                        return event;
        }
        return NULL;
-@@ -3828,34 +4063,42 @@
+@@ -3828,34 +4063,42 @@ static struct sigmatel_event *stac_get_e
                                                      unsigned char tag)
  {
        struct sigmatel_spec *spec = codec->spec;
@@ -2158,7 +2153,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  }
  
  static int is_nid_hp_pin(struct auto_pin_cfg *cfg, hda_nid_t nid)
-@@ -3915,46 +4158,64 @@
+@@ -3915,46 +4158,64 @@ static int stac92xx_init(struct hda_code
                        hda_nid_t nid = cfg->hp_pins[i];
                        enable_pin_detect(codec, nid, STAC_HP_EVENT);
                }
@@ -2234,7 +2229,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                        }
                }
        }
-@@ -3990,8 +4251,7 @@
+@@ -3990,8 +4251,7 @@ static int stac92xx_init(struct hda_code
                        stac_toggle_power_map(codec, nid, 1);
                        continue;
                }
@@ -2244,7 +2239,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                def_conf = get_defcfg_connect(def_conf);
                /* skip any ports that don't have jacks since presence
                 * detection is useless */
-@@ -4000,32 +4260,35 @@
+@@ -4000,32 +4260,35 @@ static int stac92xx_init(struct hda_code
                                stac_toggle_power_map(codec, nid, 1);
                        continue;
                }
@@ -2293,7 +2288,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        kfree(spec);
        snd_hda_detach_beep_device(codec);
-@@ -4034,7 +4297,9 @@
+@@ -4034,7 +4297,9 @@ static void stac92xx_free(struct hda_cod
  static void stac92xx_set_pinctl(struct hda_codec *codec, hda_nid_t nid,
                                unsigned int flag)
  {
@@ -2304,7 +2299,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                        0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00);
  
        if (pin_ctl & AC_PINCTL_IN_EN) {
-@@ -4048,14 +4313,17 @@
+@@ -4048,14 +4313,17 @@ static void stac92xx_set_pinctl(struct h
                        return;
        }
  
@@ -2325,7 +2320,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  }
  
  static void stac92xx_reset_pinctl(struct hda_codec *codec, hda_nid_t nid,
-@@ -4063,9 +4331,10 @@
+@@ -4063,9 +4331,10 @@ static void stac92xx_reset_pinctl(struct
  {
        unsigned int pin_ctl = snd_hda_codec_read(codec, nid,
                        0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00);
@@ -2339,7 +2334,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  }
  
  static int get_pin_presence(struct hda_codec *codec, hda_nid_t nid)
-@@ -4078,6 +4347,48 @@
+@@ -4078,6 +4347,48 @@ static int get_pin_presence(struct hda_c
        return 0;
  }
  
@@ -2383,12 +2378,12 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
 +                              spec->gpio_dir, spec->gpio_data |
 +                              spec->eapd_mask);
 +      }
-+} 
++}
 +
  /* return non-zero if the hp-pin of the given array index isn't
   * a jack-detection target
   */
-@@ -4130,13 +4441,6 @@
+@@ -4130,13 +4441,6 @@ static void stac92xx_hp_detect(struct hd
                for (i = 0; i < cfg->line_outs; i++)
                        stac92xx_reset_pinctl(codec, cfg->line_out_pins[i],
                                                AC_PINCTL_OUT_EN);
@@ -2402,7 +2397,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        } else {
                /* enable lineouts */
                if (spec->hp_switch)
-@@ -4145,14 +4449,8 @@
+@@ -4145,14 +4449,8 @@ static void stac92xx_hp_detect(struct hd
                for (i = 0; i < cfg->line_outs; i++)
                        stac92xx_set_pinctl(codec, cfg->line_out_pins[i],
                                                AC_PINCTL_OUT_EN);
@@ -2418,7 +2413,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        /* toggle hp outs */
        for (i = 0; i < cfg->hp_outs; i++) {
                unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN;
-@@ -4210,10 +4508,28 @@
+@@ -4210,10 +4508,28 @@ static void stac92xx_pin_sense(struct hd
        stac_toggle_power_map(codec, nid, get_pin_presence(codec, nid));
  }
  
@@ -2450,7 +2445,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        if (!event)
                return;
        codec->patch_ops.unsol_event(codec, (unsigned)event->tag << 26);
-@@ -4232,12 +4548,40 @@
+@@ -4232,12 +4548,40 @@ static void stac92xx_unsol_event(struct
  
        switch (event->type) {
        case STAC_HP_EVENT:
@@ -2492,7 +2487,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                break;
        case STAC_VREF_EVENT:
                data = snd_hda_codec_read(codec, codec->afg, 0,
-@@ -4254,17 +4598,48 @@
+@@ -4254,17 +4598,48 @@ static int stac92xx_resume(struct hda_co
  {
        struct sigmatel_spec *spec = codec->spec;
  
@@ -2544,7 +2539,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static int stac92xx_suspend(struct hda_codec *codec, pm_message_t state)
  {
        struct sigmatel_spec *spec = codec->spec;
-@@ -4275,8 +4650,7 @@
+@@ -4275,8 +4650,7 @@ static int stac92xx_suspend(struct hda_c
        nid = codec->start_nid;
        for (i = 0; i < codec->num_nodes; i++, nid++) {
                unsigned int wcaps = get_wcaps(codec, nid);
@@ -2554,7 +2549,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                if (wid_type == AC_WID_PIN)
                        snd_hda_codec_read(codec, nid, 0,
                                AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
-@@ -4435,6 +4809,9 @@
+@@ -4435,6 +4809,9 @@ static int patch_stac925x(struct hda_cod
  
        spec->init = stac925x_core_init;
        spec->mixer = stac925x_mixer;
@@ -2564,7 +2559,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        err = stac92xx_parse_auto_config(codec, 0x8, 0x7);
        if (!err) {
-@@ -4456,16 +4833,6 @@
+@@ -4456,16 +4833,6 @@ static int patch_stac925x(struct hda_cod
        return 0;
  }
  
@@ -2581,7 +2576,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  static int patch_stac92hd73xx(struct hda_codec *codec)
  {
        struct sigmatel_spec *spec;
-@@ -4520,12 +4887,10 @@
+@@ -4520,12 +4887,10 @@ again:
        case 0x5: /* 10 Channel */
                spec->mixer = stac92hd73xx_10ch_mixer;
                spec->init = stac92hd73xx_10ch_core_init;
@@ -2595,7 +2590,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        spec->digbeep_nid = 0x1c;
        spec->mux_nids = stac92hd73xx_mux_nids;
        spec->adc_nids = stac92hd73xx_adc_nids;
-@@ -4538,8 +4903,10 @@
+@@ -4538,8 +4903,10 @@ again:
        spec->num_muxes = ARRAY_SIZE(stac92hd73xx_mux_nids);
        spec->num_adcs = ARRAY_SIZE(stac92hd73xx_adc_nids);
        spec->num_dmuxes = ARRAY_SIZE(stac92hd73xx_dmux_nids);
@@ -2608,7 +2603,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        switch (spec->board_config) {
        case STAC_DELL_EQ:
-@@ -4558,20 +4925,17 @@
+@@ -4558,20 +4925,17 @@ again:
                        spec->init = dell_m6_core_init;
                switch (spec->board_config) {
                case STAC_DELL_M6_AMIC: /* Analog Mics */
@@ -2633,7 +2628,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                        break;
                }
                break;
-@@ -4579,13 +4943,13 @@
+@@ -4579,13 +4943,13 @@ again:
                spec->num_dmics = STAC92HD73XX_NUM_DMICS;
                spec->num_smuxes = ARRAY_SIZE(stac92hd73xx_smux_nids);
                spec->eapd_switch = 1;
@@ -2648,7 +2643,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids);
        spec->pwr_nids = stac92hd73xx_pwr_nids;
-@@ -4615,21 +4979,13 @@
+@@ -4615,21 +4979,13 @@ again:
        return 0;
  }
  
@@ -2671,7 +2666,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        spec  = kzalloc(sizeof(*spec), GFP_KERNEL);
        if (spec == NULL)
-@@ -4648,14 +5004,6 @@
+@@ -4648,14 +5004,6 @@ static int patch_stac92hd83xxx(struct hd
        spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids);
        spec->multiout.dac_nids = spec->dac_nids;
  
@@ -2686,7 +2681,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        spec->init = stac92hd83xxx_core_init;
        spec->mixer = stac92hd83xxx_mixer;
        spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids);
-@@ -4663,8 +5011,11 @@
+@@ -4663,8 +5011,11 @@ static int patch_stac92hd83xxx(struct hd
        spec->num_adcs = ARRAY_SIZE(stac92hd83xxx_adc_nids);
        spec->num_amps = ARRAY_SIZE(stac92hd83xxx_amp_nids);
        spec->num_dmics = STAC92HD83XXX_NUM_DMICS;
@@ -2699,7 +2694,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        spec->board_config = snd_hda_check_board_config(codec,
                                                        STAC_92HD83XXX_MODELS,
                                                        stac92hd83xxx_models,
-@@ -4687,6 +5038,7 @@
+@@ -4687,6 +5038,7 @@ again:
        switch (codec->vendor_id) {
        case 0x111d7604:
        case 0x111d7605:
@@ -2707,7 +2702,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                if (spec->board_config == STAC_92HD83XXX_PWR_REF)
                        break;
                spec->num_pwrs = 0;
-@@ -4709,24 +5061,89 @@
+@@ -4709,24 +5061,89 @@ again:
                return err;
        }
  
@@ -2805,7 +2800,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        int err = 0;
  
        spec  = kzalloc(sizeof(*spec), GFP_KERNEL);
-@@ -4735,11 +5152,21 @@
+@@ -4735,11 +5152,21 @@ static int patch_stac92hd71bxx(struct hd
  
        codec->spec = spec;
        codec->patch_ops = stac92xx_patch_ops;
@@ -2831,7 +2826,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        spec->board_config = snd_hda_check_board_config(codec,
                                                        STAC_92HD71BXX_MODELS,
                                                        stac92hd71bxx_models,
-@@ -4766,14 +5193,25 @@
+@@ -4766,14 +5193,25 @@ again:
                spec->gpio_data = 0x01;
        }
  
@@ -2858,7 +2853,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                break;
        case 0x111d7608: /* 5 Port with Analog Mixer */
                switch (spec->board_config) {
-@@ -4797,12 +5235,15 @@
+@@ -4797,12 +5235,15 @@ again:
  
                /* no output amps */
                spec->num_pwrs = 0;
@@ -2879,7 +2874,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                break;
        case 0x111d7603: /* 6 Port with Analog Mixer */
                if ((codec->revision_id & 0xf) == 1)
-@@ -4812,12 +5253,17 @@
+@@ -4812,12 +5253,17 @@ again:
                spec->num_pwrs = 0;
                /* fallthru */
        default:
@@ -2900,7 +2895,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        /* Some HP machines seem to have unstable codec communications
         * especially with ATI fglrx driver.  For recovering from the
         * CORB/RIRB stall, allow the BUS reset and keep always sync
-@@ -4827,25 +5273,22 @@
+@@ -4827,25 +5273,22 @@ again:
                codec->bus->allow_bus_reset = 1;
        }
  
@@ -2929,7 +2924,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                stac92xx_auto_set_pinctl(codec, 0x0e,
                        AC_PINCTL_IN_EN | AC_PINCTL_VREF_80);
                /* fallthru */
-@@ -4860,19 +5303,42 @@
+@@ -4860,19 +5303,42 @@ again:
                spec->num_smuxes = 0;
                spec->num_dmuxes = 1;
                break;
@@ -2969,7 +2964,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
 +              codec->patch_ops.check_power_status =
 +                      stac92xx_hp_check_power_status;
 +      }
-+#endif        
++#endif
  
        spec->multiout.dac_nids = spec->dac_nids;
 -      if (spec->dinput_mux)
@@ -2982,7 +2977,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        if (!err) {
                if (spec->board_config < 0) {
                        printk(KERN_WARNING "hda_codec: No auto-config is "
-@@ -4889,7 +5355,7 @@
+@@ -4889,7 +5355,7 @@ again:
        }
  
        return 0;
@@ -2991,7 +2986,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
  static int patch_stac922x(struct hda_codec *codec)
  {
-@@ -4967,7 +5433,10 @@
+@@ -4967,7 +5433,10 @@ static int patch_stac922x(struct hda_cod
        spec->num_pwrs = 0;
  
        spec->init = stac922x_core_init;
@@ -3003,7 +2998,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
        spec->multiout.dac_nids = spec->dac_nids;
        
-@@ -5008,6 +5477,7 @@
+@@ -5008,6 +5477,7 @@ static int patch_stac927x(struct hda_cod
                return -ENOMEM;
  
        codec->spec = spec;
@@ -3011,7 +3006,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        spec->num_pins = ARRAY_SIZE(stac927x_pin_nids);
        spec->pin_nids = stac927x_pin_nids;
        spec->board_config = snd_hda_check_board_config(codec, STAC_927X_MODELS,
-@@ -5049,32 +5519,37 @@
+@@ -5049,32 +5519,37 @@ static int patch_stac927x(struct hda_cod
                spec->num_dmics = 0;
  
                spec->init = d965_core_init;
@@ -3056,7 +3051,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
                spec->dmux_nids = stac927x_dmux_nids;
                spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids);
                break;
-@@ -5087,12 +5562,13 @@
+@@ -5087,12 +5562,13 @@ static int patch_stac927x(struct hda_cod
                spec->num_dmics = 0;
  
                spec->init = stac927x_core_init;
@@ -3073,7 +3068,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        spec->eapd_switch = 1;
  
        err = stac92xx_parse_auto_config(codec, 0x1e, 0x20);
-@@ -5174,10 +5650,11 @@
+@@ -5174,10 +5650,11 @@ static int patch_stac9205(struct hda_cod
        spec->num_pwrs = 0;
  
        spec->init = stac9205_core_init;
@@ -3088,7 +3083,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        /* Turn on/off EAPD per HP plugging */
        if (spec->board_config != STAC_9205_EAPD)
                spec->eapd_switch = 1;
-@@ -5186,8 +5663,8 @@
+@@ -5186,8 +5663,8 @@ static int patch_stac9205(struct hda_cod
        switch (spec->board_config){
        case STAC_9205_DELL_M43:
                /* Enable SPDIF in/out */
@@ -3099,7 +3094,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
  
                /* Enable unsol response for GPIO4/Dock HP connection */
                err = stac_add_event(spec, codec->afg, STAC_VREF_EVENT, 0x01);
-@@ -5521,6 +5998,7 @@
+@@ -5521,6 +5998,7 @@ struct hda_codec_preset snd_hda_preset_s
        { .id = 0x83847661, .name = "CXD9872RD/K", .patch = patch_stac9872 },
        { .id = 0x83847662, .name = "STAC9872AK", .patch = patch_stac9872 },
        { .id = 0x83847664, .name = "CXD9872AKD", .patch = patch_stac9872 },
@@ -3107,7 +3102,7 @@ Signed-off-by: Takashi Iwai <tiwai@suse.de>
        { .id = 0x838476a0, .name = "STAC9205", .patch = patch_stac9205 },
        { .id = 0x838476a1, .name = "STAC9205D", .patch = patch_stac9205 },
        { .id = 0x838476a2, .name = "STAC9204", .patch = patch_stac9205 },
-@@ -5532,6 +6010,7 @@
+@@ -5532,6 +6010,7 @@ struct hda_codec_preset snd_hda_preset_s
        { .id = 0x111d7603, .name = "92HD75B3X5", .patch = patch_stac92hd71bxx},
        { .id = 0x111d7604, .name = "92HD83C1X5", .patch = patch_stac92hd83xxx},
        { .id = 0x111d7605, .name = "92HD81B1X5", .patch = patch_stac92hd83xxx},