diff options
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 2311114..f82a64d 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3779,18 +3779,13 @@ static void sync_power_up_states(struct hda_codec *codec) for (i = 0; i < codec->num_nodes; i++, nid++) { unsigned int wcaps = get_wcaps(codec, nid); - unsigned int state, target; + unsigned int target; if (!(wcaps & AC_WCAP_POWER)) continue; target = codec->power_filter(codec, nid, AC_PWRST_D0); if (target == AC_PWRST_D0) continue; - state = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_POWER_STATE, 0); - if (state & AC_PWRST_ERROR) - continue; - state = (state >> 4) & 0x0f; - if (state != target) + if (!snd_hda_check_power_state(codec, nid, target)) snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, target); } |