Index: trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 65149)
+++ trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 65150)
@@ -328,5 +328,5 @@
 {
     /** Stream number (SDn). */
-    uint8_t         u8Strm;
+    uint8_t         u8SD;
     /** Bus master registers of this stream. */
     AC97BMREGS      Regs;
@@ -617,7 +617,7 @@
     {
         if (iIRQL)
-            pThis->glob_sta |=  masks[pStream->u8Strm];
+            pThis->glob_sta |=  masks[pStream->u8SD];
         else
-            pThis->glob_sta &= ~masks[pStream->u8Strm];
+            pThis->glob_sta &= ~masks[pStream->u8SD];
 
         LogFlowFunc(("Setting IRQ level=%d\n", iIRQL));
@@ -638,8 +638,8 @@
     AssertPtrReturn(pStream, false);
 
-    PAUDMIXSINK pSink = ichac97IndexToSink(pThis, pStream->u8Strm);
+    PAUDMIXSINK pSink = ichac97IndexToSink(pThis, pStream->u8SD);
     bool fIsEnabled = RT_BOOL(AudioMixerSinkGetStatus(pSink) & AUDMIXSINK_STS_RUNNING);
 
-    LogFunc(("[SD%RU8] fIsEnabled=%RTbool\n", pStream->u8Strm, fIsEnabled));
+    LogFunc(("[SD%RU8] fIsEnabled=%RTbool\n", pStream->u8SD, fIsEnabled));
     return fIsEnabled;
 }
@@ -686,5 +686,5 @@
     {
         /* First, enable or disable the stream and the stream's sink, if any. */
-        rc = AudioMixerSinkCtl(ichac97IndexToSink(pThis, pStream->u8Strm),
+        rc = AudioMixerSinkCtl(ichac97IndexToSink(pThis, pStream->u8SD),
                                fEnable ? AUDMIXSINKCMD_ENABLE : AUDMIXSINKCMD_DISABLE);
     }
@@ -705,5 +705,5 @@
 #endif
 
-    LogFunc(("[SD%RU8]: cStreamsActive=%RU8, rc=%Rrc\n", pStream->u8Strm, pThis->cStreamsActive, rc));
+    LogFunc(("[SD%RU8]: cStreamsActive=%RU8, rc=%Rrc\n", pStream->u8SD, pThis->cStreamsActive, rc));
     return rc;
 }
@@ -723,7 +723,7 @@
     ichac97StreamLock(pStream);
 
-    LogFunc(("[SD%RU8]\n", pStream->u8Strm));
-
-    AudioMixerSinkReset(ichac97IndexToSink(pThis, pStream->u8Strm));
+    LogFunc(("[SD%RU8]\n", pStream->u8SD));
+
+    AudioMixerSinkReset(ichac97IndexToSink(pThis, pStream->u8SD));
 
     if (pStream->State.pCircBuf)
@@ -762,5 +762,5 @@
     LogFunc(("[SD%RU8] pStream=%p\n", u8Strm, pStream));
 
-    pStream->u8Strm = u8Strm;
+    pStream->u8SD = u8Strm;
 
     int rc = RTCritSectInit(&pStream->State.CritSect);
@@ -780,5 +780,5 @@
 static void ichac97StreamDestroy(PAC97STATE pThis, PAC97STREAM pStream)
 {
-    LogFlowFunc(("[SD%RU8]\n", pStream->u8Strm));
+    LogFlowFunc(("[SD%RU8]\n", pStream->u8SD));
 
     int rc2 = RTCritSectDelete(&pStream->State.CritSect);
@@ -981,5 +981,5 @@
     AssertPtr(pCircBuf);
 
-    PAUDMIXSINK pMixSink = ichac97IndexToSink(pThis, pStream->u8Strm);
+    PAUDMIXSINK pMixSink = ichac97IndexToSink(pThis, pStream->u8SD);
     AssertPtr(pMixSink);
 
@@ -988,9 +988,9 @@
     RTThreadUserSignal(hThreadSelf);
 
-    LogFunc(("[SD%RU8]: Started\n", pStream->u8Strm));
+    LogFunc(("[SD%RU8]: Started\n", pStream->u8SD));
 
     for (;;)
     {
-        Log2Func(("[SD%RU8]: Waiting ...\n", pStream->u8Strm));
+        Log2Func(("[SD%RU8]: Waiting ...\n", pStream->u8SD));
 
         int rc2 = RTSemEventWait(pAIO->Event, RT_INDEFINITE_WAIT);
@@ -1013,5 +1013,5 @@
             uint32_t cbProcessed = 0;
 
-            switch (pStream->u8Strm)
+            switch (pStream->u8SD)
             {
                 /* Input. */
@@ -1049,5 +1049,5 @@
     }
 
-    LogFunc(("[SD%RU8]: Ended\n", pStream->u8Strm));
+    LogFunc(("[SD%RU8]: Ended\n", pStream->u8SD));
 
     ASMAtomicXchgBool(&pAIO->fStarted, false);
@@ -1082,5 +1082,5 @@
 
                 char szThreadName[64];
-                RTStrPrintf2(szThreadName, sizeof(szThreadName), "ac97AIO%RU8", pStream->u8Strm);
+                RTStrPrintf2(szThreadName, sizeof(szThreadName), "ac97AIO%RU8", pStream->u8SD);
 
                 rc = RTThreadCreate(&pAIO->Thread, ichac97StreamAsyncIOThread, &Ctx,
@@ -1094,5 +1094,5 @@
         rc = VINF_SUCCESS;
 
-    LogFunc(("[SD%RU8]: Returning %Rrc\n", pStream->u8Strm, rc));
+    LogFunc(("[SD%RU8]: Returning %Rrc\n", pStream->u8SD, rc));
     return rc;
 }
@@ -1134,5 +1134,5 @@
     }
 
-    LogFunc(("[SD%RU8]: Returning %Rrc\n", pStream->u8Strm, rc));
+    LogFunc(("[SD%RU8]: Returning %Rrc\n", pStream->u8SD, rc));
     return rc;
 }
@@ -1149,5 +1149,5 @@
     RT_NOREF(pThis);
 
-    LogFunc(("[SD%RU8]\n", pStream->u8Strm));
+    LogFunc(("[SD%RU8]\n", pStream->u8SD));
     return RTSemEventSignal(pStream->State.AIO.Event);
 }
