diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-09-11 13:43:16 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-09-11 13:43:49 +0200 |
commit | 998052b74574699bdd1e451b6556e4d7667a7a4e (patch) | |
tree | 3124898e873cdec28f724106e60d1bff760505f1 /sound/pci/hda/patch_sigmatel.c | |
parent | e7e69265b6269763799a5de9c263fbbce32cd3a3 (diff) | |
parent | 7a9744cb455e6faa287e148394b4b422a6f3c5c4 (diff) | |
download | op-kernel-dev-998052b74574699bdd1e451b6556e4d7667a7a4e.zip op-kernel-dev-998052b74574699bdd1e451b6556e4d7667a7a4e.tar.gz |
Merge branch 'for-linus' into for-next
Merging for-linus branch for syncing the latest STAC/IDT codec
changes to be affected by the upcoming hda-jack rewrites.
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index f26ec04..60aebd0 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -565,8 +565,8 @@ static void stac_init_power_map(struct hda_codec *codec) if (snd_hda_jack_tbl_get(codec, nid)) continue; if (def_conf == AC_JACK_PORT_COMPLEX && - !(spec->vref_mute_led_nid == nid || - is_jack_detectable(codec, nid))) { + spec->vref_mute_led_nid != nid && + is_jack_detectable(codec, nid)) { snd_hda_jack_detect_enable_callback(codec, nid, STAC_PWR_EVENT, jack_update_power); @@ -4272,11 +4272,18 @@ static int stac_parse_auto_config(struct hda_codec *codec) return err; } - stac_init_power_map(codec); - return 0; } +static int stac_build_controls(struct hda_codec *codec) +{ + int err = snd_hda_gen_build_controls(codec); + + if (err < 0) + return err; + stac_init_power_map(codec); + return 0; +} static int stac_init(struct hda_codec *codec) { @@ -4388,7 +4395,7 @@ static int stac_suspend(struct hda_codec *codec) #endif /* CONFIG_PM */ static const struct hda_codec_ops stac_patch_ops = { - .build_controls = snd_hda_gen_build_controls, + .build_controls = stac_build_controls, .build_pcms = snd_hda_gen_build_pcms, .init = stac_init, .free = stac_free, |