Index: /trunk/src/VBox/Devices/Audio/DevHDA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 75605)
+++ /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 75606)
@@ -1551,5 +1551,5 @@
             LogRelMax2(64, ("HDA: Stream #%RU8 interrupt lagging behind (expected %uus, got %uus), trying to catch up ...\n",
                             pStream->u8SD,
-                            (TMTimerGetFreq(pThis->pTimer[pStream->u8SD]) / pThis->u16TimerHz) / 1000,(tsNow - pStream->State.tsTransferLast) / 1000));
+                            (TMTimerGetFreq(pThis->pTimer[pStream->u8SD]) / pThis->uTimerHz) / 1000,(tsNow - pStream->State.tsTransferLast) / 1000));
 
             cTicksToNext = 0;
@@ -2927,5 +2927,5 @@
             hdaR3TimerSet(pThis, pStream,
                             TMTimerGet(pThis->pTimer[pStream->u8SD])
-                          + TMTimerGetFreq(pThis->pTimer[pStream->u8SD]) / pStream->pHDAState->u16TimerHz,
+                          + TMTimerGetFreq(pThis->pTimer[pStream->u8SD]) / pStream->pHDAState->uTimerHz,
                           true /* fForce */);
     }
@@ -4933,11 +4933,11 @@
 
 
-    rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &pThis->u16TimerHz, HDA_TIMER_HZ_DEFAULT /* Default value, if not set. */);
+    rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &pThis->uTimerHz, HDA_TIMER_HZ_DEFAULT /* Default value, if not set. */);
     if (RT_FAILURE(rc))
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("HDA configuration error: failed to read Hertz (Hz) rate as unsigned integer"));
 
-    if (pThis->u16TimerHz != HDA_TIMER_HZ_DEFAULT)
-        LogRel(("HDA: Using custom device timer rate (%RU16Hz)\n", pThis->u16TimerHz));
+    if (pThis->uTimerHz != HDA_TIMER_HZ_DEFAULT)
+        LogRel(("HDA: Using custom device timer rate (%RU16Hz)\n", pThis->uTimerHz));
 
     rc = CFGMR3QueryBoolDef(pCfg, "PosAdjustEnabled", &pThis->fPosAdjustEnabled, true);
Index: /trunk/src/VBox/Devices/Audio/DevHDA.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHDA.h	(revision 75605)
+++ /trunk/src/VBox/Devices/Audio/DevHDA.h	(revision 75606)
@@ -203,5 +203,5 @@
     uint8_t                            u8IRQL;
     /** The device timer Hz rate. Defaults to HDA_TIMER_HZ_DEFAULT. */
-    uint16_t                           u16TimerHz;
+    uint16_t                           uTimerHz;
     /** Padding for alignment. */
     uint8_t                            au8Padding3[3];
Index: /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 75605)
+++ /trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 75606)
@@ -51,5 +51,5 @@
 
 /** Default timer frequency (in Hz). */
-#define AC97_TIMER_HZ       200
+#define AC97_TIMER_HZ_DEFAULT 200
 
 /** Maximum FIFO size (in bytes). */
@@ -472,8 +472,8 @@
     /** Number of active (running) SDn streams. */
     uint8_t                 cStreamsActive;
-#ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
     /** Flag indicating whether the timer is active or not. */
     bool                    fTimerActive;
-    uint8_t                 u8Padding1[2];
+    /** The device timer Hz rate. Defaults to AC97_TIMER_HZ_DEFAULT_DEFAULT. */
+    uint16_t                uTimerHz;
     /** The timer for pumping data thru the attached LUN drivers - RCPtr. */
     PTMTIMERRC              pTimerRC;
@@ -487,5 +487,4 @@
      * Used to calculate the time actually elapsed between two timer callbacks. */
     uint64_t                uTimerTS;
-#endif
 #ifdef VBOX_WITH_STATISTICS
     STAMPROFILE             StatTimer;
@@ -636,5 +635,5 @@
 
 static DECLCALLBACK(void) ichac97R3Reset(PPDMDEVINS pDevIns);
-# ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
+
 static int                ichac97R3TimerStart(PAC97STATE pThis);
 static int                ichac97R3TimerMaybeStart(PAC97STATE pThis);
@@ -643,5 +642,5 @@
 static void               ichac97R3TimerMain(PAC97STATE pThis);
 static DECLCALLBACK(void) ichac97R3Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser);
-# endif
+
 static void               ichac97R3DoTransfers(PAC97STATE pThis);
 
@@ -877,5 +876,4 @@
     ichac97R3StreamUnlock(pStream);
 
-# ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
     /* Second, see if we need to start or stop the timer. */
     if (!fEnable)
@@ -883,5 +881,4 @@
     else
         ichac97R3TimerMaybeStart(pThis);
-# endif
 
     LogFunc(("[SD%RU8] cStreamsActive=%RU8, fEnable=%RTbool, rc=%Rrc\n", pStream->u8SD, pThis->cStreamsActive, fEnable, rc));
@@ -1214,10 +1211,4 @@
 
     PAC97STREAMSTATEAIO pAIO = &pCtx->pStream->State.AIO;
-
-    PRTCIRCBUF pCircBuf = pStream->State.pCircBuf;
-    AssertPtr(pCircBuf);
-
-    PAUDMIXSINK pMixSink = ichac97R3IndexToSink(pThis, pStream->u8SD);
-    AssertPtr(pMixSink);
 
     ASMAtomicXchgBool(&pAIO->fStarted, true);
@@ -1926,6 +1917,6 @@
 
     /* Set scheduling hint (if available). */
-    if (pThis->cTimerTicks)
-        pCfg->Device.uSchedulingHintMs = 1000 /* ms */ / (TMTimerGetFreq(pThis->pTimerR3) / pThis->cTimerTicks);
+    if (pThis->uTimerHz)
+        pCfg->Device.uSchedulingHintMs = 1000 /* ms */ / pThis->uTimerHz;
 
     switch (pStream->u8SD)
@@ -2413,6 +2404,4 @@
 # endif /* Unused */
 
-# ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
-
 /**
  * Starts the internal audio device timer.
@@ -2584,6 +2573,4 @@
     ichac97R3TimerMain(pThis);
 }
-
-# endif /* !VBOX_WITH_AUDIO_AC97_CALLBACKS */
 
 /**
@@ -3744,5 +3731,4 @@
     AudioMixerSinkReset(pThis->pSinkOut);
 
-# ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
     /*
      * Stop the timer, if any.
@@ -3751,5 +3737,4 @@
 
     pThis->cStreamsActive = 0;
-# endif
 }
 
@@ -4014,7 +3999,5 @@
     PAC97STATE pThis = PDMINS_2_DATA(pDevIns, PAC97STATE);
     pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);
-# ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
-    pThis->pTimerRC = TMTimerRCPtr(pThis->pTimerR3);
-# endif
+    pThis->pTimerRC  = TMTimerRCPtr(pThis->pTimerR3);
 }
 
@@ -4085,14 +4068,11 @@
                                 N_("AC'97 configuration error: Querying \"Codec\" as string failed"));
 
-# ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
-    uint16_t uTimerHz;
-    rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &uTimerHz, AC97_TIMER_HZ /* Default value, if not set. */);
+    rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &pThis->uTimerHz, AC97_TIMER_HZ_DEFAULT /* Default value, if not set. */);
     if (RT_FAILURE(rc))
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("AC'97 configuration error: failed to read Hertz (Hz) rate as unsigned integer"));
 
