Changeset 71735 in vbox
- Timestamp:
- Apr 7, 2018 2:55:31 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 121837
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r71727 r71735 591 591 LogFunc(("fInterrupt=%RTbool\n", fInterrupt)); 592 592 593 # ifndef DEBUG593 # ifndef LOG_ENABLED 594 594 hdaProcessInterrupt(pThis); 595 595 # else … … 875 875 HDA_REG(pThis, RIRBSTS) |= HDA_RIRBSTS_RINTFL; 876 876 877 # ifndef DEBUG877 # ifndef LOG_ENABLED 878 878 rc = hdaProcessInterrupt(pThis); 879 879 # else … … 1515 1515 } 1516 1516 1517 # ifndef DEBUG1517 # ifndef LOG_ENABLED 1518 1518 hdaProcessInterrupt(pThis); 1519 1519 # else … … 2287 2287 HDA_REG(pThis, RIRBSTS) &= ~(v & u32Value); 2288 2288 2289 #ifndef DEBUG2289 #ifndef LOG_ENABLED 2290 2290 int rc = hdaProcessInterrupt(pThis); 2291 2291 #else -
trunk/src/VBox/Devices/Audio/DevHDACommon.cpp
r71734 r71735 34 34 35 35 36 #ifndef DEBUG36 #ifndef LOG_ENABLED 37 37 /** 38 38 * Processes (de/asserts) the interrupt according to the HDA's current state. … … 205 205 return &pThis->SinkLineIn; 206 206 # ifdef VBOX_WITH_AUDIO_HDA_MIC_IN 207 elseif (uSD == uFirstSDI + 1)207 if (uSD == uFirstSDI + 1) 208 208 return &pThis->SinkMicIn; 209 209 # else 210 else/* If we don't have a dedicated Mic-In sink, use the always present Line-In sink. */211 210 /* If we don't have a dedicated Mic-In sink, use the always present Line-In sink. */ 211 return &pThis->SinkLineIn; 212 212 # endif 213 213 } … … 219 219 return &pThis->SinkFront; 220 220 # ifdef VBOX_WITH_AUDIO_HDA_51_SURROUND 221 elseif (uSD == uFirstSDO + 1)221 if (uSD == uFirstSDO + 1) 222 222 return &pThis->SinkCenterLFE; 223 elseif (uSD == uFirstSDO + 2)223 if (uSD == uFirstSDO + 2) 224 224 return &pThis->SinkRear; 225 225 # endif … … 311 311 uint32_t cbLeft = RT_MIN(cbBuf, pBDLE->Desc.u32BufSize - pBDLE->State.u32BufOff); 312 312 313 # ifdef HDA_DEBUG_SILENCE313 # ifdef HDA_DEBUG_SILENCE 314 314 uint64_t csSilence = 0; 315 315 316 316 pStream->Dbg.cSilenceThreshold = 100; 317 317 pStream->Dbg.cbSilenceReadMin = _1M; 318 # endif318 # endif 319 319 320 320 RTGCPHYS addrChunk = pBDLE->Desc.u64BufAdr + pBDLE->State.u32BufOff; … … 328 328 break; 329 329 330 # ifdef HDA_DEBUG_SILENCE330 # ifdef HDA_DEBUG_SILENCE 331 331 uint16_t *pu16Buf = (uint16_t *)pvBuf; 332 332 for (size_t i = 0; i < cbChunk / sizeof(uint16_t); i++) 333 333 { 334 334 if (*pu16Buf == 0) 335 {336 335 csSilence++; 337 }338 336 else 339 337 break; 340 338 pu16Buf++; 341 339 } 342 # endif340 # endif 343 341 if (pStream->Dbg.Runtime.fEnabled) 344 342 DrvAudioHlpFileWrite(pStream->Dbg.Runtime.pFileDMA, (uint8_t *)pvBuf + cbReadTotal, cbChunk, 0 /* fFlags */); 345 343 346 #ifdef VBOX_WITH_STATISTICS347 344 STAM_COUNTER_ADD(&pThis->StatBytesRead, cbChunk); 348 #endif349 345 addrChunk = (addrChunk + cbChunk) % pBDLE->Desc.u32BufSize; 350 346 … … 355 351 } 356 352 357 #ifdef HDA_DEBUG_SILENCE 358 353 # ifdef HDA_DEBUG_SILENCE 359 354 if (csSilence) 360 355 pStream->Dbg.csSilence += csSilence; … … 367 362 pStream->Dbg.csSilence = 0; 368 363 } 369 # endif364 # endif 370 365 371 366 if (RT_SUCCESS(rc)) … … 418 413 break; 419 414 420 #ifdef VBOX_WITH_STATISTICS421 415 STAM_COUNTER_ADD(&pThis->StatBytesWritten, cbChunk); 422 #endif423 416 addrChunk = (addrChunk + cbChunk) % pBDLE->Desc.u32BufSize; 424 417 … … 495 488 AssertPtrReturn(pProps, VERR_INVALID_POINTER); 496 489 497 # 490 #define EXTRACT_VALUE(v, mask, shift) ((v & ((mask) << (shift))) >> (shift)) 498 491 499 492 int rc = VINF_SUCCESS; … … 563 556 } 564 557 565 # 558 #undef EXTRACT_VALUE 566 559 return rc; 567 560 } -
trunk/src/VBox/Devices/Audio/DevHDACommon.h
r70964 r71735 20 20 21 21 #include "AudioMixer.h" 22 #include <VBox/log.h> /* LOG_ENABLED */ 22 23 23 24 /** See 302349 p 6.2. */ … … 515 516 #define HDA_BDLE_FLAG_IOC RT_BIT(0) 516 517 518 517 519 /********************************************************************************************************************************* 518 520 * Prototypes * … … 587 589 * @{ 588 590 */ 589 #ifdef DEBUG591 #ifdef LOG_ENABLED 590 592 int hdaProcessInterrupt(PHDASTATE pThis, const char *pszSource); 591 593 #else -
trunk/src/VBox/Devices/Audio/HDAStream.cpp
r71704 r71735 1191 1191 /* Trigger an interrupt first and let hdaRegWriteSDSTS() deal with 1192 1192 * ending / beginning a period. */ 1193 #ifndef DEBUG1193 #ifndef LOG_ENABLED 1194 1194 hdaProcessInterrupt(pThis); 1195 1195 #else
Note:
See TracChangeset
for help on using the changeset viewer.