On 2018-06-25 15:12, Gerd Hoffmann wrote:
> Currently, the HDA device tries to sync itself with the QEMU audio
> backend by waiting for the guest driver to handle buffer completion
> interrupts. This causes the backend to often read too much data from the
> device, as well as running out of data whenever the guest takes too long
> to handle the interrupt.
> 
> According to the HDA specification, the guest is also not required to
> use interrupts, but can also sync itself by polling the LPIB registers.
> 
> This patch will introduce high frequency (1000Hz) timers that interface
> with the device and allow for much smoother emulation of the LPIB
> registers. Since the timing is now provided by these timers, the need
> to wait for buffer completion interrupts also ceases.
> 
> Signed-off-by: Martin Schrodt <[email protected]>
> Signed-off-by: Gerd Hoffmann <[email protected]>
> Message-id: [email protected]
> Message-id: [email protected]
> 
> [ kraxel: keep old code for compatibility with older qemu versions,
>           add property to switch code paths at runtime ]
> [ kraxel: new code is disabled by default, use-timer=on enables it ]
> 
> Signed-off-by: Gerd Hoffmann <[email protected]>
> ---
>  hw/audio/hda-codec.c | 263 
> ++++++++++++++++++++++++++++++++++++++++++++++-----
>  hw/audio/intel-hda.c |   7 --
>  2 files changed, 237 insertions(+), 33 deletions(-)

This patch breaks compilation on clang with -m32 for me, because I
apparently I don't have 64 bit atomics there.  Should there be
CONFIG_ATOMIC64 guards and handling for when that isn't defined?

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to