[PATCH v3 02/11] ps2: don't raise an interrupt if queue is full

2021-05-15 Thread Volker Rümelin
ps2_queue() behaves differently than the very similar functions ps2_queue_2() to ps2_queue_4(). The first one calls update_irq() even if the queue is full, the others don't. Change ps2_queue() to be consistent with the others. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin

[PATCH v3 06/11] pckbd: PS/2 keyboard throttle

2021-05-15 Thread Volker Rümelin
-throttle option enabled each keystroke will move the cursor two positions. Buglink: https://bugs.launchpad.net/bugs/1895363 Buglink: https://bugs.launchpad.net/bugs/1897568 Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 54 1 file changed, 54

[PATCH v3 05/11] pckbd: don't update OBF flags if KBD_STAT_OBF is set

2021-05-15 Thread Volker Rümelin
282: tracing_mark_write: pckbd_kbd_read_data 0x4d kbd # the keyboard ISR receives the second byte of the keyboard event Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 91 1 file changed, 68 insertions(+), 23 deletions(-) diff --git a/hw/input/pckbd.

[PATCH v3 03/11] ps2: don't deassert irq twice if queue is empty

2021-05-15 Thread Volker Rümelin
Don't deassert the irq twice if the queue is empty. While the second deassertion doesn't do any harm, it's unnecessary. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin --- hw/input/ps2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/input/ps2.c b

[PATCH v3 08/11] pckbd: add controller response queue

2021-05-15 Thread Volker Rümelin
. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 38 +++--- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index adce525b88..e9523e164f 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -132,11 +132,14

[PATCH v3 04/11] pckbd: split out interrupt line changing code

2021-05-15 Thread Volker Rümelin
Split out the interrupt line changing code from kbd_update_irq(). This is a preparation for the next patch. There is no functional change. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 32 ++-- 1 file changed, 22 insertions

[PATCH v3 01/11] ps2: fix mouse stream corruption

2021-05-15 Thread Volker Rümelin
nt started with -display sdl and move the mouse around for a few seconds. You will quickly see erratic mouse movements and unexpected mouse clicks. CuteMouse (ctmouse.exe) in FreeDOS doesn't try to re-sync the mouse stream. Fixes: 7abe7eb294 ("ps2: Fix mouse stream corruption due to lost data") S

[PATCH v3 00/11] PS/2 controller related fixes

2021-05-15 Thread Volker Rümelin
2 controller command KBD_CCMD_KBD_DISABLE must disable the keyboard interrupt. In patch "pckbd: PS/2 keyboard throttle" in function kbd_throttle_timeout() an unnecessary if statement was removed. The KBD_STAT_OBF flag is never set when kbd_throttle_timeout() gets called. Volker Rümelin (11):   ps

Re: [PATCH] hw/input/ps2: Use ps2_raise_irq() instead of open coding it

2021-05-13 Thread Volker Rümelin
Inspired-by: Volker Rümelin Signed-off-by: Philippe Mathieu-Daudé --- hw/input/ps2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 72cdb80ae1c..02d7e5da723 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -213,7 +213,7

Re: [PATCH v2 00/11] PS/2 controller related fixes

2021-05-10 Thread Volker Rümelin
() in a preliminary patch to ease the review of patch "pckbd: correctly disable PS/2 communication", as Philippe suggested. Volker Rümelin (11):   ps2: fix mouse stream corruption   ps2: don't raise an interrupt if queue is full   ps2: don't deassert irq twice if queue is empty   pckbd: split out

Re: [PATCH v2 00/11] PS/2 controller related fixes

2021-05-09 Thread Volker Rümelin
() in a preliminary patch to ease the review of patch "pckbd: correctly disable PS/2 communication", as Philippe suggested. Volker Rümelin (11):   ps2: fix mouse stream corruption   ps2: don't raise an interrupt if queue is full   ps2: don't deassert irq twice if queue is empty   pckbd: split out

[PATCH v2 00/11] PS/2 controller related fixes

2021-05-07 Thread Volker Rümelin
() in a preliminary patch to ease the review of patch "pckbd: correctly disable PS/2 communication", as Philippe suggested. Volker Rümelin (11):   ps2: fix mouse stream corruption   ps2: don't raise an interrupt if queue is full   ps2: don't deassert irq twice if queue is empty   pckbd: split out

[PATCH v2 06/11] pckbd: PS/2 keyboard throttle

2021-05-07 Thread Volker Rümelin
-throttle option enabled each keystroke will move the cursor two positions. Buglink: https://bugs.launchpad.net/bugs/1895363 Buglink: https://bugs.launchpad.net/bugs/1897568 Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 57 1 file changed, 57

