ALSA: hda - Clear cached_write flag in snd_hda_codec_resume_*()
authorTakashi Iwai <tiwai@suse.de>
Thu, 20 Dec 2012 10:02:00 +0000 (11:02 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 12 Jan 2013 07:33:54 +0000 (08:33 +0100)
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@suse.de>
sound/pci/hda/hda_codec.c

index 23c821428a43ba583b0ea37aefc1eb29875de27b..3207e5c571416b6ac3f7344677aff93d504ba74a 100644 (file)
@@ -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;
@@ -3520,6 +3521,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;