Changeset 31085 in vbox
- Timestamp:
- Jul 25, 2010 4:10:21 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64033
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp
r31065 r31085 352 352 uint32_t au32Regs[113]; 353 353 /* Current BD index */ 354 uint32_t u32Cvi; 355 uint64_t u64CviAddr; 354 uint32_t u32Cvi; 355 uint64_t u64CviAddr; 356 356 /* Length of current BD entry */ 357 357 uint32_t u32CviLen; … … 577 577 { 578 578 bool fIrq = false; 579 /* @todo add state change */ 579 /* @todo add state change */ 580 580 if( INTCTL_CIE(pState) 581 581 && ( RIRBSTS_RINTFL(pState) … … 585 585 fIrq = true; 586 586 } 587 if ( INTCTL_SX(pState, 4) 587 if ( INTCTL_SX(pState, 4) 588 588 && SDSTS(pState, 4) && HDA_REG_FIELD_FLAG_MASK(SDSTS, BCIS)) 589 589 { … … 677 677 678 678 PFNCODECVERBPROCESSOR pfn = (PFNCODECVERBPROCESSOR)NULL; 679 679 680 680 rc = hdaCmdSync(pState, true); 681 681 if (RT_FAILURE(rc)) … … 800 800 { 801 801 /* enter reset state*/ 802 if ( HDA_REG_FLAG_VALUE(pState, CORBCTL, DMA) 802 if ( HDA_REG_FLAG_VALUE(pState, CORBCTL, DMA) 803 803 || HDA_REG_FLAG_VALUE(pState, RIRBCTL, DMA)) 804 804 { … … 976 976 } 977 977 #endif 978 return VINF_SUCCESS; 978 return VINF_SUCCESS; 979 979 } 980 980 DECLCALLBACK(int)hdaRegWriteSDLVI(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t u32Value) … … 1084 1084 uint8_t v = RIRBSTS(pState); 1085 1085 RIRBSTS(pState) = (v ^ nv) & v; 1086 1086 1087 1087 return hdaProcessInterrupt(pState); 1088 1088 } … … 1115 1115 static void fetch_bd(INTELHDLinkState *pState) 1116 1116 { 1117 dump_bd(pState); 1117 dump_bd(pState); 1118 1118 pState->u32Cvi; 1119 1119 uint8_t bdle[16]; … … 1209 1209 } 1210 1210 if (pState->u32CviPos == pState->u32CviLen) 1211 { 1211 { 1212 1212 pState->u32CviPos = 0; 1213 1213 pState->u32Cvi++; … … 1233 1233 * 1234 1234 * @note: while implementation was detected so called "forgotten" or "hole" registers 1235 * which description is missed in RPM, datasheet or spec. 1235 * which description is missed in RPM, datasheet or spec. 1236 1236 * 1237 1237 * @returns VBox status code. … … 1253 1253 Log(("hda: access to registers except GCTL is blocked while reset\n")); 1254 1254 } 1255 Assert( index != -1 1256 && u32Offset == s_ichIntelHDRegMap[index].offset 1255 Assert( index != -1 1256 && u32Offset == s_ichIntelHDRegMap[index].offset 1257 1257 && cb <= 4); 1258 1258 if (index != -1) … … 1262 1262 switch(cb) 1263 1263 { 1264 case 1: mask = 0x000000ff; break; 1265 case 2: mask = 0x0000ffff; break; 1266 case 3: mask = 0x00ffffff; break; 1267 case 4: mask = 0xffffffff; break; 1264 case 1: mask = 0x000000ff; break; 1265 case 2: mask = 0x0000ffff; break; 1266 case 3: mask = 0x00ffffff; break; 1267 case 4: mask = 0xffffffff; break; 1268 1268 } 1269 1269 Assert(u32Offset == s_ichIntelHDRegMap[index].offset); … … 1301 1301 Log(("hda: access to registers except GCTL is blocked while reset\n")); 1302 1302 } 1303 Assert( index != -1 1304 && u32Offset == s_ichIntelHDRegMap[index].offset 1303 Assert( index != -1 1304 && u32Offset == s_ichIntelHDRegMap[index].offset 1305 1305 && cb <= 4); 1306 1306 if (index != -1) … … 1311 1311 switch(cb) 1312 1312 { 1313 case 1: mask = 0xffffff00; break; 1314 case 2: mask = 0xffff0000; break; 1315 case 3: mask = 0xff000000; break; 1316 case 4: mask = 0x00000000; break; 1313 case 1: mask = 0xffffff00; break; 1314 case 2: mask = 0xffff0000; break; 1315 case 3: mask = 0xff000000; break; 1316 case 4: mask = 0x00000000; break; 1317 1317 } 1318 *(uint32_t *)pv = (v & mask) | (*(uint32_t *)pv & ~mask); 1318 *(uint32_t *)pv = (v & mask) | (*(uint32_t *)pv & ~mask); 1319 1319 rc = s_ichIntelHDRegMap[index].pfnWrite(&pThis->hda, u32Offset, index, *(uint32_t *)pv); 1320 1320 Log(("hda: write %s:(%x) %x => %x\n", s_ichIntelHDRegMap[index].abbrev, *(uint32_t *)pv, v, pThis->hda.au32Regs[index])); … … 1401 1401 pThis->hda.pu64RirbBuf = (uint64_t *)RTMemAllocZ(pThis->hda.cbRirbBuf); 1402 1402 1403 /* Accoding to ICH6 datasheet, 0x40000 is default value for stream descriptor register 23:20 1403 /* Accoding to ICH6 datasheet, 0x40000 is default value for stream descriptor register 23:20 1404 1404 * bits are reserved for stream number 18.2.33 */ 1405 1405 SDCTL(&pThis->hda, 0) = 0x40000; … … 1421 1421 SDFIFOS(&pThis->hda, 6) = 0xBF; 1422 1422 SDFIFOS(&pThis->hda, 7) = 0xBF; 1423 1423 1424 1424 /* emulateion of codec "wake up" HDA spec (5.5.1 and 6.5)*/ 1425 1425 STATESTS(&pThis->hda) = 0x1; … … 1483 1483 PCIDevSetBaseAddress (&pThis->dev, 0, /* 10 rw - MMIO */ 1484 1484 false /* fIoSpace */, false /* fPrefetchable */, true /* f64Bit */, 0x00000000); 1485 /* ICH6 datasheet defines 0 values for SVID and SID (18.1.14-15), which together with values returned for 1485 /* ICH6 datasheet defines 0 values for SVID and SID (18.1.14-15), which together with values returned for 1486 1486 verb F20 should provide device/codec recognition. */ 1487 1487 PCIDevSetSubSystemVendorId (&pThis->dev, 0x0000); /* 2c ro - intel.) */ … … 1492 1492 1493 1493 //** @todo r=michaln: If there are really no PCIDevSetXx for these, the meaning 1494 // of these values needs to be properly documented! 1494 // of these values needs to be properly documented! 1495 1495 /* HDCTL off 0x40 bit 0 selects signaling mode (1-HDA, 0 - Ac97) 18.1.19 */ 1496 1496 pThis->dev.config[0x40] = 0x01; … … 1541 1541 pThis->hda.Codec.pfnTransfer = hdaTransfer; 1542 1542 pThis->hda.Codec.pfnReset = hdaCodecReset; 1543 /* 1543 /* 1544 1544 * 18.2.6,7 defines that values of this registers might be cleared on power on/reset 1545 1545 * hdaReset shouldn't affects these registers. … … 1557 1557 { 1558 1558 PCIINTELHDLinkState *pThis = PDMINS_2_DATA(pDevIns, PCIINTELHDLinkState *); 1559 1559 1560 1560 int rc = stac9220Destruct(&pThis->hda.Codec); 1561 1561 AssertRC(rc);
Note:
See TracChangeset
for help on using the changeset viewer.