- Timestamp:
- Dec 20, 2017 6:01:54 PM (7 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r70142 r70246 1482 1482 /* Some guests tend to write SDnSTS even if the stream is not running. 1483 1483 * So make sure to check if the RUN bit is set first. */ 1484 const bool f InRun = RT_BOOL(HDA_STREAM_REG(pThis, CTL, pStream->u8SD) & HDA_SDCTL_RUN);1485 1486 Log3Func(("[SD%RU8] fRun =%RTbool %R[sdsts]\n", pStream->u8SD, fInRun, v));1484 const bool fRunning = pStream->State.fRunning; 1485 1486 Log3Func(("[SD%RU8] fRunning=%RTbool %R[sdsts]\n", pStream->u8SD, fRunning, v)); 1487 1487 1488 1488 PHDASTREAMPERIOD pPeriod = &pStream->State.Period; … … 1504 1504 hdaStreamPeriodEnd(pPeriod); 1505 1505 1506 if (f InRun)1506 if (fRunning) 1507 1507 hdaStreamPeriodBegin(pPeriod, hdaWalClkGetCurrent(pThis) /* Use current wall clock time */); 1508 1508 } -
trunk/src/VBox/Devices/Audio/DevHDACommon.cpp
r70132 r70246 659 659 PHDASTREAM pStream = &pThis->aStreams[i]; 660 660 661 if (! (HDA_STREAM_REG(pThis, CTL, pStream->u8SD) & HDA_SDCTL_RUN))661 if (!pStream->State.fRunning) 662 662 continue; 663 663 -
trunk/src/VBox/Devices/Audio/HDAStream.cpp
r70202 r70246 55 55 56 56 pStream->State.fInReset = false; 57 pStream->State.fRunning = false; 57 58 #ifdef HDA_USE_DMA_ACCESS_HANDLER 58 59 RTListInit(&pStream->State.lstDMAHandlers); … … 354 355 355 356 # ifdef VBOX_STRICT 356 AssertReleaseMsg(!RT_BOOL(HDA_STREAM_REG(pThis, CTL, uSD) & HDA_SDCTL_RUN), 357 ("[SD%RU8] Cannot reset stream while in running state\n", uSD)); 357 AssertReleaseMsg(!pStream->State.fRunning, ("[SD%RU8] Cannot reset stream while in running state\n", uSD)); 358 358 # endif 359 359 … … 475 475 } 476 476 477 if (RT_SUCCESS(rc)) 478 { 479 pStream->State.fRunning = fEnable; 480 } 481 477 482 LogFunc(("[SD%RU8] rc=%Rrc\n", pStream->u8SD, rc)); 478 483 return rc; … … 741 746 742 747 /* Stream not running? */ 743 if (! (HDA_STREAM_REG(pThis, CTL, pStream->u8SD) & HDA_SDCTL_RUN))744 { 745 Log3Func(("[SD%RU8] RUN bit not set\n", pStream->u8SD));748 if (!pStream->State.fRunning) 749 { 750 Log3Func(("[SD%RU8] Not running\n", pStream->u8SD)); 746 751 fProceed = false; 747 752 } -
trunk/src/VBox/Devices/Audio/HDAStream.h
r70132 r70246 118 118 * in reset mode and therefore not acccessible by the guest. */ 119 119 volatile bool fInReset; 120 /** Flag indicating if the stream is in running state or not. */ 121 volatile bool fRunning; 120 122 /** Unused, padding. */ 121 uint 32_t Padding0;123 uint8_t Padding0[3]; 122 124 /** Critical section to serialize access. */ 123 125 RTCRITSECT CritSect; … … 191 193 /** Stream descriptor number (SDn). */ 192 194 uint8_t u8SD; 193 uint8_t Padding0[7]; 195 /** Current channel index. 196 * For a stereo stream, this is u8Channel + 1. */ 197 uint8_t u8Channel; 194 198 /** DMA base address (SDnBDPU - SDnBDPL). */ 195 199 uint64_t u64BDLBase;
Note:
See TracChangeset
for help on using the changeset viewer.