Commit 85c004ca authored by Stephen Rothwell's avatar Stephen Rothwell

Merge commit 'sound/for-next'

parents e08e56c8 305f9e3b
......@@ -13370,7 +13370,8 @@ static const char *alc269_models[ALC269_MODEL_LAST] = {
[ALC269_ASUS_EEEPC_P703] = "eeepc-p703",
[ALC269_ASUS_EEEPC_P901] = "eeepc-p901",
[ALC269_FUJITSU] = "fujitsu",
[ALC269_LIFEBOOK] = "lifebook"
[ALC269_LIFEBOOK] = "lifebook",
[ALC269_AUTO] = "auto",
};
static struct snd_pci_quirk alc269_cfg_tbl[] = {
......
......@@ -1690,6 +1690,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
"HP mini 1000", STAC_HP_M4),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b,
"HP HDX", STAC_HP_HDX), /* HDX16 */
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620,
"HP dv6", STAC_HP_DV5),
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010,
"HP", STAC_HP_DV5),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
......@@ -4166,7 +4168,10 @@ static int stac92xx_init(struct hda_codec *codec)
stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0],
AC_PINCTL_OUT_EN);
/* fake event to set up pins */
stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]);
if (cfg->hp_pins[0])
stac_issue_unsol_event(codec, cfg->hp_pins[0]);
else if (cfg->line_out_pins[0])
stac_issue_unsol_event(codec, cfg->line_out_pins[0]);
} else {
stac92xx_auto_init_multi_out(codec);
stac92xx_auto_init_hp_out(codec);
......@@ -4688,8 +4693,13 @@ static int stac92xx_resume(struct hda_codec *codec)
snd_hda_codec_resume_amp(codec);
snd_hda_codec_resume_cache(codec);
/* fake event to set up pins again to override cached values */
if (spec->hp_detect)
stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]);
if (spec->hp_detect) {
if (spec->autocfg.hp_pins[0])
stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]);
else if (spec->autocfg.line_out_pins[0])
stac_issue_unsol_event(codec,
spec->autocfg.line_out_pins[0]);
}
return 0;
}
......@@ -5016,7 +5026,7 @@ again:
spec->eapd_switch = 1;
break;
}
if (spec->board_config > STAC_92HD73XX_REF) {
if (spec->board_config != STAC_92HD73XX_REF) {
/* GPIO0 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
spec->gpio_data = 0x01;
......@@ -5242,7 +5252,7 @@ again:
stac92xx_set_config_regs(codec,
stac92hd71bxx_brd_tbl[spec->board_config]);
if (spec->board_config > STAC_92HD71BXX_REF) {
if (spec->board_config != STAC_92HD71BXX_REF) {
/* GPIO0 = EAPD */
spec->gpio_mask = 0x01;
spec->gpio_dir = 0x01;
......@@ -5375,6 +5385,11 @@ again:
case STAC_HP_DV5:
snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010);
stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN);
/* HP dv6 gives the headphone pin as a line-out. Thus we
* need to set hp_detect flag here to force to enable HP
* detection.
*/
spec->hp_detect = 1;
break;
case STAC_HP_HDX:
spec->num_dmics = 1;
......@@ -5557,14 +5572,17 @@ static int patch_stac927x(struct hda_codec *codec)
spec->dac_list = stac927x_dac_nids;
spec->multiout.dac_nids = spec->dac_nids;
if (spec->board_config != STAC_D965_REF) {
/* GPIO0 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = 0x01;
spec->gpio_dir = spec->gpio_data = 0x01;
}
switch (spec->board_config) {
case STAC_D965_3ST:
case STAC_D965_5ST:
/* GPIO0 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x01;
spec->gpio_data = 0x01;
spec->num_dmics = 0;
spec->init = d965_core_init;
break;
case STAC_DELL_BIOS:
......@@ -5583,16 +5601,11 @@ static int patch_stac927x(struct hda_codec *codec)
snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130);
/* fallthru */
case STAC_DELL_3ST:
/* GPIO2 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04;
spec->gpio_data = 0x04;
switch (codec->subsystem_id) {
case 0x1028022f:
/* correct EAPD to be GPIO0 */
spec->eapd_mask = spec->gpio_mask = 0x01;
spec->gpio_dir = spec->gpio_data = 0x01;
break;
};
if (codec->subsystem_id != 0x1028022f) {
/* GPIO2 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = 0x04;
spec->gpio_dir = spec->gpio_data = 0x04;
}
spec->dmic_nids = stac927x_dmic_nids;
spec->num_dmics = STAC927X_NUM_DMICS;
......@@ -5601,14 +5614,9 @@ static int patch_stac927x(struct hda_codec *codec)
spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids);
break;
default:
if (spec->board_config > STAC_D965_REF) {
/* GPIO0 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = 0x01;
spec->gpio_dir = spec->gpio_data = 0x01;
}
spec->num_dmics = 0;
spec->init = stac927x_core_init;
break;
}
spec->num_caps = STAC927X_NUM_CAPS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment