Changeset 80692 in vbox
- Timestamp:
- Sep 10, 2019 10:17:36 AM (5 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r80691 r80692 603 603 LogFunc(("fInterrupt=%RTbool\n", fInterrupt)); 604 604 605 # ifndef LOG_ENABLED 606 hdaProcessInterrupt(pThis); 607 # else 608 hdaProcessInterrupt(pThis, __FUNCTION__); 609 # endif 605 HDA_PROCESS_INTERRUPT(pThis->pDevInsR3, pThis); 610 606 } 611 607 #endif /* IN_RING3 */ … … 890 886 HDA_REG(pThis, RIRBSTS) |= HDA_RIRBSTS_RINTFL; 891 887 892 # ifndef LOG_ENABLED 893 rc = hdaProcessInterrupt(pThis); 894 # else 895 rc = hdaProcessInterrupt(pThis, __FUNCTION__); 896 # endif 888 rc = HDA_PROCESS_INTERRUPT(pThis->pDevInsR3, pThis); 897 889 } 898 890 } … … 1537 1529 } 1538 1530 1539 # ifndef LOG_ENABLED 1540 hdaProcessInterrupt(pThis); 1541 # else 1542 hdaProcessInterrupt(pThis, __FUNCTION__); 1543 # endif 1531 HDA_PROCESS_INTERRUPT(pDevIns, pThis); 1544 1532 1545 1533 const uint64_t tsNow = TMTimerGet(pThis->pTimer[uSD]); … … 2262 2250 HDA_REG(pThis, RIRBSTS) &= ~(v & u32Value); 2263 2251 2264 #ifndef LOG_ENABLED 2265 int rc = hdaProcessInterrupt(pThis); 2266 #else 2267 int rc = hdaProcessInterrupt(pThis, __FUNCTION__); 2268 #endif 2252 int rc = HDA_PROCESS_INTERRUPT(pDevIns, pThis); 2269 2253 2270 2254 DEVHDA_UNLOCK(pDevIns, pThis); … … 4763 4747 4764 4748 /** 4765 * @interface_method_impl{PDMDEVREG,pfnRelocate}4766 */4767 static DECLCALLBACK(void) hdaR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta)4768 {4769 NOREF(offDelta);4770 PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);4771 pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);4772 }4773 4774 4775 /**4776 4749 * @interface_method_impl{PDMDEVREG,pfnDestruct} 4777 4750 */ … … 4906 4879 */ 4907 4880 pThis->pDevInsR3 = pDevIns; 4908 pThis->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);4909 pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns);4910 4881 /* IBase */ 4911 4882 pThis->IBase.pfnQueryInterface = hdaR3QueryInterface; … … 5361 5332 /* .pfnConstruct = */ hdaR3Construct, 5362 5333 /* .pfnDestruct = */ hdaR3Destruct, 5363 /* .pfnRelocate = */ hdaR3Relocate,5334 /* .pfnRelocate = */ NULL, 5364 5335 /* .pfnMemSetup = */ NULL, 5365 5336 /* .pfnPowerOn = */ NULL, -
trunk/src/VBox/Devices/Audio/DevHDA.h
r80684 r80692 105 105 /** The PCI device structure. */ 106 106 PDMPCIDEV PciDev; 107 /** Critical section protecting the HDA state. */ 108 PDMCRITSECT CritSect; 107 109 /** R3 Pointer to the device instance. */ 108 110 PPDMDEVINSR3 pDevInsR3; 109 /** R0 Pointer to the device instance. */110 PPDMDEVINSR0 pDevInsR0;111 /** R0 Pointer to the device instance. */112 PPDMDEVINSRC pDevInsRC;113 /** Padding for alignment. */114 uint32_t u32Padding;115 /** Critical section protecting the HDA state. */116 PDMCRITSECT CritSect;117 111 /** The base interface for LUN\#0. */ 118 112 PDMIBASE IBase; … … 151 145 /** The stream timers for pumping data thru the attached LUN drivers. */ 152 146 PTMTIMERR3 pTimer[HDA_MAX_STREAMS]; 153 #ifdef VBOX_WITH_STATISTICS154 STAMPROFILE StatTimer;155 STAMPROFILE StatIn;156 STAMPROFILE StatOut;157 STAMCOUNTER StatBytesRead;158 STAMCOUNTER StatBytesWritten;159 #endif160 147 /** Pointer to HDA codec to use. */ 161 148 R3PTRTYPE(PHDACODEC) pCodec; … … 211 198 uint8_t au8Padding3[3]; 212 199 HDASTATEDBGINFO Dbg; 200 #ifdef VBOX_WITH_STATISTICS 201 STAMPROFILE StatTimer; 202 STAMPROFILE StatIn; 203 STAMPROFILE StatOut; 204 STAMCOUNTER StatBytesRead; 205 STAMCOUNTER StatBytesWritten; 206 #endif 213 207 /** This is for checking that the build was correctly configured in all contexts. 214 208 * This is set to HDASTATE_ALIGNMENT_CHECK_MAGIC. */ -
trunk/src/VBox/Devices/Audio/DevHDACommon.cpp
r76553 r80692 34 34 35 35 36 #ifndef LOG_ENABLED37 36 /** 38 37 * Processes (de/asserts) the interrupt according to the HDA's current state. 39 38 * 40 39 * @returns IPRT status code. 41 * @param pThis HDA state. 42 */ 43 int hdaProcessInterrupt(PHDASTATE pThis) 44 #else 45 /** 46 * Processes (de/asserts) the interrupt according to the HDA's current state. 47 * Debug version. 48 * 49 * @returns IPRT status code. 40 * @param pDevIns The device instance. 50 41 * @param pThis HDA state. 51 42 * @param pszSource Caller information. 52 43 */ 53 int hdaProcessInterrupt(PHDASTATE pThis, const char *pszSource) 44 #if defined(LOG_ENABLED) || defined(DOXYGEN_RUNNING) 45 int hdaProcessInterrupt(PPDMDEVINS pDevIns, PHDASTATE pThis, const char *pszSource) 46 #else 47 int hdaProcessInterrupt(PPDMDEVINS pDevIns, PHDASTATE pThis) 54 48 #endif 55 49 { … … 67 61 Log3Func(("Asserted (%s)\n", pszSource)); 68 62 69 PDMDevHlpPCISetIrq(p This->CTX_SUFF(pDevIns), 0, 1 /* Assert */);63 PDMDevHlpPCISetIrq(pDevIns, 0, 1 /* Assert */); 70 64 pThis->u8IRQL = 1; 71 65 … … 79 73 Log3Func(("Deasserted (%s)\n", pszSource)); 80 74 81 PDMDevHlpPCISetIrq(p This->CTX_SUFF(pDevIns), 0, 0 /* Deassert */);75 PDMDevHlpPCISetIrq(pDevIns, 0, 0 /* Deassert */); 82 76 pThis->u8IRQL = 0; 83 77 } -
trunk/src/VBox/Devices/Audio/DevHDACommon.h
r80691 r80692 601 601 */ 602 602 #ifdef LOG_ENABLED 603 int hdaProcessInterrupt(PHDASTATE pThis, const char *pszSource); 603 int hdaProcessInterrupt(PPDMDEVINS pDevIns, PHDASTATE pThis, const char *pszSource); 604 # define HDA_PROCESS_INTERRUPT(a_pDevIns, a_pThis) hdaProcessInterrupt((a_pDevIns), (a_pThis), __FUNCTION__) 604 605 #else 605 int hdaProcessInterrupt(PHDASTATE pThis); 606 int hdaProcessInterrupt(PPDMDEVINS pDevIns, PHDASTATE pThis); 607 # define HDA_PROCESS_INTERRUPT(a_pDevIns, a_pThis) hdaProcessInterrupt((a_pDevIns), (a_pThis)) 606 608 #endif 607 609 /** @} */ -
trunk/src/VBox/Devices/Audio/HDAStream.cpp
r78506 r80692 1334 1334 /* Trigger an interrupt first and let hdaRegWriteSDSTS() deal with 1335 1335 * ending / beginning a period. */ 1336 #ifndef LOG_ENABLED 1337 hdaProcessInterrupt(pThis); 1338 #else 1339 hdaProcessInterrupt(pThis, __FUNCTION__); 1340 #endif 1336 HDA_PROCESS_INTERRUPT(pThis->pDevInsR3, pThis); 1341 1337 } 1342 1338 else /* Transfer still in-flight -- schedule the next timing slot. */
Note:
See TracChangeset
for help on using the changeset viewer.