diff --git a/include/sound/hda_regmap.h b/include/sound/hda_regmap.h
index 76648ccfbbf89884512db743026d09caec88140d..53a18b3635e24a458700a21566c56a10d0704c56 100644
--- a/include/sound/hda_regmap.h
+++ b/include/sound/hda_regmap.h
@@ -202,4 +202,16 @@ snd_hdac_regmap_update_amp_stereo(struct hdac_device *codec, hda_nid_t nid,
 	return snd_hdac_regmap_update_raw(codec, cmd, mask, val);
 }
 
+/**
+ * snd_hdac_regmap_sync_node - sync the widget node attributes
+ * @codec: HD-audio codec
+ * @nid: NID to sync
+ */
+static inline void
+snd_hdac_regmap_sync_node(struct hdac_device *codec, hda_nid_t nid)
+{
+	regcache_mark_dirty(codec->regmap);
+	regcache_sync_region(codec->regmap, nid << 20, ((nid + 1) << 20) - 1);
+}
+
 #endif /* __SOUND_HDA_REGMAP_H */
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index f7ccef5559deac7e77d5f5bc7fe1b155d5f17d30..1f2ca7be146860d015608ad6dea1af8938d3a8a1 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -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;