Index: /trunk/include/VBox/vmm/pdmaudioifs.h
===================================================================
--- /trunk/include/VBox/vmm/pdmaudioifs.h	(revision 71751)
+++ /trunk/include/VBox/vmm/pdmaudioifs.h	(revision 71752)
@@ -135,4 +135,5 @@
 #define ___VBox_vmm_pdmaudioifs_h
 
+#include <iprt/assertcompile.h>
 #include <iprt/circbuf.h>
 #include <iprt/list.h>
@@ -466,6 +467,5 @@
 
 /**
- * Properties of audio streams for host/guest
- * for in or out directions.
+ * Properties of audio streams for host/guest for in or out directions.
  */
 typedef struct PDMAUDIOPCMPROPS
@@ -473,10 +473,6 @@
     /** Sample width. Bits per sample. */
     uint8_t     cBits;
-    /** Signed or unsigned sample. */
-    bool        fSigned;
     /** Number of audio channels. */
     uint8_t     cChannels;
-    /** Sample frequency in Hertz (Hz). */
-    uint32_t    uHz;
     /** Shift count used for faster calculation of various
      *  values, such as the alignment, bytes to frames and so on.
@@ -487,8 +483,18 @@
      */
     uint8_t     cShift;
+    /** Signed or unsigned sample. */
+    bool        fSigned : 1;
     /** Whether the endianness is swapped or not. */
-    bool        fSwapEndian;
-} PDMAUDIOPCMPROPS, *PPDMAUDIOPCMPROPS;
-
+    bool        fSwapEndian : 1;
+    /** Sample frequency in Hertz (Hz). */
+    uint32_t    uHz;
+} PDMAUDIOPCMPROPS;
+AssertCompileSizeAlignment(PDMAUDIOPCMPROPS, 8);
+/** Pointer to audio stream properties. */
+typedef PDMAUDIOPCMPROPS *PPDMAUDIOPCMPROPS;
+
+/** Initializor for PDMAUDIOPCMPROPS. */
+#define PDMAUDIOPCMPROPS_INITIALIZOR(a_cBits, a_fSigned, a_cCannels, a_uHz, a_cShift, a_fSwapEndian) \
+    { a_cBits, a_cShift, a_cCannels, a_fSigned, a_fSwapEndian, a_uHz }
 /** Calculates the cShift value of given sample bits and audio channels.
  *  Note: Does only support mono/stereo channels for now. */
@@ -532,5 +538,9 @@
      *  0 if no hint is given. */
     uint32_t                 cFrameBufferHint;
-} PDMAUDIOSTREAMCFG, *PPDMAUDIOSTREAMCFG;
+} PDMAUDIOSTREAMCFG;
+AssertCompileSizeAlignment(PDMAUDIOPCMPROPS, 8);
+/** Pointer to audio stream configuration keeper. */
+typedef PDMAUDIOSTREAMCFG *PPDMAUDIOSTREAMCFG;
+
 
 /** Converts (audio) frames to bytes. */
Index: /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 71751)
+++ /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 71752)
@@ -270,7 +270,10 @@
     uint8_t  piv;               /** ro 0, Prefetched index value. */
     uint8_t  cr;                /** rw 0, Control register. */
-    int      bd_valid;          /** Whether current BDLE is initialized or not. */
+    int32_t  bd_valid;          /** Whether current BDLE is initialized or not. */
     AC97BDLE bd;                /** Current Buffer Descriptor List Entry (BDLE). */
-} AC97BMREGS, *PAC97BMREGS;
+} AC97BMREGS;
+AssertCompileSizeAlignment(AC97BMREGS, 8);
+/** Pointer to the BM registers of an audio stream. */
+typedef AC97BMREGS *PAC97BMREGS;
 
 #ifdef VBOX_WITH_AUDIO_AC97_ASYNC_IO
