Index: /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp	(revision 82418)
+++ /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp	(revision 82419)
@@ -52,6 +52,8 @@
     Assert(!(pPeriod->fStatus & HDASTREAMPERIOD_F_VALID));
 
+# ifdef HDA_STREAM_PERIOD_WITH_LOCKING
     int rc = RTCritSectInit(&pPeriod->CritSect);
     AssertRCReturnStmt(rc, pPeriod->fStatus = 0, rc);
+# endif
     pPeriod->fStatus = HDASTREAMPERIOD_F_VALID;
 
@@ -68,6 +70,7 @@
     if (pPeriod->fStatus & HDASTREAMPERIOD_F_VALID)
     {
+# ifdef HDA_STREAM_PERIOD_WITH_LOCKING
         RTCritSectDelete(&pPeriod->CritSect);
-
+# endif
         pPeriod->fStatus = HDASTREAMPERIOD_F_NONE;
     }
@@ -229,7 +232,12 @@
 int hdaR3StreamPeriodLock(PHDASTREAMPERIOD pPeriod)
 {
+# ifdef HDA_STREAM_PERIOD_WITH_LOCKING
     int rc = RTCritSectEnter(&pPeriod->CritSect);
     AssertRC(rc);
     return rc;
+# else
+    RT_NOREF(pPeriod);
+    return VINF_SUCCESS;
+# endif
 }
 
@@ -241,6 +249,10 @@
 void hdaR3StreamPeriodUnlock(PHDASTREAMPERIOD pPeriod)
 {
+# ifdef HDA_STREAM_PERIOD_WITH_LOCKING
     int rc2 = RTCritSectLeave(&pPeriod->CritSect);
     AssertRC(rc2);
+# else
+    RT_NOREF(pPeriod);
+# endif
 }
 
Index: /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h	(revision 82418)
+++ /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h	(revision 82419)
@@ -54,8 +54,10 @@
 typedef struct HDASTREAMPERIOD
 {
+#ifdef HDA_STREAM_PERIOD_WITH_LOCKING
     /** Critical section for serializing access.
      * @todo r=bird: This is not needed.  The stream lock is held the two places
      *       this critsect is entered. */
     RTCRITSECT              CritSect;
+#endif
     /** Associated HDA stream descriptor (SD) number. */
     uint8_t                 u8SD;
