- Timestamp:
- Jan 3, 2017 10:58:26 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r65059 r65062 981 981 /** @} */ 982 982 983 /* Locking + logging. */984 #ifdef IN_RING3985 DECLINLINE(int) hdaRegWriteSDLock(PHDASTATE pThis, PHDASTREAM pStream, uint32_t iReg, uint32_t u32Value);986 DECLINLINE(void) hdaRegWriteSDUnlock(PHDASTREAM pStream);987 #endif988 989 983 /** @name Generic register read/write functions. 990 984 * @{ … … 1260 1254 1261 1255 1256 #ifdef IN_RING3 1262 1257 /** 1263 1258 * Retrieves the number of bytes of a FIFOW register. … … 1281 1276 1282 1277 1283 #ifdef IN_RING31284 1278 DECLINLINE(uint32_t) hdaStreamUpdateLPIB(PHDASTATE pThis, PHDASTREAM pStream, uint32_t u32LPIB) 1285 1279 { … … 2434 2428 hdaProcessInterrupt(pThis); 2435 2429 2436 hdaRegWriteSDUnlock(pStream); 2430 rc2 = RTCritSectLeave(&pStream->State.CritSect); 2431 AssertRC(rc2); 2432 2437 2433 return VINF_SUCCESS; /* Always return success to the MMIO handler. */ 2438 2434 #else /* !IN_RING3 */ … … 2991 2987 return hdaRegWriteSDBDPX(pThis, iReg, u32Value, HDA_SD_NUM_FROM_REG(pThis, BDPU, iReg)); 2992 2988 } 2993 2994 #ifdef IN_RING32995 /**2996 * XXX2997 *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_STRICT3011 /* 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_andy3019 AssertFailed();3020 # endif3021 return VERR_ACCESS_DENIED;3022 }3023 # endif3024 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 */3036 2989 3037 2990 static int hdaRegReadIRS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
Note:
See TracChangeset
for help on using the changeset viewer.