--- /dev/null
+From: Takashi Iwai <tiwai@suse.de>
+Subject: ALSA: Fix plaback problems on Intel desktops with IDT codecs
+Patch-mainline:
+References:
+
+The Intel desktops with IDT 92HD* may have no output due to the wrong
+routing. Also, when the jack-sensing doesn't work for the front panel,
+no I/O is possible there.
+
+This patch fixes several issues:
+- 92HD73* Intel desktop fix
+- Add quirk for Dell Studo 17
+- no-jd model addition
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+
+---
+ Documentation/sound/alsa/ALSA-Configuration.txt | 2 +
+ sound/pci/hda/patch_sigmatel.c | 29 +++++++++++++++++++-----
+ 2 files changed, 26 insertions(+), 5 deletions(-)
+
+--- a/Documentation/sound/alsa/ALSA-Configuration.txt
++++ b/Documentation/sound/alsa/ALSA-Configuration.txt
+@@ -1067,6 +1067,7 @@ Prior to version 0.9.0rc4 options had a
+
+ STAC9227/9228/9229/927x
+ ref Reference board
++ ref-no-jd Reference board without HP/Mic jack detection
+ 3stack D965 3stack
+ 5stack D965 5stack + SPDIF
+ dell-3stack Dell Dimension E520
+@@ -1080,6 +1081,7 @@ Prior to version 0.9.0rc4 options had a
+
+ STAC92HD73*
+ ref Reference board
++ no-jd BIOS setup but without jack-detection
+ dell-m6-amic Dell desktops/laptops with analog mics
+ dell-m6-dmic Dell desktops/laptops with digital mics
+ dell-m6 Dell desktops/laptops with both type of mics
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -69,6 +69,7 @@ enum {
+ };
+
+ enum {
++ STAC_92HD73XX_NO_JD, /* no jack-detection */
+ STAC_92HD73XX_REF,
+ STAC_DELL_M6_AMIC,
+ STAC_DELL_M6_DMIC,
+@@ -127,6 +128,7 @@ enum {
+ };
+
+ enum {
++ STAC_D965_REF_NO_JD, /* no jack-detection */
+ STAC_D965_REF,
+ STAC_D965_3ST,
+ STAC_D965_5ST,
+@@ -783,8 +785,8 @@ static struct hda_verb dell_m6_core_init
+ { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
+ /* setup audio connections */
+ { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
+- { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x02},
+- { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x01},
++ { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
++ { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x02},
+ /* setup adcs to point to mixer */
+ { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
+ { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
+@@ -1613,6 +1615,7 @@ static unsigned int *stac92hd73xx_brd_tb
+ };
+
+ static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = {
++ [STAC_92HD73XX_NO_JD] = "no-jd",
+ [STAC_92HD73XX_REF] = "ref",
+ [STAC_DELL_M6_AMIC] = "dell-m6-amic",
+ [STAC_DELL_M6_DMIC] = "dell-m6-dmic",
+@@ -1642,6 +1645,8 @@ static struct snd_pci_quirk stac92hd73xx
+ "unknown Dell", STAC_DELL_M6_DMIC),
+ SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f,
+ "Dell Studio 1537", STAC_DELL_M6_DMIC),
++ SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0,
++ "Dell Studio 17", STAC_DELL_M6_DMIC),
+ {} /* terminator */
+ };
+
+@@ -2029,6 +2034,7 @@ static unsigned int dell_3st_pin_configs
+ };
+
+ static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
++ [STAC_D965_REF_NO_JD] = ref927x_pin_configs,
+ [STAC_D965_REF] = ref927x_pin_configs,
+ [STAC_D965_3ST] = d965_3st_pin_configs,
+ [STAC_D965_5ST] = d965_5st_pin_configs,
+@@ -2037,6 +2043,7 @@ static unsigned int *stac927x_brd_tbl[ST
+ };
+
+ static const char *stac927x_models[STAC_927X_MODELS] = {
++ [STAC_D965_REF_NO_JD] = "ref-no-jd",
+ [STAC_D965_REF] = "ref",
+ [STAC_D965_3ST] = "3stack",
+ [STAC_D965_5ST] = "5stack",
+@@ -2899,7 +2906,7 @@ static int stac92xx_auto_create_multi_ou
+ }
+
+ if ((spec->multiout.num_dacs - cfg->line_outs) > 0 &&
+- cfg->hp_outs && !spec->multiout.hp_nid)
++ cfg->hp_outs == 1 && !spec->multiout.hp_nid)
+ spec->multiout.hp_nid = nid;
+
+ if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) {
+@@ -4257,14 +4264,17 @@ again:
+
+ switch (spec->multiout.num_dacs) {
+ case 0x3: /* 6 Channel */
++ spec->multiout.hp_nid = 0x17;
+ spec->mixer = stac92hd73xx_6ch_mixer;
+ spec->init = stac92hd73xx_6ch_core_init;
+ break;
+ case 0x4: /* 8 Channel */
++ spec->multiout.hp_nid = 0x18;
+ spec->mixer = stac92hd73xx_8ch_mixer;
+ spec->init = stac92hd73xx_8ch_core_init;
+ break;
+ case 0x5: /* 10 Channel */
++ spec->multiout.hp_nid = 0x19;
+ spec->mixer = stac92hd73xx_10ch_mixer;
+ spec->init = stac92hd73xx_10ch_core_init;
+ };
+@@ -4295,13 +4305,15 @@ again:
+ case STAC_DELL_M6_AMIC:
+ case STAC_DELL_M6_DMIC:
+ case STAC_DELL_M6_BOTH:
+- if (!spec->init)
+- spec->init = dell_m6_core_init;
+ spec->num_smuxes = 0;
+ spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER];
+ spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP];
+ spec->eapd_switch = 0;
+ spec->num_amps = 1;
++ spec->multiout.hp_nid = 0; /* dual HPs */
++
++ if (!spec->init)
++ spec->init = dell_m6_core_init;
+ switch (spec->board_config) {
+ case STAC_DELL_M6_AMIC: /* Analog Mics */
+ stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
+@@ -4353,6 +4365,9 @@ again:
+ return err;
+ }
+
++ if (spec->board_config == STAC_92HD73XX_NO_JD)
++ spec->hp_detect = 0;
++
+ codec->patch_ops = stac92xx_patch_ops;
+
+ return 0;
+@@ -4901,6 +4916,10 @@ static int patch_stac927x(struct hda_cod
+ */
+ codec->bus->needs_damn_long_delay = 1;
+
++ /* no jack detecion for ref-no-jd model */
++ if (spec->board_config == STAC_D965_REF_NO_JD)
++ spec->hp_detect = 0;
++
+ return 0;
+ }
+