summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/Audio/DevIchAc97.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:45 +0000
commit04aecf1372d30eb709d8de65152535ab66dcb74a (patch)
treed1e4d8c453a76465e8b63119314a28d39b474479 /src/VBox/Devices/Audio/DevIchAc97.cpp
parentAdding upstream version 7.0.14-dfsg. (diff)
downloadvirtualbox-04aecf1372d30eb709d8de65152535ab66dcb74a.tar.xz
virtualbox-04aecf1372d30eb709d8de65152535ab66dcb74a.zip
Adding upstream version 7.0.16-dfsg.upstream/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.cpp11
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)