Changeset 31035 in vbox for trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp
- Timestamp:
- Jul 23, 2010 7:24:29 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp
r31033 r31035 81 81 #define WAKEEN(pState) (HDA_REG((pState), WAKEEN)) 82 82 83 #define ICH6_HDA_REG_STATES 7 /* range 0x0E */84 #define STATES (pState) (HDA_REG((pState), STATES))83 #define ICH6_HDA_REG_STATESTS 7 /* range 0x0E */ 84 #define STATESTS(pState) (HDA_REG((pState), STATESTS)) 85 85 #define ICH6_HDA_STATES_SCSF 0x7 86 86 … … 377 377 /* size in quad words of RIRB buf */ 378 378 uint8_t cdqRirbBuf; 379 /* indicates if HDA in reset. */ 380 bool fInReset; 379 381 CODECState Codec; 380 382 } INTELHDLinkState; … … 792 794 /* exit reset state */ 793 795 GCTL(pState) |= HDA_REG_FIELD_FLAG_MASK(GCTL, RST); 796 pState->fInReset = false; 794 797 } 795 798 else 796 799 { 797 800 /* enter reset state*/ 801 if ( HDA_REG_FLAG_VALUE(pState, CORBCTL, DMA) 802 || HDA_REG_FLAG_VALUE(pState, RIRBCTL, DMA)) 803 { 804 Log(("hda: HDA enters in reset with DMA(RIRB:%s, CORB:%s)\n", 805 HDA_REG_FLAG_VALUE(pState, CORBCTL, DMA) ? "on" : "off", 806 HDA_REG_FLAG_VALUE(pState, RIRBCTL, DMA) ? "on" : "off")); 807 } 798 808 hdaReset(ICH6_HDASTATE_2_DEVINS(pState)); 799 809 GCTL(pState) &= ~HDA_REG_FIELD_FLAG_MASK(GCTL, RST); 800 //** @todo r=michaln: The device isn't supposed to respond to any writes except to this bit now.810 pState->fInReset = true; 801 811 } 802 812 if (u32Value & HDA_REG_FIELD_FLAG_MASK(GCTL, FSH)) … … 1231 1241 uint32_t u32Offset = GCPhysAddr - pThis->hda.addrMMReg; 1232 1242 int index = hdaLookup(&pThis->hda, u32Offset); 1243 if (pThis->hda.fInReset && index != ICH6_HDA_REG_GCTL) 1244 { 1245 Log(("hda: access to registers except GCTL is blocked while reset\n")); 1246 } 1233 1247 Assert( index != -1 1234 1248 && u32Offset == s_ichIntelHDRegMap[index].offset … … 1275 1289 uint32_t u32Offset = GCPhysAddr - pThis->hda.addrMMReg; 1276 1290 int index = hdaLookup(&pThis->hda, u32Offset); 1291 if (pThis->hda.fInReset && index != ICH6_HDA_REG_GCTL) 1292 { 1293 Log(("hda: access to registers except GCTL is blocked while reset\n")); 1294 } 1277 1295 Assert( index != -1 1278 1296 && u32Offset == s_ichIntelHDRegMap[index].offset … … 1396 1414 SDFIFOS(&pThis->hda, 7) = 0xBF; 1397 1415 1416 /* emulateion of codec "wake up" HDA spec (5.5.1 and 6.5)*/ 1417 STATESTS(&pThis->hda) = 0x1; 1398 1418 1399 1419 Log(("hda: reset finished\n")); … … 1515 1535 * hdaReset shouldn't affects these registers. 1516 1536 */ 1517 WAKEEN(&pThis->hda) = 0x 1;1518 STATES (&pThis->hda) = 0x1;1537 WAKEEN(&pThis->hda) = 0x0; 1538 STATESTS(&pThis->hda) = 0x0; 1519 1539 1520 1540 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.