Index: trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp	(revision 44642)
+++ trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp	(revision 44643)
@@ -491,43 +491,41 @@
 static FNPDMDEVRESET hdaReset;
 
-/** @todo r=bird: Why aren't these static? And why use DECLCALLBACK for
- *        internal functions? */
-DECLCALLBACK(int) hdaRegReadUnimplemented(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteUnimplemented(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegReadGCTL(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteGCTL(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegReadSTATESTS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteSTATESTS(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegReadGCAP(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegReadINTSTS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegReadWALCLK(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteINTSTS(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegWriteCORBWP(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteCORBCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteCORBSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteRIRBWP(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegWriteRIRBSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteIRS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegReadIRS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegReadSDCTL(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-
-DECLCALLBACK(int) hdaRegWriteSDSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteSDLVI(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteSDBDPL(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteSDBDPU(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegWriteBase(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
-DECLCALLBACK(int) hdaRegReadU32(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteU32(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegReadU24(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteU24(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegReadU16(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteU16(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
-DECLCALLBACK(int) hdaRegReadU8(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
-DECLCALLBACK(int) hdaRegWriteU8(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegReadUnimplemented(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteUnimplemented(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegReadGCTL(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteGCTL(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegReadSTATESTS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteSTATESTS(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegReadGCAP(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegReadINTSTS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegReadWALCLK(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteINTSTS(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegWriteCORBWP(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteCORBCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteCORBSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteRIRBWP(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegWriteRIRBSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegReadIRS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegReadSDCTL(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+
+static int hdaRegWriteSDSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteSDLVI(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteSDBDPL(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteSDBDPU(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegWriteBase(PHDASTATE pThis, uint32_t index, uint32_t u32Value);
+static int hdaRegReadU32(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteU32(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegReadU24(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteU24(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegReadU16(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteU16(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
+static int hdaRegReadU8(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value);
+static int hdaRegWriteU8(PHDASTATE pThis, uint32_t index, uint32_t pu32Value);
 
 DECLINLINE(void) hdaInitTransferDescriptor(PHDASTATE pThis, PHDABDLEDESC pBdle, uint8_t u8Strm,
@@ -966,5 +964,7 @@
 
 
-DECLCALLBACK(int) hdaRegReadUnimplemented(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+/* Register access handlers. */
+
+static int hdaRegReadUnimplemented(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     *pu32Value = 0;
@@ -972,5 +972,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteUnimplemented(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteUnimplemented(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     return VINF_SUCCESS;
@@ -978,5 +978,5 @@
 
 /* U8 */
-DECLCALLBACK(int) hdaRegReadU8(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadU8(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     Assert(((pThis->au32Regs[index] & g_aIchIntelHDRegMap[index].readable) & 0xffffff00) == 0);
@@ -984,5 +984,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteU8(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteU8(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     Assert((u32Value & 0xffffff00) == 0);
@@ -991,5 +991,5 @@
 
 /* U16 */
-DECLCALLBACK(int) hdaRegReadU16(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadU16(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     Assert(((pThis->au32Regs[index] & g_aIchIntelHDRegMap[index].readable) & 0xffff0000) == 0);
@@ -997,5 +997,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteU16(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteU16(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     Assert((u32Value & 0xffff0000) == 0);
@@ -1004,5 +1004,5 @@
 
 /* U24 */
-DECLCALLBACK(int) hdaRegReadU24(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadU24(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     Assert(((pThis->au32Regs[index] & g_aIchIntelHDRegMap[index].readable) & 0xff000000) == 0);
@@ -1010,5 +1010,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteU24(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteU24(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     Assert((u32Value & 0xff000000) == 0);
@@ -1017,5 +1017,5 @@
 
 /* U32 */
-DECLCALLBACK(int) hdaRegReadU32(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadU32(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     *pu32Value = pThis->au32Regs[index] & g_aIchIntelHDRegMap[index].readable;
@@ -1023,5 +1023,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteU32(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteU32(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     pThis->au32Regs[index]  = (u32Value & g_aIchIntelHDRegMap[index].writable)
@@ -1030,10 +1030,10 @@
 }
 
-DECLCALLBACK(int) hdaRegReadGCTL(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadGCTL(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     return hdaRegReadU32(pThis, index, pu32Value);
 }
 
-DECLCALLBACK(int) hdaRegWriteGCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteGCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     if (u32Value & HDA_REG_FIELD_FLAG_MASK(GCTL, RST))
@@ -1066,5 +1066,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteSTATESTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSTATESTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     uint32_t v = pThis->au32Regs[index];
@@ -1074,5 +1074,5 @@
 }
 
-DECLCALLBACK(int) hdaRegReadINTSTS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadINTSTS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     uint32_t v = 0;
@@ -1100,5 +1100,5 @@
 }
 
-DECLCALLBACK(int) hdaRegReadWALCLK(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadWALCLK(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     /* HDA spec (1a): 3.3.16 WALCLK counter ticks with 24Mhz bitclock rate. */
@@ -1108,10 +1108,10 @@
 }
 
-DECLCALLBACK(int) hdaRegReadGCAP(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadGCAP(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     return hdaRegReadU16(pThis, index, pu32Value);
 }
 
-DECLCALLBACK(int) hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     if (u32Value & HDA_REG_FIELD_FLAG_MASK(CORBRP, RST))
@@ -1122,5 +1122,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteCORBCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteCORBCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     int rc = hdaRegWriteU8(pThis, index, u32Value);
@@ -1132,5 +1132,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteCORBSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteCORBSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     uint32_t v = CORBSTS(pThis);
@@ -1139,5 +1139,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteCORBWP(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteCORBWP(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     int rc;
@@ -1153,10 +1153,10 @@
 }
 
-DECLCALLBACK(int) hdaRegReadSDCTL(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadSDCTL(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     return hdaRegReadU24(pThis, index, pu32Value);
 }
 
-DECLCALLBACK(int) hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSDCTL(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     bool fRun     = RT_BOOL(u32Value & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
@@ -1229,5 +1229,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteSDSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSDSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     uint32_t v = HDA_REG_IND(pThis, index);
@@ -1238,5 +1238,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteSDLVI(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSDLVI(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     int rc = hdaRegWriteU32(pThis, index, u32Value);
@@ -1246,5 +1246,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSDFIFOW(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     switch (u32Value)
@@ -1265,5 +1265,5 @@
  *
  */
-DECLCALLBACK(int) hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSDFIFOS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     switch (index)
@@ -1359,5 +1359,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSDFMT(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
 #ifdef VBOX_WITH_HDA_CODEC_EMU
@@ -1387,5 +1387,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteSDBDPL(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSDBDPL(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     int rc = hdaRegWriteU32(pThis, index, u32Value);
@@ -1395,5 +1395,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteSDBDPU(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteSDBDPU(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     int rc = hdaRegWriteU32(pThis, index, u32Value);
@@ -1403,5 +1403,5 @@
 }
 
-DECLCALLBACK(int) hdaRegReadIRS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
+static int hdaRegReadIRS(PHDASTATE pThis, uint32_t index, uint32_t *pu32Value)
 {
     int rc = VINF_SUCCESS;
@@ -1415,5 +1415,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteIRS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteIRS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     int rc = VINF_SUCCESS;
@@ -1459,5 +1459,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteRIRBWP(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteRIRBWP(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     if (u32Value & HDA_REG_FIELD_FLAG_MASK(RIRBWP, RST))
@@ -1469,5 +1469,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteBase(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteBase(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     int rc = hdaRegWriteU32(pThis, index, u32Value);
@@ -1508,5 +1508,5 @@
 }
 
-DECLCALLBACK(int) hdaRegWriteRIRBSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
+static int hdaRegWriteRIRBSTS(PHDASTATE pThis, uint32_t index, uint32_t u32Value)
 {
     uint8_t v = RIRBSTS(pThis);
