aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-06-18 10:28:36 -0400
committerTakashi Iwai <tiwai@suse.de>2013-06-18 10:28:36 -0400
commitfd678cac34e66b5a289e1abd159c3cb080040370 (patch)
tree3701d3ab36f3c7b901159229f91e31ddc2b6f378 /sound/pci/hda
parent7ef166b831237e67b2ea83ce0c933c46ddd6eb26 (diff)
ALSA: hda - Use snd_hda_check_power_state() in patch_hdmi.c
... instead of open codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_hdmi.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 0687d536b563..49ef8f8eb5e9 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1026,14 +1026,10 @@ static void haswell_verify_pin_D0(struct hda_codec *codec,
1026 /* For Haswell, the converter 1/2 may keep in D3 state after bootup, 1026 /* For Haswell, the converter 1/2 may keep in D3 state after bootup,
1027 * thus pins could only choose converter 0 for use. Make sure the 1027 * thus pins could only choose converter 0 for use. Make sure the
1028 * converters are in correct power state */ 1028 * converters are in correct power state */
1029 pwr = snd_hda_codec_read(codec, cvt_nid, 0, AC_VERB_GET_POWER_STATE, 0); 1029 if (!snd_hda_check_power_state(codec, cvt_nid, AC_PWRST_D0))
1030 pwr = (pwr & AC_PWRST_ACTUAL) >> AC_PWRST_ACTUAL_SHIFT;
1031 if (pwr != AC_PWRST_D0)
1032 snd_hda_codec_write(codec, cvt_nid, 0, AC_VERB_SET_POWER_STATE, AC_PWRST_D0); 1030 snd_hda_codec_write(codec, cvt_nid, 0, AC_VERB_SET_POWER_STATE, AC_PWRST_D0);
1033 1031
1034 pwr = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_POWER_STATE, 0); 1032 if (!snd_hda_check_power_state(codec, nid, AC_PWRST_D0)) {
1035 pwr = (pwr & AC_PWRST_ACTUAL) >> AC_PWRST_ACTUAL_SHIFT;
1036 if (pwr != AC_PWRST_D0) {
1037 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, 1033 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE,
1038 AC_PWRST_D0); 1034 AC_PWRST_D0);
1039 msleep(40); 1035 msleep(40);