@@ -1220,5 +1220,5 @@
     ichac97StreamLock(pStream);
 
-    PAUDMIXSINK pMixSink = ichac97IndexToSink(pThis, pStream->u8Strm);
+    PAUDMIXSINK pMixSink = ichac97IndexToSink(pThis, pStream->u8SD);
     AssertPtr(pMixSink);
 
@@ -1235,5 +1235,5 @@
     uint8_t cTransfers = 0;
 
-    Log2Func(("[SD%RU8] Started\n", pStream->u8Strm));
+    Log2Func(("[SD%RU8] Started\n", pStream->u8SD));
 
     while (!fDone)
@@ -1242,5 +1242,5 @@
         uint32_t cbDMA = 0;
 
-        if (pStream->u8Strm == AC97SOUNDSOURCE_PO_INDEX) /* Output. */
+        if (pStream->u8SD == AC97SOUNDSOURCE_PO_INDEX) /* Output. */
         {
             STAM_PROFILE_START(&pThis->StatOut, a);
@@ -1261,5 +1261,5 @@
                    && RTCircBufFree(pCircBuf))
             {
-                Log3Func(("[SD%RU8] cbLeft=%RU32\n", pStream->u8Strm, cbDMALeft));
+                Log3Func(("[SD%RU8] cbLeft=%RU32\n", pStream->u8SD, cbDMALeft));
 
                 void *pvDst;
@@ -1294,5 +1294,5 @@
             if (cbUsed)
             {
-                Log3Func(("[SD%RU8] cbUsed=%RU32\n", pStream->u8Strm, cbUsed));
+                Log3Func(("[SD%RU8] cbUsed=%RU32\n", pStream->u8SD, cbUsed));
 
 #ifdef VBOX_WITH_AUDIO_AC97_ASYNC_IO
@@ -1323,6 +1323,6 @@
             STAM_PROFILE_STOP(&pThis->StatOut, a);
         }
-        else if (   pStream->u8Strm == AC97SOUNDSOURCE_PI_INDEX  /* Input. */
-                 || pStream->u8Strm == AC97SOUNDSOURCE_MC_INDEX) /* Input. */
+        else if (   pStream->u8SD == AC97SOUNDSOURCE_PI_INDEX  /* Input. */
+                 || pStream->u8SD == AC97SOUNDSOURCE_MC_INDEX) /* Input. */
         {
             STAM_PROFILE_START(&pThis->StatIn, a);
@@ -1374,5 +1374,5 @@
     } /* while !fDone */
 
-    Log2Func(("[SD%RU8] End\n", pStream->u8Strm));
+    Log2Func(("[SD%RU8] End\n", pStream->u8SD));
 
     ichac97StreamUnlock(pStream);
@@ -1582,5 +1582,5 @@
     int rc = VINF_SUCCESS;
 
-    LogFunc(("[SD%RU8]\n", pStream->u8Strm));
+    LogFunc(("[SD%RU8]\n", pStream->u8SD));
 
     PDMAUDIOSTREAMCFG streamCfg;
@@ -1589,5 +1589,5 @@
     PAUDMIXSINK pMixSink = NULL;
 
-    switch (pStream->u8Strm)
+    switch (pStream->u8SD)
     {
         case AC97SOUNDSOURCE_PI_INDEX:
@@ -1648,5 +1648,5 @@
     }
 
-    LogFlowFunc(("[SD%RU8] rc=%Rrc\n", pStream->u8Strm, rc));
+    LogFlowFunc(("[SD%RU8] rc=%Rrc\n", pStream->u8SD, rc));
     return rc;
 }
