[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 1/6] audio/hda: create millisecond timers that ha
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 1/6] audio/hda: create millisecond timers that handle IO |
Date: |
Fri, 29 Jun 2018 09:19:57 +0100 |
On 25 June 2018 at 14:12, Gerd Hoffmann <address@hidden> 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.
> +static inline int64_t hda_bytes_per_second(HDAAudioStream *st)
> +{
> + return 2 * st->as.nchannels * st->as.freq;
> +}
Hi; Coverity warns about this expression because the
multiplication is done as a 32-bit multiply and the
result is returned as a 64-bit (CID 1393631). As usual,
a suitable cast would fix it.
thanks
-- PMM
- Re: [Qemu-devel] Drop support for 32bit hosts in qemu? (was: [PULL 1/6] audio/hda: create millisecond timers that handle IO), (continued)
- Re: [Qemu-devel] Drop support for 32bit hosts in qemu? (was: [PULL 1/6] audio/hda: create millisecond timers that handle IO), Daniel P . Berrangé, 2018/06/27
- Re: [Qemu-devel] Drop support for 32bit hosts in qemu? (was: [PULL 1/6] audio/hda: create millisecond timers that handle IO), Alex Bennée, 2018/06/27
- Re: [Qemu-devel] Drop support for 32bit hosts in qemu? (was: [PULL 1/6] audio/hda: create millisecond timers that handle IO), Philippe Mathieu-Daudé, 2018/06/27
- Re: [Qemu-devel] Drop support for 32bit hosts in qemu?, Juan Quintela, 2018/06/27
- Re: [Qemu-devel] Drop support for 32bit hosts in qemu?, Daniel P . Berrangé, 2018/06/27
- Re: [Qemu-devel] [PULL 1/6] audio/hda: create millisecond timers that handle IO, Gerd Hoffmann, 2018/06/27
- Re: [Qemu-devel] [PULL 1/6] audio/hda: create millisecond timers that handle IO, Paolo Bonzini, 2018/06/27
- Re: [Qemu-devel] [PULL 1/6] audio/hda: create millisecond timers that handle IO, Eric Blake, 2018/06/27
Re: [Qemu-devel] [PULL 1/6] audio/hda: create millisecond timers that handle IO,
Peter Maydell <=
[Qemu-devel] [PULL 4/6] audio/hda: detect output buffer overruns, Gerd Hoffmann, 2018/06/25
[Qemu-devel] [PULL 5/6] audio/hda: enable new timer code by default., Gerd Hoffmann, 2018/06/25
[Qemu-devel] [PULL 6/6] audio: Convert use of atoi to qemu_strtoi, Gerd Hoffmann, 2018/06/25
Re: [Qemu-devel] [PULL 0/6] Audio 20180625 patches, Peter Maydell, 2018/06/25