Index: trunk/src/VBox/Devices/Audio/DevHDA.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 88138)
+++ trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 88139)
@@ -540,5 +540,5 @@
     SSMFIELD_ENTRY(HDASTREAMPERIOD, u64ElapsedWalClk),
     SSMFIELD_ENTRY(HDASTREAMPERIOD, cFramesTransferred),
-    SSMFIELD_ENTRY(HDASTREAMPERIOD, cIntPending),
+    SSMFIELD_ENTRY_OLD(cIntPending, sizeof(uint8_t)),   /** @todo Not sure what we should for non-zero values on restore... ignoring it for now.  */
     SSMFIELD_ENTRY_TERM()
 };
@@ -568,35 +568,4 @@
 };
 
-
-#ifdef IN_RING3
-/**
- * Reschedules pending interrupts for all audio streams which have complete
- * audio periods but did not have the chance to issue their (pending) interrupts yet.
- *
- * @param   pDevIns             The device instance.
- * @param   pThis               The shared HDA device state.
- * @param   pThisCC             The ring-3 HDA device state.
- */
-static void hdaR3ReschedulePendingInterrupts(PPDMDEVINS pDevIns, PHDASTATE pThis, PHDASTATER3 pThisCC)
-{
-    bool fInterrupt = false;
-
-    for (uint8_t i = 0; i < HDA_MAX_STREAMS; ++i)
-    {
-        PHDASTREAM pStream = &pThis->aStreams[i];
-        if (   hdaR3StreamPeriodIsComplete(    &pStream->State.Period)
-            && hdaR3StreamPeriodNeedsInterrupt(&pStream->State.Period)
-            && hdaR3WalClkSet(pThis, pThisCC, hdaR3StreamPeriodGetAbsElapsedWalClk(&pStream->State.Period), false /* fForce */))
-        {
-            fInterrupt = true;
-            break;
-        }
-    }
-
-    LogFunc(("fInterrupt=%RTbool\n", fInterrupt));
-
-    HDA_PROCESS_INTERRUPT(pDevIns, pThis);
-}
-#endif /* IN_RING3 */
 
 /**
@@ -1483,7 +1452,4 @@
                     if (pThisCC->cStreamsActive)
                         pThisCC->cStreamsActive--;
-
-                    /* Make sure to (re-)schedule outstanding (delayed) interrupts. */
-                    hdaR3ReschedulePendingInterrupts(pDevIns, pThis, pThisCC);
 
                     /* Reset the period. */
Index: trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp	(revision 88138)
+++ trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp	(revision 88139)
@@ -112,5 +112,4 @@
     pPeriod->cFramesToTransfer  = cFramesToTransfer;
     pPeriod->cFramesTransferred = 0;
