Changeset 82308 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Dec 1, 2019 1:20:59 AM (5 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r82307 r82308 3743 3743 3744 3744 default: 3745 LogRel(("HDA: Warning: Unsupported / too new saved state version (%RU32)\n", uVersion));3746 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;3745 AssertLogRelMsgFailedReturn(("HDA: Internal Error! Didn't expect saved state version %RU32 ending up in hdaR3LoadExecLegacy!\n", 3746 uVersion), VERR_INTERNAL_ERROR_5); 3747 3747 } 3748 3748 -
trunk/src/VBox/Devices/Audio/HDACodec.cpp
r82307 r82308 3129 3129 PCSSMFIELD pFields = NULL; 3130 3130 uint32_t fFlags = 0; 3131 switch (uVersion) 3132 { 3133 case HDA_SAVED_STATE_VERSION_1: 3134 AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR); 3135 pFields = g_aCodecNodeFieldsV1; 3136 fFlags = SSMSTRUCT_FLAGS_MEM_BAND_AID_RELAXED; 3137 break; 3138 3139 case HDA_SAVED_STATE_VERSION_2: 3140 case HDA_SAVED_STATE_VERSION_3: 3141 AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR); 3142 pFields = g_aCodecNodeFields; 3143 fFlags = SSMSTRUCT_FLAGS_MEM_BAND_AID_RELAXED; 3144 break; 3145 3131 if (uVersion >= HDA_SAVED_STATE_VERSION_4) 3132 { 3146 3133 /* Since version 4 a flexible node count is supported. */ 3147 case HDA_SAVED_STATE_VERSION_4: 3148 case HDA_SAVED_STATE_VERSION_5: 3149 case HDA_SAVED_STATE_VERSION: 3150 { 3151 uint32_t cNodes; 3152 int rc2 = SSMR3GetU32(pSSM, &cNodes); 3153 AssertRCReturn(rc2, rc2); 3154 AssertReturn(cNodes == 0x1c, VERR_SSM_DATA_UNIT_FORMAT_CHANGED); 3155 AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR); 3156 3157 pFields = g_aCodecNodeFields; 3158 fFlags = 0; 3159 break; 3160 } 3161 3162 default: 3163 AssertFailedReturn(VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION); 3164 } 3134 uint32_t cNodes; 3135 int rc2 = SSMR3GetU32(pSSM, &cNodes); 3136 AssertRCReturn(rc2, rc2); 3137 AssertReturn(cNodes == 0x1c, VERR_SSM_DATA_UNIT_FORMAT_CHANGED); 3138 AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR); 3139 3140 pFields = g_aCodecNodeFields; 3141 fFlags = 0; 3142 } 3143 else if (uVersion >= HDA_SAVED_STATE_VERSION_2) 3144 { 3145 AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR); 3146 pFields = g_aCodecNodeFields; 3147 fFlags = SSMSTRUCT_FLAGS_MEM_BAND_AID_RELAXED; 3148 } 3149 else if (uVersion >= HDA_SAVED_STATE_VERSION_1) 3150 { 3151 AssertReturn(pThis->cTotalNodes == 0x1c, VERR_INTERNAL_ERROR); 3152 pFields = g_aCodecNodeFieldsV1; 3153 fFlags = SSMSTRUCT_FLAGS_MEM_BAND_AID_RELAXED; 3154 } 3155 else 3156 AssertFailedReturn(VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION); 3165 3157 3166 3158 for (unsigned idxNode = 0; idxNode < pThis->cTotalNodes; ++idxNode)
Note:
See TracChangeset
for help on using the changeset viewer.