VirtualBox

Changeset 87809 in vbox


Ignore:
Timestamp:
Feb 19, 2021 4:05:53 PM (4 years ago)
Author:
vboxsync
Message:

HDA: Got rid of the stream period's additional locking; not needed, as it's part of the stream's own lock already. ticketoem2ref:36

Location:
trunk/src/VBox/Devices/Audio
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHDA.cpp

    r87800 r87809  
    15591559
    15601560    PHDASTREAMPERIOD pPeriod = &pStreamShared->State.Period;
    1561     hdaR3StreamPeriodLock(pPeriod);
    15621561    if (hdaR3StreamPeriodNeedsInterrupt(pPeriod))
    15631562        hdaR3StreamPeriodReleaseInterrupt(pPeriod);
     
    15751574            hdaR3StreamPeriodBegin(pPeriod, hdaWalClkGetCurrent(pThis) /* Use current wall clock time */);
    15761575    }
    1577     hdaR3StreamPeriodUnlock(pPeriod); /* Unlock before processing interrupt. */
    15781576
    15791577    HDA_PROCESS_INTERRUPT(pDevIns, pThis);
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r87758 r87809  
    10991099
    11001100    PHDASTREAMPERIOD pPeriod = &pStreamShared->State.Period;
    1101     hdaR3StreamPeriodLock(pPeriod);
    11021101
    11031102    bool fProceed = true;
     
    11221121    if (!fProceed)
    11231122    {
    1124         hdaR3StreamPeriodUnlock(pPeriod);
    11251123        hdaR3StreamUnlock(pStreamR3);
    11261124        return VINF_SUCCESS;
     
    15831581    LogFlowFuncLeave();
    15841582
    1585     hdaR3StreamPeriodUnlock(pPeriod);
    15861583    hdaR3StreamUnlock(pStreamR3);
    15871584
  • trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp

    r87758 r87809  
    223223
    224224    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_LOCKING
    236     int rc = RTCritSectEnter(&pPeriod->CritSect);
    237     AssertRC(rc);
    238     return rc;
    239 # else
    240     RT_NOREF(pPeriod);
    241     return VINF_SUCCESS;
    242 # endif
    243 }
    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_LOCKING
    253     int rc2 = RTCritSectLeave(&pPeriod->CritSect);
    254     AssertRC(rc2);
    255 # else
    256     RT_NOREF(pPeriod);
    257 # endif
    258225}
    259226
  • trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h

    r82968 r87809  
    9999void     hdaR3StreamPeriodPause(PHDASTREAMPERIOD pPeriod);
    100100void     hdaR3StreamPeriodResume(PHDASTREAMPERIOD pPeriod);
    101 int      hdaR3StreamPeriodLock(PHDASTREAMPERIOD pPeriod);
    102 void     hdaR3StreamPeriodUnlock(PHDASTREAMPERIOD pPeriod);
    103101uint64_t hdaR3StreamPeriodFramesToWalClk(PHDASTREAMPERIOD pPeriod, uint32_t uFrames);
    104102uint64_t hdaR3StreamPeriodGetAbsEndWalClk(PHDASTREAMPERIOD pPeriod);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette