- Timestamp:
- Jun 14, 2021 3:41:09 PM (3 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
-
Devices/Audio/AudioTestServiceClient.cpp (modified) (1 diff)
-
Devices/Audio/DrvHostAudioValidationKit.cpp (modified) (8 diffs)
-
ValidationKit/utils/audio/vkat.cpp (modified) (2 diffs)
-
ValidationKit/utils/audio/vkatCmdSelfTest.cpp (modified) (1 diff)
-
ValidationKit/utils/audio/vkatCommon.cpp (modified) (1 diff)
-
ValidationKit/utils/audio/vkatInternal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioTestServiceClient.cpp
r89618 r89685 475 475 } 476 476 else 477 AssertFailedStmt(rc = VERR_NET_PROTOCOL_ERROR); 477 { 478 AssertMsgFailed(("Got unexpected reply '%s'", Reply.szOp)); 479 rc = VERR_NET_PROTOCOL_ERROR; 480 } 478 481 479 482 audioTestSvcClientReplyDestroy(&Reply); -
trunk/src/VBox/Devices/Audio/DrvHostAudioValidationKit.cpp
r89584 r89685 77 77 } u; 78 78 /** The test tone instance to use. */ 79 AUDIOTESTTONE Tone;79 AUDIOTESTTONE Tone; 80 80 /** The test tone parameters to use. */ 81 AUDIOTESTTONEPARMS Parms;81 AUDIOTESTTONEPARMS Parms; 82 82 } VALKITTESTTONEDATA; 83 83 … … 140 140 /** The Audio Test Service (ATS) instance. */ 141 141 ATSSERVER Srv; 142 /** Absolute path to the packed up test set archive. 143 * Keep it simple for now and only support one (open) archive at a time. */ 144 char szTestSetArchive[RTPATH_MAX]; 145 /** File handle to the (opened) test set archive for reading. */ 146 RTFILE hTestSetArchive; 147 142 148 } DRVHOSTVALKITAUDIO; 143 149 /** Pointer to a Validation Kit host audio driver instance. */ 144 150 typedef DRVHOSTVALKITAUDIO *PDRVHOSTVALKITAUDIO; 145 151 152 153 /********************************************************************************************************************************* 154 * Internal test handling code * 155 *********************************************************************************************************************************/ 146 156 147 157 /** … … 210 220 } 211 221 222 223 /********************************************************************************************************************************* 224 * ATS callback implementations * 225 *********************************************************************************************************************************/ 226 212 227 /** @copydoc ATSCALLBACKS::pfnTestSetEnd */ 213 228 static DECLCALLBACK(int) drvHostValKitTestSetEnd(void const *pvUser, const char *pszTag) … … 224 239 /* Before destroying the test environment, pack up the test set so 225 240 * that it's ready for transmission. */ 226 char szFileOut[RTPATH_MAX]; 227 int rc = AudioTestSetPack(pSet, pThis->szPathOut, szFileOut, sizeof(szFileOut)); 228 if (RT_SUCCESS(rc)) 229 LogRel(("Audio: Validation Kit: Packed up to '%s'\n", szFileOut)); 241 int rc = AudioTestSetPack(pSet, pThis->szPathOut, pThis->szTestSetArchive, sizeof(pThis->szTestSetArchive)); 242 if (RT_SUCCESS(rc)) 243 LogRel(("Audio: Validation Kit: Packed up to '%s'\n", pThis->szTestSetArchive)); 230 244 231 245 int rc2 = AudioTestSetWipe(pSet); … … 236 250 237 251 if (RT_FAILURE(rc)) 238 LogRel(("Audio: Validation Kit: Test set prologuefailed with %Rrc\n", rc));252 LogRel(("Audio: Validation Kit: Ending test set failed with %Rrc\n", rc)); 239 253 240 254 return rc; … … 312 326 return VINF_SUCCESS; 313 327 } 328 329 /** @copydoc ATSCALLBACKS::pfnTestSetSendBegin */ 330 static DECLCALLBACK(int) drvHostValKitTestSetSendBeginCallback(void const *pvUser, const char *pszTag) 331 { 332 RT_NOREF(pszTag); 333 334 PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser; 335 336 if (!RTFileExists(pThis->szTestSetArchive)) /* Has the archive successfully been created yet? */ 337 return VERR_WRONG_ORDER; 338 339 int rc = RTFileOpen(&pThis->hTestSetArchive, pThis->szTestSetArchive, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE); 340 if (RT_SUCCESS(rc)) 341 { 342 uint64_t uSize; 343 rc = RTFileQuerySize(pThis->hTestSetArchive, &uSize); 344 if (RT_SUCCESS(rc)) 345 LogRel(("Audio: Validation Kit: Sending test set '%s' (%zu bytes)\n", pThis->szTestSetArchive, uSize)); 346 } 347 348 return rc; 349 } 350 351 /** @copydoc ATSCALLBACKS::pfnTestSetSendRead */ 352 static DECLCALLBACK(int) drvHostValKitTestSetSendReadCallback(void const *pvUser, 353 const char *pszTag, void *pvBuf, size_t cbBuf, size_t *pcbRead) 354 { 355 RT_NOREF(pszTag); 356 357 PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser; 358 359 return RTFileRead(pThis->hTestSetArchive, pvBuf, cbBuf, pcbRead); 360 } 361 362 /** @copydoc ATSCALLBACKS::pfnTestSetSendEnd */ 363 static DECLCALLBACK(int) drvHostValKitTestSetSendEndCallback(void const *pvUser, const char *pszTag) 364 { 365 RT_NOREF(pszTag); 366 367 PDRVHOSTVALKITAUDIO pThis = (PDRVHOSTVALKITAUDIO)pvUser; 368 369 int rc = RTFileClose(pThis->hTestSetArchive); 370 if (RT_SUCCESS(rc)) 371 { 372 pThis->hTestSetArchive = NIL_RTFILE; 373 } 374 375 return rc; 376 } 377 378 379 /********************************************************************************************************************************* 380 * PDMIHOSTAUDIO interface implementation * 381 *********************************************************************************************************************************/ 314 382 315 383 /** … … 363 431 return rc; 364 432 } 365 366 433 367 434 /** … … 742 809 743 810 ATSCALLBACKS Callbacks; 744 Callbacks.pfnTestSetBegin = drvHostValKitTestSetBegin; 745 Callbacks.pfnTestSetEnd = drvHostValKitTestSetEnd; 746 Callbacks.pfnTonePlay = drvHostValKitRegisterGuestRecTest; 747 Callbacks.pfnToneRecord = drvHostValKitRegisterGuestPlayTest; 748 Callbacks.pvUser = pThis; 811 RT_ZERO(Callbacks); 812 Callbacks.pfnTestSetBegin = drvHostValKitTestSetBegin; 813 Callbacks.pfnTestSetEnd = drvHostValKitTestSetEnd; 814 Callbacks.pfnTonePlay = drvHostValKitRegisterGuestRecTest; 815 Callbacks.pfnToneRecord = drvHostValKitRegisterGuestPlayTest; 816 Callbacks.pfnTestSetSendBegin = drvHostValKitTestSetSendBeginCallback; 817 Callbacks.pfnTestSetSendRead = drvHostValKitTestSetSendReadCallback; 818 Callbacks.pfnTestSetSendEnd = drvHostValKitTestSetSendEndCallback; 819 Callbacks.pvUser = pThis; 749 820 750 821 /** @todo Make this configurable via CFGM. */ -
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r89644 r89685 529 529 { 530 530 /* 531 * Download guest test set to host.531 * Download guest + Validation Kit audio driver test sets to our output directory. 532 532 */ 533 533 char szFileName[RTPATH_MAX]; 534 534 if (RTStrPrintf2(szFileName, sizeof(szFileName), "%s.tar.gz", szTagGuest)) 535 535 { 536 char szFilePath[RTPATH_MAX];537 rc2 = RTPathJoin(szFilePath, sizeof(szFilePath),pTstEnv->szPathOut, szFileName);538 if (RT_SUCCESS(rc 2))536 rc = RTPathJoin(pTstEnv->u.Host.szPathTestSetGuest, sizeof(pTstEnv->u.Host.szPathTestSetGuest), 537 pTstEnv->szPathOut, szFileName); 538 if (RT_SUCCESS(rc)) 539 539 { 540 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Downloading guest test set to '%s'\n", szFilePath); 541 rc2 = AudioTestSvcClientTestSetDownload(&pTstEnv->u.Host.AtsClGuest, szTagGuest, szFilePath); 540 if (RTStrPrintf2(szFileName, sizeof(szFileName), "%s.tar.gz", szTagHost)) 541 { 542 rc = RTPathJoin(pTstEnv->u.Host.szPathTestSetValKit, sizeof(pTstEnv->u.Host.szPathTestSetValKit), 543 pTstEnv->szPathOut, szFileName); 544 } 545 else 546 rc = VERR_BUFFER_OVERFLOW; 547 } 548 else 549 rc = VERR_BUFFER_OVERFLOW; 550 551 if (RT_SUCCESS(rc)) 552 { 553 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Downloading guest test set to '%s'\n", 554 pTstEnv->u.Host.szPathTestSetGuest); 555 rc = AudioTestSvcClientTestSetDownload(&pTstEnv->u.Host.AtsClGuest, 556 szTagGuest, pTstEnv->u.Host.szPathTestSetGuest); 557 } 558 559 if (RT_SUCCESS(rc)) 560 { 561 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Downloading host test set to '%s'\n", 562 pTstEnv->u.Host.szPathTestSetValKit); 563 rc = AudioTestSvcClientTestSetDownload(&pTstEnv->u.Host.AtsClValKit, 564 szTagHost, pTstEnv->u.Host.szPathTestSetValKit); 542 565 } 543 566 } 544 567 else 545 rc 2= VERR_BUFFER_OVERFLOW;568 rc = VERR_BUFFER_OVERFLOW; 546 569 547 570 if (RT_SUCCESS(rc)) 548 rc = rc2; 571 { 572 573 } 549 574 } 550 575 } … … 816 841 817 842 /** 818 * Verifies one single test set.843 * Verifies one test set pair. 819 844 * 820 845 * @returns VBox status code. -
trunk/src/VBox/ValidationKit/utils/audio/vkatCmdSelfTest.cpp
r89643 r89685 168 168 if (RT_SUCCESS(rc)) 169 169 { 170 audioTestWorker(pTstEnv, &TstCust); 170 rc = audioTestWorker(pTstEnv, &TstCust); 171 if (RT_SUCCESS(rc)) 172 { 173 174 } 175 171 176 audioTestEnvDestroy(pTstEnv); 172 177 } -
trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp
r89643 r89685 713 713 714 714 ATSCALLBACKS Callbacks; 715 RT_ZERO(Callbacks); 715 716 Callbacks.pfnTestSetBegin = audioTestGstAtsTestSetBeginCallback; 716 717 Callbacks.pfnTestSetEnd = audioTestGstAtsTestSetEndCallback; -
trunk/src/VBox/ValidationKit/utils/audio/vkatInternal.h
r89643 r89685 213 213 /** Client connected to the ATS on the guest side. */ 214 214 ATSCLIENT AtsClGuest; 215 /** Path to the guest's test set downloaded to the host. */ 216 char szPathTestSetGuest[RTPATH_MAX]; 215 217 /** Client connected to the Validation Kit audio driver ATS. */ 216 218 ATSCLIENT AtsClValKit; 219 /** Path to the Validation Kit audio driver's test set downloaded to the host. */ 220 char szPathTestSetValKit[RTPATH_MAX]; 217 221 } Host; 218 222 } u;
Note:
See TracChangeset
for help on using the changeset viewer.

