- Timestamp:
- Aug 3, 2018 9:41:27 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r73452 r73466 362 362 static int hdaR3AddStream(PHDASTATE pThis, PPDMAUDIOSTREAMCFG pCfg); 363 363 static int hdaR3RemoveStream(PHDASTATE pThis, PPDMAUDIOSTREAMCFG pCfg); 364 static int hdaR3UpdateStream(PHDASTATE pThis, PPDMAUDIOSTREAMCFG pCfg); 364 365 # ifdef HDA_USE_DMA_ACCESS_HANDLER 365 366 static DECLCALLBACK(VBOXSTRICTRC) hdaR3DMAAccessHandler(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, void *pvPhys, … … 2024 2025 } 2025 2026 2027 /** 2028 * Updates an audio device stream with the given configuration. 2029 * 2030 * @returns IPRT status code. 2031 * @param pThis HDA state. 2032 * @param pCfg Stream configuration to apply. 2033 */ 2034 static int hdaR3UpdateStream(PHDASTATE pThis, PPDMAUDIOSTREAMCFG pCfg) 2035 { 2036 /* Remove the old stream from the device setup. */ 2037 hdaR3RemoveStream(pThis, pCfg); 2038 2039 /* Add the stream to the device setup. */ 2040 return hdaR3AddStream(pThis, pCfg); 2041 } 2026 2042 #endif /* IN_RING3 */ 2027 2043 … … 4529 4545 PHDASTREAM pStream = hdaR3GetStreamFromSink(pThis, &pThis->SinkFront); 4530 4546 if (DrvAudioHlpStreamCfgIsValid(&pStream->State.Cfg)) 4531 hdaR3MixerAddDrvStream(pThis, pThis->SinkFront.pMixSink, &pStream->State.Cfg, pDrv); 4532 4547 { 4548 rc2 = hdaR3UpdateStream(pThis, &pStream->State.Cfg); 4549 AssertRC(rc2); 4550 } 4533 4551 #ifdef VBOX_WITH_AUDIO_HDA_51_SURROUND 4534 4552 pStream = hdaR3GetStreamFromSink(pThis, &pThis->SinkCenterLFE); 4535 4553 if (DrvAudioHlpStreamCfgIsValid(&pStream->State.Cfg)) 4536 hdaR3MixerAddDrvStream(pThis, pThis->SinkCenterLFE.pMixSink, &pStream->State.Cfg, pDrv); 4554 { 4555 rc2 = hdaR3UpdateStream(pThis, &pStream->State.Cfg); 4556 AssertRC(rc2); 4557 } 4537 4558 4538 4559 pStream = hdaR3GetStreamFromSink(pThis, &pThis->SinkRear); 4539 4560 if (DrvAudioHlpStreamCfgIsValid(&pStream->State.Cfg)) 4540 hdaR3MixerAddDrvStream(pThis, pThis->SinkRear.pMixSink, &pStream->State.Cfg, pDrv); 4561 { 4562 rc2 = hdaR3UpdateStream(pThis, &pStream->State.Cfg); 4563 AssertRC(rc2); 4564 } 4541 4565 #endif 4542 4566 pStream = hdaR3GetStreamFromSink(pThis, &pThis->SinkLineIn); 4543 4567 if (DrvAudioHlpStreamCfgIsValid(&pStream->State.Cfg)) 4544 hdaR3MixerAddDrvStream(pThis, pThis->SinkLineIn.pMixSink, &pStream->State.Cfg, pDrv); 4568 { 4569 rc2 = hdaR3UpdateStream(pThis, &pStream->State.Cfg); 4570 AssertRC(rc2); 4571 } 4545 4572 4546 4573 #ifdef VBOX_WITH_AUDIO_HDA_MIC_IN 4547 4574 pStream = hdaR3GetStreamFromSink(pThis, &pThis->SinkMicIn); 4548 4575 if (DrvAudioHlpStreamCfgIsValid(&pStream->State.Cfg)) 4549 hdaR3MixerAddDrvStream(pThis, pThis->SinkMicIn.pMixSink, &pStream->State.Cfg, pDrv); 4576 { 4577 rc2 = hdaR3UpdateStream(pThis, &pStream->State.Cfg); 4578 AssertRC(rc2); 4579 } 4550 4580 #endif 4551 4581 }
Note:
See TracChangeset
for help on using the changeset viewer.