aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index ea823e1100da..98cd1908c039 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -566,8 +566,8 @@ static void stac_init_power_map(struct hda_codec *codec)
566 if (snd_hda_jack_tbl_get(codec, nid)) 566 if (snd_hda_jack_tbl_get(codec, nid))
567 continue; 567 continue;
568 if (def_conf == AC_JACK_PORT_COMPLEX && 568 if (def_conf == AC_JACK_PORT_COMPLEX &&
569 !(spec->vref_mute_led_nid == nid || 569 spec->vref_mute_led_nid != nid &&
570 is_jack_detectable(codec, nid))) { 570 is_jack_detectable(codec, nid)) {
571 snd_hda_jack_detect_enable_callback(codec, nid, 571 snd_hda_jack_detect_enable_callback(codec, nid,
572 STAC_PWR_EVENT, 572 STAC_PWR_EVENT,
573 jack_update_power); 573 jack_update_power);
@@ -4276,11 +4276,18 @@ static int stac_parse_auto_config(struct hda_codec *codec)
4276 return err; 4276 return err;
4277 } 4277 }
4278 4278
4279 stac_init_power_map(codec);
4280
4281 return 0; 4279 return 0;
4282} 4280}
4283 4281
4282static int stac_build_controls(struct hda_codec *codec)
4283{
4284 int err = snd_hda_gen_build_controls(codec);
4285
4286 if (err < 0)
4287 return err;
4288 stac_init_power_map(codec);
4289 return 0;
4290}
4284 4291
4285static int stac_init(struct hda_codec *codec) 4292static int stac_init(struct hda_codec *codec)
4286{ 4293{
@@ -4392,7 +4399,7 @@ static int stac_suspend(struct hda_codec *codec)
4392#endif /* CONFIG_PM */ 4399#endif /* CONFIG_PM */
4393 4400
4394static const struct hda_codec_ops stac_patch_ops = { 4401static const struct hda_codec_ops stac_patch_ops = {
4395 .build_controls = snd_hda_gen_build_controls, 4402 .build_controls = stac_build_controls,
4396 .build_pcms = snd_hda_gen_build_pcms, 4403 .build_pcms = snd_hda_gen_build_pcms,
4397 .init = stac_init, 4404 .init = stac_init,
4398 .free = stac_free, 4405 .free = stac_free,