Index: /trunk/include/VBox/vmm/pdmaudioifs.h
===================================================================
--- /trunk/include/VBox/vmm/pdmaudioifs.h	(revision 88692)
+++ /trunk/include/VBox/vmm/pdmaudioifs.h	(revision 88693)
@@ -1052,4 +1052,19 @@
 
     /**
+     * Gives the audio drivers a hint about a typical configuration.
+     *
+     * This is a little hack for windows (and maybe other hosts) where stream
+     * creation can take a relatively long time, making it very unsuitable for EMT.
+     * The audio backend can use this hint to cache pre-configured stream setups,
+     * so that when the guest actually wants to play something EMT won't be blocked
+     * configuring host audio.
+     *
+     * @param   pInterface      Pointer to this interface.
+     * @param   pCfg            The typical configuration.  Can be modified by the
+     *                          drivers in unspecified ways.
+     */
+    DECLR3CALLBACKMEMBER(void, pfnStreamConfigHint, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAMCFG pCfg));
+
+    /**
      * Creates an audio stream.
      *
@@ -1202,5 +1217,5 @@
 
 /** PDMIAUDIOCONNECTOR interface ID. */
-#define PDMIAUDIOCONNECTOR_IID                  "473a3a3c-cda9-454c-90f9-63751320e62a"
+#define PDMIAUDIOCONNECTOR_IID                  "9e7d9efb-45ac-4364-9e9d-67b6990df94c"
 
 
@@ -1228,5 +1243,5 @@
 
     /**
-     * Returns (enumerates) host audio device information.
+     * Returns (enumerates) host audio device information (optional).
      *
      * @returns VBox status code.
@@ -1237,5 +1252,5 @@
 
     /**
-     * Returns the current status from the audio backend.
+     * Returns the current status from the audio backend (optional).
      *
      * @returns PDMAUDIOBACKENDSTS enum.
@@ -1244,4 +1259,20 @@
      */
     DECLR3CALLBACKMEMBER(PDMAUDIOBACKENDSTS, pfnGetStatus, (PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir));
+
+    /**
+     * Gives the audio backend a hint about a typical configuration (optional).
+     *
+     * This is a little hack for windows (and maybe other hosts) where stream
+     * creation can take a relatively long time, making it very unsuitable for EMT.
+     * The audio backend can use this hint to cache pre-configured stream setups,
+     * so that when the guest actually wants to play something EMT won't be blocked
+     * configuring host audio.
+     *
+     * @param   pInterface      Pointer to this interface.
+     * @param   pCfg            The typical configuration.  (Feel free to change it
+     *                          to the actual stream config that would be used,
+     *                          however caller will probably ignore this.)
+     */
+    DECLR3CALLBACKMEMBER(void, pfnStreamConfigHint, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAMCFG pCfg));
 
     /**
@@ -1303,5 +1334,5 @@
 
     /**
-     * Returns the number of buffered bytes that hasn't been played yet.
+     * Returns the number of buffered bytes that hasn't been played yet (optional).
      *
      * This function is used by DrvAudio to detect when it is appropriate to fully
@@ -1362,5 +1393,5 @@
 
 /** PDMIHOSTAUDIO interface ID. */
-#define PDMIHOSTAUDIO_IID                           "71b1dcc3-46d7-4c27-a76a-63cd229adb74"
+#define PDMIHOSTAUDIO_IID                           "ccfd4020-1a41-4158-8c42-6f7c98f0aaa8"
 
 
Index: /trunk/src/VBox/Devices/Audio/DevHda.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHda.cpp	(revision 88692)
+++ /trunk/src/VBox/Devices/Audio/DevHda.cpp	(revision 88693)
@@ -4446,4 +4446,25 @@
             if (ppDrv)
                 *ppDrv = pDrv;
+
+            /*
+             * While we're here, give the windows backends a hint about our typical playback
+             * configuration.
+             * Note! If 48000Hz is advertised to the guest, add it here.
+             */
+            if (   pDrv->pConnector
+                && pDrv->pConnector->pfnStreamConfigHint)
+            {
+                PDMAUDIOSTREAMCFG Cfg;
+                RT_ZERO(Cfg);
+                Cfg.enmDir                        = PDMAUDIODIR_OUT;
+                Cfg.u.enmDst                      = PDMAUDIOPLAYBACKDST_FRONT;
+                Cfg.enmLayout                     = PDMAUDIOSTREAMLAYOUT_INTERLEAVED;
+                Cfg.Device.cMsSchedulingHint      = 10;
+                Cfg.Backend.cFramesPreBuffering   = UINT32_MAX;
+                PDMAudioPropsInit(&Cfg.Props, 2, true /*fSigned*/, 2, 44100);
+                RTStrPrintf(Cfg.szName, sizeof(Cfg.szName), "output 44.1kHz 2ch S16 (HDA config hint)");
+
+                pDrv->pConnector->pfnStreamConfigHint(pDrv->pConnector, &Cfg); /* (may trash CfgReq) */
+            }
         }
         else
Index: /trunk/src/VBox/Devices/Audio/DrvAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 88692)
+++ /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 88693)
@@ -2268,4 +2268,5 @@
     AssertPtrNullReturn(pHostDrvAudio->pfnGetDevices, VERR_INVALID_POINTER);
     AssertPtrNullReturn(pHostDrvAudio->pfnGetStatus, VERR_INVALID_POINTER);
+    AssertPtrNullReturn(pHostDrvAudio->pfnStreamConfigHint, VERR_INVALID_POINTER);
     AssertPtrReturn(pHostDrvAudio->pfnStreamCreate, VERR_INVALID_POINTER);
     AssertPtrReturn(pHostDrvAudio->pfnStreamDestroy, VERR_INVALID_POINTER);