[PATCH v2 05/11] pckbd: don't update OBF flags if KBD_STAT_OBF is set

2021-05-07 Thread Volker Rümelin
282: tracing_mark_write: pckbd_kbd_read_data 0x4d kbd # the keyboard ISR receives the second byte of the keyboard event Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 91 1 file changed, 68 insertions(+), 23 deletions(-) diff --git a/hw/input/pckbd.

[PATCH v2 09/11] pckbd: add function kbd_pending()

2021-05-07 Thread Volker Rümelin
Replace reads of the variable s->pending with a call to a new function kbd_pending() to ease the review of the next patch. There is no functional change. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --

[PATCH v2 01/11] ps2: fix mouse stream corruption

2021-05-07 Thread Volker Rümelin
nt started with -display sdl and move the mouse around for a few seconds. You will quickly see erratic mouse movements and unexpected mouse clicks. CuteMouse (ctmouse.exe) in FreeDOS doesn't try to re-sync the mouse stream. Fixes: 7abe7eb294 ("ps2: Fix mouse stream corruption due to lost data") S

[PATCH v2 11/11] pckbd: remove duplicated keyboard and mouse defines

2021-05-07 Thread Volker Rümelin
hem now. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 37 - 1 file changed, 37 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index 7c476f7a3e..a386457187 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -61,21 +61,6 @@ #d

[PATCH v2 02/11] ps2: don't raise an interrupt if queue is full

2021-05-07 Thread Volker Rümelin
ps2_queue() behaves differently than the very similar functions ps2_queue_2() to ps2_queue_4(). The first one calls update_irq() even if the queue is full, the others don't. Change ps2_queue() to be consistent with the others. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin

[PATCH v2 07/11] pckbd: add state variable for interrupt source

2021-05-07 Thread Volker Rümelin
-by: Volker Rümelin --- hw/input/pckbd.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index f45aebb6b8..f8f3859b17 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -135,12 +135,16 @@ #define

[PATCH v2 08/11] pckbd: add controller response queue

2021-05-07 Thread Volker Rümelin
. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 38 +++--- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index f8f3859b17..3c41c11841 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -132,11 +132,14

[PATCH v2 10/11] pckbd: correctly disable PS/2 communication

2021-05-07 Thread Volker Rümelin
. A guest may notice the difference. Mask out pending data on disabled queues to correctly disable the PS/2 controller communication. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/hw/input

[PATCH v2 03/11] ps2: don't deassert irq twice if queue is empty

2021-05-07 Thread Volker Rümelin
Don't deassert the irq twice if the queue is empty. While the second deassertion doesn't do any harm, it's unnecessary. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin --- hw/input/ps2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/input/ps2.c b

[PATCH v2 04/11] pckbd: split out interrupt line changing code

2021-05-07 Thread Volker Rümelin
Split out the interrupt line changing code from kbd_update_irq(). This is a preparation for the next patch. There is no functional change. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 32 ++-- 1 file changed, 22 insertions

Re: [PATCH 09/10] pckbd: correctly disable PS/2 communication

2021-05-06 Thread Volker Rümelin
Hi Volker, On 5/5/21 9:21 PM, Volker Rümelin wrote: Currently the PS/2 controller command KBD_CCMD_MOUSE_DISABLE doesn't disable the PS/2 mouse communication at all, and the PS/2 controller commands KBD_CCMD_KBD_DISABLE and KBD_CCMD_KBD_ENABLE disable and enable the keyboard interrupt, which

[PATCH 07/10] pckbd: add state variable for interrupt source

2021-05-05 Thread Volker Rümelin
-by: Volker Rümelin --- hw/input/pckbd.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index f45aebb6b8..f8f3859b17 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -135,12 +135,16 @@ #define

[PATCH 04/10] pckbd: split out interrupt line changing code

2021-05-05 Thread Volker Rümelin
Split out the interrupt line changing code from kbd_update_irq(). This is a preparation for the next patch. There is no functional change. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/hw

[PATCH 08/10] pckbd: add controller response queue

2021-05-05 Thread Volker Rümelin
. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 38 +++--- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index f8f3859b17..3c41c11841 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -132,11 +132,14

[PATCH 06/10] pckbd: PS/2 keyboard throttle

2021-05-05 Thread Volker Rümelin
-throttle option enabled each keystroke will move the cursor two positions. Buglink: https://bugs.launchpad.net/bugs/1895363 Buglink: https://bugs.launchpad.net/bugs/1897568 Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 57 1 file changed, 57

[PATCH 01/10] ps2: fix mouse stream corruption

2021-05-05 Thread Volker Rümelin
nt started with -display sdl and move the mouse around for a few seconds. You will quickly see erratic mouse movements and unexpected mouse clicks. CuteMouse (ctmouse.exe) in FreeDOS doesn't try to re-sync the mouse stream. Fixes: 7abe7eb294 ("ps2: Fix mouse stream corruption due to lost data") S

[PATCH 09/10] pckbd: correctly disable PS/2 communication

2021-05-05 Thread Volker Rümelin
. A guest may notice the difference. Mask out pending data on disabled queues to correctly disable the PS/2 controller communication. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 48 +++- 1 file changed, 35 insertions(+), 13 deletions(-) diff

[PATCH 02/10] ps2: don't raise an interrupt if queue is full

2021-05-05 Thread Volker Rümelin
ps2_queue() behaves differently than the very similar functions ps2_queue_2() to ps2_queue_4(). The first one calls update_irq() even if the queue is full, the others don't. Change ps2_queue() to be consistent with the others. Signed-off-by: Volker Rümelin --- hw/input/ps2.c | 4 1 file

[PATCH 10/10] pckbd: remove duplicated keyboard and mouse defines

2021-05-05 Thread Volker Rümelin
hem now. Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 37 - 1 file changed, 37 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index 7c476f7a3e..a386457187 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -61,21 +61,6 @@ #d

[PATCH 05/10] pckbd: don't update OBF flags if KBD_STAT_OBF is set

2021-05-05 Thread Volker Rümelin
282: tracing_mark_write: pckbd_kbd_read_data 0x4d kbd # the keyboard ISR receives the second byte of the keyboard event Signed-off-by: Volker Rümelin --- hw/input/pckbd.c | 91 1 file changed, 68 insertions(+), 23 deletions(-) diff --git a/hw/input/pckbd.

[PATCH 03/10] ps2: don't deassert irq twice if queue is empty

2021-05-05 Thread Volker Rümelin
Don't deassert the irq twice if the queue is empty. While the second deassertion doesn't do any harm, it's unnecessary. Signed-off-by: Volker Rümelin --- hw/input/ps2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 55a81a0c51

[PATCH 00/10] PS/2 controller related fixes

2021-05-05 Thread Volker Rümelin
This patch series fixes two different PS/2 mouse stream corruptions and adds a feature that allows some old misbehaving DOS programs to have a working keyboard. With the last few patches, the PS/2 con- troller behaves more like a real controller. Volker Rümelin (10):   ps2: fix mouse stream

Re: [Bug 1861677] Re: wavcapture crash with pulseaudio

2021-05-01 Thread Volker Rümelin
You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. >https://bugs.launchpad.net/bugs/1861677 Title: wavcapture crash with pulseaudio Status in QEMU: New Hi Philippe, this bug was fixed with commit cbaf25d1f5 "audio: fix wavcapture

[PATCH] simpletrace: build() missing 2 required positional arguments

2021-01-31 Thread Volker Rümelin
missing 2 required positional arguments: 'lineno' and 'filename' Add the missing arguments. Signed-off-by: Volker Rümelin --- scripts/simpletrace.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py index 20f0026066..d61fb0bd87

Re: [PATCH 03/23] sdlaudio: add -audiodev sdl, out.buffer-count option

2021-01-31 Thread Volker Rümelin
Hi, -hw->samples = obt.samples; +hw->samples = (spdo->has_buffer_count ? spdo->buffer_count : 4) * +obt.samples; +# @buffer-count: number of buffers (default 4) Any specific reason for this default? In my testing I've needed much higher values. 8 still got me crackling

Re: [PATCH 02/23] audio: fix bit-rotted code

2021-01-31 Thread Volker Rümelin
#ifdef DEBUG -alsa_dump_info(req, obt, obtfmt, pdo); +alsa_dump_info(req, obt, obtfmt, apdo); #endif "if (DEBUG) { }" is a nice way to have this checked by the compiler. With "#define DEBUG 0" the compiler will optimize away the dead code, so it isn't much different to

Re: [PATCH 06/23] sdlaudio: fill remaining sample buffer with silence

2021-01-17 Thread Volker Rümelin
On 10/01/2021 11.02, Volker Rümelin wrote: Fill the remaining sample buffer with silence. To fill it with zeroes is wrong for unsigned samples because this is silence with a DC bias. Signed-off-by: Volker Rümelin ---   audio/sdlaudio.c | 3 ++-   1 file changed, 2 insertions(+), 1 deletion

