Index: /trunk/Config.kmk
===================================================================
--- /trunk/Config.kmk	(revision 61331)
+++ /trunk/Config.kmk	(revision 61332)
@@ -3592,5 +3592,5 @@
  else ifeq ($(VBOX_SOLARIS_VERSION),511)
   # OSS audio support for Solaris
-  VBOX_WITH_SOLARIS_OSS := $(if-expr $(VBOX_SOLARIS_11_VERSION) >= 115,1,)
+  VBOX_WITH_OSS := $(if-expr $(VBOX_SOLARIS_11_VERSION) >= 115,1,)
  endif
 
Index: /trunk/include/VBox/err.h
===================================================================
--- /trunk/include/VBox/err.h	(revision 61331)
+++ /trunk/include/VBox/err.h	(revision 61332)
@@ -2748,7 +2748,7 @@
 #define VERR_AUDIO_NO_FREE_INPUT_STREAMS            (-6601)
 /** No free output streams.  */
-#define VERR_AUDIO_NO_FREE_OUTPUT_STREAMS           (-6603)
+#define VERR_AUDIO_NO_FREE_OUTPUT_STREAMS           (-6602)
 /** Pending stream disable operation in progress.  */
-#define VERR_AUDIO_STREAM_PENDING_DISABLE           (-6604)
+#define VERR_AUDIO_STREAM_PENDING_DISABLE           (-6603)
 /** @} */
 
Index: /trunk/src/VBox/Devices/Audio/DevSB16.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevSB16.cpp	(revision 61331)
+++ /trunk/src/VBox/Devices/Audio/DevSB16.cpp	(revision 61332)
@@ -318,5 +318,5 @@
     PVM pVM = PDMDevHlpGetVM(pThis->pDevInsR3);
     PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
-    PCFGMNODE pDev0 = CFGMR3GetChild(pRoot, "Devices/SB16/0/");
+    PCFGMNODE pDev0 = CFGMR3GetChild(pRoot, "Devices/sb16/0/");
 
     /* Remove LUN branch. */
