Index: trunk/src/VBox/Devices/Audio/DevHdaCodec.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevHdaCodec.cpp	(revision 90142)
+++ trunk/src/VBox/Devices/Audio/DevHdaCodec.cpp	(revision 90143)
@@ -132,6 +132,6 @@
 *   Global Variables                                                                                                             *
 *********************************************************************************************************************************/
-/** @name STAC9220 Values
- * @note Referenced through STAC9220WIDGET in the constructor below
+/** @name STAC9220 Node Classifications.
+ * @note Referenced through STAC9220WIDGET in the constructor below.
  * @{ */
 static uint8_t const g_abStac9220Ports[]      = { STAC9220_NID_PIN_HEADPHONE0, STAC9220_NID_PIN_B, STAC9220_NID_PIN_C, STAC9220_NID_PIN_HEADPHONE1, STAC9220_NID_PIN_E, STAC9220_NID_PIN_F, 0 };
@@ -800,5 +800,6 @@
 #define STAC9220WIDGET(a_Type) do { \
             AssertCompile(RT_ELEMENTS(g_abStac9220##a_Type##s) <= RT_ELEMENTS(pThis->ab##a_Type##s)); \
-            memcpy(&pThis->ab##a_Type##s, &g_abStac9220##a_Type##s, sizeof(uint8_t) * RT_ELEMENTS(g_abStac9220##a_Type##s)); \
+            memcpy((void *)&pThis->ab##a_Type##s[0], &g_abStac9220##a_Type##s[0], \
+                   sizeof(uint8_t) * RT_ELEMENTS(g_abStac9220##a_Type##s)); \
         } while (0)
     STAC9220WIDGET(Port);
@@ -854,5 +855,7 @@
  * Some generic predicate functions.
  */
-/** @todo r=bird: we could use memchr here if we knew the array always ended with zeros */
+/** @todo r=bird: we could use memchr here if we knew the array always ended with zeros
+ * What would be even quicker would be an array of 16-bit flag masks for each node,
+ * compiled by STAC9220WIDGET at construction time. */
 #define HDA_CODEC_IS_NODE_OF_TYPE_FUNC(a_Type) \
     DECLINLINE(bool) hdaCodecIs##a_Type##Node(PHDACODECR3 pThis, uint8_t idNode) \
Index: trunk/src/VBox/Devices/Audio/DevHdaCodec.h
===================================================================
--- trunk/src/VBox/Devices/Audio/DevHdaCodec.h	(revision 90142)
+++ trunk/src/VBox/Devices/Audio/DevHdaCodec.h	(revision 90143)
@@ -796,45 +796,51 @@
 {
     /** Codec implementation type. */
-    CODECTYPE   enmType;
+    CODECTYPE       enmType;
     /** Codec ID. */
-    uint16_t    id;
-    uint16_t    idVendor;
-    uint16_t    idDevice;
-    uint8_t     bBSKU;
-    uint8_t     idAssembly;
-
-    bool        fInReset;
-
-    uint8_t     cTotalNodes;
-    uint8_t     u8AdcVolsLineIn;
-    uint8_t     u8DacLineOut;
-
-    uint32_t    cNodes;
+    uint16_t        id;
+    uint16_t        idVendor;
+    uint16_t        idDevice;
+    uint8_t         bBSKU;
+    uint8_t         idAssembly;
+
+    bool            fInReset;
+
+    uint8_t         cTotalNodes;
+    uint8_t         u8AdcVolsLineIn;
+    uint8_t         u8DacLineOut;
+
+    uint32_t        cNodes;
 
     /** Align the lists below so they don't cross cache lines (assumes
      *  CODEC_NODES_MAX is 32). */
-    uint8_t     abPadding1[CODEC_NODES_MAX - 20];
-
-    uint8_t     abPorts[CODEC_NODES_MAX];
-    uint8_t     abDacs[CODEC_NODES_MAX];
-    uint8_t     abAdcVols[CODEC_NODES_MAX];
-    uint8_t     abAdcs[CODEC_NODES_MAX];
-    uint8_t     abAdcMuxs[CODEC_NODES_MAX];
-    uint8_t     abPcbeeps[CODEC_NODES_MAX];
-    uint8_t     abSpdifIns[CODEC_NODES_MAX];
-    uint8_t     abSpdifOuts[CODEC_NODES_MAX];
-    uint8_t     abDigInPins[CODEC_NODES_MAX];
-    uint8_t     abDigOutPins[CODEC_NODES_MAX];
-    uint8_t     abCds[CODEC_NODES_MAX];
-    uint8_t     abVolKnobs[CODEC_NODES_MAX];
-    uint8_t     abReserveds[CODEC_NODES_MAX];
+    uint8_t const   abPadding1[CODEC_NODES_MAX - 20];
+
+    /** @name Node classifications.
+     * @note These are copies of the g_abStac9220Xxxx arrays in DevHdaCodec.cpp.
+     *       They are used both for classifying a node and for processing a class of
+     *       nodes.
+     * @{ */
+    uint8_t const   abPorts[CODEC_NODES_MAX];
+    uint8_t const   abDacs[CODEC_NODES_MAX];
+    uint8_t const   abAdcVols[CODEC_NODES_MAX];
+    uint8_t const   abAdcs[CODEC_NODES_MAX];
+    uint8_t const   abAdcMuxs[CODEC_NODES_MAX];
+    uint8_t const   abPcbeeps[CODEC_NODES_MAX];
+    uint8_t const   abSpdifIns[CODEC_NODES_MAX];
+    uint8_t const   abSpdifOuts[CODEC_NODES_MAX];
+    uint8_t const   abDigInPins[CODEC_NODES_MAX];
+    uint8_t const   abDigOutPins[CODEC_NODES_MAX];
+    uint8_t const   abCds[CODEC_NODES_MAX];
+    uint8_t const   abVolKnobs[CODEC_NODES_MAX];
+    uint8_t const   abReserveds[CODEC_NODES_MAX];
+    /** @} */
 
     /** Safty zero padding before the nodes start. */
-    uint8_t     abSaftyPadding2[CODEC_NODES_MAX * 2];
-
-    CODECNODE   aNodes[CODEC_NODES_MAX];
-
-    STAMCOUNTER StatLookupsR3;
-    uint64_t    au64Padding3[7];
+    uint8_t const   abSaftyPadding2[CODEC_NODES_MAX * 2];
+
+    CODECNODE       aNodes[CODEC_NODES_MAX];
+
+    STAMCOUNTER     StatLookupsR3;
+    uint64_t const  au64Padding3[7];
 } HDACODECR3;
 AssertCompile(RT_IS_POWER_OF_TWO(CODEC_NODES_MAX));
