Index: trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 89773)
+++ trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 89775)
@@ -589,4 +589,6 @@
     STAMCOUNTER             StatUnimplementedNabmReads;
     STAMCOUNTER             StatUnimplementedNabmWrites;
+    STAMCOUNTER             StatUnimplementedNamReads;
+    STAMCOUNTER             StatUnimplementedNamWrites;
 #ifdef VBOX_WITH_STATISTICS
     STAMPROFILE             StatTimer;
@@ -2510,5 +2512,5 @@
                     default:
                         *pu32 = UINT32_MAX;
-                        LogFunc(("U nabm readb %#x -> %#x\n", offPort, UINT32_MAX));
+                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
                         break;
@@ -2531,5 +2533,5 @@
                     default:
                         *pu32 = UINT32_MAX;
-                        LogFunc(("U nabm readw %#x -> %#x\n", offPort, UINT32_MAX));
+                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
                         break;
@@ -2564,5 +2566,5 @@
                     default:
                         *pu32 = UINT32_MAX;
-                        LogFunc(("U nabm readl %#x -> %#x\n", offPort, UINT32_MAX));
+                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
                         break;
@@ -2591,5 +2593,5 @@
                     default:
                         *pu32 = UINT32_MAX;
-                        LogFunc(("U nabm readb %#x -> %#x\n", offPort, UINT32_MAX));
+                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
                         break;
@@ -2599,5 +2601,5 @@
             case 2:
                 *pu32 = UINT32_MAX;
-                LogFunc(("U nabm readw %#x -> %#x\n", offPort, UINT32_MAX));
+                LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort));
                 STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
                 break;
@@ -2618,5 +2620,5 @@
                     default:
                         *pu32 = UINT32_MAX;
-                        LogFunc(("U nabm readl %#x -> %#x\n", offPort, UINT32_MAX));
+                        LogRel2(("AC97: Warning: Unimplemented NAMB read offPort=%#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmReads);
                         break;
@@ -2822,5 +2824,7 @@
 
                     default:
-                        LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 1\n", offPort, u32));
+                        /* Linux tries to write CIV. */
+                        LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x%s <- %#x LB 1 (line " RT_XSTR(__LINE__) ")\n",
+                                 offPort, (offPort & AC97_NABM_OFF_MASK) == AC97_NABM_OFF_CIV ? " (CIV)" : "" , u32));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
                         break;
@@ -2838,5 +2842,5 @@
                         break;
                     default:
-                        LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 2\n", offPort, u32));
+                        LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
                         break;
@@ -2856,5 +2860,5 @@
                         break;
                     default:
-                        LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 4\n", offPort, u32));
+                        LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
                         break;
@@ -2872,10 +2876,10 @@
         {
             case 1:
-                LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 1\n", offPort, u32));
+                LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
                 STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
                 break;
 
             case 2:
-                LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 2\n", offPort, u32));
+                LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
                 STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
                 break;
@@ -2905,5 +2909,5 @@
                         break;
                     default:
-                        LogRel2(("AC97: Warning: Unimplemented NABMWrite offPort=%#x <- %#x LB 4\n", offPort, u32));
+                        LogRel2(("AC97: Warning: Unimplemented NAMB write offPort=%#x <- %#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
                         STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNabmWrites);
                         break;
@@ -3329,5 +3333,6 @@
     {
         case 1:
-            LogRel2(("AC97: Warning: Unimplemented read (1 byte) offPort=%#x\n", offPort));
+            LogRel2(("AC97: Warning: Unimplemented NAM read offPort=%#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort));
+            STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamReads);
             pThis->cas = 0;
             *pu32 = UINT32_MAX;
@@ -3340,5 +3345,6 @@
 
         case 4:
-            LogRel2(("AC97: Warning: Unimplemented read (4 bytes) offPort=%#x\n", offPort));
+            LogRel2(("AC97: Warning: Unimplemented NAM read offPort=%#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort));
+            STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamReads);
             pThis->cas = 0;
             *pu32 = UINT32_MAX;
@@ -3373,5 +3379,6 @@
     {
         case 1:
-            LogRel2(("AC97: Warning: Unimplemented NAMWrite (1 byte) offPort=%#x <- %#x\n", offPort, u32));
+            LogRel2(("AC97: Warning: Unimplemented NAM write offPort=%#x <- %#x LB 1 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
+            STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamWrites);
             pThis->cas = 0;
             break;
@@ -3559,5 +3566,9 @@
                     break;
                 default:
-                    LogRel2(("AC97: Warning: Unimplemented NAMWrite (2 bytes) offPort=%#x <- %#x\n", offPort, u32));
+                    /* Most of these are to register we don't care about like AC97_CD_Volume_Mute
+                       and AC97_Master_Volume_Mono_Mute or things we don't need to handle specially.
+                       Thus this is not a 'warning' but an 'info log message. */
+                    LogRel2(("AC97: Info: Unimplemented NAM write offPort=%#x <- %#x LB 2 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
+                    STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamWrites);
                     ichac97MixerSet(pThis, offPort, u32);
                     break;
@@ -3567,10 +3578,11 @@
 
         case 4:
-            LogRel2(("AC97: Warning: Unimplemented 4 byte NAMWrite: offPort=%#x <- %#x\n", offPort, u32));
+            LogRel2(("AC97: Warning: Unimplemented NAM write offPort=%#x <- %#x LB 4 (line " RT_XSTR(__LINE__) ")\n", offPort, u32));
+            STAM_REL_COUNTER_INC(&pThis->StatUnimplementedNamWrites);
             pThis->cas = 0;
             break;
 
         default:
-            AssertMsgFailed(("Unhandled NAMWrite offPort=%#x, cb=%u u32=%#x\n", offPort, cb, u32));
+            AssertMsgFailed(("Unhandled NAM write offPort=%#x, cb=%u u32=%#x\n", offPort, cb, u32));
             break;
     }
@@ -4514,4 +4526,6 @@
     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUnimplementedNabmReads,  STAMTYPE_COUNTER, "UnimplementedNabmReads", STAMUNIT_OCCURENCES, "Unimplemented NABM register reads.");
     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUnimplementedNabmWrites, STAMTYPE_COUNTER, "UnimplementedNabmWrites", STAMUNIT_OCCURENCES, "Unimplemented NABM register writes.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUnimplementedNamReads,   STAMTYPE_COUNTER, "UnimplementedNamReads", STAMUNIT_OCCURENCES, "Unimplemented NAM register reads.");
+    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUnimplementedNamWrites,  STAMTYPE_COUNTER, "UnimplementedNamWrites", STAMUNIT_OCCURENCES, "Unimplemented NAM register writes.");
 # ifdef VBOX_WITH_STATISTICS
     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTimer,        STAMTYPE_PROFILE, "Timer",        STAMUNIT_TICKS_PER_CALL, "Profiling ichac97Timer.");
