Index: /trunk/src/VBox/Devices/Audio/DevHDA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 71734)
+++ /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 71735)
@@ -591,5 +591,5 @@
     LogFunc(("fInterrupt=%RTbool\n", fInterrupt));
 
-# ifndef DEBUG
+# ifndef LOG_ENABLED
     hdaProcessInterrupt(pThis);
 # else
@@ -875,5 +875,5 @@
                 HDA_REG(pThis, RIRBSTS) |= HDA_RIRBSTS_RINTFL;
 
-# ifndef DEBUG
+# ifndef LOG_ENABLED
                 rc = hdaProcessInterrupt(pThis);
 # else
@@ -1515,5 +1515,5 @@
     }
 
-# ifndef DEBUG
+# ifndef LOG_ENABLED
     hdaProcessInterrupt(pThis);
 # else
@@ -2287,5 +2287,5 @@
     HDA_REG(pThis, RIRBSTS) &= ~(v & u32Value);
 
-#ifndef DEBUG
+#ifndef LOG_ENABLED
     int rc = hdaProcessInterrupt(pThis);
 #else
Index: /trunk/src/VBox/Devices/Audio/DevHDACommon.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHDACommon.cpp	(revision 71734)
+++ /trunk/src/VBox/Devices/Audio/DevHDACommon.cpp	(revision 71735)
@@ -34,5 +34,5 @@
 
 
-#ifndef DEBUG
+#ifndef LOG_ENABLED
 /**
  * Processes (de/asserts) the interrupt according to the HDA's current state.
@@ -205,9 +205,9 @@
             return &pThis->SinkLineIn;
 # ifdef VBOX_WITH_AUDIO_HDA_MIC_IN
-        else if (uSD == uFirstSDI + 1)
+        if (uSD == uFirstSDI + 1)
             return &pThis->SinkMicIn;
 # else
-        else /* If we don't have a dedicated Mic-In sink, use the always present Line-In sink. */
-            return &pThis->SinkLineIn;
+        /* If we don't have a dedicated Mic-In sink, use the always present Line-In sink. */
+        return &pThis->SinkLineIn;
 # endif
     }
@@ -219,7 +219,7 @@
             return &pThis->SinkFront;
 # ifdef VBOX_WITH_AUDIO_HDA_51_SURROUND
-        else if (uSD == uFirstSDO + 1)
+        if (uSD == uFirstSDO + 1)
             return &pThis->SinkCenterLFE;
-        else if (uSD == uFirstSDO + 2)
+        if (uSD == uFirstSDO + 2)
             return &pThis->SinkRear;
 # endif
@@ -311,10 +311,10 @@
     uint32_t cbLeft      = RT_MIN(cbBuf, pBDLE->Desc.u32BufSize - pBDLE->State.u32BufOff);
 
-#ifdef HDA_DEBUG_SILENCE
+# ifdef HDA_DEBUG_SILENCE
     uint64_t   csSilence = 0;
 
     pStream->Dbg.cSilenceThreshold = 100;
     pStream->Dbg.cbSilenceReadMin  = _1M;
-#endif
+# endif
 
     RTGCPHYS addrChunk = pBDLE->Desc.u64BufAdr + pBDLE->State.u32BufOff;
@@ -328,23 +328,19 @@
             break;
 
-#ifdef HDA_DEBUG_SILENCE
+# ifdef HDA_DEBUG_SILENCE
         uint16_t *pu16Buf = (uint16_t *)pvBuf;
         for (size_t i = 0; i < cbChunk / sizeof(uint16_t); i++)
         {
             if (*pu16Buf == 0)
-            {
                 csSilence++;
-            }
             else
                 break;
             pu16Buf++;
         }
-#endif
+# endif
         if (pStream->Dbg.Runtime.fEnabled)
             DrvAudioHlpFileWrite(pStream->Dbg.Runtime.pFileDMA, (uint8_t *)pvBuf + cbReadTotal, cbChunk, 0 /* fFlags */);
 
-#ifdef VBOX_WITH_STATISTICS
         STAM_COUNTER_ADD(&pThis->StatBytesRead, cbChunk);
-#endif
         addrChunk         = (addrChunk + cbChunk) % pBDLE->Desc.u32BufSize;
 
@@ -355,6 +351,5 @@
     }
 
-#ifdef HDA_DEBUG_SILENCE
-
+# ifdef HDA_DEBUG_SILENCE
     if (csSilence)
         pStream->Dbg.csSilence += csSilence;
@@ -367,5 +362,5 @@
         pStream->Dbg.csSilence = 0;
     }
-#endif
+# endif
 
     if (RT_SUCCESS(rc))
@@ -418,7 +413,5 @@
             break;
 
-#ifdef VBOX_WITH_STATISTICS
         STAM_COUNTER_ADD(&pThis->StatBytesWritten, cbChunk);
-#endif
         addrChunk       = (addrChunk + cbChunk) % pBDLE->Desc.u32BufSize;
 
@@ -495,5 +488,5 @@
     AssertPtrReturn(pProps, VERR_INVALID_POINTER);
 
-# define EXTRACT_VALUE(v, mask, shift) ((v & ((mask) << (shift))) >> (shift))
+#define EXTRACT_VALUE(v, mask, shift) ((v & ((mask) << (shift))) >> (shift))
 
     int rc = VINF_SUCCESS;
@@ -563,5 +556,5 @@
     }
 
-# undef EXTRACT_VALUE
+#undef EXTRACT_VALUE
     return rc;
 }
Index: /trunk/src/VBox/Devices/Audio/DevHDACommon.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHDACommon.h	(revision 71734)
+++ /trunk/src/VBox/Devices/Audio/DevHDACommon.h	(revision 71735)
@@ -20,4 +20,5 @@
 
 #include "AudioMixer.h"
+#include <VBox/log.h> /* LOG_ENABLED */
 
 /** See 302349 p 6.2. */
@@ -515,4 +516,5 @@
 #define HDA_BDLE_FLAG_IOC           RT_BIT(0)
 
+
 /*********************************************************************************************************************************
 *   Prototypes                                                                                                                 *
@@ -587,5 +589,5 @@
  * @{
  */
-#ifdef DEBUG
+#ifdef LOG_ENABLED
 int           hdaProcessInterrupt(PHDASTATE pThis, const char *pszSource);
 #else
Index: /trunk/src/VBox/Devices/Audio/HDAStream.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/HDAStream.cpp	(revision 71734)
+++ /trunk/src/VBox/Devices/Audio/HDAStream.cpp	(revision 71735)
@@ -1191,5 +1191,5 @@
         /* Trigger an interrupt first and let hdaRegWriteSDSTS() deal with
          * ending / beginning a period. */
-#ifndef DEBUG
+#ifndef LOG_ENABLED
         hdaProcessInterrupt(pThis);
 #else
