[alsa-devel] [PATCH 056/112] ALSA: hda - Clear cached_write flag in snd_hda_codec_resume_*()

Takashi Iwai tiwai at suse.de
Tue Jan 8 12:38:49 CET 2013


These functions are supposed to be called at finishing the cached
sequential writes, so clear the flag properly for lazy developers who
often forget details.

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/pci/hda/hda_codec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 44b525f..df4abbe 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1955,6 +1955,7 @@ void snd_hda_codec_resume_amp(struct hda_codec *codec)
 	int i;
 
 	mutex_lock(&codec->hash_mutex);
+	codec->cached_write = 0;
 	for (i = 0; i < codec->amp_cache.buf.used; i++) {
 		struct hda_amp_info *buffer;
 		u32 key;
@@ -3519,6 +3520,7 @@ void snd_hda_codec_resume_cache(struct hda_codec *codec)
 	int i;
 
 	mutex_lock(&codec->hash_mutex);
+	codec->cached_write = 0;
 	for (i = 0; i < codec->cmd_cache.buf.used; i++) {
 		struct hda_cache_head *buffer;
 		u32 key;
-- 
1.8.0.1



More information about the Alsa-devel mailing list