diff options
-rw-r--r-- | sound/pci/hda/patch_via.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 9d9583ca5f5b..5bd4b0c10003 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -240,8 +240,10 @@ static void set_widgets_power_state(struct hda_codec *codec) | |||
240 | static void update_power_state(struct hda_codec *codec, hda_nid_t nid, | 240 | static void update_power_state(struct hda_codec *codec, hda_nid_t nid, |
241 | unsigned int parm) | 241 | unsigned int parm) |
242 | { | 242 | { |
243 | if (snd_hda_codec_read(codec, nid, 0, | 243 | unsigned int state = snd_hda_codec_read(codec, nid, 0, |
244 | AC_VERB_GET_POWER_STATE, 0) == parm) | 244 | AC_VERB_GET_POWER_STATE, 0); |
245 | state = (state >> 4) & 0x0f; | ||
246 | if (state == parm) | ||
245 | return; | 247 | return; |
246 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, parm); | 248 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, parm); |
247 | } | 249 | } |
@@ -251,8 +253,10 @@ static void update_conv_power_state(struct hda_codec *codec, hda_nid_t nid, | |||
251 | { | 253 | { |
252 | struct via_spec *spec = codec->spec; | 254 | struct via_spec *spec = codec->spec; |
253 | unsigned int format; | 255 | unsigned int format; |
254 | if (snd_hda_codec_read(codec, nid, 0, | 256 | unsigned int state = snd_hda_codec_read(codec, nid, 0, |
255 | AC_VERB_GET_POWER_STATE, 0) == parm) | 257 | AC_VERB_GET_POWER_STATE, 0); |
258 | state = (state >> 4) & 0x0f; | ||
259 | if (state == parm) | ||
256 | return; | 260 | return; |
257 | format = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); | 261 | format = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); |
258 | if (format && (spec->dac_stream_tag[index] != format)) | 262 | if (format && (spec->dac_stream_tag[index] != format)) |