Changeset 82403 in vbox for trunk/src/VBox
- Timestamp:
- Dec 5, 2019 12:08:56 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r82402 r82403 1239 1239 const bool fReset = RT_BOOL(u32Value & HDA_SDCTL_SRST); 1240 1240 1241 /** 1242 * @todo r=bird: Must reduce the time we holding the virtual sync 1243 * clock lock here! 1244 */ 1245 DEVHDA_UNLOCK(pDevIns, pThis); 1246 DEVHDA_LOCK_BOTH_RETURN(pDevIns, pThis, pStream, VINF_IOM_R3_MMIO_WRITE); 1241 /* If the run bit is set, we take the virtual-sync clock lock as well so we 1242 can safely update timers via hdaR3TimerSet if necessary. We need to be 1243 very careful with the fInReset and fInRun indicators here, as they may 1244 change during the relocking if we need to acquire the clock lock. */ 1245 const bool fNeedVirtualSyncClockLock = (u32Value & (HDA_SDCTL_RUN | HDA_SDCTL_SRST)) == HDA_SDCTL_RUN 1246 && (HDA_REG_IND(pThis, iReg) & HDA_SDCTL_RUN) == 0; 1247 if (fNeedVirtualSyncClockLock) 1248 { 1249 DEVHDA_UNLOCK(pDevIns, pThis); 1250 DEVHDA_LOCK_BOTH_RETURN(pDevIns, pThis, pStream, VINF_IOM_R3_MMIO_WRITE); 1251 } 1247 1252 1248 1253 const bool fInRun = RT_BOOL(HDA_REG_IND(pThis, iReg) & HDA_SDCTL_RUN); … … 1396 1401 } 1397 1402 1398 VBOXSTRICTRC rc = hdaRegWriteU24(pDevIns, pThis, iReg, u32Value);1399 1400 PDMDevHlpTimerUnlockClock(pDevIns, pStream->hTimer); /* Caller will unlock pThis->CritSect. */ /** @todo r=bird: Move this up. */ 1401 return rc;1403 if (fNeedVirtualSyncClockLock) 1404 PDMDevHlpTimerUnlockClock(pDevIns, pStream->hTimer); /* Caller will unlock pThis->CritSect. */ 1405 1406 return hdaRegWriteU24(pDevIns, pThis, iReg, u32Value); 1402 1407 #else /* !IN_RING3 */ 1403 1408 RT_NOREF(pDevIns, pThis, iReg, u32Value);
Note:
See TracChangeset
for help on using the changeset viewer.