aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_sigmatel.c20
-rw-r--r--sound/soc/omap/omap-pcm.c2
2 files changed, 20 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 5dd3e89f620a..596ceabd6504 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -69,6 +69,7 @@ enum {
69}; 69};
70 70
71enum { 71enum {
72 STAC_92HD73XX_NO_JD, /* no jack-detection */
72 STAC_92HD73XX_REF, 73 STAC_92HD73XX_REF,
73 STAC_DELL_M6_AMIC, 74 STAC_DELL_M6_AMIC,
74 STAC_DELL_M6_DMIC, 75 STAC_DELL_M6_DMIC,
@@ -127,6 +128,7 @@ enum {
127}; 128};
128 129
129enum { 130enum {
131 STAC_D965_REF_NO_JD, /* no jack-detection */
130 STAC_D965_REF, 132 STAC_D965_REF,
131 STAC_D965_3ST, 133 STAC_D965_3ST,
132 STAC_D965_5ST, 134 STAC_D965_5ST,
@@ -1611,6 +1613,7 @@ static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = {
1611}; 1613};
1612 1614
1613static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { 1615static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = {
1616 [STAC_92HD73XX_NO_JD] = "no-jd",
1614 [STAC_92HD73XX_REF] = "ref", 1617 [STAC_92HD73XX_REF] = "ref",
1615 [STAC_DELL_M6_AMIC] = "dell-m6-amic", 1618 [STAC_DELL_M6_AMIC] = "dell-m6-amic",
1616 [STAC_DELL_M6_DMIC] = "dell-m6-dmic", 1619 [STAC_DELL_M6_DMIC] = "dell-m6-dmic",
@@ -1640,6 +1643,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
1640 "unknown Dell", STAC_DELL_M6_DMIC), 1643 "unknown Dell", STAC_DELL_M6_DMIC),
1641 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f, 1644 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f,
1642 "Dell Studio 1537", STAC_DELL_M6_DMIC), 1645 "Dell Studio 1537", STAC_DELL_M6_DMIC),
1646 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0,
1647 "Dell Studio 17", STAC_DELL_M6_DMIC),
1643 {} /* terminator */ 1648 {} /* terminator */
1644}; 1649};
1645 1650
@@ -2027,6 +2032,7 @@ static unsigned int dell_3st_pin_configs[14] = {
2027}; 2032};
2028 2033
2029static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = { 2034static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
2035 [STAC_D965_REF_NO_JD] = ref927x_pin_configs,
2030 [STAC_D965_REF] = ref927x_pin_configs, 2036 [STAC_D965_REF] = ref927x_pin_configs,
2031 [STAC_D965_3ST] = d965_3st_pin_configs, 2037 [STAC_D965_3ST] = d965_3st_pin_configs,
2032 [STAC_D965_5ST] = d965_5st_pin_configs, 2038 [STAC_D965_5ST] = d965_5st_pin_configs,
@@ -2035,6 +2041,7 @@ static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
2035}; 2041};
2036 2042
2037static const char *stac927x_models[STAC_927X_MODELS] = { 2043static const char *stac927x_models[STAC_927X_MODELS] = {
2044 [STAC_D965_REF_NO_JD] = "ref-no-jd",
2038 [STAC_D965_REF] = "ref", 2045 [STAC_D965_REF] = "ref",
2039 [STAC_D965_3ST] = "3stack", 2046 [STAC_D965_3ST] = "3stack",
2040 [STAC_D965_5ST] = "5stack", 2047 [STAC_D965_5ST] = "5stack",
@@ -2896,7 +2903,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
2896 } 2903 }
2897 2904
2898 if ((spec->multiout.num_dacs - cfg->line_outs) > 0 && 2905 if ((spec->multiout.num_dacs - cfg->line_outs) > 0 &&
2899 cfg->hp_outs && !spec->multiout.hp_nid) 2906 cfg->hp_outs == 1 && !spec->multiout.hp_nid)
2900 spec->multiout.hp_nid = nid; 2907 spec->multiout.hp_nid = nid;
2901 2908
2902 if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) { 2909 if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) {
@@ -4254,14 +4261,17 @@ again:
4254 4261
4255 switch (spec->multiout.num_dacs) { 4262 switch (spec->multiout.num_dacs) {
4256 case 0x3: /* 6 Channel */ 4263 case 0x3: /* 6 Channel */
4264 spec->multiout.hp_nid = 0x17;
4257 spec->mixer = stac92hd73xx_6ch_mixer; 4265 spec->mixer = stac92hd73xx_6ch_mixer;
4258 spec->init = stac92hd73xx_6ch_core_init; 4266 spec->init = stac92hd73xx_6ch_core_init;
4259 break; 4267 break;
4260 case 0x4: /* 8 Channel */ 4268 case 0x4: /* 8 Channel */
4269 spec->multiout.hp_nid = 0x18;
4261 spec->mixer = stac92hd73xx_8ch_mixer; 4270 spec->mixer = stac92hd73xx_8ch_mixer;
4262 spec->init = stac92hd73xx_8ch_core_init; 4271 spec->init = stac92hd73xx_8ch_core_init;
4263 break; 4272 break;
4264 case 0x5: /* 10 Channel */ 4273 case 0x5: /* 10 Channel */
4274 spec->multiout.hp_nid = 0x19;
4265 spec->mixer = stac92hd73xx_10ch_mixer; 4275 spec->mixer = stac92hd73xx_10ch_mixer;
4266 spec->init = stac92hd73xx_10ch_core_init; 4276 spec->init = stac92hd73xx_10ch_core_init;
4267 }; 4277 };
@@ -4297,6 +4307,7 @@ again:
4297 spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; 4307 spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP];
4298 spec->eapd_switch = 0; 4308 spec->eapd_switch = 0;
4299 spec->num_amps = 1; 4309 spec->num_amps = 1;
4310 spec->multiout.hp_nid = 0; /* dual HPs */
4300 4311
4301 if (!spec->init) 4312 if (!spec->init)
4302 spec->init = dell_m6_core_init; 4313 spec->init = dell_m6_core_init;
@@ -4351,6 +4362,9 @@ again:
4351 return err; 4362 return err;
4352 } 4363 }
4353 4364
4365 if (spec->board_config == STAC_92HD73XX_NO_JD)
4366 spec->hp_detect = 0;
4367
4354 codec->patch_ops = stac92xx_patch_ops; 4368 codec->patch_ops = stac92xx_patch_ops;
4355 4369
4356 return 0; 4370 return 0;
@@ -4899,6 +4913,10 @@ static int patch_stac927x(struct hda_codec *codec)
4899 */ 4913 */
4900 codec->bus->needs_damn_long_delay = 1; 4914 codec->bus->needs_damn_long_delay = 1;
4901 4915
4916 /* no jack detecion for ref-no-jd model */
4917 if (spec->board_config == STAC_D965_REF_NO_JD)
4918 spec->hp_detect = 0;
4919
4902 return 0; 4920 return 0;
4903} 4921}
4904 4922
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index e9084fdd2082..acd68efb2b75 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -233,7 +233,7 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
233 if (ret < 0) 233 if (ret < 0)
234 goto out; 234 goto out;
235 235
236 prtd = kzalloc(sizeof(prtd), GFP_KERNEL); 236 prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
237 if (prtd == NULL) { 237 if (prtd == NULL) {
238 ret = -ENOMEM; 238 ret = -ENOMEM;
239 goto out; 239 goto out;