@@ -2450,4 +2451,156 @@
 
 /**
+ * Adjusts the request stream configuration, applying our settings.
+ *
+ * This also does some basic validations.
+ *
+ * Used by both the stream creation and stream configuration hinting code.
+ *
+ * @returns VBox status code.
+ * @param   pThis       Pointer to the DrvAudio instance data.
+ * @param   pCfgReq     The request configuration that should be adjusted.
+ * @param   pszName     Stream name to use when logging warnings and errors.
+ */
+static int drvAudioStreamAdjustConfig(PDRVAUDIO pThis, PPDMAUDIOSTREAMCFG pCfgReq, const char *pszName)
+{
+    /* Get the right configuration for the stream to be created. */
+    PDRVAUDIOCFG pDrvCfg = pCfgReq->enmDir == PDMAUDIODIR_IN ? &pThis->In.Cfg : &pThis->Out.Cfg;
+
+    /* Fill in the tweakable parameters into the requested host configuration.
+     * All parameters in principle can be changed and returned by the backend via the acquired configuration. */
+
+    /*
+     * PCM
+     */
+    if (PDMAudioPropsSampleSize(&pDrvCfg->Props) != 0) /* Anything set via custom extra-data? */
+    {
+        PDMAudioPropsSetSampleSize(&pCfgReq->Props, PDMAudioPropsSampleSize(&pDrvCfg->Props));
+        LogRel2(("Audio: Using custom sample size of %RU8 bytes for stream '%s'\n",
+                 PDMAudioPropsSampleSize(&pCfgReq->Props), pszName));
+    }
+
+    if (pDrvCfg->Props.uHz) /* Anything set via custom extra-data? */
+    {
+        pCfgReq->Props.uHz = pDrvCfg->Props.uHz;
+        LogRel2(("Audio: Using custom Hz rate %RU32 for stream '%s'\n", pCfgReq->Props.uHz, pszName));
+    }
+
+    if (pDrvCfg->uSigned != UINT8_MAX) /* Anything set via custom extra-data? */
+    {
+        pCfgReq->Props.fSigned = RT_BOOL(pDrvCfg->uSigned);
+        LogRel2(("Audio: Using custom %s sample format for stream '%s'\n",
+                 pCfgReq->Props.fSigned ? "signed" : "unsigned", pszName));
+    }
+
+    if (pDrvCfg->uSwapEndian != UINT8_MAX) /* Anything set via custom extra-data? */
+    {
+        pCfgReq->Props.fSwapEndian = RT_BOOL(pDrvCfg->uSwapEndian);
+        LogRel2(("Audio: Using custom %s endianess for samples of stream '%s'\n",
+                 pCfgReq->Props.fSwapEndian ? "swapped" : "original", pszName));
+    }
+
+    if (PDMAudioPropsChannels(&pDrvCfg->Props) != 0) /* Anything set via custom extra-data? */
+    {
+        PDMAudioPropsSetChannels(&pCfgReq->Props, PDMAudioPropsChannels(&pDrvCfg->Props));
+        LogRel2(("Audio: Using custom %RU8 channel(s) for stream '%s'\n", PDMAudioPropsChannels(&pDrvCfg->Props), pszName));
+    }
+
+    /* Validate PCM properties. */
+    if (!AudioHlpPcmPropsAreValid(&pCfgReq->Props))
+    {
+        LogRel(("Audio: Invalid custom PCM properties set for stream '%s', cannot create stream\n", pszName));
+        return VERR_INVALID_PARAMETER;
+    }
+
+    /*
+     * Period size
+     */
+    const char *pszWhat = "device-specific";
+    if (pDrvCfg->uPeriodSizeMs)
+    {
+        pCfgReq->Backend.cFramesPeriod = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uPeriodSizeMs);
+        pszWhat = "custom";
+    }
+
+    if (!pCfgReq->Backend.cFramesPeriod) /* Set default period size if nothing explicitly is set. */
+    {
+        pCfgReq->Backend.cFramesPeriod = PDMAudioPropsMilliToFrames(&pCfgReq->Props, 150 /*ms*/);
+        pszWhat = "default";
+    }
+
+    LogRel2(("Audio: Using %s period size %RU64 ms / %RU32 frames for stream '%s'\n",
+             pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPeriod),
+             pCfgReq->Backend.cFramesPeriod, pszName));
+
+    /*
+     * Buffer size
+     */
+    pszWhat = "device-specific";
+    if (pDrvCfg->uBufferSizeMs)
+    {
+        pCfgReq->Backend.cFramesBufferSize = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uBufferSizeMs);
+        pszWhat = "custom";
+    }
+
+    if (!pCfgReq->Backend.cFramesBufferSize) /* Set default buffer size if nothing explicitly is set. */
+    {
+        pCfgReq->Backend.cFramesBufferSize = PDMAudioPropsMilliToFrames(&pCfgReq->Props, 300 /*ms*/);
+        pszWhat = "default";
+    }
+
+    LogRel2(("Audio: Using %s buffer size %RU64 ms / %RU32 frames for stream '%s'\n",
+             pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize),
+             pCfgReq->Backend.cFramesBufferSize, pszName));
+
+    /*
+     * Pre-buffering size
+     */
+    pszWhat = "device-specific";
+    if (pDrvCfg->uPreBufSizeMs != UINT32_MAX) /* Anything set via global / per-VM extra-data? */
+    {
+        pCfgReq->Backend.cFramesPreBuffering = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uPreBufSizeMs);
+        pszWhat = "custom";
+    }
+    else /* No, then either use the default or device-specific settings (if any). */
+    {
+        if (pCfgReq->Backend.cFramesPreBuffering == UINT32_MAX) /* Set default pre-buffering size if nothing explicitly is set. */
+        {
+            /* Pre-buffer 66% of the buffer. */
+            pCfgReq->Backend.cFramesPreBuffering = pCfgReq->Backend.cFramesBufferSize * 2 / 3;
+            pszWhat = "default";
+        }
+    }
+
+    LogRel2(("Audio: Using %s pre-buffering size %RU64 ms / %RU32 frames for stream '%s'\n",
+             pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPreBuffering),
+             pCfgReq->Backend.cFramesPreBuffering, pszName));
+
+    /*
+     * Validate input.
+     */
+    if (pCfgReq->Backend.cFramesBufferSize < pCfgReq->Backend.cFramesPeriod)
+    {
+        LogRel(("Audio: Error for stream '%s': Buffering size (%RU64ms) must not be smaller than the period size (%RU64ms)\n",
+                pszName, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize),
+                PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPeriod)));
+        return VERR_INVALID_PARAMETER;
+    }
+
+    if (   pCfgReq->Backend.cFramesPreBuffering != UINT32_MAX /* Custom pre-buffering set? */
+        && pCfgReq->Backend.cFramesPreBuffering)
+    {
+        if (pCfgReq->Backend.cFramesBufferSize < pCfgReq->Backend.cFramesPreBuffering)
+        {
+            LogRel(("Audio: Error for stream '%s': Buffering size (%RU64ms) must not be smaller than the pre-buffering size (%RU64ms)\n",
+                    pszName, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPreBuffering),
+                    PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize)));
+            return VERR_INVALID_PARAMETER;
+        }
+    }
+
+    return VINF_SUCCESS;
+}
+
+/**
  * Worker for drvAudioStreamInitInternal and drvAudioStreamReInitInternal that
  * creates the backend (host driver) side of an audio stream.
@@ -2473,138 +2626,10 @@
               ("Stream '%s' already initialized in backend\n", pStreamEx->Core.szName));
 
-    /* Get the right configuration for the stream to be created. */
-    PDRVAUDIOCFG pDrvCfg = pCfgReq->enmDir == PDMAUDIODIR_IN ? &pThis->In.Cfg : &pThis->Out.Cfg;
-
-    /* Fill in the tweakable parameters into the requested host configuration.
-     * All parameters in principle can be changed and returned by the backend via the acquired configuration. */
-
-    /*
-     * PCM
-     */
-    if (PDMAudioPropsSampleSize(&pDrvCfg->Props) != 0) /* Anything set via custom extra-data? */
-    {
-        PDMAudioPropsSetSampleSize(&pCfgReq->Props, PDMAudioPropsSampleSize(&pDrvCfg->Props));
-        LogRel2(("Audio: Using custom sample size of %RU8 bytes for stream '%s'\n",
-                 PDMAudioPropsSampleSize(&pCfgReq->Props), pStreamEx->Core.szName));
-    }
-
-    if (pDrvCfg->Props.uHz) /* Anything set via custom extra-data? */
-    {
-        pCfgReq->Props.uHz = pDrvCfg->Props.uHz;
-        LogRel2(("Audio: Using custom Hz rate %RU32 for stream '%s'\n", pCfgReq->Props.uHz, pStreamEx->Core.szName));
-    }
-
-    if (pDrvCfg->uSigned != UINT8_MAX) /* Anything set via custom extra-data? */
-    {
-        pCfgReq->Props.fSigned = RT_BOOL(pDrvCfg->uSigned);
-        LogRel2(("Audio: Using custom %s sample format for stream '%s'\n",
-                 pCfgReq->Props.fSigned ? "signed" : "unsigned", pStreamEx->Core.szName));
-    }
-
-    if (pDrvCfg->uSwapEndian != UINT8_MAX) /* Anything set via custom extra-data? */
-    {
-        pCfgReq->Props.fSwapEndian = RT_BOOL(pDrvCfg->uSwapEndian);
-        LogRel2(("Audio: Using custom %s endianess for samples of stream '%s'\n",
-                 pCfgReq->Props.fSwapEndian ? "swapped" : "original", pStreamEx->Core.szName));
-    }
-
-    if (PDMAudioPropsChannels(&pDrvCfg->Props) != 0) /* Anything set via custom extra-data? */
-    {
-        PDMAudioPropsSetChannels(&pCfgReq->Props, PDMAudioPropsChannels(&pDrvCfg->Props));
-        LogRel2(("Audio: Using custom %RU8 channel(s) for stream '%s'\n", PDMAudioPropsChannels(&pDrvCfg->Props), pStreamEx->Core.szName));
-    }
-
-    /* Validate PCM properties. */
-    if (!AudioHlpPcmPropsAreValid(&pCfgReq->Props))
-    {
-        LogRel(("Audio: Invalid custom PCM properties set for stream '%s', cannot create stream\n", pStreamEx->Core.szName));
-        return VERR_INVALID_PARAMETER;
-    }
-
-    /*
-     * Period size
-     */
-    const char *pszWhat = "device-specific";
-    if (pDrvCfg->uPeriodSizeMs)
-    {
-        pCfgReq->Backend.cFramesPeriod = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uPeriodSizeMs);
-        pszWhat = "custom";
-    }
-
-    if (!pCfgReq->Backend.cFramesPeriod) /* Set default period size if nothing explicitly is set. */
-    {
-        pCfgReq->Backend.cFramesPeriod = PDMAudioPropsMilliToFrames(&pCfgReq->Props, 150 /*ms*/);
-        pszWhat = "default";
-    }
-
-    LogRel2(("Audio: Using %s period size %RU64 ms / %RU32 frames for stream '%s'\n",
-             pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPeriod),
-             pCfgReq->Backend.cFramesPeriod, pStreamEx->Core.szName));
-
-    /*
-     * Buffer size
-     */
-    pszWhat = "device-specific";
-    if (pDrvCfg->uBufferSizeMs)
-    {
-        pCfgReq->Backend.cFramesBufferSize = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uBufferSizeMs);
-        pszWhat = "custom";
-    }
-
-    if (!pCfgReq->Backend.cFramesBufferSize) /* Set default buffer size if nothing explicitly is set. */
-    {
-        pCfgReq->Backend.cFramesBufferSize = PDMAudioPropsMilliToFrames(&pCfgReq->Props, 300 /*ms*/);
-        pszWhat = "default";
-    }
-
-    LogRel2(("Audio: Using %s buffer size %RU64 ms / %RU32 frames for stream '%s'\n",
-             pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize),
-             pCfgReq->Backend.cFramesBufferSize, pStreamEx->Core.szName));
-
-    /*
-     * Pre-buffering size
-     */
-    pszWhat = "device-specific";
-    if (pDrvCfg->uPreBufSizeMs != UINT32_MAX) /* Anything set via global / per-VM extra-data? */
-    {
-        pCfgReq->Backend.cFramesPreBuffering = PDMAudioPropsMilliToFrames(&pCfgReq->Props, pDrvCfg->uPreBufSizeMs);
-        pszWhat = "custom";
-    }
-    else /* No, then either use the default or device-specific settings (if any). */
-    {
-        if (pCfgReq->Backend.cFramesPreBuffering == UINT32_MAX) /* Set default pre-buffering size if nothing explicitly is set. */
-        {
-            /* Pre-buffer 66% of the buffer. */
-            pCfgReq->Backend.cFramesPreBuffering = pCfgReq->Backend.cFramesBufferSize * 2 / 3;
-            pszWhat = "default";
-        }
-    }
-
-    LogRel2(("Audio: Using %s pre-buffering size %RU64 ms / %RU32 frames for stream '%s'\n",
-             pszWhat, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPreBuffering),
-             pCfgReq->Backend.cFramesPreBuffering, pStreamEx->Core.szName));
-
-    /*
-     * Validate input.
-     */
-    if (pCfgReq->Backend.cFramesBufferSize < pCfgReq->Backend.cFramesPeriod)
-    {
-        LogRel(("Audio: Error for stream '%s': Buffering size (%RU64ms) must not be smaller than the period size (%RU64ms)\n",
-                pStreamEx->Core.szName, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize),
-                PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPeriod)));
-        return VERR_INVALID_PARAMETER;
-    }
-
-    if (   pCfgReq->Backend.cFramesPreBuffering != UINT32_MAX /* Custom pre-buffering set? */
-        && pCfgReq->Backend.cFramesPreBuffering)
-    {
-        if (pCfgReq->Backend.cFramesBufferSize < pCfgReq->Backend.cFramesPreBuffering)
-        {
-            LogRel(("Audio: Error for stream '%s': Buffering size (%RU64ms) must not be smaller than the pre-buffering size (%RU64ms)\n",
-                    pStreamEx->Core.szName, PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesPreBuffering),
-                    PDMAudioPropsFramesToMilli(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize)));
-            return VERR_INVALID_PARAMETER;
-        }
-    }
+    /*
+     * Adjust the requested stream config, applying our settings.
+     */
+    int rc = drvAudioStreamAdjustConfig(pThis, pCfgReq, pStreamEx->Core.szName);
+    if (RT_FAILURE(rc))
+        return rc;
 
     /*
@@ -2613,5 +2638,5 @@
      */
     /** @todo r=bird: This is conveniently not documented in the interface... */
