Changeset 67833 in vbox
- Timestamp:
- Jul 6, 2017 2:54:00 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116767
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r67806 r67833 673 673 uint16_t u16LVI; 674 674 uint16_t Padding1[2]; 675 /** Pointer to the HDA state this stream is attached to. */ 676 R3PTRTYPE(PHDASTATE) pHDAState; 675 677 /** Pointer to HDA sink this stream is attached to. */ 676 678 R3PTRTYPE(PHDAMIXERSINK) pMixSink; … … 1005 1007 */ 1006 1008 #ifdef IN_RING3 1007 static void hdaStreamDestroy(PHDAST ATE pThis, PHDASTREAM pStream);1008 static int hdaStreamEnable(PHDAST ATE pThis, PHDASTREAM pStream, bool fEnable);1009 static void hdaStreamDestroy(PHDASTREAM pStream); 1010 static int hdaStreamEnable(PHDASTREAM pStream, bool fEnable); 1009 1011 static uint32_t hdaStreamGetUsed(PHDASTREAM pStream); 1010 1012 static uint32_t hdaStreamGetFree(PHDASTREAM pStream); 1011 static int hdaStreamTransfer(PHDAST ATE pThis, PHDASTREAM pStream, uint32_t cbToProcessMax);1012 DECLINLINE(uint32_t) hdaStreamUpdateLPIB(PHDAST ATE pThis, PHDASTREAM pStream, uint32_t u32LPIB);1013 static int hdaStreamTransfer(PHDASTREAM pStream, uint32_t cbToProcessMax); 1014 DECLINLINE(uint32_t) hdaStreamUpdateLPIB(PHDASTREAM pStream, uint32_t u32LPIB); 1013 1015 static void hdaStreamLock(PHDASTREAM pStream); 1014 1016 static void hdaStreamUnlock(PHDASTREAM pStream); 1015 static int hdaStreamRead(PHDAST ATE pThis, PHDASTREAM pStream, uint32_t cbToRead, uint32_t *pcbRead);1016 static int hdaStreamWrite(PHDAST ATE pThis, PHDASTREAM pStream, uint32_t cbToWrite, uint32_t *pcbWritten);1017 static void hdaStreamUpdate(PHDAST ATE pThis, PHDASTREAM pStream, bool fAsync);1017 static int hdaStreamRead(PHDASTREAM pStream, uint32_t cbToRead, uint32_t *pcbRead); 1018 static int hdaStreamWrite(PHDASTREAM pStream, uint32_t cbToWrite, uint32_t *pcbWritten); 1019 static void hdaStreamUpdate(PHDASTREAM pStream, bool fAsync); 1018 1020 # ifdef HDA_USE_DMA_ACCESS_HANDLER 1019 static bool hdaStreamRegisterDMAHandlers(PHDAST ATE pThis, PHDASTREAM pStream);1020 static void hdaStreamUnregisterDMAHandlers(PHDAST ATE pThis, PHDASTREAM pStream);1021 static bool hdaStreamRegisterDMAHandlers(PHDASTREAM pStream); 1022 static void hdaStreamUnregisterDMAHandlers(PHDASTREAM pStream); 1021 1023 # endif 1022 1024 #endif /* IN_RING3 */ … … 1029 1031 # ifdef VBOX_WITH_AUDIO_HDA_ASYNC_IO 1030 1032 static DECLCALLBACK(int) hdaStreamAsyncIOThread(RTTHREAD hThreadSelf, void *pvUser); 1031 static int hdaStreamAsyncIOCreate(PHDAST ATE pThis, PHDASTREAM pStream);1032 static int hdaStreamAsyncIODestroy(PHDAST ATE pThis, PHDASTREAM pStream);1033 static int hdaStreamAsyncIONotify(PHDAST ATE pThis, PHDASTREAM pStream);1033 static int hdaStreamAsyncIOCreate(PHDASTREAM pStream); 1034 static int hdaStreamAsyncIODestroy(PHDASTREAM pStream); 1035 static int hdaStreamAsyncIONotify(PHDASTREAM pStream); 1034 1036 static void hdaStreamAsyncIOLock(PHDASTREAM pStream); 1035 1037 static void hdaStreamAsyncIOUnlock(PHDASTREAM pStream); … … 1324 1326 * 1325 1327 * @returns Set LPIB value. 1326 * @param pThis HDA state.1327 1328 * @param pStream HDA stream to update read / write position for. 1328 1329 * @param u32LPIB New LPIB (position) value to set. 1329 1330 */ 1330 DECLINLINE(uint32_t) hdaStreamUpdateLPIB(PHDASTATE pThis, PHDASTREAM pStream, uint32_t u32LPIB) 1331 { 1332 AssertPtrReturn(pThis, 0); 1331 DECLINLINE(uint32_t) hdaStreamUpdateLPIB(PHDASTREAM pStream, uint32_t u32LPIB) 1332 { 1333 1333 AssertPtrReturn(pStream, 0); 1334 1334 1335 1335 AssertMsg(u32LPIB <= pStream->u32CBL, 1336 1336 ("[SD%RU8] New LPIB (%RU32) exceeds CBL (%RU32)\n", pStream->u8SD, u32LPIB, pStream->u32CBL)); 1337 1338 const PHDASTATE pThis = pStream->pHDAState; 1337 1339 1338 1340 u32LPIB = RT_MIN(u32LPIB, pStream->u32CBL); … … 1847 1849 } 1848 1850 1849 static int hdaStreamCreate(PHDAST ATE pThis, PHDASTREAM pStream)1851 static int hdaStreamCreate(PHDASTREAM pStream, PHDASTATE pThis) 1850 1852 { 1851 1853 RT_NOREF(pThis); … … 1854 1856 pStream->u8SD = UINT8_MAX; 1855 1857 pStream->pMixSink = NULL; 1858 pStream->pHDAState = pThis; 1856 1859 1857 1860 pStream->State.fInReset = false; … … 1876 1879 } 1877 1880 1878 static void hdaStreamDestroy(PHDAST ATE pThis, PHDASTREAM pStream)1881 static void hdaStreamDestroy(PHDASTREAM pStream) 1879 1882 { 1880 1883 AssertPtrReturnVoid(pStream); … … 1887 1890 1888 1891 #ifdef VBOX_WITH_AUDIO_HDA_ASYNC_IO 1889 rc2 = hdaStreamAsyncIODestroy(p This, pStream);1892 rc2 = hdaStreamAsyncIODestroy(pStream); 1890 1893 AssertRC(rc2); 1891 1894 #else … … 1912 1915 } 1913 1916 1914 static int hdaStreamInit(PHDASTATE pThis, PHDASTREAM pStream, uint8_t uSD) 1915 { 1916 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 1917 static int hdaStreamInit(PHDASTREAM pStream, uint8_t uSD) 1918 { 1917 1919 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 1920 1921 PHDASTATE pThis = pStream->pHDAState; 1922 AssertPtr(pThis); 1918 1923 1919 1924 pStream->u8SD = uSD; … … 1925 1930 1926 1931 /* Make sure to also update the stream's DMA counter (based on its current LPIB value). */ 1927 hdaStreamUpdateLPIB(p This, pStream, HDA_STREAM_REG(pThis, LPIB, pStream->u8SD));1932 hdaStreamUpdateLPIB(pStream, HDA_STREAM_REG(pThis, LPIB, pStream->u8SD)); 1928 1933 1929 1934 PPDMAUDIOSTREAMCFG pCfg = &pStream->State.strmCfg; … … 2037 2042 2038 2043 /* (Re-)initialize the stream with current values. */ 2039 int rc2 = hdaStreamInit(p This, pStream, uSD);2044 int rc2 = hdaStreamInit(pStream, uSD); 2040 2045 AssertRC(rc2); 2041 2046 … … 2067 2072 * 2068 2073 * @returns IPRT status code. 2069 * @param pThis HDA state.2070 2074 * @param pStream HDA stream to enable or disable. 2071 2075 * @param fEnable Whether to enable or disble the stream. 2072 2076 */ 2073 static int hdaStreamEnable(PHDASTATE pThis, PHDASTREAM pStream, bool fEnable) 2074 { 2075 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 2077 static int hdaStreamEnable(PHDASTREAM pStream, bool fEnable) 2078 { 2076 2079 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 2077 2080 … … 2550 2553 #endif 2551 2554 /* (Re-)initialize the stream with current values. */ 2552 int rc2 = hdaStreamInit(p This, pStream, pStream->u8SD);2555 int rc2 = hdaStreamInit(pStream, pStream->u8SD); 2553 2556 AssertRC(rc2); 2554 2557 2555 2558 /* Enable/disable the stream. */ 2556 hdaStreamEnable(p This, pStream, fRun /* fEnable */);2559 hdaStreamEnable(pStream, fRun /* fEnable */); 2557 2560 2558 2561 if (fRun) … … 3147 3150 AssertRC(rc); 3148 3151 3149 rc = hdaStreamInit(p This, pStream, pStream->u8SD);3152 rc = hdaStreamInit(pStream, pStream->u8SD); 3150 3153 if (RT_SUCCESS(rc)) 3151 3154 { … … 3154 3157 # ifdef VBOX_WITH_AUDIO_HDA_ASYNC_IO 3155 3158 if (RT_SUCCESS(rc)) 3156 rc = hdaStreamAsyncIOCreate(p This, pStream);3159 rc = hdaStreamAsyncIOCreate(pStream); 3157 3160 # endif 3158 3161 } … … 3348 3351 * 3349 3352 * @returns true if registration was successful, false if not. 3350 * @param pThis HDA state.3351 3353 * @param pStream HDA stream to register BDLE access handlers for. 3352 3354 */ 3353 static bool hdaStreamRegisterDMAHandlers(PHDAST ATE pThis, PHDASTREAM pStream)3355 static bool hdaStreamRegisterDMAHandlers(PHDASTREAM pStream) 3354 3356 { 3355 3357 /* At least LVI and the BDL base must be set. */ … … 3360 3362 } 3361 3363 3362 hdaStreamUnregisterDMAHandlers(p This, pStream);3364 hdaStreamUnregisterDMAHandlers(pStream); 3363 3365 3364 3366 LogFunc(("Registering ...\n")); … … 3444 3446 RTStrPrintf(szDesc, sizeof(szDesc), "HDA[SD%RU8 - RANGE%02zu]", pStream->u8SD, i); 3445 3447 3446 int rc2 = PGMR3HandlerPhysicalTypeRegister(PDMDevHlpGetVM(p This->pDevInsR3), PGMPHYSHANDLERKIND_WRITE,3448 int rc2 = PGMR3HandlerPhysicalTypeRegister(PDMDevHlpGetVM(pStream->pHDAState->pDevInsR3), PGMPHYSHANDLERKIND_WRITE, 3447 3449 hdaDMAAccessHandler, 3448 3450 NULL, NULL, NULL, … … 3469 3471 pHandler->BDLEAddr, pHandler->BDLEAddr + pHandler->BDLESize, pHandler->BDLESize)); 3470 3472 3471 rc2 = PGMHandlerPhysicalRegister(PDMDevHlpGetVM(p This->pDevInsR3),3473 rc2 = PGMHandlerPhysicalRegister(PDMDevHlpGetVM(pStream->pHDAState->pDevInsR3), 3472 3474 pHandler->GCPhysFirst, pHandler->GCPhysLast, 3473 3475 pHandler->hAccessHandlerType, pHandler, NIL_RTR0PTR, NIL_RTRCPTR, … … 3486 3488 * Unregisters access handlers of a stream's BDLEs. 3487 3489 * 3488 * @param pThis HDA state.3489 3490 * @param pStream HDA stream to unregister BDLE access handlers for. 3490 3491 */ 3491 static void hdaStreamUnregisterDMAHandlers(PHDAST ATE pThis, PHDASTREAM pStream)3492 static void hdaStreamUnregisterDMAHandlers(PHDASTREAM pStream) 3492 3493 { 3493 3494 LogFunc(("\n")); … … 3502 3503 pHandler->GCPhysFirst, pHandler->GCPhysLast, pHandler->GCPhysLast - pHandler->GCPhysFirst)); 3503 3504 3504 int rc2 = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(p This->pDevInsR3),3505 int rc2 = PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pStream->pHDAState->pDevInsR3), 3505 3506 pHandler->GCPhysFirst); 3506 3507 AssertRC(rc2); … … 3628 3629 3629 3630 3630 DECLINLINE(void) hdaStreamTransferInc(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbInc) 3631 { 3632 AssertPtrReturnVoid(pThis); 3631 DECLINLINE(void) hdaStreamTransferInc(PHDASTREAM pStream, uint32_t cbInc) 3632 { 3633 3633 AssertPtrReturnVoid(pStream); 3634 3634 … … 3636 3636 return; 3637 3637 3638 const PHDASTATE pThis = pStream->pHDAState; 3639 3638 3640 const uint32_t u32LPIB = HDA_STREAM_REG(pThis, LPIB, pStream->u8SD); 3639 3641 … … 3641 3643 pStream->u8SD, u32LPIB, cbInc, u32LPIB + cbInc, pStream->u32CBL)); 3642 3644 3643 hdaStreamUpdateLPIB(p This, pStream, u32LPIB + cbInc);3645 hdaStreamUpdateLPIB(pStream, u32LPIB + cbInc); 3644 3646 } 3645 3647 … … 4714 4716 #endif 4715 4717 4716 hdaStreamUpdate(p This, pStreamFront, true /* fInTimer */);4718 hdaStreamUpdate(pStreamFront, true /* fInTimer */); 4717 4719 #ifdef VBOX_WITH_AUDIO_HDA_MIC_IN 4718 hdaStreamUpdate(p This, pStreamMicIn, true /* fInTimer */);4719 #endif 4720 hdaStreamUpdate(p This, pStreamLineIn, true /* fInTimer */);4720 hdaStreamUpdate(pStreamMicIn, true /* fInTimer */); 4721 #endif 4722 hdaStreamUpdate(pStreamLineIn, true /* fInTimer */); 4721 4723 } 4722 4724 … … 4762 4764 * 4763 4765 * @returns IPRT status code. 4764 * @param pThis HDA state.4765 4766 * @param pStream HDA stream to write to. 4766 4767 * @param cbToWrite Number of bytes to write. 4767 4768 * @param pcbWritten Number of bytes written. Optional. 4768 4769 */ 4769 static int hdaStreamWrite(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToWrite, uint32_t *pcbWritten) 4770 { 4771 RT_NOREF(pThis); 4770 static int hdaStreamWrite(PHDASTREAM pStream, uint32_t cbToWrite, uint32_t *pcbWritten) 4771 { 4772 4772 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 4773 4773 AssertReturn(cbToWrite, VERR_INVALID_PARAMETER); … … 4840 4840 * 4841 4841 * @returns IPRT status code. 4842 * @param pThis HDA state.4843 4842 * @param pStream HDA stream to read audio data from. 4844 4843 * @param cbToRead Number of bytes to read. 4845 4844 * @param pcbRead Number of bytes read. Optional. 4846 4845 */ 4847 static int hdaStreamRead(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToRead, uint32_t *pcbRead) 4848 { 4849 RT_NOREF(pThis); 4846 static int hdaStreamRead(PHDASTREAM pStream, uint32_t cbToRead, uint32_t *pcbRead) 4847 { 4850 4848 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 4851 4849 AssertReturn(cbToRead, VERR_INVALID_PARAMETER); … … 4926 4924 AssertPtr(pCtx); 4927 4925 4928 PHDASTATE pThis = pCtx->pThis;4929 AssertPtr(pThis);4930 4931 4926 PHDASTREAM pStream = pCtx->pStream; 4932 4927 AssertPtr(pStream); … … 4958 4953 } 4959 4954 4960 hdaStreamUpdate(p This, pStream, false /* fInTimer */);4955 hdaStreamUpdate(pStream, false /* fInTimer */); 4961 4956 4962 4957 int rc3 = RTCritSectLeave(&pAIO->CritSect); … … 4978 4973 * 4979 4974 * @returns IPRT status code. 4980 * @param pThis HDA state.4981 4975 * @param pStream HDA audio stream to create the async I/O thread for. 4982 4976 */ 4983 static int hdaStreamAsyncIOCreate(PHDAST ATE pThis, PHDASTREAM pStream)4977 static int hdaStreamAsyncIOCreate(PHDASTREAM pStream) 4984 4978 { 4985 4979 PHDASTREAMSTATEAIO pAIO = &pStream->State.AIO; … … 4997 4991 if (RT_SUCCESS(rc)) 4998 4992 { 4999 HDASTREAMTHREADCTX Ctx = { p This, pStream };4993 HDASTREAMTHREADCTX Ctx = { pStream->pHDAState, pStream }; 5000 4994 5001 4995 char szThreadName[64]; … … 5020 5014 * 5021 5015 * @returns IPRT status code. 5022 * @param pThis HDA state.5023 5016 * @param pStream HDA audio stream to destroy the async I/O thread for. 5024 5017 */ 5025 static int hdaStreamAsyncIODestroy(PHDAST ATE pThis, PHDASTREAM pStream)5018 static int hdaStreamAsyncIODestroy(PHDASTREAM pStream) 5026 5019 { 5027 5020 PHDASTREAMSTATEAIO pAIO = &pStream->State.AIO; … … 5032 5025 ASMAtomicWriteBool(&pAIO->fShutdown, true); 5033 5026 5034 int rc = hdaStreamAsyncIONotify(p This, pStream);5027 int rc = hdaStreamAsyncIONotify(pStream); 5035 5028 AssertRC(rc); 5036 5029 … … 5060 5053 * 5061 5054 * @returns IPRT status code. 5062 * @param pThis HDA state.5063 5055 * @param pStream HDA stream to notify async I/O thread for. 5064 5056 */ 5065 static int hdaStreamAsyncIONotify(PHDASTATE pThis, PHDASTREAM pStream) 5066 { 5067 RT_NOREF(pThis); 5057 static int hdaStreamAsyncIONotify(PHDASTREAM pStream) 5058 { 5068 5059 return RTSemEventSignal(pStream->State.AIO.Event); 5069 5060 } … … 5116 5107 #endif /* VBOX_WITH_AUDIO_HDA_ASYNC_IO */ 5117 5108 5118 static uint32_t hdaStreamTransferGetElapsed(PHDASTATE pThis, PHDASTREAM pStream) 5119 { 5120 const uint64_t cTicksNow = TMTimerGet(pThis->pTimer); 5121 const uint64_t cTicksPerSec = TMTimerGetFreq(pThis->pTimer); 5109 static uint32_t hdaStreamTransferGetElapsed(PHDASTREAM pStream) 5110 { 5111 AssertPtr(pStream->pHDAState->pTimer); 5112 const uint64_t cTicksNow = TMTimerGet(pStream->pHDAState->pTimer); 5113 const uint64_t cTicksPerSec = TMTimerGetFreq(pStream->pHDAState->pTimer); 5122 5114 5123 5115 const uint64_t cTicksElapsed = cTicksNow - pStream->State.uTimerTS; … … 5126 5118 #endif 5127 5119 5128 AssertPtr(p This->pCodec);5120 AssertPtr(pStream->pHDAState->pCodec); 5129 5121 5130 5122 PPDMAUDIOSTREAMCFG pCfg = &pStream->State.strmCfg; … … 5149 5141 * 5150 5142 * @returns IPRT status code. 5151 * @param pThis HDA state.5152 5143 * @param pStream HDA stream to update. 5153 5144 * @param cbToProcessMax Maximum of data (in bytes) to process. 5154 5145 */ 5155 static int hdaStreamTransfer(PHDASTATE pThis, PHDASTREAM pStream, uint32_t cbToProcessMax) 5156 { 5157 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 5146 static int hdaStreamTransfer(PHDASTREAM pStream, uint32_t cbToProcessMax) 5147 { 5158 5148 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 5159 5149 AssertReturn(cbToProcessMax, VERR_INVALID_PARAMETER); 5160 5150 5161 5151 hdaStreamLock(pStream); 5152 5153 PHDASTATE pThis = pStream->pHDAState; 5154 AssertPtr(pThis); 5162 5155 5163 5156 PHDASTREAMPERIOD pPeriod = &pStream->State.Period; … … 5206 5199 Assert(cbPeriodRemaining); /* Paranoia. */ 5207 5200 5208 const uint32_t cbElapsed = hdaStreamTransferGetElapsed(p This, pStream);5201 const uint32_t cbElapsed = hdaStreamTransferGetElapsed(pStream); 5209 5202 Assert(cbElapsed); /* Paranoia. */ 5210 5203 … … 5258 5251 Assert(pBDLE->State.u32BufOff <= pBDLE->Desc.u32BufSize); 5259 5252 5260 hdaStreamTransferInc(p This, pStream, cbDMA);5253 hdaStreamTransferInc(pStream, cbDMA); 5261 5254 5262 5255 uint32_t framesDMA = cbDMA / HDA_FRAME_SIZE; … … 5290 5283 5291 5284 pStream->State.uCurBDLE = 0; 5292 hdaStreamUpdateLPIB(p This, pStream, 0 /* LPIB */);5285 hdaStreamUpdateLPIB(pStream, 0 /* LPIB */); 5293 5286 } 5294 5287 else … … 5367 5360 * This routine is called by both, the synchronous and the asynchronous, implementations. 5368 5361 * 5369 * @param pThis HDA state.5370 5362 * @param pStream HDA stream to update. 5371 5363 * @param fInTimer Whether to this function was called from the timer 5372 5364 * context or an asynchronous I/O stream thread (if supported). 5373 5365 */ 5374 static void hdaStreamUpdate(PHDAST ATE pThis, PHDASTREAM pStream, bool fInTimer)5366 static void hdaStreamUpdate(PHDASTREAM pStream, bool fInTimer) 5375 5367 { 5376 5368 PAUDMIXSINK pSink = NULL; … … 5397 5389 5398 5390 /* Do the DMA transfer. */ 5399 rc2 = hdaStreamTransfer(p This, pStream, cbFree);5391 rc2 = hdaStreamTransfer(pStream, cbFree); 5400 5392 AssertRC(rc2); 5401 5393 } … … 5408 5400 && cbUsed) 5409 5401 { 5410 rc2 = hdaStreamAsyncIONotify(p This, pStream);5402 rc2 = hdaStreamAsyncIONotify(pStream); 5411 5403 AssertRC(rc2); 5412 5404 } … … 5424 5416 { 5425 5417 /* Read (guest output) data and write it to the stream's sink. */ 5426 rc2 = hdaStreamRead(p This, pStream, cbUsed, NULL /* pcbRead */);5418 rc2 = hdaStreamRead(pStream, cbUsed, NULL /* pcbRead */); 5427 5419 AssertRC(rc2); 5428 5420 } … … 5442 5434 if (fInTimer) 5443 5435 { 5444 rc2 = hdaStreamAsyncIONotify(p This, pStream);5436 rc2 = hdaStreamAsyncIONotify(pStream); 5445 5437 AssertRC(rc2); 5446 5438 } … … 5467 5459 { 5468 5460 /* Write (guest input) data to the stream which was read from stream's sink before. */ 5469 rc2 = hdaStreamWrite(p This, pStream, cbFree, NULL /* pcbWritten */);5461 rc2 = hdaStreamWrite(pStream, cbFree, NULL /* pcbWritten */); 5470 5462 AssertRC(rc2); 5471 5463 } … … 5483 5475 /* When running synchronously, do the DMA data transfers here. 5484 5476 * Otherwise this will be done in the stream's async I/O thread. */ 5485 rc2 = hdaStreamTransfer(p This, pStream, cbToTransfer);5477 rc2 = hdaStreamTransfer(pStream, cbToTransfer); 5486 5478 AssertRC(rc2); 5487 5479 } … … 6006 5998 #ifdef VBOX_WITH_AUDIO_HDA_ASYNC_IO 6007 5999 /* Make sure to also create the async I/O thread before actually enabling the stream. */ 6008 rc2 = hdaStreamAsyncIOCreate(p This, pStream);6000 rc2 = hdaStreamAsyncIOCreate(pStream); 6009 6001 AssertRC(rc2); 6010 6002 … … 6013 6005 #endif 6014 6006 /* (Re-)initialize the stream with current values. */ 6015 rc2 = hdaStreamInit(p This, pStream, pStream->u8SD);6007 rc2 = hdaStreamInit(pStream, pStream->u8SD); 6016 6008 AssertRC(rc2); 6017 6009 … … 6020 6012 6021 6013 /* (Re-)enable the stream. */ 6022 rc2 = hdaStreamEnable(p This, pStream, true /* fEnable */);6014 rc2 = hdaStreamEnable(pStream, true /* fEnable */); 6023 6015 AssertRC(rc2); 6024 6016 … … 6172 6164 /* Output */ 6173 6165 PHDASTREAM pStream = &pThis->aStreams[4]; 6174 rc = hdaStreamInit(p This, pStream, 4 /* Stream descriptor, hardcoded */);6166 rc = hdaStreamInit(pStream, 4 /* Stream descriptor, hardcoded */); 6175 6167 if (RT_FAILURE(rc)) 6176 6168 break; … … 6180 6172 /* Microphone-In */ 6181 6173 pStream = &pThis->aStreams[2]; 6182 rc = hdaStreamInit(p This, pStream, 2 /* Stream descriptor, hardcoded */);6174 rc = hdaStreamInit(pStream, 2 /* Stream descriptor, hardcoded */); 6183 6175 if (RT_FAILURE(rc)) 6184 6176 break; … … 6188 6180 /* Line-In */ 6189 6181 pStream = &pThis->aStreams[0]; 6190 rc = hdaStreamInit(p This, pStream, 0 /* Stream descriptor, hardcoded */);6182 rc = hdaStreamInit(pStream, 0 /* Stream descriptor, hardcoded */); 6191 6183 if (RT_FAILURE(rc)) 6192 6184 break; … … 6225 6217 } 6226 6218 6227 rc = hdaStreamInit(p This, pStrm, uStreamID);6219 rc = hdaStreamInit(pStrm, uStreamID); 6228 6220 if (RT_FAILURE(rc)) 6229 6221 { … … 6419 6411 } 6420 6412 6421 rc = hdaStreamInit(p This, pStrm, uStreamID);6413 rc = hdaStreamInit(pStrm, uStreamID); 6422 6414 if (RT_FAILURE(rc)) 6423 6415 { … … 6866 6858 6867 6859 for (uint8_t i = 0; i < HDA_MAX_STREAMS; i++) 6868 hdaStreamDestroy( pThis,&pThis->aStreams[i]);6860 hdaStreamDestroy(&pThis->aStreams[i]); 6869 6861 6870 6862 return VINF_SUCCESS; … … 7312 7304 for (uint8_t i = 0; i < HDA_MAX_STREAMS; ++i) 7313 7305 { 7314 rc = hdaStreamCreate( pThis, &pThis->aStreams[i]);7306 rc = hdaStreamCreate(&pThis->aStreams[i], pThis); 7315 7307 AssertRC(rc); 7316 7308 }
Note:
See TracChangeset
for help on using the changeset viewer.