Patchwork [08/10] ac97: recalculate active after loadvm

login
register
mail settings
Submitter Juan Quintela
Date Oct. 28, 2009, 12:29 p.m.
Message ID <c7031176c7dda6d58da25aa59f4127b59e5c96be.1256731509.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/37094/
State New
Headers show

Comments

Juan Quintela - Oct. 28, 2009, 12:29 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/ac97.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/ac97.c b/hw/ac97.c
index e4ecbe9..b1a6395 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -1242,6 +1242,9 @@  static int ac97_load (QEMUFile *f, void *opaque, int version_id)
     V_ (AC97_Line_In_Volume_Mute, AUD_MIXER_LINE_IN);
 #undef V_
 #endif
+    active[PI_INDEX] = !!(s->bm_regs[PI_INDEX].cr & CR_RPBM);
+    active[PO_INDEX] = !!(s->bm_regs[PO_INDEX].cr & CR_RPBM);
+    active[MC_INDEX] = !!(s->bm_regs[MC_INDEX].cr & CR_RPBM);
     reset_voices (s, active);

     s->bup_flag = 0;