Index: /trunk/src/VBox/Devices/Audio/HDAStream.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/HDAStream.h	(revision 71732)
+++ /trunk/src/VBox/Devices/Audio/HDAStream.h	(revision 71733)
@@ -24,7 +24,4 @@
 #include "HDAStreamPeriod.h"
 
-/*********************************************************************************************************************************
-*   Prototypes                                                                                                                   *
-*********************************************************************************************************************************/
 
 typedef struct HDAMIXERSINK *PHDAMIXERSINK;
Index: /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp	(revision 71732)
+++ /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp	(revision 71733)
@@ -3,11 +3,11 @@
  * HDAStreamPeriod.cpp - Stream period functions for HD Audio.
  *
- * Utility functions for handling HDA audio stream periods.
- * Stream period handling is needed in order to keep track of a stream's timing
+ * Utility functions for handling HDA audio stream periods.  Stream period
+ * handling is needed in order to keep track of a stream's timing
  * and processed audio data.
  *
- * As the HDA device only has one bit clock (WALCLK) but audio streams can be processed
- * at certain points in time, these functions can be used to estimate and schedule the
- * wall clock (WALCLK) for all streams accordingly.
+ * As the HDA device only has one bit clock (WALCLK) but audio streams can be
+ * processed at certain points in time, these functions can be used to estimate
+ * and schedule the wall clock (WALCLK) for all streams accordingly.
  */
 
@@ -39,5 +39,7 @@
 #include "HDAStreamPeriod.h"
 
-#ifdef IN_RING3
+
+#ifdef IN_RING3 /* entire file currently */
+
 /**
  * Creates a stream period.
@@ -51,8 +53,6 @@
 
     int rc = RTCritSectInit(&pPeriod->CritSect);
-    if (RT_SUCCESS(rc))
-    {
-        pPeriod->fStatus = HDASTREAMPERIOD_FLAG_VALID;
-    }
+    AssertRCReturnStmt(rc, pPeriod->fStatus = 0, rc);
+    pPeriod->fStatus = HDASTREAMPERIOD_FLAG_VALID;
 
     return VINF_SUCCESS;
@@ -143,7 +143,7 @@
     pPeriod->framesTransferred = 0;
     pPeriod->cIntPending       = 0;
-#ifdef DEBUG
+# ifdef LOG_ENABLED
     pPeriod->Dbg.tsStartNs     = 0;
-#endif
+# endif
 }
 
@@ -164,11 +164,9 @@
     pPeriod->framesTransferred = 0;
     pPeriod->cIntPending       = 0;
-#ifdef DEBUG
+# ifdef LOG_ENABLED
     pPeriod->Dbg.tsStartNs     = RTTimeNanoTS();
-#endif
-
-    Log3Func(("[SD%RU8] Starting @ %RU64 (%RU64 long)\n",
-              pPeriod->u8SD, pPeriod->u64StartWalClk, pPeriod->u64DurationWalClk));
-
+# endif
+
+    Log3Func(("[SD%RU8] Starting @ %RU64 (%RU64 long)\n", pPeriod->u8SD, pPeriod->u64StartWalClk, pPeriod->u64DurationWalClk));
     return VINF_SUCCESS;
 }
@@ -257,5 +255,5 @@
 {
     /* Prevent division by zero. */
-    const uint32_t uHz = (pPeriod->u32Hz ? pPeriod->u32Hz : 1);
+    const uint32_t uHz = pPeriod->u32Hz ? pPeriod->u32Hz : 1;
 
     /* 24 MHz wall clock (WALCLK): 42ns resolution. */
@@ -272,7 +270,7 @@
 uint64_t hdaStreamPeriodGetAbsElapsedWalClk(PHDASTREAMPERIOD pPeriod)
 {
-    return   pPeriod->u64StartWalClk
-           + pPeriod->u64ElapsedWalClk
-           + pPeriod->i64DelayWalClk;
+    return pPeriod->u64StartWalClk
+         + pPeriod->u64ElapsedWalClk
+         + pPeriod->i64DelayWalClk;
 }
 
Index: /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h	(revision 71732)
+++ /trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h	(revision 71733)
@@ -23,9 +23,10 @@
 # include <iprt/time.h>
 #endif
+#include <VBox/log.h> /* LOG_ENABLED */
 
 struct HDASTREAM;
 typedef HDASTREAM *PHDASTREAM;
 
-#ifdef DEBUG
+#ifdef LOG_ENABLED
 /**
  * Structure for debug information of an HDA stream's period.
@@ -76,5 +77,5 @@
     uint8_t                 cIntPending;
     uint8_t                 Padding3[7];
-#ifdef DEBUG
+#ifdef LOG_ENABLED
     /** Debugging information. */
     HDASTREAMPERIODDBGINFO  Dbg;
