Changeset 31032 in vbox
- Timestamp:
- Jul 23, 2010 5:06:16 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp
r31031 r31032 140 140 141 141 #define ICH6_HDA_REG_CORBCTL 17 /* 0x4C */ 142 #define ICH6_HDA_COBCTL_RUN_SHIFT (1) 143 #define ICH6_HDA_COBCTL_CMEIE_SHIFT (0) 142 #define ICH6_HDA_CORBCTL_DMA_SHIFT (1) 143 #define ICH6_HDA_CORBCTL_CMEIE_SHIFT (0) 144 145 #define CORBCTL(pState) (HDA_REG(pState, CORBCTL)) 146 144 147 145 148 #define ICH6_HDA_REG_CORBSTS 18 /* 0x4D */ … … 397 400 DECLCALLBACK(int)hdaRegWriteCORBWP(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t pu32Value); 398 401 DECLCALLBACK(int)hdaRegWriteCORBRP(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t u32Value); 402 DECLCALLBACK(int)hdaRegWriteCORBCTL(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t u32Value); 399 403 DECLCALLBACK(int)hdaRegWriteCORBSTS(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t u32Value); 400 404 DECLCALLBACK(int)hdaRegWriteRIRBWP(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t pu32Value); … … 461 465 { 0x00048, 0x00002, 0x000000FF, 0x000000FF, hdaRegReadU16 , hdaRegWriteCORBWP , "CORBWP" , "CORB Write Pointer" }, 462 466 { 0x0004A, 0x00002, 0x000000FF, 0x000080FF, hdaRegReadU8 , hdaRegWriteCORBRP , "CORBRP" , "CORB Read Pointer" }, 463 { 0x0004C, 0x00001, 0x00000003, 0x00000003, hdaRegReadU8 , hdaRegWrite U8, "CORBCTL" , "CORB Control" },467 { 0x0004C, 0x00001, 0x00000003, 0x00000003, hdaRegReadU8 , hdaRegWriteCORBCTL , "CORBCTL" , "CORB Control" }, 464 468 { 0x0004D, 0x00001, 0x00000001, 0x00000001, hdaRegReadU8 , hdaRegWriteCORBSTS , "CORBSTS" , "CORB Status" }, 465 469 { 0x0004E, 0x00001, 0x000000F3, 0x00000000, hdaRegReadU8 , hdaRegWriteUnimplemented, "CORBSIZE" , "CORB Size" }, … … 611 615 if (fLocal) 612 616 { 617 Assert((HDA_REG_FLAG_VALUE(pState, CORBCTL, DMA))); 613 618 rc = PDMDevHlpPhysRead(ICH6_HDASTATE_2_DEVINS(pState), pState->u64CORBBase, pState->pu32CorbBuf, pState->cbCorbBuf); 614 619 if (RT_FAILURE(rc)) … … 637 642 else 638 643 { 644 Assert((HDA_REG_FLAG_VALUE(pState, RIRBCTL, DMA))); 639 645 rc = PDMDevHlpPhysWrite(ICH6_HDASTATE_2_DEVINS(pState), pState->u64RIRBBase, pState->pu64RirbBuf, pState->cbRirbBuf); 640 646 if (RT_FAILURE(rc)) … … 841 847 } 842 848 849 DECLCALLBACK(int)hdaRegWriteCORBCTL(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t u32Value) 850 { 851 int rc = hdaRegWriteU8(pState, offset, index, u32Value); 852 AssertRC(rc); 853 if ( CORBWP(pState) != CORBRP(pState) 854 && HDA_REG_FLAG_VALUE(pState, CORBCTL, DMA) != 0) 855 return hdaCORBCmdProcess(pState); 856 return rc; 857 } 858 843 859 DECLCALLBACK(int)hdaRegWriteCORBSTS(INTELHDLinkState* pState, uint32_t offset, uint32_t index, uint32_t u32Value) 844 860 { … … 856 872 AssertRCReturn(rc, rc); 857 873 if (CORBWP(pState) == CORBRP(pState)) 874 return VINF_SUCCESS; 875 if (!HDA_REG_FLAG_VALUE(pState, CORBCTL, DMA)) 858 876 return VINF_SUCCESS; 859 877 rc = hdaCORBCmdProcess(pState);
Note:
See TracChangeset
for help on using the changeset viewer.