VirtualBox

Changeset 65062 in vbox for trunk


Ignore:
Timestamp:
Jan 3, 2017 10:58:26 AM (8 years ago)
Author:
vboxsync
Message:

Build fix.

File:
1 edited

Legend:

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

    r65059 r65062  
    981981/** @} */
    982982
    983 /* Locking + logging. */
    984 #ifdef IN_RING3
    985 DECLINLINE(int)  hdaRegWriteSDLock(PHDASTATE pThis, PHDASTREAM pStream, uint32_t iReg, uint32_t u32Value);
    986 DECLINLINE(void) hdaRegWriteSDUnlock(PHDASTREAM pStream);
    987 #endif
    988 
    989983/** @name Generic register read/write functions.
    990984 * @{
     
    12601254
    12611255
     1256#ifdef IN_RING3
    12621257/**
    12631258 * Retrieves the number of bytes of a FIFOW register.
     
    12811276
    12821277
    1283 #ifdef IN_RING3
    12841278DECLINLINE(uint32_t) hdaStreamUpdateLPIB(PHDASTATE pThis, PHDASTREAM pStream, uint32_t u32LPIB)
    12851279{
     
    24342428    hdaProcessInterrupt(pThis);
    24352429
    2436     hdaRegWriteSDUnlock(pStream);
     2430    rc2 = RTCritSectLeave(&pStream->State.CritSect);
     2431    AssertRC(rc2);
     2432
    24372433    return VINF_SUCCESS; /* Always return success to the MMIO handler. */
    24382434#else  /* !IN_RING3 */
     
    29912987    return hdaRegWriteSDBDPX(pThis, iReg, u32Value, HDA_SD_NUM_FROM_REG(pThis, BDPU, iReg));
    29922988}
    2993 
    2994 #ifdef IN_RING3
    2995 /**
    2996  * XXX
    2997  *
    2998  * @return  VBox status code.  ALL THE CALLERS IGNORES THIS. DUH.
    2999  *
    3000  * @param   pThis               Pointer to HDA state.
    3001  * @param   iReg                Register to write (logging only).
    3002  * @param   u32Value            Value to write (logging only).
    3003  */
    3004 DECLINLINE(int) hdaRegWriteSDLock(PHDASTATE pThis, PHDASTREAM pStream, uint32_t iReg, uint32_t u32Value)
    3005 {
    3006     RT_NOREF(pThis, iReg, u32Value);
    3007     AssertPtr(pThis);   /* don't bother returning errors */
    3008     AssertPtr(pStream);
    3009 
    3010 # ifdef VBOX_STRICT
    3011     /* Check if the SD's RUN bit is set. */
    3012     uint32_t u32SDCTL = HDA_STREAM_REG(pThis, CTL, pStream->u8SD);
    3013     bool fIsRunning   = RT_BOOL(u32SDCTL & HDA_REG_FIELD_FLAG_MASK(SDCTL, RUN));
    3014     if (fIsRunning)
    3015     {
    3016         LogFunc(("[SD%RU8]: Warning: Cannot write to register 0x%x (0x%x) when RUN bit is set (%R[sdctl])\n",
    3017                  pStream->u8SD, iReg, u32Value, u32SDCTL));
    3018 #  ifdef DEBUG_andy
    3019         AssertFailed();
    3020 #  endif
    3021         return VERR_ACCESS_DENIED;
    3022     }
    3023 # endif
    3024 
    3025     return RTCritSectEnter(&pStream->State.CritSect);
    3026 }
    3027 
    3028 DECLINLINE(void) hdaRegWriteSDUnlock(PHDASTREAM pStream)
    3029 {
    3030     AssertPtrReturnVoid(pStream);
    3031 
    3032     int rc2 = RTCritSectLeave(&pStream->State.CritSect);
    3033     AssertRC(rc2);
    3034 }
    3035 #endif /* IN_RING3 */
    30362989
    30372990static int hdaRegReadIRS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
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