-    if (uTimerHz != AC97_TIMER_HZ)
-        LogRel(("AC97: Using custom device timer rate (%RU16Hz)\n", uTimerHz));
-# endif
+    if (pThis->uTimerHz != AC97_TIMER_HZ_DEFAULT)
+        LogRel(("AC97: Using custom device timer rate (%RU16Hz)\n", pThis->uTimerHz));
 
     rc = CFGMR3QueryBoolDef(pCfg, "DebugEnabled", &pThis->Dbg.fEnabled, false);
@@ -4354,5 +4334,4 @@
         ichac97R3Reset(pDevIns);
 
-# ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
     if (RT_SUCCESS(rc))
     {
@@ -4374,39 +4353,8 @@
         AssertRCReturn(rc, rc);
 
-        pThis->cTimerTicks = TMTimerGetFreq(pThis->pTimerR3) / uTimerHz;
+        pThis->cTimerTicks = TMTimerGetFreq(pThis->pTimerR3) / pThis->uTimerHz;
         pThis->uTimerTS    = TMTimerGet(pThis->pTimerR3);
-        LogFunc(("Timer ticks=%RU64 (%RU16 Hz)\n", pThis->cTimerTicks, uTimerHz));
-    }
-# else /* !VBOX_WITH_AUDIO_AC97_CALLBACKS */
-    if (RT_SUCCESS(rc))
-    {
-        PAC97DRIVER pDrv;
-        RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
-        {
-            /* Only register primary driver.
-             * The device emulation does the output multiplexing then. */
-            if (!(pDrv->fFlags & PDMAUDIODRVFLAGS_PRIMARY))
-                continue;
-
-            PDMAUDIOCBRECORD AudioCallbacks[2];
-
-            AC97CALLBACKCTX Ctx = { pThis, pDrv };
-
-            AudioCallbacks[0].enmType     = PDMAUDIOCALLBACKTYPE_INPUT;
-            AudioCallbacks[0].pfnCallback = ac97CallbackInput;
-            AudioCallbacks[0].pvCtx       = &Ctx;
-            AudioCallbacks[0].cbCtx       = sizeof(AC97CALLBACKCTX);
-
-            AudioCallbacks[1].enmType     = PDMAUDIOCALLBACKTYPE_OUTPUT;
-            AudioCallbacks[1].pfnCallback = ac97CallbackOutput;
-            AudioCallbacks[1].pvCtx       = &Ctx;
-            AudioCallbacks[1].cbCtx       = sizeof(AC97CALLBACKCTX);
-
-            rc = pDrv->pConnector->pfnRegisterCallbacks(pDrv->pConnector, AudioCallbacks, RT_ELEMENTS(AudioCallbacks));
-            if (RT_FAILURE(rc))
-                break;
-        }
-    }
-# endif /* VBOX_WITH_AUDIO_AC97_CALLBACKS */
+        LogFunc(("Timer ticks=%RU64 (%RU16 Hz)\n", pThis->cTimerTicks, pThis->uTimerHz));
+    }
 
 # ifdef VBOX_WITH_STATISTICS
Index: /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp	(revision 75605)
+++ /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp	(revision 75606)
@@ -1596,5 +1596,5 @@
     }
 
-    rc = RTCircBufCreate(&pCAStream->pCircBuf, PDMAUDIOSTREAMCFG_F2B(pCfgReq, 4096)); /** @todo Make this configurable. */
+    rc = RTCircBufCreate(&pCAStream->pCircBuf, PDMAUDIOSTREAMCFG_F2B(pCfgReq, pCfgReq->Backend.cfBufferSize));
     if (RT_FAILURE(rc))
         return rc;
Index: /trunk/src/VBox/Devices/Audio/HDAStream.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/HDAStream.cpp	(revision 75605)
+++ /trunk/src/VBox/Devices/Audio/HDAStream.cpp	(revision 75606)
@@ -198,6 +198,6 @@
 
     /* Set scheduling hint (if available). */