@@ -301,16 +304,21 @@
 typedef struct AC97STREAMSTATE
 {
+    /** Criticial section for this stream. */
+    RTCRITSECT            CritSect;
     /** Circular buffer (FIFO) for holding DMA'ed data. */
     R3PTRTYPE(PRTCIRCBUF) pCircBuf;
-    /** Criticial section for this stream. */
-    RTCRITSECT            CritSect;
+#if HC_ARCH_BITS == 32
+    uint32_t              Padding;
+#endif
     /** The stream's current configuration. */
-    PDMAUDIOSTREAMCFG     Cfg;
-    uint32_t              Padding;
+    PDMAUDIOSTREAMCFG     Cfg; //+96
 #ifdef VBOX_WITH_AUDIO_AC97_ASYNC_IO
     /** Asynchronous I/O state members. */
     AC97STREAMSTATEAIO    AIO;
 #endif
-} AC97STREAMSTATE, *PAC97STREAMSTATE;
+} AC97STREAMSTATE;
+AssertCompileSizeAlignment(AC97STREAMSTATE, 8);
+/** Pointer to internal state of an AC'97 stream. */
+typedef AC97STREAMSTATE *PAC97STREAMSTATE;
 
 /**
@@ -321,4 +329,5 @@
     /** Stream number (SDn). */
     uint8_t         u8SD;
+    uint8_t         abPadding[7];
     /** Bus master registers of this stream. */
     AC97BMREGS      Regs;
@@ -326,4 +335,7 @@
     AC97STREAMSTATE State;
 } AC97STREAM, *PAC97STREAM;
+AssertCompileSizeAlignment(AC97STREAM, 8);
+/** Pointer to an AC'97 stream (registers + state). */
+typedef AC97STREAM *PAC97STREAM;
 
 typedef struct AC97STATE *PAC97STATE;
@@ -404,4 +416,5 @@
     /** Set if R0/RC is enabled. */
     bool                    fRZEnabled;
+    bool                    afPadding0[3];
     /** Global Control (Bus Master Control Register). */
     uint32_t                glob_cnt;
@@ -462,5 +475,8 @@
     /** Codec model. */
     uint32_t                uCodecModel;
-} AC97STATE, *PAC97STATE;
+} AC97STATE;
+AssertCompileMemberAlignment(AC97STATE, StreamLineIn, 8);
+/** Pointer to a AC'97 state. */
+typedef AC97STATE *PAC97STATE;
 
 /**
@@ -563,5 +579,5 @@
 *   Internal Functions                                                                                                           *
 *********************************************************************************************************************************/
-DECLINLINE(PAC97STREAM)   ichac97GetStreamFromIdx(PAC97STATE pThis, uint32_t uIdx);
+#ifdef IN_RING3
 static int                ichac97StreamCreate(PAC97STATE pThis, PAC97STREAM pStream, uint8_t u8Strm);
 static void               ichac97StreamDestroy(PAC97STATE pThis, PAC97STREAM pStream);
@@ -578,5 +594,5 @@
 
 static DECLCALLBACK(void) ichac97Reset(PPDMDEVINS pDevIns);
-#ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
+# ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
 static int                ichac97TimerStart(PAC97STATE pThis);
 static int                ichac97TimerMaybeStart(PAC97STATE pThis);
@@ -585,5 +601,5 @@
 static void               ichac97TimerMain(PAC97STATE pThis);
 static DECLCALLBACK(void) ichac97Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser);
-#endif
+# endif
 static void               ichac97DoTransfers(PAC97STATE pThis);
 
@@ -593,5 +609,5 @@
 static void               ichac97MixerRemoveDrvStreams(PAC97STATE pThis, PAUDMIXSINK pMixSink, PDMAUDIODIR enmDir, PDMAUDIODESTSOURCE dstSrc);
 
-#ifdef VBOX_WITH_AUDIO_AC97_ASYNC_IO
+# ifdef VBOX_WITH_AUDIO_AC97_ASYNC_IO
 static DECLCALLBACK(int)  ichac97StreamAsyncIOThread(RTTHREAD hThreadSelf, void *pvUser);
 static int                ichac97StreamAsyncIOCreate(PAC97STATE pThis, PAC97STREAM pStream);
@@ -601,6 +617,6 @@
 static void               ichac97StreamAsyncIOUnlock(PAC97STREAM pStream);
 static void               ichac97StreamAsyncIOEnable(PAC97STREAM pStream, bool fEnable);
-#endif
-
+# endif
+#endif /* IN_RING3 */
 
 
Index: /trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp	(revision 71751)
+++ /trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp	(revision 71752)
@@ -42,6 +42,5 @@
 
     /* 44100Hz, 2 Channels, S16 */
