summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-12-20 12:54:18 +0100
committerTakashi Iwai <tiwai@suse.de>2013-01-12 08:34:06 +0100
commit8565f052c5f696ba095a078ea7dbac32460012be (patch)
tree137f79d35c0eb4f5643d3333f12023c01acb8e85 /sound/pci/hda/hda_codec.c
parent3bbcd274c295011e9377053ff46f725ad5e7dbc0 (diff)
downloadop-kernel-dev-8565f052c5f696ba095a078ea7dbac32460012be.zip
op-kernel-dev-8565f052c5f696ba095a078ea7dbac32460012be.tar.gz
ALSA: hda - Fix wrong dirty check in snd_hda_codec_resume_amp()
The dirty entry has to be checked at the beginning in the loop, not in the inner loop for channels. This caused a regression that the right channel isn't properly written. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index afc3ccd..febadc9 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1969,6 +1969,9 @@ void snd_hda_codec_resume_amp(struct hda_codec *codec)
unsigned int idx, dir, ch;
buffer = snd_array_elem(&codec->amp_cache.buf, i);
+ if (!buffer->head.dirty)
+ continue;
+ buffer->head.dirty = 0;
key = buffer->head.key;
if (!key)
continue;
@@ -1978,9 +1981,6 @@ void snd_hda_codec_resume_amp(struct hda_codec *codec)
for (ch = 0; ch < 2; ch++) {
if (!(buffer->head.val & INFO_AMP_VOL(ch)))
continue;
- if (!buffer->head.dirty)
- continue;
- buffer->head.dirty = 0;
mutex_unlock(&codec->hash_mutex);
put_vol_mute(codec, buffer, nid, ch, dir, idx,
buffer->vol[ch]);
OpenPOWER on IntegriCloud