Index: /trunk/src/VBox/Devices/Audio/DevIchHda.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevIchHda.cpp	(revision 59271)
+++ /trunk/src/VBox/Devices/Audio/DevIchHda.cpp	(revision 59272)
@@ -3631,5 +3631,5 @@
     Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
 
-    LogFlowFunc(("uVersion=%RU32, uPass=0x%x\n", uVersion, uPass));
+    LogRel2(("hdaLoadExec: uVersion=%RU32, uPass=0x%x\n", uVersion, uPass));
 
     /*
@@ -3743,15 +3743,18 @@
             /* Output */
             rc = hdaStreamInit(pThis, &pThis->StrmStOut,    4 /* Stream number, hardcoded */);
-            AssertRCBreak(rc);
+            if (RT_FAILURE(rc))
+                break;
             HDA_SSM_LOAD_BDLE_STATE_PRE_V5(uVersion, (   pThis->StrmStOut.State.cBDLE
                                                       ? &pThis->StrmStOut.State.paBDLE[0].State : &StateBDLEDummy));
             /* Microphone-In */
             rc = hdaStreamInit(pThis, &pThis->StrmStMicIn,  2 /* Stream number, hardcoded */);
-            AssertRCBreak(rc);
+            if (RT_FAILURE(rc))
+                break;
             HDA_SSM_LOAD_BDLE_STATE_PRE_V5(uVersion, (   pThis->StrmStMicIn.State.cBDLE
                                                       ? &pThis->StrmStMicIn.State.paBDLE[0].State : &StateBDLEDummy));
             /* Line-In */
             rc = hdaStreamInit(pThis, &pThis->StrmStLineIn, 0 /* Stream number, hardcoded */);
-            AssertRCBreak(rc);
+            if (RT_FAILURE(rc))
+                break;
             HDA_SSM_LOAD_BDLE_STATE_PRE_V5(uVersion, (  pThis->StrmStLineIn.State.cBDLE
                                                       ? &pThis->StrmStLineIn.State.paBDLE[0].State : &StateBDLEDummy));
@@ -3765,5 +3768,8 @@
             uint32_t cStreams;
             rc = SSMR3GetU32(pSSM, &cStreams);
-            AssertRCBreak(rc);
+            if (RT_FAILURE(rc))
+                break;
+
+            LogRel2(("hdaLoadExec: cStreams=%RU32\n", cStreams));
 
             /* Load stream states. */
@@ -3772,5 +3778,6 @@
                 uint8_t uStreamID;
                 rc = SSMR3GetU8(pSSM, &uStreamID);
-                AssertRCBreak(rc);
+                if (RT_FAILURE(rc))
+                    break;
 
                 PHDASTREAM pStrm;
@@ -3798,8 +3805,13 @@
                 RT_BZERO(pStrm, sizeof(HDASTREAM));
                 rc = SSMR3GetStructEx(pSSM, &pStrm->State, sizeof(HDASTREAMSTATE), 0 /* fFlags */, g_aSSMStreamStateFields5, NULL);
-                AssertRCBreak(rc);
+                if (RT_FAILURE(rc))
+                    break;
 
                 rc = hdaStreamInit(pThis, pStrm, uStreamID);
-                AssertRCBreak(rc);
+                if (RT_FAILURE(rc))
+                {
+                    LogRel(("HDA: Stream #%RU32: Inititialization of stream (ID=%RU8, cBDLE=%RU32) failed, rc=%Rrc\n", i, uStreamID, pStrm->State.cBDLE, rc));
+                    break;
+                }
 
                 /* Load BDLE states. */
@@ -3808,11 +3820,17 @@
                 for (uint32_t a = 0; a < pStrm->State.cBDLE; a++)
                 {
-                    /* v5 did not save the BDLE state correctly, so skip. */
-                    pState = uVersion == HDA_SSM_VERSION_5
-                           ? &StateDummy : &pStrm->State.paBDLE[a].State;
-
-                    rc = SSMR3GetStructEx(pSSM, pState, sizeof(HDABDLESTATE),
-                                          0 /* fFlags */, g_aSSMBDLEStateFields5, NULL);
-                    AssertRCBreak(rc);
+                    if (uVersion == HDA_SSM_VERSION_5)
+                    {
+                        /* v5 saved the entire HDABDLE struct instead of only HDABDLESTATE,
+                         * so skip. */
+                        rc = SSMR3Skip(pSSM, 0x120 /* sizeof(HDABLDE) in v5 */);
+                    }
+                    else
+                    {
+                        rc = SSMR3GetStructEx(pSSM, &pStrm->State.paBDLE[a].State, sizeof(HDABDLESTATE),
+                                              0 /* fFlags */, g_aSSMBDLEStateFields5, NULL);
+                    }
+                    if (RT_FAILURE(rc))
+                        break;
                 }
 
@@ -3839,6 +3857,4 @@
 #ifdef VBOX_WITH_HDA_MIC_IN
         bool fEnableMicIn = RT_BOOL(HDA_SDCTL(pThis, 2 /** @todo Use a define. */) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
-#else
-        bool fEnableMicIn = fEnableIn; /* Mic In == Line In */
 #endif
         bool fEnableOut   = RT_BOOL(HDA_SDCTL(pThis, 4 /** @todo Use a define. */) & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
@@ -3850,7 +3866,9 @@
             if (RT_FAILURE(rc))
                 break;
+#ifdef VBOX_WITH_HDA_MIC_IN
             rc = pDrv->pConnector->pfnEnableIn(pDrv->pConnector, pDrv->MicIn.pStrmIn, fEnableMicIn);
             if (RT_FAILURE(rc))
                 break;
+#endif
             rc = pDrv->pConnector->pfnEnableOut(pDrv->pConnector, pDrv->Out.pStrmOut, fEnableOut);
             if (RT_FAILURE(rc))
@@ -3863,5 +3881,5 @@
         pThis->u64CORBBase = RT_MAKE_U64(HDA_REG(pThis, CORBLBASE), HDA_REG(pThis, CORBUBASE));
         pThis->u64RIRBBase = RT_MAKE_U64(HDA_REG(pThis, RIRBLBASE), HDA_REG(pThis, RIRBUBASE));
-        pThis->u64DPBase   = RT_MAKE_U64(HDA_REG(pThis, DPLBASE), HDA_REG(pThis, DPUBASE));
+        pThis->u64DPBase   = RT_MAKE_U64(HDA_REG(pThis, DPLBASE),   HDA_REG(pThis, DPUBASE));
     }
     else
@@ -4106,6 +4124,8 @@
     {
         pDrv->pConnector->pfnEnableIn(pDrv->pConnector, pDrv->LineIn.pStrmIn, false /* Disable */);
+#ifdef VBOX_WITH_HDA_MIC_IN
         /* Ignore rc. */
         pDrv->pConnector->pfnEnableIn(pDrv->pConnector, pDrv->MicIn.pStrmIn, false /* Disable */);
+#endif
         /* Ditto. */
         pDrv->pConnector->pfnEnableOut(pDrv->pConnector, pDrv->Out.pStrmOut, false /* Disable */);
