aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-04-04 06:17:28 -0400
committerTakashi Iwai <tiwai@suse.de>2015-04-04 06:22:52 -0400
commitd545a57c5f84c01b50187177921e232a450858c7 (patch)
treed4f756b072131bef0c4b04b67e00aaa872fa371b /sound/pci
parent664bc5c55923712a8aabd2a390ed7477325e32df (diff)
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>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_generic.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index f7ccef5559de..1f2ca7be1468 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,
842 snd_hda_codec_write(codec, nid, 0, 842 snd_hda_codec_write(codec, nid, 0,
843 AC_VERB_SET_POWER_STATE, state); 843 AC_VERB_SET_POWER_STATE, state);
844 changed = nid; 844 changed = nid;
845 /* here we assume that widget attributes (e.g. amp, 845 if (state == AC_PWRST_D0)
846 * pinctl connection) don't change with local power 846 snd_hdac_regmap_sync_node(&codec->core, nid);
847 * state change. If not, need to sync the cache.
848 */
849 } 847 }
850 } 848 }
851 return changed; 849 return changed;