Changeset 90138 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Jul 9, 2021 9:02:07 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145640
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHda.cpp
r90137 r90138 4991 4991 /* ICH6 datasheet defines 0 values for SVID and SID (18.1.14-15), which together with values returned for 4992 4992 verb F20 should provide device/codec recognition. */ 4993 Assert(pThisCC->Codec. State.u16VendorId);4994 Assert(pThisCC->Codec. State.u16DeviceId);4995 PDMPciDevSetSubSystemVendorId(pPciDev, pThisCC->Codec. State.u16VendorId); /* 2c ro - intel.) */4996 PDMPciDevSetSubSystemId( pPciDev, pThisCC->Codec. State.u16DeviceId); /* 2e ro. */4993 Assert(pThisCC->Codec.u16VendorId); 4994 Assert(pThisCC->Codec.u16DeviceId); 4995 PDMPciDevSetSubSystemVendorId(pPciDev, pThisCC->Codec.u16VendorId); /* 2c ro - intel.) */ 4996 PDMPciDevSetSubSystemId( pPciDev, pThisCC->Codec.u16DeviceId); /* 2e ro. */ 4997 4997 4998 4998 /* -
trunk/src/VBox/Devices/Audio/DevHda.h
r90137 r90138 806 806 807 807 808 /** @name DevHDA.cppfunctions used by the codec.808 /** @name HDA device functions used by the codec. 809 809 * @{ */ 810 810 DECLHIDDEN(int) hdaR3MixerAddStream(PHDACODECR3 pCodec, PDMAUDIOMIXERCTL enmMixerCtl, PCPDMAUDIOSTREAMCFG pCfg); -
trunk/src/VBox/Devices/Audio/DevHdaCodec.cpp
r90137 r90138 119 119 * 120 120 * @param pThis The shared codec intance data. 121 * @param pThisCC The codec instance data for the current context (ring-3).122 121 * @param uCmd The command. 123 122 * @param puResp Where to return the response value. … … 125 124 * @thread EMT or task worker thread (see HDASTATE::hCorbDmaTask). 126 125 */ 127 DECLCALLBACKMEMBER(int, pfn, (PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp));126 DECLCALLBACKMEMBER(int, pfn, (PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp)); 128 127 /** Friendly name, for debugging. */ 129 128 const char *pszName; … … 197 196 * @param pNode Node to reset. 198 197 */ 199 static void stac9220NodeReset(PHDACODEC pThis, uint8_t uNID, PCODECNODE pNode)198 static void stac9220NodeReset(PHDACODECR3 pThis, uint8_t uNID, PCODECNODE pNode) 200 199 { 201 200 LogFlowFunc(("NID=0x%x (%RU8)\n", uNID, uNID)); … … 772 771 * @param pThis HDA codec to reset. 773 772 */ 774 static DECLCALLBACK(void) stac9220Reset(PHDACODECpThis)773 static void stac9220Reset(PHDACODECR3 pThis) 775 774 { 776 775 AssertPtrReturnVoid(pThis->aNodes); … … 788 787 789 788 790 static int stac9220Construct(PHDACODEC pThis)789 static int stac9220Construct(PHDACODECR3 pThis) 791 790 { 792 791 pThis->u16VendorId = 0x8384; /* SigmaTel */ … … 856 855 */ 857 856 #define HDA_CODEC_IS_NODE_OF_TYPE_FUNC(a_Type) \ 858 DECLINLINE(bool) hdaCodecIs##a_Type##Node(PHDACODEC pThis, uint8_t idNode) \857 DECLINLINE(bool) hdaCodecIs##a_Type##Node(PHDACODECR3 pThis, uint8_t idNode) \ 859 858 { \ 860 859 Assert(pThis->au8##a_Type##s); \ … … 895 894 * Misc helpers. 896 895 */ 897 static int hdaR3CodecToAudVolume(PHDACODECR3 pThis CC, PCODECNODE pNode, AMPLIFIER *pAmp, PDMAUDIOMIXERCTL enmMixerCtl)896 static int hdaR3CodecToAudVolume(PHDACODECR3 pThis, PCODECNODE pNode, AMPLIFIER *pAmp, PDMAUDIOMIXERCTL enmMixerCtl) 898 897 { 899 898 RT_NOREF(pNode); … … 940 939 PDMAudioMixerCtlGetName(enmMixerCtl), bLeft, bRight, Vol.fMuted ? "- Muted!" : "")); 941 940 942 return hdaR3MixerSetVolume(pThis CC, enmMixerCtl, &Vol);941 return hdaR3MixerSetVolume(pThis, enmMixerCtl, &Vol); 943 942 } 944 943 … … 970 969 * @interface_method_impl{CODECVERB,pfn, Unimplemented} 971 970 */ 972 static DECLCALLBACK(int) vrbProcUnimplemented(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp)973 { 974 RT_NOREF(pThis, pThisCC,uCmd);971 static DECLCALLBACK(int) vrbProcUnimplemented(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 972 { 973 RT_NOREF(pThis, uCmd); 975 974 LogFlowFunc(("uCmd(raw:%x: cad:%x, d:%c, nid:%x, verb:%x)\n", uCmd, 976 975 CODEC_CAD(uCmd), CODEC_DIRECT(uCmd) ? 'N' : 'Y', CODEC_NID(uCmd), CODEC_VERBDATA(uCmd))); … … 983 982 * @interface_method_impl{CODECVERB,pfn, ??? } 984 983 */ 985 static DECLCALLBACK(int) vrbProcBreak(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp)984 static DECLCALLBACK(int) vrbProcBreak(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 986 985 { 987 986 int rc; 988 rc = vrbProcUnimplemented(pThis, pThisCC,uCmd, puResp);987 rc = vrbProcUnimplemented(pThis, uCmd, puResp); 989 988 *puResp |= CODEC_RESPONSE_UNSOLICITED; 990 989 return rc; … … 996 995 * @interface_method_impl{CODECVERB,pfn, b-- } 997 996 */ 998 static DECLCALLBACK(int) vrbProcGetAmplifier(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 999 { 1000 RT_NOREF(pThisCC); 997 static DECLCALLBACK(int) vrbProcGetAmplifier(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 998 { 1001 999 *puResp = 0; 1002 1000 … … 1046 1044 * @interface_method_impl{CODECVERB,pfn, ??? } 1047 1045 */ 1048 static DECLCALLBACK(int) vrbProcGetParameter(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1049 { 1050 RT_NOREF(pThisCC); 1046 static DECLCALLBACK(int) vrbProcGetParameter(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1047 { 1051 1048 Assert((uCmd & CODEC_VERB_8BIT_DATA) < CODECNODE_F00_PARAM_LENGTH); 1052 1049 if ((uCmd & CODEC_VERB_8BIT_DATA) >= CODECNODE_F00_PARAM_LENGTH) … … 1066 1063 * @interface_method_impl{CODECVERB,pfn, f01 } 1067 1064 */ 1068 static DECLCALLBACK(int) vrbProcGetConSelectCtrl(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1069 { 1070 RT_NOREF(pThisCC); 1065 static DECLCALLBACK(int) vrbProcGetConSelectCtrl(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1066 { 1071 1067 *puResp = 0; 1072 1068 … … 1091 1087 * @interface_method_impl{CODECVERB,pfn, 701 } 1092 1088 */ 1093 static DECLCALLBACK(int) vrbProcSetConSelectCtrl(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1094 { 1095 RT_NOREF(pThisCC); 1089 static DECLCALLBACK(int) vrbProcSetConSelectCtrl(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1090 { 1096 1091 *puResp = 0; 1097 1092 … … 1120 1115 * @interface_method_impl{CODECVERB,pfn, f07 } 1121 1116 */ 1122 static DECLCALLBACK(int) vrbProcGetPinCtrl(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1123 { 1124 RT_NOREF(pThisCC); 1117 static DECLCALLBACK(int) vrbProcGetPinCtrl(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1118 { 1125 1119 *puResp = 0; 1126 1120 … … 1147 1141 * @interface_method_impl{CODECVERB,pfn, 707 } 1148 1142 */ 1149 static DECLCALLBACK(int) vrbProcSetPinCtrl(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1150 { 1151 RT_NOREF(pThisCC); 1143 static DECLCALLBACK(int) vrbProcSetPinCtrl(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1144 { 1152 1145 *puResp = 0; 1153 1146 … … 1179 1172 * @interface_method_impl{CODECVERB,pfn, f08 } 1180 1173 */ 1181 static DECLCALLBACK(int) vrbProcGetUnsolicitedEnabled(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1182 { 1183 RT_NOREF(pThisCC); 1174 static DECLCALLBACK(int) vrbProcGetUnsolicitedEnabled(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1175 { 1184 1176 *puResp = 0; 1185 1177 … … 1206 1198 * @interface_method_impl{CODECVERB,pfn, 708 } 1207 1199 */ 1208 static DECLCALLBACK(int) vrbProcSetUnsolicitedEnabled(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1209 { 1210 RT_NOREF(pThisCC); 1200 static DECLCALLBACK(int) vrbProcSetUnsolicitedEnabled(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1201 { 1211 1202 *puResp = 0; 1212 1203 … … 1237 1228 * @interface_method_impl{CODECVERB,pfn, f09 } 1238 1229 */ 1239 static DECLCALLBACK(int) vrbProcGetPinSense(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1240 { 1241 RT_NOREF(pThisCC); 1230 static DECLCALLBACK(int) vrbProcGetPinSense(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1231 { 1242 1232 *puResp = 0; 1243 1233 … … 1259 1249 * @interface_method_impl{CODECVERB,pfn, 709 } 1260 1250 */ 1261 static DECLCALLBACK(int) vrbProcSetPinSense(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1262 { 1263 RT_NOREF(pThisCC); 1251 static DECLCALLBACK(int) vrbProcSetPinSense(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1252 { 1264 1253 *puResp = 0; 1265 1254 … … 1282 1271 * @interface_method_impl{CODECVERB,pfn, ??? } 1283 1272 */ 1284 static DECLCALLBACK(int) vrbProcGetConnectionListEntry(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1285 { 1286 RT_NOREF(pThisCC); 1273 static DECLCALLBACK(int) vrbProcGetConnectionListEntry(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1274 { 1287 1275 *puResp = 0; 1288 1276 … … 1301 1289 * @interface_method_impl{CODECVERB,pfn, f03 } 1302 1290 */ 1303 static DECLCALLBACK(int) vrbProcGetProcessingState(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1304 { 1305 RT_NOREF(pThisCC); 1291 static DECLCALLBACK(int) vrbProcGetProcessingState(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1292 { 1306 1293 *puResp = 0; 1307 1294 … … 1316 1303 * @interface_method_impl{CODECVERB,pfn, 703 } 1317 1304 */ 1318 static DECLCALLBACK(int) vrbProcSetProcessingState(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1319 { 1320 RT_NOREF(pThisCC); 1305 static DECLCALLBACK(int) vrbProcSetProcessingState(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1306 { 1321 1307 *puResp = 0; 1322 1308 … … 1330 1316 * @interface_method_impl{CODECVERB,pfn, f0d } 1331 1317 */ 1332 static DECLCALLBACK(int) vrbProcGetDigitalConverter(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1333 { 1334 RT_NOREF(pThisCC); 1318 static DECLCALLBACK(int) vrbProcGetDigitalConverter(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1319 { 1335 1320 *puResp = 0; 1336 1321 … … 1343 1328 1344 1329 1345 static int codecSetDigitalConverter(PHDACODEC pThis, uint32_t uCmd, uint8_t u8Offset, uint64_t *puResp)1330 static int codecSetDigitalConverter(PHDACODECR3 pThis, uint32_t uCmd, uint8_t u8Offset, uint64_t *puResp) 1346 1331 { 1347 1332 *puResp = 0; … … 1358 1343 * @interface_method_impl{CODECVERB,pfn, 70d } 1359 1344 */ 1360 static DECLCALLBACK(int) vrbProcSetDigitalConverter1(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1361 { 1362 RT_NOREF(pThisCC); 1345 static DECLCALLBACK(int) vrbProcSetDigitalConverter1(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1346 { 1363 1347 return codecSetDigitalConverter(pThis, uCmd, 0, puResp); 1364 1348 } … … 1368 1352 * @interface_method_impl{CODECVERB,pfn, 70e } 1369 1353 */ 1370 static DECLCALLBACK(int) vrbProcSetDigitalConverter2(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1371 { 1372 RT_NOREF(pThisCC); 1354 static DECLCALLBACK(int) vrbProcSetDigitalConverter2(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1355 { 1373 1356 return codecSetDigitalConverter(pThis, uCmd, 8, puResp); 1374 1357 } … … 1378 1361 * @interface_method_impl{CODECVERB,pfn, f20 } 1379 1362 */ 1380 static DECLCALLBACK(int) vrbProcGetSubId(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1381 { 1382 RT_NOREF(pThisCC); 1363 static DECLCALLBACK(int) vrbProcGetSubId(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1364 { 1383 1365 Assert(CODEC_CAD(uCmd) == pThis->id); 1384 1366 uint8_t const cTotalNodes = (uint8_t)RT_MIN(pThis->cTotalNodes, RT_ELEMENTS(pThis->aNodes)); … … 1398 1380 1399 1381 1400 static int codecSetSubIdX(PHDACODEC pThis, uint32_t uCmd, uint8_t u8Offset)1382 static int codecSetSubIdX(PHDACODECR3 pThis, uint32_t uCmd, uint8_t u8Offset) 1401 1383 { 1402 1384 Assert(CODEC_CAD(uCmd) == pThis->id); … … 1421 1403 * @interface_method_impl{CODECVERB,pfn, 720 } 1422 1404 */ 1423 static DECLCALLBACK(int) vrbProcSetSubId0(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1424 { 1425 RT_NOREF(pThisCC); 1405 static DECLCALLBACK(int) vrbProcSetSubId0(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1406 { 1426 1407 *puResp = 0; 1427 1408 return codecSetSubIdX(pThis, uCmd, 0); … … 1432 1413 * @interface_method_impl{CODECVERB,pfn, 721 } 1433 1414 */ 1434 static DECLCALLBACK(int) vrbProcSetSubId1(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1435 { 1436 RT_NOREF(pThisCC); 1415 static DECLCALLBACK(int) vrbProcSetSubId1(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1416 { 1437 1417 *puResp = 0; 1438 1418 return codecSetSubIdX(pThis, uCmd, 8); … … 1443 1423 * @interface_method_impl{CODECVERB,pfn, 722 } 1444 1424 */ 1445 static DECLCALLBACK(int) vrbProcSetSubId2(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1446 { 1447 RT_NOREF(pThisCC); 1425 static DECLCALLBACK(int) vrbProcSetSubId2(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1426 { 1448 1427 *puResp = 0; 1449 1428 return codecSetSubIdX(pThis, uCmd, 16); … … 1454 1433 * @interface_method_impl{CODECVERB,pfn, 723 } 1455 1434 */ 1456 static DECLCALLBACK(int) vrbProcSetSubId3(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1457 { 1458 RT_NOREF(pThisCC); 1435 static DECLCALLBACK(int) vrbProcSetSubId3(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1436 { 1459 1437 *puResp = 0; 1460 1438 return codecSetSubIdX(pThis, uCmd, 24); … … 1465 1443 * @interface_method_impl{CODECVERB,pfn, ??? } 1466 1444 */ 1467 static DECLCALLBACK(int) vrbProcReset(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1468 { 1469 RT_NOREF(pThisCC); 1445 static DECLCALLBACK(int) vrbProcReset(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1446 { 1470 1447 Assert(CODEC_CAD(uCmd) == pThis->id); 1471 1448 … … 1488 1465 * @interface_method_impl{CODECVERB,pfn, f05 } 1489 1466 */ 1490 static DECLCALLBACK(int) vrbProcGetPowerState(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1491 { 1492 RT_NOREF(pThisCC); 1467 static DECLCALLBACK(int) vrbProcGetPowerState(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1468 { 1493 1469 *puResp = 0; 1494 1470 … … 1522 1498 * @interface_method_impl{CODECVERB,pfn, 705 } 1523 1499 */ 1524 static DECLCALLBACK(int) vrbProcSetPowerState(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1525 { 1526 RT_NOREF(pThisCC); 1500 static DECLCALLBACK(int) vrbProcSetPowerState(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1501 { 1527 1502 *puResp = 0; 1528 1503 … … 1635 1610 * @interface_method_impl{CODECVERB,pfn, 705 } 1636 1611 */ 1637 static DECLCALLBACK(int) vrbProcSetPowerState(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1638 { 1639 RT_NOREF(pThisCC); 1612 static DECLCALLBACK(int) vrbProcSetPowerState(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1613 { 1640 1614 Assert(CODEC_CAD(uCmd) == pThis->id); 1641 1615 uint8_t const cTotalNodes = (uint8_t)RT_MIN(pThis->cTotalNodes, RT_ELEMENTS(pThis->aNodes)); … … 1709 1683 * @interface_method_impl{CODECVERB,pfn, f06 } 1710 1684 */ 1711 static DECLCALLBACK(int) vrbProcGetStreamId(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1712 { 1713 RT_NOREF(pThisCC); 1685 static DECLCALLBACK(int) vrbProcGetStreamId(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1686 { 1714 1687 *puResp = 0; 1715 1688 … … 1737 1710 * @interface_method_impl{CODECVERB,pfn, a0 } 1738 1711 */ 1739 static DECLCALLBACK(int) vrbProcGetConverterFormat(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1740 { 1741 RT_NOREF(pThisCC); 1712 static DECLCALLBACK(int) vrbProcGetConverterFormat(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1713 { 1742 1714 *puResp = 0; 1743 1715 … … 1762 1734 * @interface_method_impl{CODECVERB,pfn, ??? - Also see section 3.7.1. } 1763 1735 */ 1764 static DECLCALLBACK(int) vrbProcSetConverterFormat(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1765 { 1766 RT_NOREF(pThisCC); 1736 static DECLCALLBACK(int) vrbProcSetConverterFormat(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1737 { 1767 1738 *puResp = 0; 1768 1739 … … 1785 1756 * @interface_method_impl{CODECVERB,pfn, f0c } 1786 1757 */ 1787 static DECLCALLBACK(int) vrbProcGetEAPD_BTLEnabled(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1788 { 1789 RT_NOREF(pThisCC); 1758 static DECLCALLBACK(int) vrbProcGetEAPD_BTLEnabled(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1759 { 1790 1760 *puResp = 0; 1791 1761 … … 1806 1776 * @interface_method_impl{CODECVERB,pfn, 70c } 1807 1777 */ 1808 static DECLCALLBACK(int) vrbProcSetEAPD_BTLEnabled(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1809 { 1810 RT_NOREF(pThisCC); 1778 static DECLCALLBACK(int) vrbProcSetEAPD_BTLEnabled(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1779 { 1811 1780 *puResp = 0; 1812 1781 … … 1831 1800 * @interface_method_impl{CODECVERB,pfn, f0f } 1832 1801 */ 1833 static DECLCALLBACK(int) vrbProcGetVolumeKnobCtrl(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1834 { 1835 RT_NOREF(pThisCC); 1802 static DECLCALLBACK(int) vrbProcGetVolumeKnobCtrl(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1803 { 1836 1804 *puResp = 0; 1837 1805 … … 1848 1816 * @interface_method_impl{CODECVERB,pfn, 70f } 1849 1817 */ 1850 static DECLCALLBACK(int) vrbProcSetVolumeKnobCtrl(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1851 { 1852 RT_NOREF(pThisCC); 1818 static DECLCALLBACK(int) vrbProcSetVolumeKnobCtrl(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1819 { 1853 1820 *puResp = 0; 1854 1821 … … 1869 1836 * @interface_method_impl{CODECVERB,pfn, f15 } 1870 1837 */ 1871 static DECLCALLBACK(int) vrbProcGetGPIOData(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp)1872 { 1873 RT_NOREF(pThis, pThisCC,uCmd);1838 static DECLCALLBACK(int) vrbProcGetGPIOData(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1839 { 1840 RT_NOREF(pThis, uCmd); 1874 1841 *puResp = 0; 1875 1842 return VINF_SUCCESS; … … 1880 1847 * @interface_method_impl{CODECVERB,pfn, 715 } 1881 1848 */ 1882 static DECLCALLBACK(int) vrbProcSetGPIOData(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp)1883 { 1884 RT_NOREF(pThis, pThisCC,uCmd);1849 static DECLCALLBACK(int) vrbProcSetGPIOData(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1850 { 1851 RT_NOREF(pThis, uCmd); 1885 1852 *puResp = 0; 1886 1853 return VINF_SUCCESS; … … 1891 1858 * @interface_method_impl{CODECVERB,pfn, f16 } 1892 1859 */ 1893 static DECLCALLBACK(int) vrbProcGetGPIOEnableMask(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp)1894 { 1895 RT_NOREF(pThis, pThisCC,uCmd);1860 static DECLCALLBACK(int) vrbProcGetGPIOEnableMask(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1861 { 1862 RT_NOREF(pThis, uCmd); 1896 1863 *puResp = 0; 1897 1864 return VINF_SUCCESS; … … 1902 1869 * @interface_method_impl{CODECVERB,pfn, 716 } 1903 1870 */ 1904 static DECLCALLBACK(int) vrbProcSetGPIOEnableMask(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp)1905 { 1906 RT_NOREF(pThis, pThisCC,uCmd);1871 static DECLCALLBACK(int) vrbProcSetGPIOEnableMask(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1872 { 1873 RT_NOREF(pThis, uCmd); 1907 1874 *puResp = 0; 1908 1875 return VINF_SUCCESS; … … 1913 1880 * @interface_method_impl{CODECVERB,pfn, f17 } 1914 1881 */ 1915 static DECLCALLBACK(int) vrbProcGetGPIODirection(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1916 { 1917 RT_NOREF(pThisCC); 1882 static DECLCALLBACK(int) vrbProcGetGPIODirection(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1883 { 1918 1884 *puResp = 0; 1919 1885 … … 1931 1897 * @interface_method_impl{CODECVERB,pfn, 717 } 1932 1898 */ 1933 static DECLCALLBACK(int) vrbProcSetGPIODirection(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1934 { 1935 RT_NOREF(pThisCC); 1899 static DECLCALLBACK(int) vrbProcSetGPIODirection(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1900 { 1936 1901 *puResp = 0; 1937 1902 … … 1952 1917 * @interface_method_impl{CODECVERB,pfn, f1c } 1953 1918 */ 1954 static DECLCALLBACK(int) vrbProcGetConfig(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 1955 { 1956 RT_NOREF(pThisCC); 1919 static DECLCALLBACK(int) vrbProcGetConfig(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1920 { 1957 1921 *puResp = 0; 1958 1922 … … 1975 1939 } 1976 1940 1977 static int codecSetConfigX(PHDACODEC pThis, uint32_t uCmd, uint8_t u8Offset)1941 static int codecSetConfigX(PHDACODECR3 pThis, uint32_t uCmd, uint8_t u8Offset) 1978 1942 { 1979 1943 uint32_t *pu32Reg = NULL; … … 2003 1967 * @interface_method_impl{CODECVERB,pfn, 71c } 2004 1968 */ 2005 static DECLCALLBACK(int) vrbProcSetConfig0(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 2006 { 2007 RT_NOREF(pThisCC); 1969 static DECLCALLBACK(int) vrbProcSetConfig0(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1970 { 2008 1971 *puResp = 0; 2009 1972 return codecSetConfigX(pThis, uCmd, 0); … … 2014 1977 * @interface_method_impl{CODECVERB,pfn, 71d } 2015 1978 */ 2016 static DECLCALLBACK(int) vrbProcSetConfig1(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 2017 { 2018 RT_NOREF(pThisCC); 1979 static DECLCALLBACK(int) vrbProcSetConfig1(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1980 { 2019 1981 *puResp = 0; 2020 1982 return codecSetConfigX(pThis, uCmd, 8); … … 2025 1987 * @interface_method_impl{CODECVERB,pfn, 71e } 2026 1988 */ 2027 static DECLCALLBACK(int) vrbProcSetConfig2(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 2028 { 2029 RT_NOREF(pThisCC); 1989 static DECLCALLBACK(int) vrbProcSetConfig2(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 1990 { 2030 1991 *puResp = 0; 2031 1992 return codecSetConfigX(pThis, uCmd, 16); … … 2036 1997 * @interface_method_impl{CODECVERB,pfn, 71e } 2037 1998 */ 2038 static DECLCALLBACK(int) vrbProcSetConfig3(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 2039 { 2040 RT_NOREF(pThisCC); 1999 static DECLCALLBACK(int) vrbProcSetConfig3(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 2000 { 2041 2001 *puResp = 0; 2042 2002 return codecSetConfigX(pThis, uCmd, 24); … … 2047 2007 * @interface_method_impl{CODECVERB,pfn, f04 } 2048 2008 */ 2049 static DECLCALLBACK(int) vrbProcGetSDISelect(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 2050 { 2051 RT_NOREF(pThisCC); 2009 static DECLCALLBACK(int) vrbProcGetSDISelect(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 2010 { 2052 2011 *puResp = 0; 2053 2012 … … 2064 2023 * @interface_method_impl{CODECVERB,pfn, 704 } 2065 2024 */ 2066 static DECLCALLBACK(int) vrbProcSetSDISelect(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 2067 { 2068 RT_NOREF(pThisCC); 2025 static DECLCALLBACK(int) vrbProcSetSDISelect(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 2026 { 2069 2027 *puResp = 0; 2070 2028 … … 2085 2043 * @interface_method_impl{CODECVERB,pfn, 3-- } 2086 2044 */ 2087 static DECLCALLBACK(int) vrbProcR3SetAmplifier(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp)2045 static DECLCALLBACK(int) vrbProcR3SetAmplifier(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 2088 2046 { 2089 2047 *puResp = 0; … … 2132 2090 // if (CODEC_NID(uCmd) == pThis->u8AdcVolsLineIn) 2133 2091 // { 2134 hdaR3CodecToAudVolume(pThis CC, pNode, pAmplifier, PDMAUDIOMIXERCTL_LINE_IN);2092 hdaR3CodecToAudVolume(pThis, pNode, pAmplifier, PDMAUDIOMIXERCTL_LINE_IN); 2135 2093 // } 2136 2094 } … … 2143 2101 2144 2102 if (CODEC_NID(uCmd) == pThis->u8DacLineOut) 2145 hdaR3CodecToAudVolume(pThis CC, pNode, pAmplifier, PDMAUDIOMIXERCTL_FRONT);2103 hdaR3CodecToAudVolume(pThis, pNode, pAmplifier, PDMAUDIOMIXERCTL_FRONT); 2146 2104 } 2147 2105 … … 2153 2111 * @interface_method_impl{CODECVERB,pfn, 706 } 2154 2112 */ 2155 static DECLCALLBACK(int) vrbProcR3SetStreamId(PHDACODEC pThis, PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp)2113 static DECLCALLBACK(int) vrbProcR3SetStreamId(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 2156 2114 { 2157 2115 *puResp = 0; … … 2204 2162 2205 2163 /* Propagate to the controller. */ 2206 hdaR3MixerControl(pThis CC, PDMAUDIOMIXERCTL_FRONT, uSD, uChannel);2164 hdaR3MixerControl(pThis, PDMAUDIOMIXERCTL_FRONT, uSD, uChannel); 2207 2165 # ifdef VBOX_WITH_AUDIO_HDA_51_SURROUND 2208 hdaR3MixerControl(pThis CC, PDMAUDIOMIXERCTL_CENTER_LFE, uSD, uChannel);2209 hdaR3MixerControl(pThis CC, PDMAUDIOMIXERCTL_REAR, uSD, uChannel);2166 hdaR3MixerControl(pThis, PDMAUDIOMIXERCTL_CENTER_LFE, uSD, uChannel); 2167 hdaR3MixerControl(pThis, PDMAUDIOMIXERCTL_REAR, uSD, uChannel); 2210 2168 # endif 2211 2169 } 2212 2170 else if (enmDir == PDMAUDIODIR_IN) 2213 2171 { 2214 hdaR3MixerControl(pThis CC, PDMAUDIOMIXERCTL_LINE_IN, uSD, uChannel);2172 hdaR3MixerControl(pThis, PDMAUDIOMIXERCTL_LINE_IN, uSD, uChannel); 2215 2173 # ifdef VBOX_WITH_AUDIO_HDA_MIC_IN 2216 hdaR3MixerControl(pThis CC, PDMAUDIOMIXERCTL_MIC_IN, uSD, uChannel);2174 hdaR3MixerControl(pThis, PDMAUDIOMIXERCTL_MIC_IN, uSD, uChannel); 2217 2175 # endif 2218 2176 } … … 2290 2248 * @returns VBox status code (not strict). 2291 2249 */ 2292 DECLHIDDEN(int) hdaR3CodecLookup(PHDACODECCC pThisCC, uint32_t uCmd, uint64_t *puResp) 2293 { 2294 PHDACODEC pThis = &pThisCC->State; 2295 2250 DECLHIDDEN(int) hdaR3CodecLookup(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp) 2251 { 2296 2252 /* 2297 2253 * Clear the return value and assert some sanity. … … 2299 2255 AssertPtr(puResp); 2300 2256 *puResp = 0; 2301 AssertPtr(pThis CC);2257 AssertPtr(pThis); 2302 2258 AssertMsgReturn(CODEC_CAD(uCmd) == pThis->id, 2303 2259 ("Unknown codec address 0x%x\n", CODEC_CAD(uCmd)), … … 2341 2297 AssertPtrReturn(g_aCodecVerbs[iCur].pfn, VERR_INTERNAL_ERROR_5); /* Paranoia^2. */ 2342 2298 2343 int rc = g_aCodecVerbs[iCur].pfn(pThis, pThisCC,uCmd, puResp);2299 int rc = g_aCodecVerbs[iCur].pfn(pThis, uCmd, puResp); 2344 2300 AssertRC(rc); 2345 2301 Log3Func(("[NID0x%02x] (0x%x) %s: 0x%x -> 0x%x\n", … … 2376 2332 uint8_t uLevel; 2377 2333 /** Pointer to codec state. */ 2378 PHDACODEC pThis;2334 PHDACODECR3 pThis; 2379 2335 } CODECDEBUG; 2380 2336 /** Pointer to the debug info item printing state for the codec. */ … … 2578 2534 * Worker for hdaR3DbgInfoCodecNodes implementing the 'hdcnodes' info item. 2579 2535 */ 2580 DECLHIDDEN(void) hdaR3CodecDbgListNodes(PHDACODECR3 pThis CC, PCDBGFINFOHLP pHlp, const char *pszArgs)2581 { 2582 RT_NOREF(p ThisCC, pszArgs);2536 DECLHIDDEN(void) hdaR3CodecDbgListNodes(PHDACODECR3 pThis, PCDBGFINFOHLP pHlp, const char *pszArgs) 2537 { 2538 RT_NOREF(pszArgs); 2583 2539 2584 2540 pHlp->pfnPrintf(pHlp, "HDA LINK / INPUTS\n"); … … 2586 2542 CODECDEBUG DbgInfo; 2587 2543 DbgInfo.pHlp = pHlp; 2588 DbgInfo.pThis = &pThisCC->State;2544 DbgInfo.pThis = pThis; 2589 2545 DbgInfo.uLevel = 0; 2590 2546 … … 2592 2548 2593 2549 CODECDBG_INDENT 2594 for (uint8_t i = 0; i < pThis CC->State.cTotalNodes; i++)2595 { 2596 PCODECNODE pNode = &pThis CC->State.aNodes[i];2550 for (uint8_t i = 0; i < pThis->cTotalNodes; i++) 2551 { 2552 PCODECNODE pNode = &pThis->aNodes[i]; 2597 2553 2598 2554 /* Start with all nodes which have connection entries set. */ … … 2607 2563 * Worker for hdaR3DbgInfoCodecSelector implementing the 'hdcselector' info item. 2608 2564 */ 2609 DECLHIDDEN(void) hdaR3CodecDbgSelector(PHDACODECR3 pThis CC, PCDBGFINFOHLP pHlp, const char *pszArgs)2610 { 2611 RT_NOREF(pThis CC, pHlp, pszArgs);2565 DECLHIDDEN(void) hdaR3CodecDbgSelector(PHDACODECR3 pThis, PCDBGFINFOHLP pHlp, const char *pszArgs) 2566 { 2567 RT_NOREF(pThis, pHlp, pszArgs); 2612 2568 } 2613 2569 2614 2570 2615 2571 #if 0 /* unused */ 2616 static DECLCALLBACK(void) stac9220DbgNodes(PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs)2572 static DECLCALLBACK(void) stac9220DbgNodes(PHDACODECR3 pThis, PCDBGFINFOHLP pHlp, const char *pszArgs) 2617 2573 { 2618 2574 RT_NOREF(pszArgs); … … 2636 2592 *********************************************************************************************************************************/ 2637 2593 2638 int hdaR3CodecAddStream(PHDACODECR3 pThis CC, PDMAUDIOMIXERCTL enmMixerCtl, PPDMAUDIOSTREAMCFG pCfg)2639 { 2640 AssertPtrReturn(pThis CC, VERR_INVALID_POINTER);2594 int hdaR3CodecAddStream(PHDACODECR3 pThis, PDMAUDIOMIXERCTL enmMixerCtl, PPDMAUDIOSTREAMCFG pCfg) 2595 { 2596 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 2641 2597 AssertPtrReturn(pCfg, VERR_INVALID_POINTER); 2642 2598 … … 2666 2622 2667 2623 if (RT_SUCCESS(rc)) 2668 rc = hdaR3MixerAddStream(pThis CC, enmMixerCtl, pCfg);2624 rc = hdaR3MixerAddStream(pThis, enmMixerCtl, pCfg); 2669 2625 2670 2626 LogFlowFuncLeaveRC(rc); … … 2673 2629 2674 2630 2675 int hdaR3CodecRemoveStream(PHDACODECR3 pThis CC, PDMAUDIOMIXERCTL enmMixerCtl, bool fImmediate)2676 { 2677 AssertPtrReturn(pThis CC, VERR_INVALID_POINTER);2678 2679 int rc = hdaR3MixerRemoveStream(pThis CC, enmMixerCtl, fImmediate);2631 int hdaR3CodecRemoveStream(PHDACODECR3 pThis, PDMAUDIOMIXERCTL enmMixerCtl, bool fImmediate) 2632 { 2633 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 2634 2635 int rc = hdaR3MixerRemoveStream(pThis, enmMixerCtl, fImmediate); 2680 2636 2681 2637 LogFlowFuncLeaveRC(rc); … … 2689 2645 * @returns VBox status code. 2690 2646 * @param pDevIns The device instance of the HDA device. 2691 * @param pThis CCThe codec instance data.2647 * @param pThis The codec instance data. 2692 2648 * @param pSSM The saved state handle. 2693 2649 */ 2694 int hdaCodecSaveState(PPDMDEVINS pDevIns, PHDACODECR3 pThisCC, PSSMHANDLE pSSM) 2695 { 2696 PHDACODEC pThis = &pThisCC->State; 2697 PCPDMDEVHLPR3 pHlp = pDevIns->pHlpR3; 2650 int hdaCodecSaveState(PPDMDEVINS pDevIns, PHDACODECR3 pThis, PSSMHANDLE pSSM) 2651 { 2652 PCPDMDEVHLPR3 pHlp = pDevIns->pHlpR3; 2698 2653 AssertLogRelMsgReturn(pThis->cTotalNodes == STAC9221_NUM_NODES, ("cTotalNodes=%#x, should be 0x1c", pThis->cTotalNodes), 2699 2654 VERR_INTERNAL_ERROR); … … 2711 2666 * @returns VBox status code. 2712 2667 * @param pDevIns The device instance of the HDA device. 2713 * @param pThis CCThe codec instance data.2668 * @param pThis The codec instance data. 2714 2669 * @param pSSM The saved state handle. 2715 2670 * @param uVersion The state version. 2716 2671 */ 2717 int hdaR3CodecLoadState(PPDMDEVINS pDevIns, PHDACODECR3 pThisCC, PSSMHANDLE pSSM, uint32_t uVersion) 2718 { 2719 PHDACODEC pThis = &pThisCC->State; 2672 int hdaR3CodecLoadState(PPDMDEVINS pDevIns, PHDACODECR3 pThis, PSSMHANDLE pSSM, uint32_t uVersion) 2673 { 2720 2674 PCPDMDEVHLPR3 pHlp = pDevIns->pHlpR3; 2721 2675 PCSSMFIELD pFields = NULL; … … 2766 2720 { 2767 2721 pNode = &pThis->aNodes[pThis->u8DacLineOut]; 2768 hdaR3CodecToAudVolume(pThis CC, pNode, &pNode->dac.B_params, PDMAUDIOMIXERCTL_FRONT);2722 hdaR3CodecToAudVolume(pThis, pNode, &pNode->dac.B_params, PDMAUDIOMIXERCTL_FRONT); 2769 2723 } 2770 2724 else if (hdaCodecIsSpdifOutNode(pThis, pThis->u8DacLineOut)) 2771 2725 { 2772 2726 pNode = &pThis->aNodes[pThis->u8DacLineOut]; 2773 hdaR3CodecToAudVolume(pThis CC, pNode, &pNode->spdifout.B_params, PDMAUDIOMIXERCTL_FRONT);2727 hdaR3CodecToAudVolume(pThis, pNode, &pNode->spdifout.B_params, PDMAUDIOMIXERCTL_FRONT); 2774 2728 } 2775 2729 2776 2730 pNode = &pThis->aNodes[pThis->u8AdcVolsLineIn]; 2777 hdaR3CodecToAudVolume(pThis CC, pNode, &pNode->adcvol.B_params, PDMAUDIOMIXERCTL_LINE_IN);2731 hdaR3CodecToAudVolume(pThis, pNode, &pNode->adcvol.B_params, PDMAUDIOMIXERCTL_LINE_IN); 2778 2732 2779 2733 LogFlowFuncLeaveRC(VINF_SUCCESS); … … 2785 2739 * Powers off the codec (ring-3). 2786 2740 * 2787 * @param pThis CCThe codec data.2788 */ 2789 void hdaR3CodecPowerOff(PHDACODECR3 pThis CC)2741 * @param pThis The codec data. 2742 */ 2743 void hdaR3CodecPowerOff(PHDACODECR3 pThis) 2790 2744 { 2791 2745 LogFlowFuncEnter(); 2792 2746 LogRel2(("HDA: Powering off codec ...\n")); 2793 2747 2794 int rc2 = hdaR3CodecRemoveStream(pThis CC, PDMAUDIOMIXERCTL_FRONT, true /*fImmediate*/);2748 int rc2 = hdaR3CodecRemoveStream(pThis, PDMAUDIOMIXERCTL_FRONT, true /*fImmediate*/); 2795 2749 AssertRC(rc2); 2796 2750 #ifdef VBOX_WITH_AUDIO_HDA_51_SURROUND 2797 rc2 = hdaR3CodecRemoveStream(pThis CC, PDMAUDIOMIXERCTL_CENTER_LFE, true /*fImmediate*/);2751 rc2 = hdaR3CodecRemoveStream(pThis, PDMAUDIOMIXERCTL_CENTER_LFE, true /*fImmediate*/); 2798 2752 AssertRC(rc2); 2799 rc2 = hdaR3CodecRemoveStream(pThis CC, PDMAUDIOMIXERCTL_REAR, true /*fImmediate*/);2753 rc2 = hdaR3CodecRemoveStream(pThis, PDMAUDIOMIXERCTL_REAR, true /*fImmediate*/); 2800 2754 AssertRC(rc2); 2801 2755 #endif 2802 2756 2803 2757 #ifdef VBOX_WITH_AUDIO_HDA_MIC_IN 2804 rc2 = hdaR3CodecRemoveStream(pThis CC, PDMAUDIOMIXERCTL_MIC_IN, true /*fImmediate*/);2758 rc2 = hdaR3CodecRemoveStream(pThis, PDMAUDIOMIXERCTL_MIC_IN, true /*fImmediate*/); 2805 2759 AssertRC(rc2); 2806 2760 #endif 2807 rc2 = hdaR3CodecRemoveStream(pThis CC, PDMAUDIOMIXERCTL_LINE_IN, true /*fImmediate*/);2761 rc2 = hdaR3CodecRemoveStream(pThis, PDMAUDIOMIXERCTL_LINE_IN, true /*fImmediate*/); 2808 2762 AssertRC(rc2); 2809 2763 } … … 2815 2769 * @returns VBox status code. 2816 2770 * @param pDevIns The associated device instance. 2817 * @param pThis CCThe codec data.2771 * @param pThis The codec data. 2818 2772 * @param uLUN Device LUN to assign. 2819 2773 * @param pCfg CFGM node to use for configuration. 2820 2774 */ 2821 int hdaR3CodecConstruct(PPDMDEVINS pDevIns, PHDACODECR3 pThis CC, uint16_t uLUN, PCFGMNODE pCfg)2775 int hdaR3CodecConstruct(PPDMDEVINS pDevIns, PHDACODECR3 pThis, uint16_t uLUN, PCFGMNODE pCfg) 2822 2776 { 2823 2777 AssertPtrReturn(pDevIns, VERR_INVALID_POINTER); 2824 AssertPtrReturn(pThis CC,VERR_INVALID_POINTER);2778 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 2825 2779 AssertPtrReturn(pCfg, VERR_INVALID_POINTER); 2826 PHDACODEC pThis = &pThisCC->State;2827 2780 2828 2781 pThis->id = uLUN; … … 2849 2802 */ 2850 2803 PCODECNODE pNode = &pThis->aNodes[pThis->u8DacLineOut]; 2851 rc = hdaR3CodecToAudVolume(pThis CC, pNode, &pNode->dac.B_params, PDMAUDIOMIXERCTL_FRONT);2804 rc = hdaR3CodecToAudVolume(pThis, pNode, &pNode->dac.B_params, PDMAUDIOMIXERCTL_FRONT); 2852 2805 AssertRCReturn(rc, rc); 2853 2806 2854 2807 pNode = &pThis->aNodes[pThis->u8AdcVolsLineIn]; 2855 rc = hdaR3CodecToAudVolume(pThis CC, pNode, &pNode->adcvol.B_params, PDMAUDIOMIXERCTL_LINE_IN);2808 rc = hdaR3CodecToAudVolume(pThis, pNode, &pNode->adcvol.B_params, PDMAUDIOMIXERCTL_LINE_IN); 2856 2809 AssertRCReturn(rc, rc); 2857 2810 … … 2875 2828 * Destructs a codec. 2876 2829 * 2877 * @param pThis CCCodec to destruct.2878 */ 2879 void hdaCodecDestruct(PHDACODECR3 pThis CC)2830 * @param pThis Codec to destruct. 2831 */ 2832 void hdaCodecDestruct(PHDACODECR3 pThis) 2880 2833 { 2881 2834 LogFlowFuncEnter(); 2882 2835 2883 2836 /* Nothing to do here atm. */ 2884 RT_NOREF(pThis CC);2837 RT_NOREF(pThis); 2885 2838 } 2886 2839 … … 2889 2842 * Resets a codec. 2890 2843 * 2891 * @param pThis CCCodec to reset.2892 */ 2893 void hdaCodecReset(PHDACODECR3 pThis CC)2894 { 2895 switch (pThis CC->State.enmType)2844 * @param pThis Codec to reset. 2845 */ 2846 void hdaCodecReset(PHDACODECR3 pThis) 2847 { 2848 switch (pThis->enmType) 2896 2849 { 2897 2850 case CODECTYPE_STAC9220: 2898 stac9220Reset( &pThisCC->State);2851 stac9220Reset(pThis); 2899 2852 break; 2900 2853 -
trunk/src/VBox/Devices/Audio/DevHdaCodec.h
r90137 r90138 30 30 31 31 32 /** The ICH HDA (Intel) common codec state. */33 typedef struct HDACODEC *PHDACODEC;34 32 /** The ICH HDA (Intel) ring-3 codec state. */ 35 33 typedef struct HDACODECR3 *PHDACODECR3; 36 #ifdef IN_RING3 /* (A leftover from attempt at running the codec in ring-0. Deemed unsafe37 and not a help with performance when it mattered.) */38 /** The ICH HDA (Intel) current context codec state. */39 typedef CTX_SUFF(PHDACODEC) PHDACODECCC;40 #endif41 34 42 35 /** … … 798 791 799 792 /** 800 * HDA codec state ( shared).793 * HDA codec state (ring-3, no shared state). 801 794 */ 802 typedef struct HDACODEC 795 typedef struct HDACODECR3 803 796 { 804 797 /** Codec implementation type. */ … … 837 830 838 831 STAMCOUNTER StatLookupsR3; 839 #if 0 /* Codec is not yet kosher enough for ring-0. @bugref{9890c64} */840 STAMCOUNTER StatLookupsR0;841 #endif842 } HDACODEC;843 844 845 /**846 * HDA codec state (ring-3).847 */848 typedef struct HDACODECR3849 {850 /** The state (was shared with ring-0 for a while). */851 HDACODEC State;852 832 } HDACODECR3; 833 853 834 854 835 /** @name HDA Codec API used by the device emulation. 855 836 * @{ */ 856 int hdaR3CodecConstruct(PPDMDEVINS pDevIns, PHDACODECR3 pThis CC, uint16_t uLUN, PCFGMNODE pCfg);857 void hdaR3CodecPowerOff(PHDACODECR3 pThis CC);858 int hdaR3CodecLoadState(PPDMDEVINS pDevIns, PHDACODECR3 pThis CC, PSSMHANDLE pSSM, uint32_t uVersion);859 int hdaR3CodecAddStream(PHDACODECR3 pThis CC, PDMAUDIOMIXERCTL enmMixerCtl, PPDMAUDIOSTREAMCFG pCfg);860 int hdaR3CodecRemoveStream(PHDACODECR3 pThis CC, PDMAUDIOMIXERCTL enmMixerCtl, bool fImmediate);861 862 int hdaCodecSaveState(PPDMDEVINS pDevIns, PHDACODECR3 pThis CC, PSSMHANDLE pSSM);863 void hdaCodecDestruct(PHDACODECR3 pThis CC);864 void hdaCodecReset(PHDACODECR3 pThis CC);865 866 DECLHIDDEN(int) hdaR3CodecLookup(PHDACODECR3 pThis CC, uint32_t uCmd, uint64_t *puResp);867 DECLHIDDEN(void) hdaR3CodecDbgListNodes(PHDACODECR3 pThis CC, PCDBGFINFOHLP pHlp, const char *pszArgs);868 DECLHIDDEN(void) hdaR3CodecDbgSelector(PHDACODECR3 pThis CC, PCDBGFINFOHLP pHlp, const char *pszArgs);837 int hdaR3CodecConstruct(PPDMDEVINS pDevIns, PHDACODECR3 pThis, uint16_t uLUN, PCFGMNODE pCfg); 838 void hdaR3CodecPowerOff(PHDACODECR3 pThis); 839 int hdaR3CodecLoadState(PPDMDEVINS pDevIns, PHDACODECR3 pThis, PSSMHANDLE pSSM, uint32_t uVersion); 840 int hdaR3CodecAddStream(PHDACODECR3 pThis, PDMAUDIOMIXERCTL enmMixerCtl, PPDMAUDIOSTREAMCFG pCfg); 841 int hdaR3CodecRemoveStream(PHDACODECR3 pThis, PDMAUDIOMIXERCTL enmMixerCtl, bool fImmediate); 842 843 int hdaCodecSaveState(PPDMDEVINS pDevIns, PHDACODECR3 pThis, PSSMHANDLE pSSM); 844 void hdaCodecDestruct(PHDACODECR3 pThis); 845 void hdaCodecReset(PHDACODECR3 pThis); 846 847 DECLHIDDEN(int) hdaR3CodecLookup(PHDACODECR3 pThis, uint32_t uCmd, uint64_t *puResp); 848 DECLHIDDEN(void) hdaR3CodecDbgListNodes(PHDACODECR3 pThis, PCDBGFINFOHLP pHlp, const char *pszArgs); 849 DECLHIDDEN(void) hdaR3CodecDbgSelector(PHDACODECR3 pThis, PCDBGFINFOHLP pHlp, const char *pszArgs); 869 850 /** @} */ 870 851
Note:
See TracChangeset
for help on using the changeset viewer.