qemu/hw
Mark Cave-Ayland 5243e5543e asc: generate silence if FIFO empty but engine still running
MacOS (un)helpfully leaves the FIFO engine running even when all the samples have
been written to the hardware, and expects the FIFO status flags and IRQ to be
updated continuously.

There is an additional problem in that not all audio backends guarantee an
all-zero output when there is no FIFO data available, in particular the Windows
dsound backend which re-uses its internal circular buffer causing the last played
sound to loop indefinitely.

Whilst this is effectively a bug in the Windows dsound backend, work around it
for now using a simple heuristic: if the FIFO remains empty for half a cycle
(~23ms) then continuously fill the generated buffer with empty silence.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20231004083806.757242-9-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2023-10-06 10:33:43 +02:00
..
9pfs fsdev: Use ThrottleDirection instread of bool is_write 2023-08-29 10:49:24 +02:00
acpi virtio,pci: features, cleanups 2023-10-05 09:01:01 -04:00
adc meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
alpha hw/alpha: Use MachineClass->default_nic in the alpha machine 2023-05-26 09:10:49 +02:00
arm * fix from optionrom build 2023-10-03 07:43:44 -04:00
audio asc: generate silence if FIFO empty but engine still running 2023-10-06 10:33:43 +02:00
avr Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
block block: Clean up local variable shadowing 2023-09-29 08:13:57 +02:00
char hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
core virtio,pci: features, cleanups 2023-10-05 09:01:01 -04:00
cpu hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
cris Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
cxl hw/cxl: Support 4 HDM decoders at all levels of topology 2023-10-04 18:15:06 -04:00
display virtio,pci: features, cleanups 2023-10-05 09:01:01 -04:00
dma hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
gpio hw/gpio/nrf51: implement DETECT signal 2023-08-22 17:30:59 +01:00
hppa target/hppa: Report and clear BTLBs via fw_cfg at startup 2023-09-15 17:34:38 +02:00
hyperv win32: replace closesocket() with close() wrapper 2023-03-13 15:39:31 +04:00
i2c aspeed/i2c: Clean up local variable shadowing 2023-09-29 10:07:19 +02:00
i386 virtio,pci: features, cleanups 2023-10-05 09:01:01 -04:00
ide hw/ide/ahci: fix broken SError handling 2023-09-06 22:48:04 -04:00
input audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
intc accel/tcg: Replace CPUState.env_ptr with cpu_env() 2023-10-04 11:03:54 -07:00
ipack meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
ipmi hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
isa hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method 2023-10-04 18:15:05 -04:00
loongarch hw/loongarch: Fix ACPI processor id off-by-one error 2023-08-24 16:58:16 +08:00
m68k audio: add Apple Sound Chip (ASC) emulation 2023-10-06 10:33:43 +02:00
mem hw/cxl: Support 4 HDM decoders at all levels of topology 2023-10-04 18:15:06 -04:00
microblaze hw/microblaze: Clean up local variable shadowing 2023-09-29 10:07:16 +02:00
mips vt82c686 machines: Support machine-default audiodev with fallback 2023-10-03 10:29:40 +02:00
misc q800: add IOSB subsystem 2023-10-06 10:33:43 +02:00
net virtio,pci: features, cleanups 2023-10-05 09:01:01 -04:00
nios2 hw/nios2: Clean up local variable shadowing 2023-09-29 10:07:16 +02:00
nubus trace-events: Fix the name of the tracing.rst file 2023-09-08 13:08:51 +03:00
nvme hw/nvme: Clean up local variable shadowing in nvme_ns_init() 2023-09-29 10:07:20 +02:00
nvram crypto: only include tls-cipher-suites in emulators 2023-10-03 10:29:39 +02:00
openrisc *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
pci pcie_sriov: unregister_vfs(): fix error path 2023-10-04 18:15:06 -04:00
pci-bridge hw/pci-bridge/cxl-upstream: Add serial number extended capability support 2023-10-04 18:15:06 -04:00
pci-host pc: remove short_root_bus property 2023-09-29 09:33:10 +02:00
pcmcia meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
ppc accel/tcg: Replace CPUState.env_ptr with cpu_env() 2023-10-04 11:03:54 -07:00
rdma meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
remote exec/memory: Add symbol for memory listener priority for device backend 2023-06-28 14:27:59 +02:00
riscv hw/riscv: opentitan: Fixup local variables shadowing 2023-09-29 10:07:20 +02:00
rtc hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
rx hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
s390x s390x: do a subsystem reset before the unprotect on reboot 2023-09-12 11:13:33 +02:00
scsi virtio,pci: features, cleanups 2023-10-05 09:01:01 -04:00
sd aspeed queue: 2023-09-06 11:14:55 -04:00
sensor hw/i2c: spelling fixes 2023-08-31 19:47:43 +02:00
sh4 hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
smbios hw/acpi: changes towards enabling -Wshadow=local 2023-09-29 10:07:18 +02:00
sparc other architectures: spelling fixes 2023-07-25 17:14:07 +03:00
sparc64 hw/pci/pci: Remove multifunction parameter from pci_new_multifunction() 2023-07-10 18:59:32 -04:00
ssi hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
timer aspeed/timer: Clean up local variable shadowing 2023-09-29 10:07:19 +02:00
tpm hw/tpm: spelling fixes 2023-09-20 07:54:34 +03:00
tricore hw/tricore: Log failing test in testdevice 2023-09-29 08:28:02 +02:00
ufs hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
usb audio: propagate Error * out of audio_init 2023-10-03 10:29:40 +02:00
vfio spapr: Remove support for NVIDIA V100 GPU with NVLink2 2023-09-18 07:25:28 -03:00
virtio vhost-user: add shared_object msg 2023-10-04 18:15:06 -04:00
watchdog meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
xen xen: spelling fix 2023-09-08 13:08:52 +03:00
xenpv hw/xenpv: Initialize Xen backend operations 2023-03-24 14:52:14 +00:00
xtensa trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a numeric value 2023-09-08 13:08:52 +03:00
Kconfig hw/ufs: Initial commit for emulated Universal-Flash-Storage 2023-09-07 14:01:29 -04:00
meson.build hw/ufs: Initial commit for emulated Universal-Flash-Storage 2023-09-07 14:01:29 -04:00