-    PDMAUDIOPCMPROPS config =
-    {
+    PDMAUDIOPCMPROPS config = PDMAUDIOPCMPROPS_INITIALIZOR(
         16,                                                                 /* Bits */
         true,                                                               /* Signed */
@@ -50,5 +49,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */
         false                                                               /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&config));
@@ -164,6 +163,5 @@
 
     /* 44100Hz, 2 Channels, S16 */
-    PDMAUDIOPCMPROPS cfg_p =
-    {
+    PDMAUDIOPCMPROPS cfg_p = PDMAUDIOPCMPROPS_INITIALIZOR(
         16,                                                                 /* Bits */
         true,                                                               /* Signed */
@@ -172,5 +170,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */
         false                                                               /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_p));
@@ -180,6 +178,5 @@
 
     /* 22050Hz, 2 Channels, S16 */
-    PDMAUDIOPCMPROPS cfg_c1 = /* Upmixing to parent */
-    {
+    PDMAUDIOPCMPROPS cfg_c1 = PDMAUDIOPCMPROPS_INITIALIZOR(/* Upmixing to parent */
         16,                                                                 /* Bits */
         true,                                                               /* Signed */
@@ -188,5 +185,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */
         false                                                               /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c1));
@@ -200,6 +197,5 @@
 
     /* 48000Hz, 2 Channels, S16 */
-    PDMAUDIOPCMPROPS cfg_c2 = /* Downmixing to parent */
-    {
+    PDMAUDIOPCMPROPS cfg_c2 = PDMAUDIOPCMPROPS_INITIALIZOR(/* Downmixing to parent */
         16,                                                                 /* Bits */
         true,                                                               /* Signed */
@@ -208,5 +204,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */
         false                                                               /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c2));
@@ -315,6 +311,5 @@
 
     /* 44100Hz, 1 Channel, U8 */
-    PDMAUDIOPCMPROPS cfg_p =
-    {
+    PDMAUDIOPCMPROPS cfg_p = PDMAUDIOPCMPROPS_INITIALIZOR(
         8,                                                                 /* Bits */
         false,                                                             /* Signed */
@@ -323,5 +318,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(8 /* Bits */, 1 /* Channels */), /* Shift */
         false                                                              /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_p));
@@ -339,6 +334,5 @@
 
     /* 22050Hz, 1 Channel, U8 */
-    PDMAUDIOPCMPROPS cfg_c =   /* Upmixing to parent */
-    {
+    PDMAUDIOPCMPROPS cfg_c = PDMAUDIOPCMPROPS_INITIALIZOR( /* Upmixing to parent */
         8,                                                                 /* Bits */
         false,                                                             /* Signed */
@@ -347,5 +341,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(8 /* Bits */, 1 /* Channels */), /* Shift */
         false                                                              /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c));
@@ -422,6 +416,5 @@
 
     /* 44100Hz, 1 Channel, S16 */
-    PDMAUDIOPCMPROPS cfg_p =
-    {
+    PDMAUDIOPCMPROPS cfg_p = PDMAUDIOPCMPROPS_INITIALIZOR(
         16,                                                                 /* Bits */
         true,                                                               /* Signed */
@@ -430,5 +423,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 1 /* Channels */), /* Shift */
         false                                                               /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_p));
@@ -438,6 +431,5 @@
 
     /* 22050Hz, 1 Channel, S16 */
-    PDMAUDIOPCMPROPS cfg_c =   /* Upmixing to parent */
-    {
+    PDMAUDIOPCMPROPS cfg_c = PDMAUDIOPCMPROPS_INITIALIZOR( /* Upmixing to parent */
         16,                                                                 /* Bits */
         true,                                                               /* Signed */
@@ -446,5 +438,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 1 /* Channels */), /* Shift */
         false                                                               /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c));
@@ -521,6 +513,5 @@
     /* Same for parent/child. */
     /* 44100Hz, 2 Channels, S16 */
-    PDMAUDIOPCMPROPS cfg =
-    {
+    PDMAUDIOPCMPROPS cfg = PDMAUDIOPCMPROPS_INITIALIZOR(
         16,                                                                 /* Bits */
         true,                                                               /* Signed */
@@ -529,5 +520,5 @@
         PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(16 /* Bits */, 2 /* Channels */), /* Shift */
         false                                                               /* Swap Endian */
-    };
+    );
 
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg));