@@ -1664,5 +1664,5 @@
     RT_NOREF(pStream);
 
-    LogFlowFunc(("[SD%RU8]\n", pStream->u8Strm));
+    LogFlowFunc(("[SD%RU8]\n", pStream->u8SD));
 
     return VINF_SUCCESS;
@@ -1679,5 +1679,5 @@
 static int ichac97StreamReOpen(PAC97STATE pThis, PAC97STREAM pStream)
 {
-    LogFlowFunc(("[SD%RU8]\n", pStream->u8Strm));
+    LogFlowFunc(("[SD%RU8]\n", pStream->u8SD));
 
     int rc = ichac97StreamClose(pThis, pStream);
@@ -2103,7 +2103,7 @@
 
     /* Do we need to kick the timer again? */
-    if (   AudioMixerSinkIsActive(ichac97IndexToSink(pThis, pThis->StreamLineIn.u8Strm))
-        || AudioMixerSinkIsActive(ichac97IndexToSink(pThis, pThis->StreamMicIn.u8Strm))
-        || AudioMixerSinkIsActive(ichac97IndexToSink(pThis, pThis->StreamOut.u8Strm)))
+    if (   AudioMixerSinkIsActive(ichac97IndexToSink(pThis, pThis->StreamLineIn.u8SD))
+        || AudioMixerSinkIsActive(ichac97IndexToSink(pThis, pThis->StreamMicIn.u8SD))
+        || AudioMixerSinkIsActive(ichac97IndexToSink(pThis, pThis->StreamOut.u8SD)))
     {
         fKickTimer = true;
@@ -2185,5 +2185,5 @@
         if (pRegs->cr & AC97_CR_RPBM) /* Bus master operation starts. */
         {
-            switch (pStream->u8Strm)
+            switch (pStream->u8SD)
             {
                 case AC97SOUNDSOURCE_PO_INDEX:
@@ -2205,5 +2205,5 @@
     if (pRegs->sr & AC97_SR_BCIS)
     {
-        Log3Func(("[SD%RU8] BCIS set\n", pStream->u8Strm));
+        Log3Func(("[SD%RU8] BCIS set\n", pStream->u8SD));
 
         if (pcbProcessed)
@@ -2219,5 +2219,5 @@
     int rc = VINF_SUCCESS;
 
-    Log3Func(("[SD%RU8] cbToProcess=%RU32, cbLeft=%RU32\n", pStream->u8Strm, cbToProcess, cbLeft));
+    Log3Func(("[SD%RU8] cbToProcess=%RU32, cbLeft=%RU32\n", pStream->u8SD, cbToProcess, cbLeft));
 
     while (cbLeft)
@@ -2253,5 +2253,5 @@
         Assert(cbChunk);
 
-        switch (pStream->u8Strm)
+        switch (pStream->u8SD)
         {
             case AC97SOUNDSOURCE_PO_INDEX: /* Output */
@@ -2271,5 +2271,5 @@
 
             default:
-                AssertMsgFailed(("Stream #%RU8 not supported\n", pStream->u8Strm));
+                AssertMsgFailed(("Stream #%RU8 not supported\n", pStream->u8SD));
                 rc = VERR_NOT_SUPPORTED;
                 break;
@@ -2282,5 +2282,5 @@
         RTFILE fh;
         RTFileOpen(&fh,
-                     pStream->u8Strm == AC97SOUNDSOURCE_PO_INDEX
+                     pStream->u8SD == AC97SOUNDSOURCE_PO_INDEX
                    ? AC97_DEBUG_DUMP_PCM_DATA_PATH "ac97DMARead.pcm" : AC97_DEBUG_DUMP_PCM_DATA_PATH "ac97DMAWrite.pcm",
                    RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
@@ -2302,5 +2302,5 @@
 
         LogFlowFunc(("[SD%RU8]: cbChunk=%RU32, cbLeft=%RU32, cbTotal=%RU32, rc=%Rrc\n",
-                     pStream->u8Strm, cbChunk, cbLeft, cbTotal, rc));
+                     pStream->u8SD, cbChunk, cbLeft, cbTotal, rc));
 
         if (!pRegs->picb)
@@ -2552,5 +2552,5 @@
                     }
                     pRegs->lvi = u32 % 32;
-                    Log3Func(("[SD%RU8] LVI <- %#x\n", pStream->u8Strm, u32));
+                    Log3Func(("[SD%RU8] LVI <- %#x\n", pStream->u8SD, u32));
                     break;
                 }
@@ -2563,9 +2563,9 @@
                 case MC_CR:
                 {
-                    Log3Func(("[SD%RU8] CR <- %#x (cr %#x)\n", pStream->u8Strm, u32, pRegs->cr));
+                    Log3Func(("[SD%RU8] CR <- %#x (cr %#x)\n", pStream->u8SD, u32, pRegs->cr));
 
                     if (u32 & AC97_CR_RR) /* Busmaster reset. */
                     {
-                        Log3Func(("[SD%RU8] Reset\n", pStream->u8Strm));
+                        Log3Func(("[SD%RU8] Reset\n", pStream->u8SD));
 
                         /* Make sure that Run/Pause Bus Master bit (RPBM) is cleared (0). */
@@ -2583,5 +2583,5 @@
                         if (!(pRegs->cr & AC97_CR_RPBM))
                         {
-                            Log3Func(("[SD%RU8] Disable\n", pStream->u8Strm));
+                            Log3Func(("[SD%RU8] Disable\n", pStream->u8SD));
 
                             ichac97StreamEnable(pThis, pStream, false /* fEnable */);
@@ -2591,5 +2591,5 @@
                         else
                         {
-                            Log3Func(("[SD%RU8] Enable\n", pStream->u8Strm));
+                            Log3Func(("[SD%RU8] Enable\n", pStream->u8SD));
 
                             pRegs->civ = pRegs->piv;
@@ -2616,5 +2616,5 @@
                     pRegs->sr |= u32 & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK);
                     ichac97StreamUpdateSR(pThis, pStream, pRegs->sr & ~(u32 & AC97_SR_WCLEAR_MASK));
-                    Log3Func(("[SD%RU8] SR <- %#x (sr %#x)\n", pStream->u8Strm, u32, pRegs->sr));
+                    Log3Func(("[SD%RU8] SR <- %#x (sr %#x)\n", pStream->u8SD, u32, pRegs->sr));
                     break;
                 }
@@ -2637,5 +2637,5 @@
                     pRegs->sr |= u32 & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK);
                     ichac97StreamUpdateSR(pThis, pStream, pRegs->sr & ~(u32 & AC97_SR_WCLEAR_MASK));
-                    Log3Func(("[SD%RU8] SR <- %#x (sr %#x)\n", pStream->u8Strm, u32, pRegs->sr));
+                    Log3Func(("[SD%RU8] SR <- %#x (sr %#x)\n", pStream->u8SD, u32, pRegs->sr));
                     break;
                 default:
