Re: [PULL 20/38] accel/whpx: Use accel-specific per-vcpu @dirty field

2024-04-28 Thread Volker Rümelin
Am 26.04.24 um 21:41 schrieb Philippe Mathieu-Daudé: > WHPX has a specific use of the CPUState::vcpu_dirty field > (CPUState::vcpu_dirty is not used by common code). > To make this field accel-specific, add and use a new > @dirty variable in the AccelCPUState structure. > > Signed-off-by: Philippe

Re: [PATCH] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-22 Thread Volker Rümelin
Am 20.04.24 um 07:40 schrieb Mark Cave-Ayland: > On 20/04/2024 02:21, Richard Henderson wrote: > >> On 4/19/24 12:51, Mark Cave-Ayland wrote: >>> The various Intel CPU manuals claim that SGDT and SIDT can write >>> either 24-bits >>> or 32-bits depending upon the operand size, but this is

Re: [PATCH] usb-audio: Fix invalid values in AudioControl descriptors

2024-03-17 Thread Volker Rümelin
0x37, not 0x38. In Linux, "lsusb -D ..." displays > incomplete descriptor information when this length is incorrect. > > Signed-off-by: Joonas Kankaala lsusb also misinterprets the invalid interface protocol 0x4 and uses 0x30 instead. Reviewed-by: Volker Rümelin > --- >

Re: [PULL 14/25] hw/i386/pc: Confine system flash handling to pc_sysfw

2024-02-25 Thread Volker Rümelin
Am 21.02.24 um 22:16 schrieb Philippe Mathieu-Daudé: > From: Bernhard Beschow > > Rather than distributing PC system flash handling across three files, let's > confine it to one. Now, pc_system_firmware_init() creates, configures and > cleans > up the system flash which makes the code easier to

[PATCH v2 09/11] hw/audio/virtio-sound: introduce virtio_snd_set_active()

2024-02-18 Thread Volker Rümelin
Split out the function virtio_snd_pcm_set_active() from virtio_snd_pcm_start_stop(). A later patch also needs this new funcion. There is no functional change. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 21 - 1 file changed, 16

[PATCH v2 08/11] hw/audio/virtio-sound: introduce virtio_snd_pcm_open()

2024-02-18 Thread Volker Rümelin
Split out the function virtio_snd_pcm_open() from virtio_snd_pcm_prepare(). A later patch also needs the new function. There is no functional change. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 57 +++ 1 file

[PATCH v2 06/11] hw/audio/virtio-sound: split out virtio_snd_pcm_start_stop()

2024-02-18 Thread Volker Rümelin
Split out virtio_snd_pcm_start_stop(). This is a preparation for the next patch so that it doesn't become too big. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- hw/audio/trace-events | 3 ++- hw/audio/virtio-snd.c | 57 --- 2 files

[PATCH v2 05/11] hw/audio/virtio-sound: free all stream buffers on reset

2024-02-18 Thread Volker Rümelin
All remaining stream buffers in the stream queues must be freed after a reset. This is the initial state of the virtio-sound device. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio

[PATCH v2 02/11] hw/audio/virtio-sound: fix segmentation fault in tx/rx xfer handler

2024-02-18 Thread Volker Rümelin
. Don't try to handle the invalid virtio queue element with a stream queue. Instead, push the invalid queue element back to the guest immediately. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 100 ++ include/hw/audio/virtio-snd.h | 1 - 2

[PATCH v2 07/11] hw/audio/virtio-sound: add stream state variable

2024-02-18 Thread Volker Rümelin
, only one copy of the audio stream parameters is required and these do not need to be initialised with default values. The state variable will also make it easier to restore the audio stream after migration. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 213

[PATCH v2 03/11] hw/audio/virtio-sound: remove command and stream mutexes

2024-02-18 Thread Volker Rümelin
All code in virtio-snd.c runs with the BQL held. Remove the command queue mutex and the stream queue mutexes. The qatomic functions are also not needed. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 215 +++--- include/hw/audio/virtio-snd.h | 3

[PATCH v2 04/11] hw/audio/virtio-sound: allocate an array of streams

2024-02-18 Thread Volker Rümelin
immediately after allocation. This makes it easier to remove the virtio_snd_set_pcm_params() and virtio_snd_pcm_prepare() calls in the realisation phase and to migrate the audio streams of the virtio sound device after the next few patches. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c

[PATCH v2 11/11] hw/audio/virtio-sound: add placeholder for buffer write position

2024-02-18 Thread Volker Rümelin
issues. However, the placeholder makes it possible to add code in a backwards and forwards compatible way. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 2 ++ include/hw/audio/virtio-snd.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio

[PATCH v2 10/11] hw/audio/virtio-sound: add missing vmstate fields

2024-02-18 Thread Volker Rümelin
after migration. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 84 +++ include/hw/audio/virtio-snd.h | 1 + 2 files changed, 77 insertions(+), 8 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 06a27ef8d9..b0a0ff2456

[PATCH v2 01/11] hw/audio/virtio-sound: return correct command response size

2024-02-18 Thread Volker Rümelin
virtio_snd_ctrl_command to allow for additional payloads. Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 7 +-- include/hw/audio/virtio-snd.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio

[PATCH v2 00/11] virtio-sound migration part 1

2024-02-18 Thread Volker Rümelin
on reset. Once a stream has been opened, it will only be closed after a reset or when QEMU shuts down. Patch 10/11 "add missing vmstate fields" resets the inuse variables on reset. Volker Rümelin (11):   hw/audio/virtio-sound: return correct command response size   hw/audio/virtio-sou

Re: [PATCH 05/10] hw/audio/virtio-sound: return correct command response size

2024-02-18 Thread Volker Rümelin
Am 05.01.24 um 12:36 schrieb Marc-André Lureau: > Hi > > On Fri, Jan 5, 2024 at 12:34 AM Volker Rümelin wrote: >> The payload size returned by command VIRTIO_SND_R_PCM_INFO is >> wrong. The code in process_cmd() assumes that all commands >> return only a virtio_snd_hdr

Re: [PATCH 02/10] hw/audio/virtio-sound: allocate all streams in advance

2024-01-06 Thread Volker Rümelin
Am 05.01.24 um 11:54 schrieb Marc-André Lureau: > Hi > > On Fri, Jan 5, 2024 at 12:34 AM Volker Rümelin wrote: >> It is much easier to migrate an array of structs than individual >> structs that are accessed via a pointer to a pointer to an array >> of pointers to stru

[PATCH 07/10] hw/audio/virtio-sound: introduce virtio_snd_set_active()

2024-01-04 Thread Volker Rümelin
Split out the function virtio_snd_pcm_set_active() from virtio_snd_pcm_start_stop(). A later patch also needs this new funcion. There is no functional change. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 21 - 1 file changed, 16 insertions(+), 5 deletions

[PATCH 04/10] hw/audio/virtio-sound: add stream state variable

2024-01-04 Thread Volker Rümelin
, only one copy of the audio stream parameters is required and these do not need to be initialised with default values. The state variable will also make it easier to restore the audio stream after migration. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 219

[PATCH 08/10] hw/audio/virtio-sound: fix segmentation fault in tx/rx xfer handler

2024-01-04 Thread Volker Rümelin
early so they are always available to avoid this kind of issue. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 84 --- include/hw/audio/virtio-snd.h | 8 +++- 2 files changed, 45 insertions(+), 47 deletions(-) diff --git a/hw/audio/virtio

[PATCH 10/10] hw/audio/virtio-sound: add placeholder for buffer write position

2024-01-04 Thread Volker Rümelin
issues. However, the placeholder makes it possible to add code in a backwards and forwards compatible way. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 2 ++ include/hw/audio/virtio-snd.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio

[PATCH 09/10] hw/audio/virtio-sound: add missing vmstate fields

2024-01-04 Thread Volker Rümelin
after migration. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 81 +++ include/hw/audio/virtio-snd.h | 1 + 2 files changed, 74 insertions(+), 8 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 92b10287ad..328ee54808

[PATCH 03/10] hw/audio/virtio-sound: split out virtio_snd_pcm_start_stop()

2024-01-04 Thread Volker Rümelin
Split out virtio_snd_pcm_start_stop(). This is a preparation for the next patch so that it doesn't become too big. Signed-off-by: Volker Rümelin --- hw/audio/trace-events | 3 ++- hw/audio/virtio-snd.c | 57 --- 2 files changed, 39 insertions(+), 21

[PATCH 05/10] hw/audio/virtio-sound: return correct command response size

2024-01-04 Thread Volker Rümelin
virtio_snd_ctrl_command to allow for additional payloads. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 7 +-- include/hw/audio/virtio-snd.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index a2817a64b5

[PATCH 02/10] hw/audio/virtio-sound: allocate all streams in advance

2024-01-04 Thread Volker Rümelin
variables that are constant at runtime are initialised immediately after allocation. This is a step towards being able to migrate the audio streams of the virtio sound device after the next few patches. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 35

[PATCH 06/10] hw/audio/virtio-sound: introduce virtio_snd_pcm_open()

2024-01-04 Thread Volker Rümelin
Split out the function virtio_snd_pcm_open() from virtio_snd_pcm_prepare(). A later patch also needs the new function. There is no functional change. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 57 +++ 1 file changed, 31 insertions(+), 26

[PATCH 01/10] hw/audio/virtio-sound: remove command and stream mutexes

2024-01-04 Thread Volker Rümelin
All code in virtio-snd.c runs with the BQL held. Remove the command queue mutex and the stream queue mutexes. The qatomic functions are also not needed. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 294 +++--- include/hw/audio/virtio-snd.h | 3

[PATCH 00/10] virtio-sound migration part 1

2024-01-04 Thread Volker Rümelin
Here is the first part of my virtio-sound patches. Most of them are a preparation to make migration work. Patch 09/10 enables migration of the virtio-sound device. The second part isn't finished yet and will have to do with virtio-sound jack and channel maps configuration and migration. Volker

[PATCH] hw/vfio: fix iteration over global VFIODevice list

2023-12-29 Thread Volker Rümelin
roduce a global VFIODevice list") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2061 Signed-off-by: Volker Rümelin --- hw/vfio/common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 08a3e57672..3ba892d7d3

Re: [PATCH for 8.2] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-03 Thread Volker Rümelin
Am 04.12.23 um 08:28 schrieb Volker Rümelin: > The virtio-sound device is currently not migratable. QEMU crashes > on the source machine at some point during the migration with a > segmentation fault. > > Even with this bug fixed, the virtio-sound device doesn't migrate > the

[PATCH for 8.2] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-03 Thread Volker Rümelin
on the destination machine in a broken condition. Mark the device as unmigratable until these issues have been fixed. Signed-off-by: Volker Rümelin --- hw/audio/virtio-snd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 2fe966e311

Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path

2023-12-03 Thread Volker Rümelin
Am 13.11.23 um 09:26 schrieb Marc-André Lureau: > Hi > > On Sat, Nov 11, 2023 at 2:40 PM Volker Rümelin wrote: >> Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing >> scanout") introduced a regression when QEMU is running with a >> virtio-gpu

pending hw/audio patches for 8.2

2023-11-26 Thread Volker Rümelin
Hi, there are five pending reviewed hw/audio patches for 8.2. They are all bug fixes. It would be good if someone could send a pull request for rc2. I don't think Gerd will send it. The five patches are: ("hw/audio/hda-codec: fix multiplication overflow")

virtio-sound segmentation fault

2023-11-15 Thread Volker Rümelin
Cc: qemu-devel Hi Manos, it's easy to trigger a segmentation fault with the virtio-sound device. The basic problem is that in function virtio_snd_realize() there is no code in the errror paths to undo the previous steps. To reproduce the segmentation fault start QEMU with an empty PCIe root

Re: [PATCH] Fix Windows 2000 and XP HDAudio Support

2023-11-12 Thread Volker Rümelin
Am 12.11.23 um 01:37 schrieb Christopher Lentocha: > So wait, you want me to add it as another device name? Because > it is going to be the same exact way as the 1af4 device > just with a number change. Ok, work it is then ... > (Sorry about not getting back sooner also) > > Christopher Hi

Re: disable-pie build

