* [Bug 1861458] [NEW] Clock drift issue with -soundhw hda
@ 2020-01-30 21:59 Noah Bergbauer
2021-05-05 15:24 ` [Bug 1861458] " Thomas Huth
2021-07-05 4:17 ` Launchpad Bug Tracker
0 siblings, 2 replies; 3+ messages in thread
From: Noah Bergbauer @ 2020-01-30 21:59 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
Here's the scenario: I'm working on code for loopback audio recording
(i.e. recording what you're hearing) using WASAPI on Windows. As I
usually develop on Linux, I'm using qemu to test this on a Windows 10
VM. The heart of WASAPI audio recording is the
IAudioCaptureClient::GetBuffer function (https://docs.microsoft.com/en-
us/windows/win32/api/audioclient/nf-audioclient-iaudiocaptureclient-
getbuffer). Among other things, this function produces a timestamp for
when the audio buffer it returned is supposed to be played.
When the audio device in question is the qemu hda device, this timestamp
is wrong.
There is a clock drift error (I measured it to be about 0.1%, i.e. 1ms
drift every second = a full second after 16 minutes) that causes the
audio clock to advance faster than the system clock. Paradoxically, this
does not affect audio playback through qemu at all, no delay there. Only
the timestamps returned to recording applications are completely bogus.
Unfortunately I'm not intimately familiar with the inner workings of
Intel HD Audio. All I can tell you is that this timestamp is supposedly
obtained directly from the hardware (which would be qemu in this case),
which is also why e.g. chromium implements a workaround for buggy
hardware that returns incorrect timestamps.
Here are the relevant parts of my command line (version 4.2.0):
-enable-kvm -machine pc-q35-3.1,kernel-irqchip=on -cpu host,kvm=off,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=NvidiaFuckU -rtc base=localtime -nodefaults -soundhw hda
Just wanted to let you know about this because it took me three days of
utter confusion and frustration to figure this out.
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1861458
Title:
Clock drift issue with -soundhw hda
Status in QEMU:
New
Bug description:
Here's the scenario: I'm working on code for loopback audio recording
(i.e. recording what you're hearing) using WASAPI on Windows. As I
usually develop on Linux, I'm using qemu to test this on a Windows 10
VM. The heart of WASAPI audio recording is the
IAudioCaptureClient::GetBuffer function (https://docs.microsoft.com
/en-us/windows/win32/api/audioclient/nf-audioclient-
iaudiocaptureclient-getbuffer). Among other things, this function
produces a timestamp for when the audio buffer it returned is supposed
to be played.
When the audio device in question is the qemu hda device, this
timestamp is wrong.
There is a clock drift error (I measured it to be about 0.1%, i.e. 1ms
drift every second = a full second after 16 minutes) that causes the
audio clock to advance faster than the system clock. Paradoxically,
this does not affect audio playback through qemu at all, no delay
there. Only the timestamps returned to recording applications are
completely bogus.
Unfortunately I'm not intimately familiar with the inner workings of
Intel HD Audio. All I can tell you is that this timestamp is
supposedly obtained directly from the hardware (which would be qemu in
this case), which is also why e.g. chromium implements a workaround
for buggy hardware that returns incorrect timestamps.
Here are the relevant parts of my command line (version 4.2.0):
-enable-kvm -machine pc-q35-3.1,kernel-irqchip=on -cpu host,kvm=off,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=NvidiaFuckU -rtc base=localtime -nodefaults -soundhw hda
Just wanted to let you know about this because it took me three days
of utter confusion and frustration to figure this out.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1861458/+subscriptions
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug 1861458] Re: Clock drift issue with -soundhw hda
2020-01-30 21:59 [Bug 1861458] [NEW] Clock drift issue with -soundhw hda Noah Bergbauer
@ 2021-05-05 15:24 ` Thomas Huth
2021-07-05 4:17 ` Launchpad Bug Tracker
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2021-05-05 15:24 UTC (permalink / raw)
To: qemu-devel
The QEMU project is currently considering to move its bug tracking to
another system. For this we need to know which bugs are still valid
and which could be closed already. Thus we are setting older bugs to
"Incomplete" now.
If you still think this bug report here is valid, then please switch
the state back to "New" within the next 60 days, otherwise this report
will be marked as "Expired". Or please mark it as "Fix Released" if
the problem has been solved with a newer version of QEMU already.
Thank you and sorry for the inconvenience.
** Changed in: qemu
Status: New => Incomplete
** Tags added: audio
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1861458
Title:
Clock drift issue with -soundhw hda
Status in QEMU:
Incomplete
Bug description:
Here's the scenario: I'm working on code for loopback audio recording
(i.e. recording what you're hearing) using WASAPI on Windows. As I
usually develop on Linux, I'm using qemu to test this on a Windows 10
VM. The heart of WASAPI audio recording is the
IAudioCaptureClient::GetBuffer function (https://docs.microsoft.com
/en-us/windows/win32/api/audioclient/nf-audioclient-
iaudiocaptureclient-getbuffer). Among other things, this function
produces a timestamp for when the audio buffer it returned is supposed
to be played.
When the audio device in question is the qemu hda device, this
timestamp is wrong.
There is a clock drift error (I measured it to be about 0.1%, i.e. 1ms
drift every second = a full second after 16 minutes) that causes the
audio clock to advance faster than the system clock. Paradoxically,
this does not affect audio playback through qemu at all, no delay
there. Only the timestamps returned to recording applications are
completely bogus.
Unfortunately I'm not intimately familiar with the inner workings of
Intel HD Audio. All I can tell you is that this timestamp is
supposedly obtained directly from the hardware (which would be qemu in
this case), which is also why e.g. chromium implements a workaround
for buggy hardware that returns incorrect timestamps.
Here are the relevant parts of my command line (version 4.2.0):
-enable-kvm -machine pc-q35-3.1,kernel-irqchip=on -cpu host,kvm=off,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=NvidiaFuckU -rtc base=localtime -nodefaults -soundhw hda
Just wanted to let you know about this because it took me three days
of utter confusion and frustration to figure this out.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1861458/+subscriptions
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug 1861458] Re: Clock drift issue with -soundhw hda
2020-01-30 21:59 [Bug 1861458] [NEW] Clock drift issue with -soundhw hda Noah Bergbauer
2021-05-05 15:24 ` [Bug 1861458] " Thomas Huth
@ 2021-07-05 4:17 ` Launchpad Bug Tracker
1 sibling, 0 replies; 3+ messages in thread
From: Launchpad Bug Tracker @ 2021-07-05 4:17 UTC (permalink / raw)
To: qemu-devel
[Expired for QEMU because there has been no activity for 60 days.]
** Changed in: qemu
Status: Incomplete => Expired
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1861458
Title:
Clock drift issue with -soundhw hda
Status in QEMU:
Expired
Bug description:
Here's the scenario: I'm working on code for loopback audio recording
(i.e. recording what you're hearing) using WASAPI on Windows. As I
usually develop on Linux, I'm using qemu to test this on a Windows 10
VM. The heart of WASAPI audio recording is the
IAudioCaptureClient::GetBuffer function (https://docs.microsoft.com
/en-us/windows/win32/api/audioclient/nf-audioclient-
iaudiocaptureclient-getbuffer). Among other things, this function
produces a timestamp for when the audio buffer it returned is supposed
to be played.
When the audio device in question is the qemu hda device, this
timestamp is wrong.
There is a clock drift error (I measured it to be about 0.1%, i.e. 1ms
drift every second = a full second after 16 minutes) that causes the
audio clock to advance faster than the system clock. Paradoxically,
this does not affect audio playback through qemu at all, no delay
there. Only the timestamps returned to recording applications are
completely bogus.
Unfortunately I'm not intimately familiar with the inner workings of
Intel HD Audio. All I can tell you is that this timestamp is
supposedly obtained directly from the hardware (which would be qemu in
this case), which is also why e.g. chromium implements a workaround
for buggy hardware that returns incorrect timestamps.
Here are the relevant parts of my command line (version 4.2.0):
-enable-kvm -machine pc-q35-3.1,kernel-irqchip=on -cpu host,kvm=off,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=NvidiaFuckU -rtc base=localtime -nodefaults -soundhw hda
Just wanted to let you know about this because it took me three days
of utter confusion and frustration to figure this out.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1861458/+subscriptions
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-05 4:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 21:59 [Bug 1861458] [NEW] Clock drift issue with -soundhw hda Noah Bergbauer
2021-05-05 15:24 ` [Bug 1861458] " Thomas Huth
2021-07-05 4:17 ` Launchpad Bug Tracker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).