Changeset 31507 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Aug 10, 2010 6:52:49 AM (14 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevCodec.cpp
r31502 r31507 579 579 uint8_t i; 580 580 Log(("HDAcodec: enters reset\n")); 581 if (pState->fFirstResetDetected)581 for (i = 0; i < STAC9220_NODE_COUNT; ++i) 582 582 { 583 LogRel(("HDAcodec: \"Double\" reset detected\n")); 584 pState->fFirstResetDetected = false; 585 for (i = 0; i < STAC9220_NODE_COUNT; ++i) 586 { 587 stac9220ResetNode(pState, i, &pState->pNodes[i]); 588 } 589 } 590 else 591 pState->fFirstResetDetected = true; 583 stac9220ResetNode(pState, i, &pState->pNodes[i]); 584 } 585 pState->fInReset = false; 592 586 Log(("HDAcodec: exits reset\n")); 593 587 } … … 980 974 pNode->port.u32F08_param = 0; 981 975 pNode->port.u32F09_param = RT_BIT(31)|0x9920; /* 39.2 kOm */ 982 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x20, 0x40, 0x21, 0x02); 976 if (!pState->fInReset) 977 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x20, 0x40, 0x21, 0x02); 983 978 goto port_init; 984 979 case 0xB: … … 988 983 pNode->port.u32F09_param = 0; 989 984 pNode->port.u32F07_param = RT_BIT(5); 990 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x11, 0x60, 0x11, 0x01); 985 if (!pState->fInReset) 986 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x11, 0x60, 0x11, 0x01); 991 987 goto port_init; 992 988 case 0xC: … … 996 992 pNode->port.u32F09_param = 0; 997 993 pNode->port.u32F07_param = RT_BIT(5); 998 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x10, 0x40, 0x11, 0x01); 994 if (!pState->fInReset) 995 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x10, 0x40, 0x11, 0x01); 999 996 goto port_init; 1000 997 case 0xD: … … 1015 1012 pNode->port.u32F07_param = RT_BIT(5); 1016 1013 pNode->port.u32F09_param = 0; 1017 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x51, 0x30, 0x81, 0x01); 1014 if (!pState->fInReset) 1015 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x51, 0x30, 0x81, 0x01); 1018 1016 break; 1019 1017 case 0xF: … … 1024 1022 pNode->port.u32F08_param = 0; 1025 1023 pNode->port.u32F07_param = 0; 1026 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x12, 0x60, 0x11, 0x01); 1024 if (!pState->fInReset) 1025 pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x12, 0x60, 0x11, 0x01); 1027 1026 pNode->node.au8F02_param[0] = 0x5; 1028 1027 pNode->port.u32F09_param = 0; … … 1037 1036 *(uint32_t *)pNode->node.au8F02_param = RT_MAKE_U32_FROM_U8(0x08, 0x17, 0x0, 0); 1038 1037 pNode->digout.u32F07_param = 0; 1039 pNode->digout.u32F1c_param = RT_MAKE_U32_FROM_U8(0x30, 0x10, 0x45, 0x01); 1038 if (!pState->fInReset) 1039 pNode->digout.u32F1c_param = RT_MAKE_U32_FROM_U8(0x30, 0x10, 0x45, 0x01); 1040 1040 break; 1041 1041 case 0x11: … … 1048 1048 pNode->digin.u32F09_param = 0; 1049 1049 pNode->digin.u32F0c_param = 0; 1050 pNode->digin.u32F1c_param = (0x1 << 24) | (0xc5 << 16) | (0x10 << 8) | 0x60; 1050 if (!pState->fInReset) 1051 pNode->digin.u32F1c_param = (0x1 << 24) | (0xc5 << 16) | (0x10 << 8) | 0x60; 1051 1052 break; 1052 1053 case 0x12: … … 1078 1079 pNode->node.au32F00_param[0xc] = RT_BIT(5); 1079 1080 pNode->cdnode.u32F07_param = 0; 1080 pNode->cdnode.u32F1c_param = RT_MAKE_U32_FROM_U8(0x52, 0x0, 0x33, 0x90); 1081 if (!pState->fInReset) 1082 pNode->cdnode.u32F1c_param = RT_MAKE_U32_FROM_U8(0x52, 0x0, 0x33, 0x90); 1081 1083 break; 1082 1084 case 0x16: … … 1180 1182 if ((CODEC_VERBDATA(cmd) & pState->pVerbs[i].mask) == pState->pVerbs[i].verb) 1181 1183 { 1182 if( pState->fFirstResetDetected1183 && CODEC_VERBDATA(cmd) != 0x7FF001184 && CODEC_VERBDATA(cmd) != 0)1185 pState->fFirstResetDetected = false;1186 1184 *pfn = pState->pVerbs[i].pfn; 1187 1185 return VINF_SUCCESS; … … 1230 1228 pState->pfnLookup = codecLookup; 1231 1229 pState->pNodes = (PCODECNODE)RTMemAllocZ(sizeof(CODECNODE) * STAC9220_NODE_COUNT); 1232 pState->f FirstResetDetected= false;1230 pState->fInReset = false; 1233 1231 uint8_t i; 1234 1232 for (i = 0; i < STAC9220_NODE_COUNT; ++i) -
trunk/src/VBox/Devices/Audio/DevCodec.h
r31502 r31507 223 223 /** Mic in */ 224 224 SWVoiceIn *voice_mc; 225 void *pHDAState;226 bool fFirstResetDetected;225 void *pHDAState; 226 bool fInReset; 227 227 DECLR3CALLBACKMEMBER(int, pfnProcess, (struct CODECState *)); 228 228 DECLR3CALLBACKMEMBER(int, pfnLookup, (struct CODECState *pState, uint32_t verb, PPFNCODECVERBPROCESSOR)); -
trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp
r31502 r31507 1201 1201 { 1202 1202 INTELHDLinkState *pState = (INTELHDLinkState *)pCodecState->pHDAState; 1203 pCodecState->fFirstResetDetected = true;1204 1203 return VINF_SUCCESS; 1205 1204 }
Note:
See TracChangeset
for help on using the changeset viewer.