2023-11-11 Thread Volker Rümelin
Am 11.11.23 um 17:09 schrieb Paolo Bonzini: > On Sat, Nov 11, 2023 at 3:40 AM Michael Tokarev wrote: >> Hi! >> >> It looks like --disable-pie configure, which uses -fno-pie -no-pie flags >> for the compiler, is broken: it does not not tell the *linker* about the >> option, so the link fails (at

Re: [PATCH] hw/audio/es1370: Clean up comment

2023-11-11 Thread Volker Rümelin
Am 10.11.23 um 17:43 schrieb Peter Maydell: > Replace a sweary comment with one that's a bit more helpful to > future readers of the code. > > Signed-off-by: Peter Maydell Reviewed-by: Volker Rümelin > --- > hw/audio/es1370.c | 9 +++-- > 1 file changed, 7 inser

Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path

2023-11-11 Thread Volker Rümelin
> the regular code path so they get always called if one of the > gd_egl_init() calls was successful. > > Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout") > Signed-off-by: Volker Rümelin > --- > ui/gtk-egl.c | 12 ++-- > 1 file c

[PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path

2023-11-11 Thread Volker Rümelin
gd_egl_init() calls was successful. Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout") Signed-off-by: Volker Rümelin --- ui/gtk-egl.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index cd2f176502..

Re: [PULL 2/5] ui/gtk-egl: Check EGLSurface before doing scanout

2023-11-10 Thread Volker Rümelin
>> From: Antonio Caggiano >> >> The first time gd_egl_scanout_texture() is called, there's a possibility >> that the GTK drawing area might not be realized yet, in which case its >> associated GdkWindow is NULL. This means gd_egl_init() was also skipped >> and the EGLContext and EGLSurface stored

Re: [PULL 2/5] ui/gtk-egl: Check EGLSurface before doing scanout

2023-11-09 Thread Volker Rümelin
> From: Antonio Caggiano > > The first time gd_egl_scanout_texture() is called, there's a possibility > that the GTK drawing area might not be realized yet, in which case its > associated GdkWindow is NULL. This means gd_egl_init() was also skipped > and the EGLContext and EGLSurface stored in

[PATCH] hw/audio/virtio-snd-pci: fix the PCI class code

2023-11-07 Thread Volker Rümelin
ice to a multimedia audio controller. ~> sudo lspci -s '00:02.0' -v -nn | head -n 2 00:02.0 Multimedia audio controller [0401]: Red Hat, Inc. Device [1af4:1059] (rev 01) Subsystem: Red Hat, Inc. Device [1af4:1100] Signed-off-by: Volker Rümelin --- The two additional lines have bee

Re: [PATCH 0/2] hw/audio/hda-codec bug fixes

2023-11-06 Thread Volker Rümelin
Am 06.11.23 um 20:54 schrieb Michael Tokarev: > 05.11.2023 20:23, Volker Rümelin : >> Patch 1/2 fixes a bug that was reported and correctly diagnosed on the >> QEMU devel mailing list. >> https://lists.nongnu.org/archive/html/qemu-devel/2023-08/msg02539.html >> The

[PATCH 2/2] hw/audio/hda-codec: reenable the audio mixer

2023-11-05 Thread Volker Rümelin
ng streams don't start muted by default. Fixes: b7639b7dd0 ("hw/audio: Simplify hda audio init") Signed-off-by: Volker Rümelin --- hw/audio/hda-codec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index f756e419b

[PATCH 1/2] hw/audio/hda-codec: fix multiplication overflow

2023-11-05 Thread Volker Rümelin
econd timers that handle IO") Reported-by: M_O_Bz Signed-off-by: Volker Rümelin --- hw/audio/hda-codec.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index b9ad1f4c39..f756e419bb 100644 --- a/hw

[PATCH 0/2] hw/audio/hda-codec bug fixes

2023-11-05 Thread Volker Rümelin
.html Patch 2/2 corrects the sense of hda codec property mixer during initialization. It was inverted not too long ago. I guess Gerd is still busy with other projects. Another maintainer probably will have to take these patches. Volker Rümelin (2):   hw/audio/hda-codec: fix multiplication overflow

Re: [PATCH v12 02/11] Add virtio-sound-pci device

2023-10-22 Thread Volker Rümelin
Am 22.10.23 um 11:58 schrieb Manos Pitsidianakis: > Hello Volker, > > On Sat, 21 Oct 2023 12:07, Volker Rümelin wrote: >> the virtio-sound device alias doesn't work. > > Yes, there's no virtio-sound alias hence why it does not work. Sorry, I don't understand your l

Re: [PATCH v2 11/13] migration: Use vmstate_register_any() for audio

2023-10-21 Thread Volker Rümelin
Am 20.10.23 um 11:07 schrieb Juan Quintela: > We can have more than one audio card. Hi Juan, I wouldn't use the term "audio card" here. In QEMU speak, Audiodev is an "audio backend". With best regards, Volker > > void audio_init_audiodevs(void) > { > AudiodevListEntry *e; > >

Re: [PATCH v12 02/11] Add virtio-sound-pci device

2023-10-21 Thread Volker Rümelin
Am 19.10.23 um 12:03 schrieb Emmanouil Pitsidianakis: > This patch adds a PCI wrapper device for the virtio-sound device. > It is necessary to instantiate a virtio-snd device in a guest. > All sound logic will be added to the virtio-snd device in the following > commits. > > To add this device

Re: [PATCH 2/3] hw/pci-host: Add emulation of Mai Logic Articia S

2023-10-06 Thread Volker Rümelin
Am 06.10.23 um 00:13 schrieb BALATON Zoltan: > The Articia S is a generic chipset supporting several different CPUs > that were used on some PPC boards. This is a minimal emulation of the > parts needed for emulating the AmigaOne board. > > Signed-off-by: BALATON Zoltan > --- >

Re: [PATCH v2 07/20] audio: add Apple Sound Chip (ASC) emulation

2023-09-23 Thread Volker Rümelin
Am 20.09.23 um 17:39 schrieb Mark Cave-Ayland: > On 14/09/2023 08:06, Volker Rümelin wrote: > >> Am 09.09.23 um 11:48 schrieb Mark Cave-Ayland: >>> The Apple Sound Chip was primarily used by the Macintosh II to >>> generate sound >>> in hardware which wa

Re: [PATCH 2/2] seabios: remove PCI drivers from bios.bin

2023-09-23 Thread Volker Rümelin
Am 21.09.23 um 14:10 schrieb Paolo Bonzini: > bios.bin is now used only by ISA PC, so PCI drivers are not necessary. > > Signed-off-by: Paolo Bonzini > --- > pc-bios/bios.bin | Bin 131072 -> 131072 bytes > roms/config.seabios-128k | 30 ++ > 2 files changed,

Re: [PATCH v9 11/12] virtio-sound: implement audio capture (RX)

2023-09-19 Thread Volker Rümelin
Am 13.09.23 um 09:33 schrieb Emmanouil Pitsidianakis: > To perform audio capture we duplicate the TX logic of the previous > commit with the following difference: we receive data from the QEMU > audio backend and write it in the virt queue IO buffers the guest sends > to QEMU. When they are full

[PATCH 3/8] hw/audio/es1370: remove unused dolog macro

2023-09-17 Thread Volker Rümelin
The dolog macro is unused. Remove the macro and use the now unused ES1370_VERBOSE macro to replace its inverse ES1370_SILENT macro. Tested-by: Rene Engel Signed-off-by: Volker Rümelin --- hw/audio/es1370.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio

[PATCH 2/8] hw/audio/es1370: replace bit-rotted code with tracepoints

2023-09-17 Thread Volker Rümelin
It seems that nobody has enabled the debug code of the ES1370 device for a long time. Since then, the code has bit-rotted. Replace the bit-rotten code with tracepoints. Tested-by: Rene Engel Signed-off-by: Volker Rümelin --- hw/audio/es1370.c | 55

[PATCH 6/8] hw/audio/es1370: block structure coding style fixes

2023-09-17 Thread Volker Rümelin
Change the block structure according to the QEMU Coding Style documentation. Signed-off-by: Volker Rümelin --- hw/audio/es1370.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index e1ca6a4cd5

[PATCH 8/8] hw/audio/es1370: trace lost interrupts

2023-09-17 Thread Volker Rümelin
It turns out that there are drivers which assume that interrupts can't be lost. E.g. the AROS sb128 driver is such a driver. Add a lost interrupt tracepoint to debug this kind of issues. Signed-off-by: Volker Rümelin --- hw/audio/es1370.c | 14 ++ hw/audio/trace-events | 3

[PATCH 4/8] hw/audio/es1370: remove #ifdef ES1370_DEBUG to avoid bit rot

2023-09-17 Thread Volker Rümelin
Replace the #ifdef ES1370_DEBUG code with code that the compiler can optimize away to avoid bit rot. While at it, replace strcat() with pstrcat(). Tested-by: Rene Engel Signed-off-by: Volker Rümelin --- hw/audio/es1370.c | 135 +++--- 1 file changed, 66

[PATCH 7/8] hw/audio/es1370: change variable type and name

2023-09-17 Thread Volker Rümelin
Change the type of the variable temp to size_t to avoid a type cast. While at it, rename the variable name to to_transfer. This improves the readability of the code. Signed-off-by: Volker Rümelin --- hw/audio/es1370.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff

[PATCH 5/8] hw/audio/es1370: remove #ifdef ES1370_VERBOSE to avoid bit rot

2023-09-17 Thread Volker Rümelin
Replace the #ifdef ES1370_VERBOSE code with code that the compiler can optimize away to avoid bit rot and fix the already rotten code. Tested-by: Rene Engel Signed-off-by: Volker Rümelin --- hw/audio/es1370.c | 25 + 1 file changed, 13 insertions(+), 12 deletions

[PATCH 1/8] hw/audio/es1370: reset current sample counter

2023-09-17 Thread Volker Rümelin
transferred. This may lead to corrupted audio streams. Tested-by: Rene Engel Signed-off-by: Volker Rümelin --- hw/audio/es1370.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 4f738a0ad8..9a8e29c39c 100644 --- a/hw/audio/es1370.c +++ b/hw

[PATCH 0/8] hw/audio/es1370: bug fix

2023-09-17 Thread Volker Rümelin
/8 helps to debug this kind of issues. Volker Rümelin (8):   hw/audio/es1370: reset current sample counter   hw/audio/es1370: replace bit-rotted code with tracepoints   hw/audio/es1370: remove unused dolog macro   hw/audio/es1370: remove #ifdef ES1370_DEBUG to avoid bit rot   hw/audio/es1370

Re: [PATCH v2 08/20] asc: generate silence if FIFO empty but engine still running

2023-09-16 Thread Volker Rümelin
Am 14.09.23 um 09:56 schrieb Philippe Mathieu-Daudé: > > On 9/9/23 11:48, Mark Cave-Ayland wrote: >> 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. >>

Re: [PATCH v2 07/20] audio: add Apple Sound Chip (ASC) emulation

2023-09-14 Thread Volker Rümelin
and DirectSound when played directly > with > -audiodev out.mixing-engine=off. > > Co-developed-by: Laurent Vivier > Co-developed-by: Volker Rümelin > Signed-off-by: Mark Cave-Ayland > --- > MAINTAINERS| 2 + > hw/audio/Kconfig | 3 + > hw/audio/asc.c

Re: [PATCH v8 11/12] virtio-sound: implement audio capture (RX)

2023-09-09 Thread Volker Rümelin
Am 28.08.23 um 21:55 schrieb Emmanouil Pitsidianakis: To perform audio capture we duplicate the TX logic of the previous commit with the following difference: we receive data from the QEMU audio backend and write it in the virt queue IO buffers the guest sends to QEMU. When they are full (i.e.

Re: [PATCH v8 11/12] virtio-sound: implement audio capture (RX)

2023-09-08 Thread Volker Rümelin
Am 28.08.23 um 21:55 schrieb Emmanouil Pitsidianakis: To perform audio capture we duplicate the TX logic of the previous commit with the following difference: we receive data from the QEMU audio backend and write it in the virt queue IO buffers the guest sends to QEMU. When they are full (i.e.

Re: [PATCH v8 10/12] virtio-sound: implement audio output (TX)

2023-09-05 Thread Volker Rümelin
Am 04.09.23 um 23:34 schrieb Volker Rümelin: Am 04.09.23 um 12:34 schrieb Manos Pitsidianakis: On Mon, 04 Sep 2023 13:26, Philippe Mathieu-Daudé wrote: +/* + * AUD_* output callback. + * + * @data: VirtIOSoundPCMStream stream + * @available: number of bytes that can be written

Re: [PATCH v8 00/12] Add VIRTIO sound card

2023-09-05 Thread Volker Rümelin
Am 04.09.23 um 12:01 schrieb Manos Pitsidianakis: Hello Volker :) On Mon, 04 Sep 2023 10:20, Volker Rümelin wrote: All qemu_log_mask() format strings need a trailing \n. Thank you, will fix it! I still hear a lot of playback dropouts. I had planned to look at the playback code, but I

Re: [PATCH v8 00/12] Add VIRTIO sound card

2023-09-05 Thread Volker Rümelin
Am 04.09.23 um 14:11 schrieb Alex Bennée: Manos Pitsidianakis writes: Hello Volker :) On Mon, 04 Sep 2023 10:20, Volker Rümelin wrote: All qemu_log_mask() format strings need a trailing \n. Thank you, will fix it! I still hear a lot of playback dropouts. I had planned to look

Re: [PATCH v8 10/12] virtio-sound: implement audio output (TX)

2023-09-04 Thread Volker Rümelin
Am 04.09.23 um 12:34 schrieb Manos Pitsidianakis: On Mon, 04 Sep 2023 13:26, Philippe Mathieu-Daudé wrote: +/* + * AUD_* output callback. + * + * @data: VirtIOSoundPCMStream stream + * @available: number of bytes that can be written with AUD_write() + */ +static void

Re: [PATCH v8 02/12] Add virtio-sound-pci device

2023-09-04 Thread Volker Rümelin
Am 04.09.23 um 12:26 schrieb Manos Pitsidianakis: On Mon, 04 Sep 2023 09:32, Volker Rümelin wrote: +static Property virtio_snd_pci_properties[] = { +    DEFINE_AUDIO_PROPERTIES(VirtIOSoundPCI, vdev.card), I think DEFINE_AUDIO_PROPERTIES should be moved back to virtio-snd.c. The audiodev

Re: [PATCH v8 00/12] Add VIRTIO sound card

2023-09-04 Thread Volker Rümelin
Am 28.08.23 um 21:54 schrieb Emmanouil Pitsidianakis: This patch series adds an audio device implementing the recent virtio sound spec (1.2) and a corresponding PCI wrapper device. Hi Manos, I have a few more general comments. All qemu_log_mask() format strings need a trailing \n. I still

Re: [PATCH v8 02/12] Add virtio-sound-pci device

2023-09-04 Thread Volker Rümelin
This patch adds a PCI wrapper device for the virtio-sound device. It is necessary to instantiate a virtio-snd device in a guest. All sound logic will be added to the virtio-snd device in the following commits. To add this device with a guest, you'll need a >=5.13 kernel compiled with

Re: [PATCH v6 00/12] Add VIRTIO sound card

2023-08-21 Thread Volker Rümelin
Am 21.08.23 um 08:10 schrieb Manos Pitsidianakis: Hello Volker, On Sun, 20 Aug 2023 14:46, Volker Rümelin wrote: I tested the virtio-sound-pci device. It seems the device works unreliably. Audio playback has a lot of dropouts. I can actually hear my mouse moving around. Audio recording

Re: [PATCH v6 01/12] Add virtio-sound device stub

2023-08-21 Thread Volker Rümelin
Am 21.08.23 um 08:06 schrieb Manos Pitsidianakis: Hello Volker! On Sun, 20 Aug 2023 12:33, Volker Rümelin wrote: I think the virtio-snd.c code, the trace events and the Kconfig VIRTIO_SND should be moved to hw/audio. The code for nearly all audio devices is in this directory. This would

Re: [PATCH v6 00/12] Add VIRTIO sound card

2023-08-20 Thread Volker Rümelin
Hi Manos, I tested the virtio-sound-pci device. It seems the device works unreliably. Audio playback has a lot of dropouts. I can actually hear my mouse moving around. Audio recording with audacity doesn't work. Either recording stops with an error or the recorded stream is silent. I'll see

Re: [PATCH v6 01/12] Add virtio-sound device stub

2023-08-20 Thread Volker Rümelin
Hi Manos, Add a new VIRTIO device for the virtio sound device id. Functionality will be added in the following commits. I think the virtio-snd.c code, the trace events and the Kconfig VIRTIO_SND should be moved to hw/audio. The code for nearly all audio devices is in this directory. This

Re: [PATCH v6 02/12] Add virtio-sound-pci device

2023-08-20 Thread Volker Rümelin
Hi Manos, I see a core dump with this code on my host. I don't use the -audio command line argument and the audiodev_id variable is NULL. You can't use a global audiodev_id variable because each guest can have more than one virtio-sound-pci device and each virtio-sound-pci device may be

Re: [PATCH] HDA codec: Fix wanted_r/w position overflow

2023-08-17 Thread Volker Rümelin
Hi, From: zeroway when the duration now - buft_start reach to some kind of value, which will get the multiply hda_bytes_per_second(st) * (now - buft_start) overflow, instead of calculate the wanted_r/wpos from start time to current time, here calculate the each timer tick delta data first in

Re: hda codec issue

2023-08-16 Thread Volker Rümelin
Cc: qemu-devel@nongnu.org cc Volker Rümelin == so I was curious about: 1. why using wpos, rpos which will increasing along the time, which may overflow in the feature time? wpos and rpos are 64 bit integers. At a sample rate of 96kHz and with 32 bit

Re: [PULL 06/19] ui/gtk: set scanout-mode right before scheduling draw

2023-07-24 Thread Volker Rümelin
cking_height,    backing_id, false);   } Thanks! Adding back this line fixes the black guest screen when running the host under X11. For Wayland I had to add back the similar line in ui/gtk-gl-area.c. With best regards, Volker On 7/20/2023 11:53 PM, Volker Rümelin wrote: Am 17.07

Re: [PULL 06/19] ui/gtk: set scanout-mode right before scheduling draw

2023-07-21 Thread Volker Rümelin
Am 17.07.23 um 14:45 schrieb marcandre.lur...@redhat.com: From: Dongwon Kim Setting scanout mode is better to be done very last minute right because the mode can be reset anytime after it is set in dpy_gl_scanout_texture by any asynchronouse dpy_refresh call, which eventually cancels drawing of

Re: [PATCH 08/21] asc: generate silence if FIFO empty but engine still running

2023-07-07 Thread Volker Rümelin
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. Since not all audio backends guarantee an all-zero output when no data is provided, explicitly generate at least

Re: [PATCH 07/21] audio: add Apple Sound Chip (ASC) emulation

2023-07-06 Thread Volker Rümelin
-developed-by: Volker Rümelin Signed-off-by: Mark Cave-Ayland --- MAINTAINERS| 2 + hw/audio/Kconfig | 3 + hw/audio/asc.c | 685 + hw/audio/meson.build | 1 + hw/audio/trace-events | 10 + hw/m68k/Kconfig| 1

Re: [PATCH 14/30] audio: add Apple Sound Chip (ASC) emulation

2023-05-29 Thread Volker Rümelin
-developed-by: Volker Rümelin Signed-off-by: Mark Cave-Ayland --- MAINTAINERS| 2 + hw/audio/Kconfig | 3 + hw/audio/asc.c | 688 + hw/audio/meson.build | 1 + hw/audio/trace-events | 10 + hw/m68k/Kconfig| 1

Re: [PATCH 15/30] asc: generate silence if FIFO empty but engine still running

2023-05-29 Thread Volker Rümelin
-zero output when this condition occurs to avoid the audio backends re-using their internal buffers and looping audio once the FIFOs are empty. Signed-off-by: Mark Cave-Ayland --- hw/audio/asc.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: Volker Rümelin diff

Re: [PATCH v2] meson: move -no-pie from linker to compiler

2023-05-24 Thread Volker Rümelin
er doesn't find the libslirp-0.dll when QEMU was built with libslirp from the subprojects folder and started from the build folder. It's necessary to copy this library to a folder in the DLL search path. Tested-by: Volker Rümelin

Re: [PATCH] meson: remove -no-pie linker flag

2023-05-22 Thread Volker Rümelin
c4fb51506d. Building QEMU on my Linux system works fine. Tested-by: Volker Rümelin

[PATCH v2] tests/qtest/ac97-test: add up-/downsampling tests

2023-05-20 Thread Volker Rümelin
-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- v2: Cosmetic changes to the comments. The promised improved commit message appeared in commit b9ae74e2e4 ("audio: log unimplemented audio device sample rates"). tests/qtest/ac97-test.c | 40 ++

Re: [PATCH 10/12] audio/pw: simplify error reporting in stream creation

2023-05-07 Thread Volker Rümelin
From: Marc-André Lureau create_stream() now reports on all error paths. Signed-off-by: Marc-André Lureau --- audio/pwaudio.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 5c706a9fde

Re: [PATCH 09/12] audio/pw: add more error reporting

2023-05-07 Thread Volker Rümelin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- audio/pwaudio.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 67df53948c..5c706a9fde 100644 --- a/audio/pwaudio.c +++ b/audio

Re: [PATCH 07/12] audio/pw: add more details on error

2023-05-07 Thread Volker Rümelin
From: Marc-André Lureau PipeWire uses errno to report error details. Signed-off-by: Marc-André Lureau --- audio/pwaudio.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 2b12b40934..d0bc4680a6

Re: [PATCH 12/12] audio/pw: improve channel position code

2023-05-07 Thread Volker Rümelin
+ 1 file changed, 26 insertions(+), 49 deletions(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index f74d506ec6..062610a704 100644 --- a/audio/pwaudio.c +++ b/audio/pwaudio.c @@ -417,8 +417,8 @@ pw_to_audfmt(enum

Re: [PATCH 11/12] audio/pw: remove wrong comment

2023-05-07 Thread Volker Rümelin
From: Marc-André Lureau The stream is actually created connected. Signed-off-by: Marc-André Lureau --- audio/pwaudio.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 38905f5be2..f74d506ec6 100644 --- a/audio

Re: [PATCH 08/12] audio/pw: factorize some common code

2023-05-07 Thread Volker Rümelin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- audio/pwaudio.c | 85 - 1 file changed, 34 insertions(+), 51 deletions(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index d0bc4680a6..67df53948c

Re: [PATCH 06/12] audio/pw: trace during init before calling pipewire API

2023-05-07 Thread Volker Rümelin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- audio/pwaudio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 6ca4ef4f62..2b12b40934 100644 --- a/audio/pwaudio.c +++ b/audio

Re: [PATCH 05/12] audio/pw: needless check for NULL

2023-05-07 Thread Volker Rümelin
From: Marc-André Lureau g_clear_pointer() already checks for NULL. Signed-off-by: Marc-André Lureau --- audio/pwaudio.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 51cfc0b052..6ca4ef4f62

Re: [PATCH 04/12] audio/pw: drop needless case statement

2023-05-07 Thread Volker Rümelin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- audio/pwaudio.c | 10 -- 1 file changed, 10 deletions(-) Reviewed-by: Volker Rümelin diff --git a/audio/pwaudio.c b/audio/pwaudio.c index 9eb69bfd18..51cfc0b052 100644 --- a/audio/pwaudio.c +++ b/audio/pwaudio.c

Re: [PATCH 03/12] audio/pw: Pipewire->PipeWire case fix for user-visible text

2023-05-07 Thread Volker Rümelin
ptions.txt | 2 +- qemu-options.hx | 4 ++-- scripts/meson-buildoptions.sh | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) Reviewed-by: Volker Rümelin diff --git a/meson.build b/meson.build index 229eb585f7..4c44736bd4 100644 --- a/meson.build +++ b/m

  1   2   3   4   5   6   >