Re: [PULL 04/47] util/oslib-win32: Use _aligned_malloc for qemu_try_memalign

2021-01-10 Thread Volker Rümelin
> We do not need or want to be allocating page sized quanta. > > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Stefan Weil > Message-Id: <20201018164836.1149452-1-richard.hender...@linaro.org> > Signed-off-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- >

Re: [PATCH 00/23] next round of audio patches

2021-01-10 Thread Volker Rümelin
> Patchew URL: > https://patchew.org/QEMU/9315afe5-5958-c0b4-ea1e-14769511a...@t-online.de/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Message-id: 9315afe5-5958-c0b4-ea1e-14769511a...@t-online.de > Subject:

[PATCH 20/23] dsoundaudio: replace GetForegroundWindow()

2021-01-10 Thread Volker Rümelin
and start audio playback with the hda device in the guest. The guest will be silent. To hear guest audio you have to activate the shell window once. Signed-off-by: Volker Rümelin --- audio/dsound_template.h | 2 +- audio/dsoundaudio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions

[PATCH 18/23] paaudio: limit minreq to 75% of audio timer_rate

2021-01-10 Thread Volker Rümelin
a stream buffer size update before it tries to write data to the playback stream. Signed-off-by: Volker Rümelin --- audio/paaudio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index ff3dd01c96..3186868294 100644 --- a/audio/paaudio.c

[PATCH 19/23] paaudio: send recorded data in smaller chunks

2021-01-10 Thread Volker Rümelin
is 75% of timer_period. The lower limit for the recording buffer size maxlength is fragsize * 2. Signed-off-by: Volker Rümelin --- audio/paaudio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index 3186868294..1e6f4448ce 100644

[PATCH 21/23] dsoundaudio: rename dsound_open()

2021-01-10 Thread Volker Rümelin
Rename dsound_open() to dsound_set_cooperative_level(). The only task of that function is to set the cooperative level for DirectSound. Signed-off-by: Volker Rümelin --- audio/dsoundaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/dsoundaudio.c b/audio

[PATCH 17/23] paaudio: comment bugs in functions qpa_init_*

2021-01-10 Thread Volker Rümelin
The audio buffer size in audio/paaudio.c is typically larger than expected. Just comment the bugs in qpa_init_in() and qpa_init_out() for now. Fixing these bugs may break glitch free audio playback with fine tuned user audio settings. Signed-off-by: Volker Rümelin --- audio/paaudio.c | 8

[PATCH 15/23] paaudio: wait until the playback stream is ready

2021-01-10 Thread Volker Rümelin
,audiodev=audio0 -audiodev pa,id=audio0 Signed-off-by: Volker Rümelin --- audio/paaudio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/audio/paaudio.c b/audio/paaudio.c index 1a7252b16d..4a1ffda753 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -214,6 +214,12 @@ static void

[PATCH 23/23] dsoundaudio: fix log message

2021-01-10 Thread Volker Rümelin
There is a mismatch between message and used argument. Change the argument from frequency to format. Signed-off-by: Volker Rümelin --- audio/audio_win_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio_win_int.c b/audio/audio_win_int.c index b7db34900c

[PATCH 12/23] audio: remove remaining unused plive code

2021-01-10 Thread Volker Rümelin
Commit 73ad33ef7b "audio: remove plive" forgot to remove this code. Signed-off-by: Volker Rümelin --- audio/audio.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index 22d769db0c..34c9cb9182 100644 --- a/audio/aud

[PATCH 13/23] paaudio: avoid to clip samples multiple times

2021-01-10 Thread Volker Rümelin
. Signed-off-by: Volker Rümelin --- audio/paaudio.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index b052084698..229bcfcae8 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -207,6 +207,7 @@ static void

[PATCH 16/23] paaudio: remove unneeded code

2021-01-10 Thread Volker Rümelin
Commit baea032ec7 "audio/paaudio: fix ignored buffer_length setting" added code to handle buffer_length defaults. This was unnecessary because the audio_buffer_* functions in audio/audio.c already handle this. Remove the unneeded code. Signed-off-by: Volker Rümelin --- audio/paau

[PATCH 22/23] dsoundaudio: enable f32 audio sample format

2021-01-10 Thread Volker Rümelin
Enable the f32 audio sample format for the DirectSound backend. Signed-off-by: Volker Rümelin --- audio/audio_win_int.c | 71 --- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/audio/audio_win_int.c b/audio/audio_win_int.c index

[PATCH 11/23] sdlaudio: enable (in|out).mixing-engine=off