@@ -452,4 +452,7 @@
     RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node)
     {
+        if (!pDrv->Out.pStream)
+            continue;
+
         int rc2 = pDrv->pConnector->pfnStreamControl(pDrv->pConnector, pDrv->Out.pStream,
                                                      hold == 1 ? PDMAUDIOSTREAMCMD_ENABLE : PDMAUDIOSTREAMCMD_DISABLE);
@@ -1775,4 +1778,6 @@
     {
         PPDMAUDIOSTREAM pStream = pDrv->Out.pStream;
+        if (!pStream)
+            continue;
 
         PDMAUDIOSTRMSTS strmSts = pDrv->pConnector->pfnStreamGetStatus(pDrv->pConnector, pStream);
@@ -2327,6 +2332,5 @@
 
         /** @todo No input streams available for SB16 yet. */
-        /* Note: Only query the whole backend status here, as we don't have multiple streams to check for. */
-        bool fValidOut = pCon->pfnGetStatus(pCon, PDMAUDIODIR_OUT) == PDMAUDIOBACKENDSTS_RUNNING;
+        bool fValidOut = pCon->pfnStreamGetStatus(pCon, pDrv->Out.pStream) & PDMAUDIOSTRMSTS_FLAG_INITIALIZED;
         if (!fValidOut)
         {
Index: /trunk/src/VBox/Devices/Audio/DrvAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 61331)
+++ /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 61332)
@@ -254,5 +254,7 @@
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
+
+    if (!pStream)
+        return VINF_SUCCESS;
 
     PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
@@ -337,4 +339,5 @@
         return VINF_SUCCESS;
 
+    AssertPtr(pThis->pHostDrvAudio);
     AssertMsg(pHstStream->enmCtx == PDMAUDIOSTREAMCTX_HOST,
               ("Stream '%s' is not a host stream and therefore has no backend\n", pHstStream->szName));
@@ -450,5 +453,4 @@
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
     AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
     /* pcbWritten is optional. */
@@ -456,5 +458,6 @@
     PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
 
-    if (!cbBuf)
+    if (   !pStream
+        || !cbBuf)
     {
         if (pcbWritten)
@@ -676,6 +679,8 @@
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
-    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
     /* pcData is optional. */
+
+    if (!pStream)
+        return VINF_SUCCESS;
 
     PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
@@ -1332,5 +1337,5 @@
 {
     AssertPtrReturn(pCfgHandle, VERR_INVALID_POINTER);
-    AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
+    AssertPtrReturn(pDrvIns,    VERR_INVALID_POINTER);
 
     PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
@@ -1365,5 +1370,9 @@
 
     if (!pStream)
-        return VERR_NOT_AVAILABLE;
+    {
+        if (pcbRead)
+            *pcbRead = 0;
+        return VINF_SUCCESS;
+    }
 
     AssertPtrReturn(pvBuf, VERR_INVALID_POINTER);
@@ -1619,5 +1628,5 @@
             {
                 LogFlowFunc(("Maximum number of host output streams reached\n"));
-                RC_BREAK(VERR_NO_MORE_HANDLES); /** @todo Fudge! */
+                RC_BREAK(VERR_AUDIO_NO_FREE_OUTPUT_STREAMS);
             }
 
@@ -1873,10 +1882,11 @@
         return VINF_SUCCESS;
 
-    int rc = VINF_SUCCESS;
-
-    LogFlowFunc(("%s: fStatus=0x%x\n", pHstStream->szName, pHstStream->fStatus));
-
+    AssertPtr(pThis->pHostDrvAudio);
     AssertMsg(pHstStream->enmCtx == PDMAUDIOSTREAMCTX_HOST,
               ("Stream '%s' is not a host stream and therefore has no backend\n", pHstStream->szName));
+
+    int rc = VINF_SUCCESS;
+
+    LogFlowFunc(("%s: fStatus=0x%x\n", pHstStream->szName, pHstStream->fStatus));
 
     if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_INITIALIZED)
@@ -1920,6 +1930,9 @@
 
     int rc = drvAudioStreamControlInternal(pThis, pGstStream, PDMAUDIOSTREAMCMD_DISABLE);
-    if (RT_SUCCESS(rc))
+    if (   RT_SUCCESS(rc)
+        && pThis->pHostDrvAudio)
+    {
         rc = drvAudioStreamControlInternalBackend(pThis, pHstStream, PDMAUDIOSTREAMCMD_DISABLE);
+    }
 
     if (RT_SUCCESS(rc))
Index: /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp	(revision 61331)
+++ /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp	(revision 61332)
@@ -1432,5 +1432,26 @@
     NOREF(pStream);
 
-    return (PDMAUDIOSTRMSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED);
+    PDMAUDIOSTRMSTS strmSts =   PDMAUDIOSTRMSTS_FLAG_INITIALIZED
+                              | PDMAUDIOSTRMSTS_FLAG_ENABLED;
+
+    if (pStream->enmDir == PDMAUDIODIR_IN)
+    {
+
+    }
+    else
+    {
+        PALSAAUDIOSTREAMOUT pStreamOut = (PALSAAUDIOSTREAMOUT)pStream;
+
+        snd_pcm_sframes_t cAvail;
+        int rc2 = alsaStreamGetAvail(pStreamOut->phPCM, &cAvail);
+        if (   RT_SUCCESS(rc2)
+            && cAvail >= 1024) /** @todo !!! HACK ALERT !!! Use bufsize. */
+        {
+            LogFlowFunc(("cAvail=%ld\n", cAvail));
+            strmSts |= PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE;
+        }
+    }
+
+    return strmSts;
 }
 
Index: /trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp	(revision 61331)
+++ /trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp	(revision 61332)
@@ -1061,7 +1061,13 @@
     NOREF(pStream);
 
-    return (PDMAUDIOSTRMSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED);
-}
-
+    PDMAUDIOSTRMSTS strmSts =   PDMAUDIOSTRMSTS_FLAG_INITIALIZED
+                              | PDMAUDIOSTRMSTS_FLAG_ENABLED;
+
+    strmSts |=   pStream->enmDir == PDMAUDIODIR_IN
+               ? PDMAUDIOSTRMSTS_FLAG_DATA_READABLE
+               : PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE;
+
+    return strmSts;
+}
 /**
  * @interface_method_impl{PDMIBASE,pfnQueryInterface}
Index: /trunk/src/VBox/Devices/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Devices/Makefile.kmk	(revision 61331)
+++ /trunk/src/VBox/Devices/Makefile.kmk	(revision 61332)
@@ -589,5 +589,5 @@
   ifdef VBOX_WITH_OSS
    VBoxDD_DEFS    += VBOX_WITH_OSS
-   VBoxDD_SOURCES  += \
+   VBoxDD_SOURCES += \
     	Audio/DrvHostOSSAudio.cpp
   endif
Index: /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 61331)
+++ /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 61332)
@@ -123,7 +123,7 @@
 	$(if $(VBOX_WITH_ADDITIONS_AUTOUPDATE_UI),VBOX_WITH_ADDITIONS_AUTOUPDATE_UI) \
 	$(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \
+	$(if $(VBOX_WITH_OSS),VBOX_WITH_OSS) \
 	$(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \
 	$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
-	$(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \
 	$(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
 	$(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT) \
Index: /trunk/src/VBox/Main/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/Makefile.kmk	(revision 61331)
+++ /trunk/src/VBox/Main/Makefile.kmk	(revision 61332)
@@ -5,5 +5,5 @@
 
 #
-# Copyright (C) 2004-2015 Oracle Corporation
+# Copyright (C) 2004-2016 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -271,8 +271,9 @@
 	$(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
 	$(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
+	$(if $(VBOX_WITH_OSS),VBOX_WITH_OSS,) \
 	$(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
 	$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
+	$(if $(VBOX_WITH_VRDE_AUDIO),VBOX_WITH_VRDE_AUDIO,) \
 	$(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
-	$(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
 	$(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
 	$(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
@@ -640,8 +641,8 @@
 	VBOX_COM_INPROC \
 	$(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
+	$(if $(VBOX_WITH_OSS),VBOX_WITH_OSS,) \
 	$(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \
 	$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \
 	$(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \
-	$(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \
 	$(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \
 	$(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