-    if (pThis->u16TimerHz)
-        pCfg->Device.uSchedulingHintMs = 1000 /* ms */ / pThis->u16TimerHz;
+    if (pThis->uTimerHz)
+        pCfg->Device.uSchedulingHintMs = 1000 /* ms */ / pThis->uTimerHz;
 
     /* (Re-)Allocate the stream's internal DMA buffer, based on the PCM  properties we just got above. */
@@ -274,7 +274,7 @@
     {
         /* Make sure that the chosen Hz rate dividable by the stream's rate. */
-        if (pStream->State.Cfg.Props.uHz % pThis->u16TimerHz != 0)
+        if (pStream->State.Cfg.Props.uHz % pThis->uTimerHz != 0)
             LogRel(("HDA: Device timer (%RU32) does not fit to stream #RU8 timing (%RU32)\n",
-                    pThis->u16TimerHz, pStream->State.Cfg.Props.uHz));
+                    pThis->uTimerHz, pStream->State.Cfg.Props.uHz));
 
         /* Figure out how many transfer fragments we're going to use for this stream. */
@@ -369,5 +369,5 @@
         /* Calculate the bytes we need to transfer to / from the stream's DMA per iteration.
          * This is bound to the device's Hz rate and thus to the (virtual) timing the device expects. */
-        pStream->State.cbTransferChunk = (pStream->State.Cfg.Props.uHz / pThis->u16TimerHz) * pStream->State.cbFrameSize;
+        pStream->State.cbTransferChunk = (pStream->State.Cfg.Props.uHz / pThis->uTimerHz) * pStream->State.cbFrameSize;
         Assert(pStream->State.cbTransferChunk);
         Assert(pStream->State.cbTransferChunk % pStream->State.cbFrameSize == 0);
@@ -382,5 +382,5 @@
         pStream->State.tsLastUpdateNs             = 0;
 
-        const uint64_t cTicksPerHz = TMTimerGetFreq(pStream->pTimer) / pThis->u16TimerHz;
+        const uint64_t cTicksPerHz = TMTimerGetFreq(pStream->pTimer) / pThis->uTimerHz;
 
         /* Calculate the timer ticks per byte for this stream. */
@@ -398,5 +398,5 @@
         LogFunc(("[SD%RU8] Timer %uHz (%RU64 ticks per Hz), cTicksPerByte=%RU64, cbTransferChunk=%RU32, cTransferTicks=%RU64, " \
                  "cbTransferSize=%RU32\n",
-                 pStream->u8SD, pThis->u16TimerHz, cTicksPerHz, pStream->State.cTicksPerByte,
+                 pStream->u8SD, pThis->uTimerHz, cTicksPerHz, pStream->State.cTicksPerByte,
                  pStream->State.cbTransferChunk, pStream->State.cTransferTicks, pStream->State.cbTransferSize));
 
Index: /trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
===================================================================
--- /trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp	(revision 75605)
+++ /trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp	(revision 75606)
@@ -1917,13 +1917,11 @@
     GEN_CHECK_OFF(AC97STATE, StreamOut);
     GEN_CHECK_OFF(AC97STATE, cStreamsActive);
-#ifndef VBOX_WITH_AUDIO_AC97_CALLBACKS
     GEN_CHECK_OFF(AC97STATE, pTimerR3);
     GEN_CHECK_OFF(AC97STATE, pTimerR0);
     GEN_CHECK_OFF(AC97STATE, pTimerRC);
     GEN_CHECK_OFF(AC97STATE, fTimerActive);
-    GEN_CHECK_OFF(AC97STATE, u8Padding1);
+    GEN_CHECK_OFF(AC97STATE, uTimerHz);
     GEN_CHECK_OFF(AC97STATE, cTimerTicks);
     GEN_CHECK_OFF(AC97STATE, uTimerTS);
-#endif
 #ifdef VBOX_WITH_STATISTICS
     GEN_CHECK_OFF(AC97STATE, StatTimer);
