Changeset 88503 in vbox
- Timestamp:
- Apr 14, 2021 11:43:28 AM (4 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHda.cpp
r88502 r88503 667 667 #endif /* IN_RING3 */ 668 668 669 #ifdef IN_RING3 /* Codec is not yet kosher enough for ring-0. @bugref{9890c64} */ 670 669 671 /** 670 672 * Synchronizes the CORB / RIRB buffers between internal <-> device state. … … 679 681 * @todo r=andy Break this up into two functions? 680 682 */ 681 static int hda CmdSync(PPDMDEVINS pDevIns, PHDASTATE pThis, bool fLocal)683 static int hdaR3CmdSync(PPDMDEVINS pDevIns, PHDASTATE pThis, bool fLocal) 682 684 { 683 685 int rc = VINF_SUCCESS; … … 765 767 * @param pThisCC The ring-0 HDA device state. 766 768 */ 767 static int hda CORBCmdProcess(PPDMDEVINS pDevIns, PHDASTATE pThis, PHDASTATECC pThisCC)769 static int hdaR3CORBCmdProcess(PPDMDEVINS pDevIns, PHDASTATE pThis, PHDASTATECC pThisCC) 768 770 { 769 771 Log3Func(("ENTER CORB(RP:%x, WP:%x) RIRBWP:%x\n", HDA_REG(pThis, CORBRP), HDA_REG(pThis, CORBWP), HDA_REG(pThis, RIRBWP))); … … 777 779 Assert(pThis->cbCorbBuf); 778 780 779 int rc = hda CmdSync(pDevIns, pThis, true /* Sync from guest */);781 int rc = hdaR3CmdSync(pDevIns, pThis, true /* Sync from guest */); 780 782 AssertRCReturn(rc, rc); 781 783 … … 791 793 uint8_t corbRp = HDA_REG(pThis, CORBRP); 792 794 uint8_t rirbWp = HDA_REG(pThis, RIRBWP); 793 794 #ifndef IN_RING3795 /*796 * Check t797 */798 #endif799 795 800 796 /* … … 891 887 * Write out the response. 892 888 */ 893 rc = hda CmdSync(pDevIns, pThis, false /* Sync to guest */);889 rc = hdaR3CmdSync(pDevIns, pThis, false /* Sync to guest */); 894 890 AssertRC(rc); 895 891 896 892 return rc; 897 893 } 894 895 #endif /* IN_RING3 - @bugref{9890c64} */ 898 896 899 897 #ifdef IN_RING3 … … 909 907 910 908 DEVHDA_LOCK(pDevIns, pThis); 911 hda CORBCmdProcess(pDevIns, pThis, pThisCC);909 hdaR3CORBCmdProcess(pDevIns, pThis, pThisCC); 912 910 DEVHDA_UNLOCK(pDevIns, pThis); 913 911 … … 1144 1142 1145 1143 if (HDA_REG(pThis, CORBCTL) & HDA_CORBCTL_DMA) /* DMA engine started? */ 1146 rc = hdaCORBCmdProcess(pDevIns, pThis, PDMDEVINS_2_DATA_CC(pDevIns, PHDASTATECC)); 1144 { 1145 #ifdef IN_RING3 /** @todo do PDMDevHlpTaskTrigger everywhere? */ 1146 rc = hdaR3CORBCmdProcess(pDevIns, pThis, PDMDEVINS_2_DATA_CC(pDevIns, PHDASTATECC)); 1147 #else 1148 rc = PDMDevHlpTaskTrigger(pDevIns, pThis->hCorbDmaTask); 1149 if (rc != VINF_SUCCESS && RT_SUCCESS(rc)) 1150 rc = VINF_SUCCESS; 1151 #endif 1152 } 1147 1153 else 1148 1154 LogFunc(("CORB DMA not running, skipping\n")); … … 1211 1217 AssertRCSuccess(VBOXSTRICTRC_VAL(rc)); 1212 1218 1213 return hdaCORBCmdProcess(pDevIns, pThis, PDMDEVINS_2_DATA_CC(pDevIns, PHDASTATECC)); 1219 #ifdef IN_RING3 /** @todo do PDMDevHlpTaskTrigger everywhere? */ 1220 return hdaR3CORBCmdProcess(pDevIns, pThis, PDMDEVINS_2_DATA_CC(pDevIns, PHDASTATECC)); 1221 #else 1222 rc = PDMDevHlpTaskTrigger(pDevIns, pThis->hCorbDmaTask); 1223 return RT_SUCCESS(rc) ? VINF_SUCCESS : rc; 1224 #endif 1214 1225 } 1215 1226 … … 5293 5304 AssertRCReturn(rc, rc); 5294 5305 5306 # if 0 /* Codec is not yet kosher enough for ring-0. @bugref{9890c64} */ 5295 5307 /* Construct the R0 codec part. */ 5296 5308 rc = hdaR0CodecConstruct(pDevIns, &pThis->Codec, &pThisCC->Codec); 5297 5309 AssertRCReturn(rc, rc); 5310 # else 5311 RT_NOREF(pThisCC); 5312 # endif 5298 5313 5299 5314 return VINF_SUCCESS; -
trunk/src/VBox/Devices/Audio/DevHda.h
r88502 r88503 219 219 typedef struct HDASTATER0 220 220 { 221 # if 0 /* Codec is not yet kosher enough for ring-0. @bugref{9890c64} */ 221 222 /** Pointer to HDA codec to use. */ 222 223 HDACODECR0 Codec; 224 # else 225 uint32_t u32Dummy; 226 # endif 223 227 } HDASTATER0; 224 228 /** Pointer to a ring-0 HDA device state. */ -
trunk/src/VBox/Devices/Audio/DevHdaCodec.cpp
r88502 r88503 2611 2611 */ 2612 2612 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatLookupsR3, STAMTYPE_COUNTER, "Codec/LookupsR0", STAMUNIT_OCCURENCES, "Number of R0 codecLookup calls"); 2613 # if 0 /* Codec is not yet kosher enough for ring-0. @bugref{9890c64} */ 2613 2614 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatLookupsR0, STAMTYPE_COUNTER, "Codec/LookupsR3", STAMUNIT_OCCURENCES, "Number of R3 codecLookup calls"); 2615 # endif 2614 2616 2615 2617 return rc; -
trunk/src/VBox/Devices/Audio/DevHdaCodec.h
r88502 r88503 862 862 uint8_t au8Reserveds[CODEC_NODES_MAX]; 863 863 864 STAMCOUNTER StatLookupsR3; 865 #if 0 /* Codec is not yet kosher enough for ring-0. @bugref{9890c64} */ 864 866 STAMCOUNTER StatLookupsR0; 865 STAMCOUNTER StatLookupsR3; 867 #endif 866 868 } HDACODEC; 867 869 -
trunk/src/VBox/Devices/Makefile.kmk
r88234 r88503 1224 1224 Audio/DevHda.cpp \ 1225 1225 Audio/DevHdaCommon.cpp \ 1226 Audio/DevHdaCodec.cpp \1227 1226 Audio/DevHdaStream.cpp \ 1228 1227 Audio/DevIchAc97.cpp
Note:
See TracChangeset
for help on using the changeset viewer.