From 37b28b2a64b87b001293962b758167166b1b77e1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 24 Jan 2013 17:12:09 +0100 Subject: [PATCH] --- yaml --- r: 353215 b: refs/heads/master c: 25368c47aee6d909923001918041f2e94bfa02ef h: refs/heads/master i: 353213: 1a4a15a8c1713627c020d5a2ef0f2d2044614309 353211: 68948667c97935f2cb50e72984a1b4058b92baca 353207: 9c4c26cf92b132f9060ea8977d4352be1acab8ae 353199: b980c73e61fbd5a0fce0c1534a62ba484e148896 353183: a29ffcf413dd6bcca984ad51b9f2c1ef1d64813f 353151: b4862814e833df5976a95ae68eb227506c26f827 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_via.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 646158b80f24..039d2f8a0935 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7dddf2aed8ffc1fa30df92b57981dea146cdfc0f +refs/heads/master: 25368c47aee6d909923001918041f2e94bfa02ef diff --git a/trunk/sound/pci/hda/patch_via.c b/trunk/sound/pci/hda/patch_via.c index 9d9583ca5f5b..5bd4b0c10003 100644 --- a/trunk/sound/pci/hda/patch_via.c +++ b/trunk/sound/pci/hda/patch_via.c @@ -240,8 +240,10 @@ static void set_widgets_power_state(struct hda_codec *codec) static void update_power_state(struct hda_codec *codec, hda_nid_t nid, unsigned int parm) { - if (snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_POWER_STATE, 0) == parm) + unsigned int state = snd_hda_codec_read(codec, nid, 0, + AC_VERB_GET_POWER_STATE, 0); + state = (state >> 4) & 0x0f; + if (state == parm) return; snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, parm); } @@ -251,8 +253,10 @@ static void update_conv_power_state(struct hda_codec *codec, hda_nid_t nid, { struct via_spec *spec = codec->spec; unsigned int format; - if (snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_POWER_STATE, 0) == parm) + unsigned int state = snd_hda_codec_read(codec, nid, 0, + AC_VERB_GET_POWER_STATE, 0); + state = (state >> 4) & 0x0f; + if (state == parm) return; format = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); if (format && (spec->dac_stream_tag[index] != format))