-    pPeriod->cIntPending        = 0;
 
     Log3Func(("[SD%RU8] %RU64 long, Hz=%RU32, CBL=%RU32, LVI=%RU16 -> %u periods, %RU32 frames each\n",
@@ -129,8 +128,4 @@
 {
     Log3Func(("[SD%RU8]\n", pPeriod->u8SD));
-
-    if (pPeriod->cIntPending)
-        LogRelMax(50, ("HDA: Warning: %RU8 interrupts for stream #%RU8 still pending -- so a period reset might trigger audio hangs\n",
-                 pPeriod->cIntPending, pPeriod->u8SD));
 
     pPeriod->fStatus          &= ~HDASTREAMPERIOD_F_ACTIVE;
@@ -138,5 +133,4 @@
     pPeriod->u64ElapsedWalClk  = 0;
     pPeriod->cFramesTransferred = 0;
-    pPeriod->cIntPending       = 0;
 # ifdef LOG_ENABLED
     pPeriod->Dbg.tsStartNs     = 0;
@@ -159,5 +153,4 @@
     pPeriod->u64ElapsedWalClk  = 0;
     pPeriod->cFramesTransferred = 0;
-    pPeriod->cIntPending       = 0;
 # ifdef LOG_ENABLED
     pPeriod->Dbg.tsStartNs     = RTTimeNanoTS();
@@ -169,39 +162,4 @@
 
 /**
- * Ends a formerly begun period life span.
- *
- * @param   pPeriod             Stream period to end life span for.
- */
-void hdaR3StreamPeriodEnd(PHDASTREAMPERIOD pPeriod)
-{
-    Log3Func(("[SD%RU8] Took %zuus\n", pPeriod->u8SD, (RTTimeNanoTS() - pPeriod->Dbg.tsStartNs) / 1000));
-
-    if (!(pPeriod->fStatus & HDASTREAMPERIOD_F_ACTIVE))
-        return;
-
-    /* Sanity. */
-    AssertMsg(pPeriod->cIntPending == 0,
-              ("%RU8 interrupts for stream #%RU8 still pending -- so ending a period might trigger audio hangs\n",
-               pPeriod->cIntPending, pPeriod->u8SD));
-    Assert(hdaR3StreamPeriodIsComplete(pPeriod));
-
-    pPeriod->fStatus &= ~HDASTREAMPERIOD_F_ACTIVE;
-}
-
-/**
- * Pauses a period. All values remain intact.
- *
- * @param   pPeriod             Stream period to pause.
- */
-void hdaR3StreamPeriodPause(PHDASTREAMPERIOD pPeriod)
-{
-    AssertMsg((pPeriod->fStatus & HDASTREAMPERIOD_F_ACTIVE), ("Period %p already in inactive state\n", pPeriod));
-
-    pPeriod->fStatus &= ~HDASTREAMPERIOD_F_ACTIVE;
-
-    Log3Func(("[SD%RU8]\n", pPeriod->u8SD));
-}
-
-/**
  * Resumes a formerly paused period.
  *
@@ -305,50 +263,4 @@
 
 /**
- * Tells whether a given stream period has some required interrupts pending or not.
- *
- * @return  true if period has interrupts pending, false if not.
- * @param   pPeriod             Stream period to get status for.
- */
-bool hdaR3StreamPeriodNeedsInterrupt(PHDASTREAMPERIOD pPeriod)
-{
-    return pPeriod->cIntPending > 0;
-}
-
-/**
- * Acquires (references) an (pending) interrupt for a given stream period.
- *
- * @param   pPeriod             Stream period to acquire interrupt for.
- *
- * @remark  This routine does not do any actual interrupt processing; it only
- *          keeps track of the required (pending) interrupts for a stream period.
- */
-void hdaR3StreamPeriodAcquireInterrupt(PHDASTREAMPERIOD pPeriod)
-{
-    uint32_t cIntPending = pPeriod->cIntPending;
-    if (cIntPending)
-    {
-        Log3Func(("[SD%RU8] Already pending\n", pPeriod->u8SD));
-        return;
-    }
-
-    pPeriod->cIntPending++;
-
-    Log3Func(("[SD%RU8] %RU32\n", pPeriod->u8SD, pPeriod->cIntPending));
-}
-
-/**
- * Releases (dereferences) a pending interrupt.
- *
- * @param   pPeriod             Stream period to release pending interrupt for.
- */
-void hdaR3StreamPeriodReleaseInterrupt(PHDASTREAMPERIOD pPeriod)
-{
-    Assert(pPeriod->cIntPending);
-    pPeriod->cIntPending--;
-
-    Log3Func(("[SD%RU8] %RU32\n", pPeriod->u8SD, pPeriod->cIntPending));
-}
-
-/**
  * Adds an amount of (processed) audio frames to a given stream period.
  *
@@ -369,37 +281,4 @@
 }
 
-/**
- * Tells whether a given stream period is considered as complete or not.
- *
- * @return  true if stream period is complete, false if not.
- * @param   pPeriod             Stream period to report status for.
- *
- * @remark  A stream period is considered complete if it has 1) passed (elapsed) its calculated period time
- *          and 2) processed all required audio frames.
- */
-bool hdaR3StreamPeriodIsComplete(PHDASTREAMPERIOD pPeriod)
-{
-    const bool fIsComplete = /* Has the period elapsed time-wise? */
-                                hdaR3StreamPeriodHasElapsed(pPeriod)
-                             /* All frames transferred? */
-                             && pPeriod->cFramesTransferred >= pPeriod->cFramesToTransfer;
-# ifdef VBOX_STRICT
-    if (fIsComplete)
-    {
-        Assert(pPeriod->cFramesTransferred == pPeriod->cFramesToTransfer);
-        Assert(pPeriod->u64ElapsedWalClk  == pPeriod->u64DurationWalClk);
-    }
-# endif
-
-    Log3Func(("[SD%RU8] Period %s - runtime %RU64 / %RU64 (abs @ %RU64, starts @ %RU64, ends @ %RU64), %RU8 IRQs pending\n",
-              pPeriod->u8SD,
-              fIsComplete ? "COMPLETE" : "NOT COMPLETE YET",
-              pPeriod->u64ElapsedWalClk, pPeriod->u64DurationWalClk,
-              hdaR3StreamPeriodGetAbsElapsedWalClk(pPeriod), pPeriod->u64StartWalClk,
-              hdaR3StreamPeriodGetAbsEndWalClk(pPeriod), pPeriod->cIntPending));
-
-    return fIsComplete;
-}
-
 #endif /* IN_RING3 */
 
Index: trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h
===================================================================
--- trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h	(revision 88138)
+++ trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h	(revision 88139)
@@ -58,7 +58,5 @@
     /** The period's status flags. */
     uint8_t                 fStatus;
-    /** Number of pending interrupts required for this period. */
-    uint8_t                 cIntPending;
-    uint8_t                 bPadding0;
+    uint8_t                 abPadding[2];
     /** Hertz (Hz) rate this period runs with. */
     uint32_t                u32Hz;
@@ -92,6 +90,4 @@
 void     hdaR3StreamPeriodReset(PHDASTREAMPERIOD pPeriod);
 int      hdaR3StreamPeriodBegin(PHDASTREAMPERIOD pPeriod, uint64_t u64WalClk);
-void     hdaR3StreamPeriodEnd(PHDASTREAMPERIOD pPeriod);
-void     hdaR3StreamPeriodPause(PHDASTREAMPERIOD pPeriod);
 void     hdaR3StreamPeriodResume(PHDASTREAMPERIOD pPeriod);
 uint64_t hdaR3StreamPeriodFramesToWalClk(PHDASTREAMPERIOD pPeriod, uint32_t uFrames);
@@ -101,9 +97,5 @@
 bool     hdaR3StreamPeriodHasElapsed(PHDASTREAMPERIOD pPeriod);
 bool     hdaR3StreamPeriodHasPassedAbsWalClk(PHDASTREAMPERIOD pPeriod, uint64_t u64WalClk);
-bool     hdaR3StreamPeriodNeedsInterrupt(PHDASTREAMPERIOD pPeriod);
-void     hdaR3StreamPeriodAcquireInterrupt(PHDASTREAMPERIOD pPeriod);
-void     hdaR3StreamPeriodReleaseInterrupt(PHDASTREAMPERIOD pPeriod);
 void     hdaR3StreamPeriodInc(PHDASTREAMPERIOD pPeriod, uint32_t framesInc);
-bool     hdaR3StreamPeriodIsComplete(PHDASTREAMPERIOD pPeriod);
 #endif /* IN_RING3 */
 
