Changeset 87809 in vbox
- Timestamp:
- Feb 19, 2021 4:05:53 PM (4 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r87800 r87809 1559 1559 1560 1560 PHDASTREAMPERIOD pPeriod = &pStreamShared->State.Period; 1561 hdaR3StreamPeriodLock(pPeriod);1562 1561 if (hdaR3StreamPeriodNeedsInterrupt(pPeriod)) 1563 1562 hdaR3StreamPeriodReleaseInterrupt(pPeriod); … … 1575 1574 hdaR3StreamPeriodBegin(pPeriod, hdaWalClkGetCurrent(pThis) /* Use current wall clock time */); 1576 1575 } 1577 hdaR3StreamPeriodUnlock(pPeriod); /* Unlock before processing interrupt. */1578 1576 1579 1577 HDA_PROCESS_INTERRUPT(pDevIns, pThis); -
trunk/src/VBox/Devices/Audio/HDAStream.cpp
r87758 r87809 1099 1099 1100 1100 PHDASTREAMPERIOD pPeriod = &pStreamShared->State.Period; 1101 hdaR3StreamPeriodLock(pPeriod);1102 1101 1103 1102 bool fProceed = true; … … 1122 1121 if (!fProceed) 1123 1122 { 1124 hdaR3StreamPeriodUnlock(pPeriod);1125 1123 hdaR3StreamUnlock(pStreamR3); 1126 1124 return VINF_SUCCESS; … … 1583 1581 LogFlowFuncLeave(); 1584 1582 1585 hdaR3StreamPeriodUnlock(pPeriod);1586 1583 hdaR3StreamUnlock(pStreamR3); 1587 1584 -
trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp
r87758 r87809 223 223 224 224 Log3Func(("[SD%RU8]\n", pPeriod->u8SD)); 225 }226 227 /**228 * Locks a stream period for serializing access.229 *230 * @returns IPRT status code (safe to ignore, asserted).231 * @param pPeriod Stream period to lock.232 */233 int hdaR3StreamPeriodLock(PHDASTREAMPERIOD pPeriod)234 {235 # ifdef HDA_STREAM_PERIOD_WITH_LOCKING236 int rc = RTCritSectEnter(&pPeriod->CritSect);237 AssertRC(rc);238 return rc;239 # else240 RT_NOREF(pPeriod);241 return VINF_SUCCESS;242 # endif243 }244 245 /**246 * Unlocks a formerly locked stream period.247 *248 * @param pPeriod Stream period to unlock.249 */250 void hdaR3StreamPeriodUnlock(PHDASTREAMPERIOD pPeriod)251 {252 # ifdef HDA_STREAM_PERIOD_WITH_LOCKING253 int rc2 = RTCritSectLeave(&pPeriod->CritSect);254 AssertRC(rc2);255 # else256 RT_NOREF(pPeriod);257 # endif258 225 } 259 226 -
trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h
r82968 r87809 99 99 void hdaR3StreamPeriodPause(PHDASTREAMPERIOD pPeriod); 100 100 void hdaR3StreamPeriodResume(PHDASTREAMPERIOD pPeriod); 101 int hdaR3StreamPeriodLock(PHDASTREAMPERIOD pPeriod);102 void hdaR3StreamPeriodUnlock(PHDASTREAMPERIOD pPeriod);103 101 uint64_t hdaR3StreamPeriodFramesToWalClk(PHDASTREAMPERIOD pPeriod, uint32_t uFrames); 104 102 uint64_t hdaR3StreamPeriodGetAbsEndWalClk(PHDASTREAMPERIOD pPeriod);
Note:
See TracChangeset
for help on using the changeset viewer.