ALSA: hda - Sync node attributes at resume from widget power saving

So far we assumed that the node attributes like amp values remain
during the power state transition of the node itself.  While this is
true for IDT/STAC codecs I've tested, but some other codecs don't seem
behaving in that way.

This patch implements a partial sync mechanism specific to the given
widget node.  Now we've merged the regmap support, and it can be
easily written with regcache_sync_region().

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2015-04-04 12:17:28 +02:00
والد 664bc5c559
کامیت d545a57c5f
2فایلهای تغییر یافته به همراه14 افزوده شده و 4 حذف شده

مشاهده پرونده

@@ -842,10 +842,8 @@ static hda_nid_t path_power_update(struct hda_codec *codec,
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_POWER_STATE, state);
changed = nid;
/* here we assume that widget attributes (e.g. amp,
* pinctl connection) don't change with local power
* state change. If not, need to sync the cache.
*/
if (state == AC_PWRST_D0)
snd_hdac_regmap_sync_node(&codec->core, nid);
}
}
return changed;