diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 22:55:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 22:55:46 +0000 |
commit | 96647a898d62d699808316238dfb933d960413f2 (patch) | |
tree | 0138491ada40b7b3fcb80d4b219fa7922ae8f512 /src/VBox/Devices/Audio/DevIchAc97.cpp | |
parent | Adding debian version 7.0.14-dfsg-4. (diff) | |
download | virtualbox-96647a898d62d699808316238dfb933d960413f2.tar.xz virtualbox-96647a898d62d699808316238dfb933d960413f2.zip |
Merging upstream version 7.0.16-dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Devices/Audio/DevIchAc97.cpp')
-rw-r--r-- | src/VBox/Devices/Audio/DevIchAc97.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/VBox/Devices/Audio/DevIchAc97.cpp b/src/VBox/Devices/Audio/DevIchAc97.cpp index 97743372..969e12db 100644 --- a/src/VBox/Devices/Audio/DevIchAc97.cpp +++ b/src/VBox/Devices/Audio/DevIchAc97.cpp @@ -1730,8 +1730,9 @@ static void ichac97R3StreamReset(PAC97STATE pThis, PAC97STREAM pStream, PAC97STR LogFunc(("[SD%RU8]\n", pStream->u8SD)); - if (pStreamCC->State.pCircBuf) - RTCircBufReset(pStreamCC->State.pCircBuf); + /* Note: Do *not* reset the stream's circular buffer here, as the audio mixer still relies on + * previously announced DMA data (via AudioMixerSinkDrainAndStop()) and processes it asynchronously. + * Resetting the buffer here will cause a race condition. See @bugref{10354}. */ pStream->Regs.bdbar = 0; pStream->Regs.civ = 0; @@ -2198,7 +2199,11 @@ static int ichac97R3StreamSetUp(PPDMDEVINS pDevIns, PAC97STATE pThis, PAC97STATE */ if ( pStreamCC->State.pCircBuf && RTCircBufSize(pStreamCC->State.pCircBuf) == cbCircBuf) - RTCircBufReset(pStreamCC->State.pCircBuf); + { + /* Note: Do *not* reset the stream's circular buffer here, as the audio mixer still relies on + * previously announced DMA data (via AudioMixerSinkDrainAndStop()) and processes it asynchronously. + * Resetting the buffer here will cause a race condition. See @bugref{10354}. */ + } else { if (pStreamCC->State.pCircBuf) |