Skip to content

Commit

Permalink
ALSA: hda - Clear cached_write flag in snd_hda_codec_resume_*()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jan 12, 2013
1 parent de1e37b commit aa88a35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit aa88a35

Please sign in to comment.