-    int rc = PDMAudioStrmCfgCopy(pCfgAcq, pCfgReq);
+    rc = PDMAudioStrmCfgCopy(pCfgAcq, pCfgReq);
     if (RT_FAILURE(rc))
     {
@@ -3231,4 +3256,41 @@
 
 /**
+ * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamConfigHint}
+ */
+static DECLCALLBACK(void) drvAudioStreamConfigHint(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAMCFG pCfg)
+{
+    PDRVAUDIO pThis = RT_FROM_MEMBER(pInterface, DRVAUDIO, IAudioConnector);
+    AssertReturnVoid(pCfg->enmDir == PDMAUDIODIR_IN || pCfg->enmDir == PDMAUDIODIR_OUT);
+
+    int rc = RTCritSectEnter(&pThis->CritSect); /** @todo Reconsider the locking for DrvAudio */
+    AssertRCReturnVoid(rc);
+
+    /*
+     * Don't do anything unless the backend has a pfnStreamConfigHint method
+     * and the direction is currently enabled.
+     */
+    if (   pThis->pHostDrvAudio
+        && pThis->pHostDrvAudio->pfnStreamConfigHint)
+    {
+        if (pCfg->enmDir == PDMAUDIODIR_OUT ? pThis->Out.fEnabled : pThis->In.fEnabled)
+        {
+            /*
+             * Adjust the configuration (applying out settings) then call the backend driver.
+             */
+            rc = drvAudioStreamAdjustConfig(pThis, pCfg, pCfg->szName);
+            AssertLogRelRC(rc);
+            if (RT_SUCCESS(rc))
+                pThis->pHostDrvAudio->pfnStreamConfigHint(pThis->pHostDrvAudio, pCfg);
+        }
+        else
+            LogFunc(("Ignoring hint because direction is not currently enabled\n"));
+    }
+    else
+        LogFlowFunc(("Ignoring hint because backend has no pfnStreamConfigHint method.\n"));
+
+    RTCritSectLeave(&pThis->CritSect);
+}
+
+/**
  * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamGetReadable}
  */
@@ -4069,4 +4131,5 @@
     pThis->IAudioConnector.pfnGetConfig         = drvAudioGetConfig;
     pThis->IAudioConnector.pfnGetStatus         = drvAudioGetStatus;
+    pThis->IAudioConnector.pfnStreamConfigHint  = drvAudioStreamConfigHint;
     pThis->IAudioConnector.pfnStreamCreate      = drvAudioStreamCreate;
     pThis->IAudioConnector.pfnStreamDestroy     = drvAudioStreamDestroy;
Index: /trunk/src/VBox/Devices/Audio/DrvHostAudioNull.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostAudioNull.cpp	(revision 88692)
+++ /trunk/src/VBox/Devices/Audio/DrvHostAudioNull.cpp	(revision 88693)
@@ -230,4 +230,5 @@
     /* .pfnGetDevices         =*/ NULL,
     /* .pfnGetStatus          =*/ drvHostNullAudioHA_GetStatus,
+    /* .pfnStreamConfigHint   =*/ NULL,
     /* .pfnStreamCreate       =*/ drvHostNullAudioHA_StreamCreate,
     /* .pfnStreamDestroy      =*/ drvHostNullAudioHA_StreamDestroy,
Index: /trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp	(revision 88692)
+++ /trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp	(revision 88693)
@@ -1278,4 +1278,34 @@
     RT_NOREF(pInterface, enmDir);
     return PDMAUDIOBACKENDSTS_RUNNING;
+}
+
+
+/**
+ * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamConfigHint}
+ */
+static DECLCALLBACK(void) drvHostAudioWasHA_StreamConfigHint(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAMCFG pCfg)
+{
+    PDRVHOSTAUDIOWAS pThis = RT_FROM_MEMBER(pInterface, DRVHOSTAUDIOWAS, IHostAudio);
+    LogFlowFunc(("pCfg=%p\n", pCfg));
+
+    /*
+     * Get the device.
+     */
+    pThis->pNotifyClient->lockEnter();
+    IMMDevice *pIDevice = pCfg->enmDir == PDMAUDIODIR_IN ? pThis->pIDeviceInput : pThis->pIDeviceOutput;
+    if (pIDevice)
+        pIDevice->AddRef();
+    pThis->pNotifyClient->lockLeave();
+    if (pIDevice)
+    {
+        /*
+         * Look up the config and put it back.
+         */
+        PDRVHOSTAUDIOWASCACHEDEVCFG pDevCfg = drvHostAudioWasCacheLookupOrCreate(pThis, pIDevice, pCfg);
+        LogFlowFunc(("pDevCfg=%p\n"));
+        if (pDevCfg)
+            drvHostAudioWasCachePutBack(pThis, pDevCfg);
+        pIDevice->Release();
+    }
 }
 
@@ -2333,4 +2363,5 @@
     pThis->IHostAudio.pfnGetDevices         = drvHostAudioWasHA_GetDevices;
     pThis->IHostAudio.pfnGetStatus          = drvHostAudioWasHA_GetStatus;
+    pThis->IHostAudio.pfnStreamConfigHint   = drvHostAudioWasHA_StreamConfigHint;
     pThis->IHostAudio.pfnStreamCreate       = drvHostAudioWasHA_StreamCreate;
     pThis->IHostAudio.pfnStreamDestroy      = drvHostAudioWasHA_StreamDestroy;
