Changeset 61332 in vbox
- Timestamp:
- May 31, 2016 1:23:20 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 107627
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r61320 r61332 3592 3592 else ifeq ($(VBOX_SOLARIS_VERSION),511) 3593 3593 # OSS audio support for Solaris 3594 VBOX_WITH_ SOLARIS_OSS := $(if-expr $(VBOX_SOLARIS_11_VERSION) >= 115,1,)3594 VBOX_WITH_OSS := $(if-expr $(VBOX_SOLARIS_11_VERSION) >= 115,1,) 3595 3595 endif 3596 3596 -
trunk/include/VBox/err.h
r61317 r61332 2748 2748 #define VERR_AUDIO_NO_FREE_INPUT_STREAMS (-6601) 2749 2749 /** No free output streams. */ 2750 #define VERR_AUDIO_NO_FREE_OUTPUT_STREAMS (-660 3)2750 #define VERR_AUDIO_NO_FREE_OUTPUT_STREAMS (-6602) 2751 2751 /** Pending stream disable operation in progress. */ 2752 #define VERR_AUDIO_STREAM_PENDING_DISABLE (-660 4)2752 #define VERR_AUDIO_STREAM_PENDING_DISABLE (-6603) 2753 2753 /** @} */ 2754 2754 -
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r61322 r61332 318 318 PVM pVM = PDMDevHlpGetVM(pThis->pDevInsR3); 319 319 PCFGMNODE pRoot = CFGMR3GetRoot(pVM); 320 PCFGMNODE pDev0 = CFGMR3GetChild(pRoot, "Devices/ SB16/0/");320 PCFGMNODE pDev0 = CFGMR3GetChild(pRoot, "Devices/sb16/0/"); 321 321 322 322 /* Remove LUN branch. */ … … 452 452 RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node) 453 453 { 454 if (!pDrv->Out.pStream) 455 continue; 456 454 457 int rc2 = pDrv->pConnector->pfnStreamControl(pDrv->pConnector, pDrv->Out.pStream, 455 458 hold == 1 ? PDMAUDIOSTREAMCMD_ENABLE : PDMAUDIOSTREAMCMD_DISABLE); … … 1775 1778 { 1776 1779 PPDMAUDIOSTREAM pStream = pDrv->Out.pStream; 1780 if (!pStream) 1781 continue; 1777 1782 1778 1783 PDMAUDIOSTRMSTS strmSts = pDrv->pConnector->pfnStreamGetStatus(pDrv->pConnector, pStream); … … 2327 2332 2328 2333 /** @todo No input streams available for SB16 yet. */ 2329 /* Note: Only query the whole backend status here, as we don't have multiple streams to check for. */ 2330 bool fValidOut = pCon->pfnGetStatus(pCon, PDMAUDIODIR_OUT) == PDMAUDIOBACKENDSTS_RUNNING; 2334 bool fValidOut = pCon->pfnStreamGetStatus(pCon, pDrv->Out.pStream) & PDMAUDIOSTRMSTS_FLAG_INITIALIZED; 2331 2335 if (!fValidOut) 2332 2336 { -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r61320 r61332 254 254 { 255 255 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 256 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 256 257 if (!pStream) 258 return VINF_SUCCESS; 257 259 258 260 PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface); … … 337 339 return VINF_SUCCESS; 338 340 341 AssertPtr(pThis->pHostDrvAudio); 339 342 AssertMsg(pHstStream->enmCtx == PDMAUDIOSTREAMCTX_HOST, 340 343 ("Stream '%s' is not a host stream and therefore has no backend\n", pHstStream->szName)); … … 450 453 { 451 454 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 452 AssertPtrReturn(pStream, VERR_INVALID_POINTER);453 455 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 454 456 /* pcbWritten is optional. */ … … 456 458 PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface); 457 459 458 if (!cbBuf) 460 if ( !pStream 461 || !cbBuf) 459 462 { 460 463 if (pcbWritten) … … 676 679 { 677 680 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 678 AssertPtrReturn(pStream, VERR_INVALID_POINTER);679 681 /* pcData is optional. */ 682 683 if (!pStream) 684 return VINF_SUCCESS; 680 685 681 686 PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface); … … 1332 1337 { 1333 1338 AssertPtrReturn(pCfgHandle, VERR_INVALID_POINTER); 1334 AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);1339 AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER); 1335 1340 1336 1341 PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO); … … 1365 1370 1366 1371 if (!pStream) 1367 return VERR_NOT_AVAILABLE; 1372 { 1373 if (pcbRead) 1374 *pcbRead = 0; 1375 return VINF_SUCCESS; 1376 } 1368 1377 1369 1378 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); … … 1619 1628 { 1620 1629 LogFlowFunc(("Maximum number of host output streams reached\n")); 1621 RC_BREAK(VERR_ NO_MORE_HANDLES); /** @todo Fudge! */1630 RC_BREAK(VERR_AUDIO_NO_FREE_OUTPUT_STREAMS); 1622 1631 } 1623 1632 … … 1873 1882 return VINF_SUCCESS; 1874 1883 1875 int rc = VINF_SUCCESS; 1876 1877 LogFlowFunc(("%s: fStatus=0x%x\n", pHstStream->szName, pHstStream->fStatus)); 1878 1884 AssertPtr(pThis->pHostDrvAudio); 1879 1885 AssertMsg(pHstStream->enmCtx == PDMAUDIOSTREAMCTX_HOST, 1880 1886 ("Stream '%s' is not a host stream and therefore has no backend\n", pHstStream->szName)); 1887 1888 int rc = VINF_SUCCESS; 1889 1890 LogFlowFunc(("%s: fStatus=0x%x\n", pHstStream->szName, pHstStream->fStatus)); 1881 1891 1882 1892 if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_INITIALIZED) … … 1920 1930 1921 1931 int rc = drvAudioStreamControlInternal(pThis, pGstStream, PDMAUDIOSTREAMCMD_DISABLE); 1922 if (RT_SUCCESS(rc)) 1932 if ( RT_SUCCESS(rc) 1933 && pThis->pHostDrvAudio) 1934 { 1923 1935 rc = drvAudioStreamControlInternalBackend(pThis, pHstStream, PDMAUDIOSTREAMCMD_DISABLE); 1936 } 1924 1937 1925 1938 if (RT_SUCCESS(rc)) -
trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
r61320 r61332 1432 1432 NOREF(pStream); 1433 1433 1434 return (PDMAUDIOSTRMSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED); 1434 PDMAUDIOSTRMSTS strmSts = PDMAUDIOSTRMSTS_FLAG_INITIALIZED 1435 | PDMAUDIOSTRMSTS_FLAG_ENABLED; 1436 1437 if (pStream->enmDir == PDMAUDIODIR_IN) 1438 { 1439 1440 } 1441 else 1442 { 1443 PALSAAUDIOSTREAMOUT pStreamOut = (PALSAAUDIOSTREAMOUT)pStream; 1444 1445 snd_pcm_sframes_t cAvail; 1446 int rc2 = alsaStreamGetAvail(pStreamOut->phPCM, &cAvail); 1447 if ( RT_SUCCESS(rc2) 1448 && cAvail >= 1024) /** @todo !!! HACK ALERT !!! Use bufsize. */ 1449 { 1450 LogFlowFunc(("cAvail=%ld\n", cAvail)); 1451 strmSts |= PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE; 1452 } 1453 } 1454 1455 return strmSts; 1435 1456 } 1436 1457 -
trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
r61320 r61332 1061 1061 NOREF(pStream); 1062 1062 1063 return (PDMAUDIOSTRMSTS_FLAG_INITIALIZED | PDMAUDIOSTRMSTS_FLAG_ENABLED); 1064 } 1065 1063 PDMAUDIOSTRMSTS strmSts = PDMAUDIOSTRMSTS_FLAG_INITIALIZED 1064 | PDMAUDIOSTRMSTS_FLAG_ENABLED; 1065 1066 strmSts |= pStream->enmDir == PDMAUDIODIR_IN 1067 ? PDMAUDIOSTRMSTS_FLAG_DATA_READABLE 1068 : PDMAUDIOSTRMSTS_FLAG_DATA_WRITABLE; 1069 1070 return strmSts; 1071 } 1066 1072 /** 1067 1073 * @interface_method_impl{PDMIBASE,pfnQueryInterface} -
trunk/src/VBox/Devices/Makefile.kmk
r61320 r61332 589 589 ifdef VBOX_WITH_OSS 590 590 VBoxDD_DEFS += VBOX_WITH_OSS 591 VBoxDD_SOURCES 591 VBoxDD_SOURCES += \ 592 592 Audio/DrvHostOSSAudio.cpp 593 593 endif -
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r61056 r61332 123 123 $(if $(VBOX_WITH_ADDITIONS_AUTOUPDATE_UI),VBOX_WITH_ADDITIONS_AUTOUPDATE_UI) \ 124 124 $(if $(VBOX_WITH_UPDATE_REQUEST),VBOX_WITH_UPDATE_REQUEST) \ 125 $(if $(VBOX_WITH_OSS),VBOX_WITH_OSS) \ 125 126 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA) \ 126 127 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \ 127 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS) \128 128 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \ 129 129 $(if $(VBOX_WITH_NETFLT)$(eq $(KBUILD_TARGET),freebsd),VBOX_WITH_NETFLT) \ -
trunk/src/VBox/Main/Makefile.kmk
r61157 r61332 5 5 6 6 # 7 # Copyright (C) 2004-201 5Oracle Corporation7 # Copyright (C) 2004-2016 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 271 271 $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \ 272 272 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \ 273 $(if $(VBOX_WITH_OSS),VBOX_WITH_OSS,) \ 273 274 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \ 274 275 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \ 276 $(if $(VBOX_WITH_VRDE_AUDIO),VBOX_WITH_VRDE_AUDIO,) \ 275 277 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \ 276 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \277 278 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \ 278 279 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \ … … 640 641 VBOX_COM_INPROC \ 641 642 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \ 643 $(if $(VBOX_WITH_OSS),VBOX_WITH_OSS,) \ 642 644 $(if $(VBOX_WITH_ALSA),VBOX_WITH_ALSA,) \ 643 645 $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE,) \ 644 646 $(if $(VBOX_WITH_WINMM),VBOX_WITH_WINMM,) \ 645 $(if $(VBOX_WITH_SOLARIS_OSS),VBOX_WITH_SOLARIS_OSS,) \646 647 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \ 647 648 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO,) \
Note:
See TracChangeset
for help on using the changeset viewer.