Commit 87bfa1db authored by Takashi Iwai's avatar Takashi Iwai

Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Fix MSI GX620 mixer
  ALSA: hda - Fix Dell S14 pin setup
  ALSA: hda - Fix IDT92HD83* codec setup
  ALSA: hda - Add support for HP dv6
  ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
  ALSA: hda - Set default GPIO for IDT92HD71bxx
  ALSA: hda - Set default GPIO for STAC/IDT codecs
  ALSA: hda - Add missing model=auto entry for ALC269
parents 673bca19 b99dba34
...@@ -7927,8 +7927,9 @@ static struct snd_kcontrol_new alc883_fivestack_mixer[] = { ...@@ -7927,8 +7927,9 @@ static struct snd_kcontrol_new alc883_fivestack_mixer[] = {
static struct snd_kcontrol_new alc883_targa_mixer[] = { static struct snd_kcontrol_new alc883_targa_mixer[] = {
HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), 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("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
...@@ -7947,8 +7948,9 @@ static struct snd_kcontrol_new alc883_targa_mixer[] = { ...@@ -7947,8 +7948,9 @@ static struct snd_kcontrol_new alc883_targa_mixer[] = {
static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = {
HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
...@@ -7960,6 +7962,15 @@ static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { ...@@ -7960,6 +7962,15 @@ static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = {
{ } /* end */ { } /* end */
}; };
static struct snd_kcontrol_new alc883_targa_8ch_mixer[] = {
HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT),
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),
{ } /* end */
};
static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = { static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = {
HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
...@@ -9167,7 +9178,8 @@ static struct alc_config_preset alc882_presets[] = { ...@@ -9167,7 +9178,8 @@ static struct alc_config_preset alc882_presets[] = {
.init_hook = alc882_targa_automute, .init_hook = alc882_targa_automute,
}, },
[ALC883_TARGA_8ch_DIG] = { [ALC883_TARGA_8ch_DIG] = {
.mixers = { alc883_base_mixer, alc883_chmode_mixer }, .mixers = { alc883_targa_mixer, alc883_targa_8ch_mixer,
alc883_chmode_mixer },
.init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs,
alc883_targa_verbs }, alc883_targa_verbs },
.num_dacs = ARRAY_SIZE(alc883_dac_nids), .num_dacs = ARRAY_SIZE(alc883_dac_nids),
...@@ -13370,7 +13382,8 @@ static const char *alc269_models[ALC269_MODEL_LAST] = { ...@@ -13370,7 +13382,8 @@ static const char *alc269_models[ALC269_MODEL_LAST] = {
[ALC269_ASUS_EEEPC_P703] = "eeepc-p703", [ALC269_ASUS_EEEPC_P703] = "eeepc-p703",
[ALC269_ASUS_EEEPC_P901] = "eeepc-p901", [ALC269_ASUS_EEEPC_P901] = "eeepc-p901",
[ALC269_FUJITSU] = "fujitsu", [ALC269_FUJITSU] = "fujitsu",
[ALC269_LIFEBOOK] = "lifebook" [ALC269_LIFEBOOK] = "lifebook",
[ALC269_AUTO] = "auto",
}; };
static struct snd_pci_quirk alc269_cfg_tbl[] = { static struct snd_pci_quirk alc269_cfg_tbl[] = {
......
...@@ -864,10 +864,6 @@ static struct hda_verb stac92hd73xx_core_init[] = { ...@@ -864,10 +864,6 @@ static struct hda_verb stac92hd73xx_core_init[] = {
}; };
static struct hda_verb stac92hd83xxx_core_init[] = { static struct hda_verb stac92hd83xxx_core_init[] = {
{ 0xa, AC_VERB_SET_CONNECT_SEL, 0x1},
{ 0xb, AC_VERB_SET_CONNECT_SEL, 0x1},
{ 0xd, AC_VERB_SET_CONNECT_SEL, 0x0},
/* power state controls amps */ /* power state controls amps */
{ 0x01, AC_VERB_SET_EAPD, 1 << 2}, { 0x01, AC_VERB_SET_EAPD, 1 << 2},
{} {}
...@@ -1590,8 +1586,8 @@ static unsigned int ref92hd83xxx_pin_configs[10] = { ...@@ -1590,8 +1586,8 @@ static unsigned int ref92hd83xxx_pin_configs[10] = {
}; };
static unsigned int dell_s14_pin_configs[10] = { static unsigned int dell_s14_pin_configs[10] = {
0x02214030, 0x02211010, 0x02a19020, 0x01014050, 0x0221403f, 0x0221101f, 0x02a19020, 0x90170110,
0x40f000f0, 0x01819040, 0x40f000f0, 0x90a60160, 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a60160,
0x40f000f0, 0x40f000f0, 0x40f000f0, 0x40f000f0,
}; };
...@@ -1690,6 +1686,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { ...@@ -1690,6 +1686,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
"HP mini 1000", STAC_HP_M4), "HP mini 1000", STAC_HP_M4),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b, SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b,
"HP HDX", STAC_HP_HDX), /* HDX16 */ "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, SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010,
"HP", STAC_HP_DV5), "HP", STAC_HP_DV5),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
...@@ -4166,7 +4164,10 @@ static int stac92xx_init(struct hda_codec *codec) ...@@ -4166,7 +4164,10 @@ static int stac92xx_init(struct hda_codec *codec)
stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0], stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0],
AC_PINCTL_OUT_EN); AC_PINCTL_OUT_EN);
/* fake event to set up pins */ /* 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 { } else {
stac92xx_auto_init_multi_out(codec); stac92xx_auto_init_multi_out(codec);
stac92xx_auto_init_hp_out(codec); stac92xx_auto_init_hp_out(codec);
...@@ -4688,8 +4689,13 @@ static int stac92xx_resume(struct hda_codec *codec) ...@@ -4688,8 +4689,13 @@ static int stac92xx_resume(struct hda_codec *codec)
snd_hda_codec_resume_amp(codec); snd_hda_codec_resume_amp(codec);
snd_hda_codec_resume_cache(codec); snd_hda_codec_resume_cache(codec);
/* fake event to set up pins again to override cached values */ /* fake event to set up pins again to override cached values */
if (spec->hp_detect) if (spec->hp_detect) {
stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); 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; return 0;
} }
...@@ -5016,7 +5022,7 @@ static int patch_stac92hd73xx(struct hda_codec *codec) ...@@ -5016,7 +5022,7 @@ static int patch_stac92hd73xx(struct hda_codec *codec)
spec->eapd_switch = 1; spec->eapd_switch = 1;
break; break;
} }
if (spec->board_config > STAC_92HD73XX_REF) { if (spec->board_config != STAC_92HD73XX_REF) {
/* GPIO0 High = Enable EAPD */ /* GPIO0 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
spec->gpio_data = 0x01; spec->gpio_data = 0x01;
...@@ -5066,7 +5072,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) ...@@ -5066,7 +5072,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
codec->spec = spec; codec->spec = spec;
codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs;
spec->mono_nid = 0x19;
spec->digbeep_nid = 0x21; spec->digbeep_nid = 0x21;
spec->mux_nids = stac92hd83xxx_mux_nids; spec->mux_nids = stac92hd83xxx_mux_nids;
spec->num_muxes = ARRAY_SIZE(stac92hd83xxx_mux_nids); spec->num_muxes = ARRAY_SIZE(stac92hd83xxx_mux_nids);
...@@ -5242,7 +5247,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) ...@@ -5242,7 +5247,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
stac92xx_set_config_regs(codec, stac92xx_set_config_regs(codec,
stac92hd71bxx_brd_tbl[spec->board_config]); stac92hd71bxx_brd_tbl[spec->board_config]);
if (spec->board_config > STAC_92HD71BXX_REF) { if (spec->board_config != STAC_92HD71BXX_REF) {
/* GPIO0 = EAPD */ /* GPIO0 = EAPD */
spec->gpio_mask = 0x01; spec->gpio_mask = 0x01;
spec->gpio_dir = 0x01; spec->gpio_dir = 0x01;
...@@ -5375,6 +5380,11 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) ...@@ -5375,6 +5380,11 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
case STAC_HP_DV5: case STAC_HP_DV5:
snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010);
stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN); 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; break;
case STAC_HP_HDX: case STAC_HP_HDX:
spec->num_dmics = 1; spec->num_dmics = 1;
...@@ -5557,14 +5567,17 @@ static int patch_stac927x(struct hda_codec *codec) ...@@ -5557,14 +5567,17 @@ static int patch_stac927x(struct hda_codec *codec)
spec->dac_list = stac927x_dac_nids; spec->dac_list = stac927x_dac_nids;
spec->multiout.dac_nids = spec->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) { switch (spec->board_config) {
case STAC_D965_3ST: case STAC_D965_3ST:
case STAC_D965_5ST: case STAC_D965_5ST:
/* GPIO0 High = Enable EAPD */ /* GPIO0 High = Enable EAPD */
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x01;
spec->gpio_data = 0x01;
spec->num_dmics = 0; spec->num_dmics = 0;
spec->init = d965_core_init; spec->init = d965_core_init;
break; break;
case STAC_DELL_BIOS: case STAC_DELL_BIOS:
...@@ -5583,16 +5596,11 @@ static int patch_stac927x(struct hda_codec *codec) ...@@ -5583,16 +5596,11 @@ static int patch_stac927x(struct hda_codec *codec)
snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130); snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130);
/* fallthru */ /* fallthru */
case STAC_DELL_3ST: case STAC_DELL_3ST:
/* GPIO2 High = Enable EAPD */ if (codec->subsystem_id != 0x1028022f) {
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; /* GPIO2 High = Enable EAPD */
spec->gpio_data = 0x04; spec->eapd_mask = spec->gpio_mask = 0x04;
switch (codec->subsystem_id) { spec->gpio_dir = spec->gpio_data = 0x04;
case 0x1028022f: }
/* correct EAPD to be GPIO0 */
spec->eapd_mask = spec->gpio_mask = 0x01;
spec->gpio_dir = spec->gpio_data = 0x01;
break;
};
spec->dmic_nids = stac927x_dmic_nids; spec->dmic_nids = stac927x_dmic_nids;
spec->num_dmics = STAC927X_NUM_DMICS; spec->num_dmics = STAC927X_NUM_DMICS;
...@@ -5601,14 +5609,9 @@ static int patch_stac927x(struct hda_codec *codec) ...@@ -5601,14 +5609,9 @@ static int patch_stac927x(struct hda_codec *codec)
spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids);
break; break;
default: 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->num_dmics = 0;
spec->init = stac927x_core_init; spec->init = stac927x_core_init;
break;
} }
spec->num_caps = STAC927X_NUM_CAPS; 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