2021-01-10 Thread Volker Rümelin
Enable the SDL2 backend options -audiodev sdl,out.mixing- engine=off,in.mixing-engine=off. Signed-off-by: Volker Rümelin --- audio/sdlaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index 445cae8de5..c68c62a3e4 100644

[PATCH 09/23] sdlaudio: add recording functions

2021-01-10 Thread Volker Rümelin
Add audio recording functions. SDL 2.0.5 or later is required to use the recording functions. Playback continues to work with earlier SDL 2.0 versions. Signed-off-by: Volker Rümelin --- audio/sdlaudio.c | 142 ++- 1 file changed, 139 insertions(+), 3

[PATCH 14/23] paaudio: wait for PA_STREAM_READY in qpa_write()

2021-01-10 Thread Volker Rümelin
=audio0 -audiodev pa,id=audio0,out.mixing-engine=off Signed-off-by: Volker Rümelin --- audio/paaudio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/audio/paaudio.c b/audio/paaudio.c index 229bcfcae8..1a7252b16d 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -269,6 +269,11 @@ static

[PATCH 08/23] audio: split pcm_ops function get_buffer_in

2021-01-10 Thread Volker Rümelin
Split off pcm_ops function run_buffer_in from get_buffer_in and call run_buffer_in before get_buffer_in. The next patch only needs the generic buffer management part from audio_generic_get_buffer_in(). Signed-off-by: Volker Rümelin --- audio/alsaaudio.c | 1 + audio/audio.c | 18

[PATCH 07/23] sdlaudio: replace legacy functions with modern ones

2021-01-10 Thread Volker Rümelin
Signed-off-by: Volker Rümelin --- audio/sdlaudio.c | 107 ++- 1 file changed, 50 insertions(+), 57 deletions(-) diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index 01ae4c600e..47968c5020 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -41,15

[PATCH 05/23] sdlaudio: always clear the sample buffer

2021-01-10 Thread Volker Rümelin
Always fill the remaining audio callback buffer with silence. SDL 2.0 doesn't initialize the audio callback buffer. This was an incompatible change compared to SDL 1.2. For reference read the SDL 1.2 to 2.0 migration guide. Signed-off-by: Volker Rümelin --- audio/sdlaudio.c | 33

[PATCH 10/23] audio: break generic buffer dependency on mixing-engine

2021-01-10 Thread Volker Rümelin
Break the unnecessary dependency of the generic buffer management code on mixing-engine. This is required for the next patch. Signed-off-by: Volker Rümelin --- audio/audio.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index

[PATCH 03/23] sdlaudio: add -audiodev sdl,out.buffer-count option

2021-01-10 Thread Volker Rümelin
. The idea was taken from the coreaudio backend. The in.buffer-count option will be used with one of the next patches. Signed-off-by: Volker Rümelin --- audio/audio.c | 2 +- audio/audio_legacy.c | 3 ++- audio/audio_template.h | 2 +- audio/sdlaudio.c | 11 +-- qapi/

[PATCH 06/23] sdlaudio: fill remaining sample buffer with silence

2021-01-10 Thread Volker Rümelin
Fill the remaining sample buffer with silence. To fill it with zeroes is wrong for unsigned samples because this is silence with a DC bias. Signed-off-by: Volker Rümelin --- audio/sdlaudio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/sdlaudio.c b/audio

[PATCH 04/23] sdlaudio: don't start playback in init routine

2021-01-10 Thread Volker Rümelin
Every emulated audio device has a way to enable audio playback. Don't start playback until the guest enables the audio device. This patch keeps the SDL2 device pause state in sync with hw->enabled. Signed-off-by: Volker Rümelin --- audio/sdlaudio.c | 1 - 1 file changed, 1 deletion(-) d

[PATCH 01/23] sdlaudio: remove leftover SDL1.2 code

2021-01-10 Thread Volker Rümelin
Signed-off-by: Volker Rümelin --- audio/sdlaudio.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index 21b7a0484b..bf3cfb8456 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -240,28 +240,24

[PATCH 02/23] audio: fix bit-rotted code

2021-01-10 Thread Volker Rümelin
Signed-off-by: Volker Rümelin --- audio/alsaaudio.c | 2 +- audio/sdlaudio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index a8e62542f9..6787e91bc1 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -599,7 +599,7

[PATCH 00/23] next round of audio patches

2021-01-10 Thread Volker Rümelin
produce in timer-period time. Patches 20/23 - 23/23 fix small issues with DirectSound. Volker Rümelin (23):   sdlaudio: remove leftover SDL1.2 code   audio: fix bit-rotted code   sdlaudio: add -audiodev sdl,out.buffer-count option   sdlaudio: don't start playback in init routine   sdlaudio: always clear

