* [Qemu-devel] [4742] Fix vm state save/load
@ 2008-06-13 18:17 malc
0 siblings, 0 replies; only message in thread
From: malc @ 2008-06-13 18:17 UTC (permalink / raw)
To: qemu-devel
Revision: 4742
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4742
Author: malc
Date: 2008-06-13 18:16:59 +0000 (Fri, 13 Jun 2008)
Log Message:
-----------
Fix vm state save/load
Modified Paths:
--------------
trunk/hw/cs4231a.c
Modified: trunk/hw/cs4231a.c
===================================================================
--- trunk/hw/cs4231a.c 2008-06-13 10:48:22 UTC (rev 4741)
+++ trunk/hw/cs4231a.c 2008-06-13 18:16:59 UTC (rev 4742)
@@ -601,17 +601,23 @@
{
CSState *s = opaque;
unsigned int i;
+ uint32_t val;
for (i = 0; i < CS_REGS; i++)
qemu_put_be32s(f, &s->regs[i]);
qemu_put_buffer(f, s->dregs, CS_DREGS);
+ val = s->dma_running; qemu_put_be32s(f, &val);
+ val = s->audio_free; qemu_put_be32s(f, &val);
+ val = s->transferred; qemu_put_be32s(f, &val);
+ val = s->aci_counter; qemu_put_be32s(f, &val);
}
static int cs_load(QEMUFile *f, void *opaque, int version_id)
{
CSState *s = opaque;
unsigned int i;
+ uint32_t val, dma_running;
if (version_id > 1)
return -EINVAL;
@@ -620,6 +626,13 @@
qemu_get_be32s(f, &s->regs[i]);
qemu_get_buffer(f, s->dregs, CS_DREGS);
+
+ qemu_get_be32s(f, &dma_running);
+ qemu_get_be32s(f, &val); s->audio_free = val;
+ qemu_get_be32s(f, &val); s->transferred = val;
+ qemu_get_be32s(f, &val); s->aci_counter = val;
+ if (dma_running && (s->dregs[Interface_Configuration] & PEN))
+ cs_reset_voices (s, s->dregs[FS_And_Playback_Data_Format]);
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-13 18:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-13 18:17 [Qemu-devel] [4742] Fix vm state save/load malc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).