Re: [PATCH 1/2] audio: remove qemu_spice_audio_init()

2020-12-15 Thread Volker Rümelin
>>> +if (using_spice) { >>> +/* >>> + * When using spice allow the spice audio driver being picked >>> + * as default. >>> + * >>> + * Temporary hack. Using audio devices without explicit >>> + * audiodev= property is already deprecated. Same

[PATCH 3/3] ui/gtk: limit virtual console max update interval

2020-12-13 Thread Volker Rümelin
interval (30ms). Signed-off-by: Volker Rümelin --- ui/gtk.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 7ff9327b9d..78da5902f4 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -749,10 +749,10 @@ static void gd_resize_event

[PATCH 1/3] ui/gtk: don't try to redefine SI prefixes

2020-12-13 Thread Volker Rümelin
in refresh_rate_millihz and see why the implicit unit ms for update_interval remains. Signed-off-by: Volker Rümelin --- include/ui/gtk.h | 2 -- ui/gtk.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/ui/gtk.h b/include/ui/gtk.h index eaeb450f91..80851fb4c7 100644

[PATCH 2/3] ui/gtk: rename variable window to widget

2020-12-13 Thread Volker Rümelin
The type of the variable window is GtkWidget. Rename the variable from window to widget, because windows and widgets are different things. Signed-off-by: Volker Rümelin --- ui/gtk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 86b386a20d

[PATCH 0/3] ui/gtk: paper over a gtk bug on Windows

2020-12-13 Thread Volker Rümelin
gtk: limit virtual console max update interval There will be a merging conflict with Nikola's patches. https://lists.nongnu.org/archive/html/qemu-devel/2020-12/msg02604.html https://lists.nongnu.org/archive/html/qemu-devel/2020-12/msg02633.html One of us has to do a simple rebase. Volker Rümelin

[PATCH 1/4] coreaudio: rename misnamed variable fake_as

2020-12-13 Thread Volker Rümelin
While the variable once was used to fake audio settings, since commit ed2a4a7941 "audio: proper support for float samples in mixeng" this is no longer true. Rename the variable to obt_as. This is the same naming scheme as in audio/sdlaudio.c Tested-by: Howard Spoelstra Signed-off-

[PATCH 4/4] audio: remove unused function audio_is_cleaning_up()

2020-12-13 Thread Volker Rümelin
The previous commit removed the last call site of audio_is_cleaning_up(). Remove the now unused function. Tested-by: Howard Spoelstra Signed-off-by: Volker Rümelin --- audio/audio.c | 8 audio/audio.h | 1 - 2 files changed, 9 deletions(-) diff --git a/audio/audio.c b/audio/audio.c

[PATCH 2/4] coreaudio: don't start playback in init routine

2020-12-13 Thread Volker Rümelin
Every emulated audio device has a way to enable audio playback. Don't start playback until the guest enables the audio device to keep the Core Audio device run state in sync with hw->enabled. Tested-by: Howard Spoelstra Signed-off-by: Volker Rümelin --- audio/coreaudio.c | 11 ---

[PATCH 3/4] coreaudio: always stop audio playback on shut down

2020-12-13 Thread Volker Rümelin
Reason: Invalid argument This bug was reported on the qemu-discuss mailing list. https://lists.nongnu.org/archive/html/qemu-discuss/2020-10/msg00018.html Tested-by: Howard Spoelstra Signed-off-by: Volker Rümelin --- audio/coreaudio.c | 36 1 file changed, 16

[PATCH 0/4] coreaudio bug fix and clean up

2020-12-13 Thread Volker Rümelin
Fix a bug reported on the qemu-discuss mailing list. The error message was: coreaudio: Could not lock voice for audioDeviceIOProc Reason: Invalid argument While being there, do some clean up. Howard was kind enough to test the patches. Volker Rümelin (4):   coreaudio: rename misnamed variable

[PATCH] qmp: fix aio_poll() assertion failure on Windows

2020-10-21 Thread Volker Rümelin
2ce2 ("qmp: Move dispatcher to a coroutine") Signed-off-by: Volker Rümelin --- util/aio-win32.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util/aio-win32.c b/util/aio-win32.c index e7b1d649e9..168717b51b 100644 --- a/util/aio-win32.c +++ b/util/aio-wi

Re: [PULL 09/14] qmp: Move dispatcher to a coroutine

2020-10-19 Thread Volker Rümelin
>>> Hi Kevin, >>> >>> since commit 9ce44e2ce2 "qmp: Move dispatcher to a coroutine" I see >>> the following error on Windows whenever I close the QEMU window or >>> shut down the guest. >>> >>> $ ./qemu-system-x86_64.exe -machine pc,accel=tcg -display gtk >>> ** >>>

Re: [PULL 09/14] qmp: Move dispatcher to a coroutine

2020-10-17 Thread Volker Rümelin
> From: Kevin Wolf > > This moves the QMP dispatcher to a coroutine and runs all QMP command > handlers that declare 'coroutine': true in coroutine context so they > can avoid blocking the main loop while doing I/O or waiting for other > events. > > For commands that are not declared safe to run

Re: [PULL 07/37] cpus: extract out hax-specific code to target/i386/

2020-10-17 Thread Volker Rümelin
>> Hi Claudio, >> >> is there a reason why you removed current_cpu = cpu; from >> hax_cpu_thread_fn() when you moved that function to target/i386/hax-cpus.c? >> This change broke HAX on Windows. Adding back that line makes it work again. > > Hello Volker, I see the change in the history and it

Re: aio_poll() assertion fail on Windows

2020-10-17 Thread Volker Rümelin
> Whilst testing a Windows build of git master of qemu-system-ppc in > MSYS2/MingW64 I noticed the following assertion message in the console after > booting into OpenBIOS and then closing the GTK GUI window without booting a > client OS: > > $ ./qemu-system-ppc > ** >

Re: [PULL 07/37] cpus: extract out hax-specific code to target/i386/

2020-10-16 Thread Volker Rümelin
> From: Claudio Fontana > > register a "CpusAccel" interface for HAX as well. > > diff --git a/softmmu/cpus.c b/softmmu/cpus.c > index 9fa73735a2..900fff827a 100644 > --- a/softmmu/cpus.c > +++ b/softmmu/cpus.c > @@ -416,35 +403,6 @@ void qemu_wait_io_event(CPUState *cpu) >

Re: [PATCH 0/7] build: replace ninjatool with ninja

2020-10-15 Thread Volker Rümelin
> > Thanks Paolo, > > Then only the issue regarding the pcbios/optionrom stuff remains ;-) > > make[1]: *** No rule to make target 'multiboot.bin', needed by 'all'.  Stop. > make: *** [Makefile:171: pc-bios/optionrom/all] Error 2 > make: *** Waiting for unfinished jobs > > Best, > Howard >

Re: [RFC PATCH] contrib/gitdm: Add more individual contributors

2020-10-05 Thread Volker Rümelin
group-map-redhat b/contrib/gitdm/group-map-redhat > index d15db2d35e..4a8ca84b36 100644 > --- a/contrib/gitdm/group-map-redhat > +++ b/contrib/gitdm/group-map-redhat > @@ -3,6 +3,5 @@ > # > > da...@gibson.dropbear.id.au > -laur...@vivier.eu > p...@fedoraproject.org > arm...@pond.sub.org Acked-by: Volker Rümelin

Re: [PATCH 8/9] audio: restore mixing-engine playback buffer size

2020-09-24 Thread Volker Rümelin
>> diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c >> index 21b7a0484b..cb931d0fda 100644 >> --- a/audio/sdlaudio.c >> +++ b/audio/sdlaudio.c >> @@ -253,6 +253,7 @@ static void sdl_callback (void *opaque, Uint8 *buf, int >> len) >> return ret;

[PATCH 8/9] audio: restore mixing-engine playback buffer size

2020-09-20 Thread Volker Rümelin
ueue which the downstream queue accepts. Signed-off-by: Volker Rümelin --- audio/alsaaudio.c | 1 + audio/audio.c | 68 + audio/audio_int.h | 7 - audio/coreaudio.c | 3 ++ audio/dsoundaudio.c | 6 audio/jackaudio.c | 1 + audio

[PATCH 7/9] audio: run downstream playback queue unconditionally

2020-09-20 Thread Volker Rümelin
Run the downstream playback queue even if there are no samples in the mixing engine buffer. The downstream queue may still have queued samples. Signed-off-by: Volker Rümelin --- audio/audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index 57eddb3324

[PATCH 4/9] audio: align audio_generic_read with audio_pcm_hw_run_in

2020-09-20 Thread Volker Rümelin
The function audio_generic_read should work exactly like audio_pcm_hw_run_in. It's a very similar function working on a different buffer. Signed-off-by: Volker Rümelin --- audio/audio.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/audio/audio.c b

[PATCH 2/9] audio/audio: fix video playback slowdown with spiceaudio

2020-09-20 Thread Volker Rümelin
dsound: fix invalid parameters error". The complete fix comes with the next patch. Reported-by: Qi Zhou Signed-off-by: Volker Rümelin --- audio/audio.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index ce8c6dec5f..ad3f57b4c4 10

[PATCH 9/9] audio: revert tests for pcm_ops table

2020-09-20 Thread Volker Rümelin
With previous commit every audio backend has a pcm_ops function table. It's no longer necessary to test if the table is available. This reverts commit cbaf25d1f5: "audio: fix wavcapture segfault" Signed-off-by: Volker Rümelin --- audio/audio.c | 4 ++-- 1 file changed, 2 insert

[PATCH 5/9] audio: remove unnecessary calls to put_buffer_in

2020-09-20 Thread Volker Rümelin
(). While Windows doesn't complain it seems wrong anyway. Signed-off-by: Volker Rümelin --- audio/audio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index f1f0d72389..75107a12d0 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1261,7 +1261,6 @@ static size_t

[PATCH 3/9] audio/spiceaudio: always rate limit playback stream

2020-09-20 Thread Volker Rümelin
("spiceaudio: port to the new audio backend api") Signed-off-by: Volker Rümelin --- audio/audio.c | 3 ++- audio/spiceaudio.c | 10 -- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index ad3f57b4c4..ba52259050 100644 --- a/aud

[PATCH 6/9] audio: align audio_generic_write with audio_pcm_hw_run_out

2020-09-20 Thread Volker Rümelin
,out.mixing-engine=off and play a song in the guest with and without this patch. Signed-off-by: Volker Rümelin --- audio/audio.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index 75107a12d0..57eddb3324 100644

[PATCH 1/9] audio: handle buf == NULL in put_buffer_out()

2020-09-20 Thread Volker Rümelin
ULL and size = 0 at the same time. The only exception is the spiceaudio backend where size may be uninitialized. Signed-off-by: Volker Rümelin --- audio/spiceaudio.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index b6b5da4

[PATCH 0/9] Audio fixes and improvements

2020-09-20 Thread Volker Rümelin
, replace .read = qpa_read with .read = audio_generic_read in the audio/paaudio.c pcm_ops table and start qemu with -audiodev pa,id=audio0,in.mixing-engine=off. With best regards, Volker Volker Rümelin (9):   audio: handle buf == NULL in put_buffer_out()   audio/audio: fix video playback slowdown

Re: [PATCH] Fix video playback slowdown when spice client no audio enabled

2020-09-17 Thread Volker Rümelin
> Hello Qi, > > your patch breaks audio playback with the dsoundaudio backend. > > I suggest you make the following changes: > > - Test for size == 0 first and leave the loop in that case. > - For buf == NULL drop size bytes. Don't leave the loop with break or return. > - Verify all audio

Re: [PATCH] Fix video playback slowdown when spice client no audio enabled

2020-09-13 Thread Volker Rümelin
Am 10.09.20 um 13:17 schrieb zhou qi: > From e8c2e283f0954de255a32ea70d577d5e61992399 Mon Sep 17 00:00:00 2001 > From: Qi Zhou > Date: Thu, 10 Sep 2020 19:09:29 +0800 > Subject: [PATCH] Fix video playback slowdown when spice client no audio > enabled > > You will get video playback slowdown on

[PATCH] meson: fix SDL2_image detection

2020-08-29 Thread Volker Rümelin
/meson.build:256:2: ERROR: Dependency "sdl-image" not found, tried pkgconfig and cmake A full log can be found at /home/ruemelin/rpmbuild/BUILD /qemu-5.1.50-build/meson-logs/meson-log.txt ERROR: meson setup failed Signed-off-by: Volker Rümelin --- meson.build | 2 +- 1 file changed, 1

Re: [PATCH] ossaudio: fix out of bounds write

2020-07-08 Thread Volker Rümelin
> On 7/7/20 8:08 PM, Volker Rümelin wrote: >> In function oss_read() a read error currently does not exit the >> read loop. With no data to read the variable pos will quickly >> underflow and a subsequent successful read overwrites memory >> outside the buffer. This p

[PATCH] ossaudio: fix out of bounds write

2020-07-07 Thread Volker Rümelin
. To reproduce start qemu with -audiodev oss,id=audio0 and in the guest start audio recording. After some time this will trigger an exception. Fixes: 3ba4066d08 "ossaudio: port to the new audio backend api" Signed-off-by: Volker Rümelin --- audio/ossaudio.c | 1 + 1 file changed, 1 insertion(+)

<    1   2   3   4   5   6   >