[Qemu-devel] [PATCH 25/51] paaudio: fix playback glitches

2016-01-17 Thread Volker Rümelin
Hi, a better way to fix the playback glitches is to use a bigger playback buffer on pulseaudio server side. I suggest you replace your patch with a patch like this one: diff --git a/audio/paaudio.c b/audio/paaudio.c index fea6071..8bd5b91 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -554

[Qemu-devel] [PATCH] pulseaudio: reduce 24s recording latency

2015-09-11 Thread Volker Rümelin
Current code doesn't provide pulseaudio buffer attributes for recording. Without buffer attributes pulseaudio uses a default buffer of 4MB. 4MB is approximately 24s 16bit stereo audio data at 44.1kHz. This patch fixes bug #1492649 |Signed-off-by: Volker Rümelin | --- audio/paaudio.

Re: [Qemu-devel] [PATCH] pulseaudio: reduce 24s recording latency

2015-09-12 Thread Volker Rümelin
Hi, Am 12.09.2015 um 01:22 schrieb Marc-André Lureau: Current code doesn't provide pulseaudio buffer attributes for recording. Without buffer attributes pulseaudio uses a default buffer of 4MB. 4MB is approximately 24s 16bit stereo audio data at 44.1kHz. Why isn't the buffer processed as soon

Re: [Qemu-devel] [PATCH] pulseaudio: reduce 24s recording latency

2015-09-12 Thread Volker Rümelin
Am 12.09.2015 um 16:35 schrieb Kővágó Zoltán: 2015-09-12 13:23 keltezéssel, Volker Rümelin írta: On start up qemu opens a connection to pulseaudio in function qpa_init_in and pulseaudio immediately starts recording to the 4MB ringbuffer. The qemu guest, Windows 8.1 in my case, doesn't co

Re: [PULL v4 46/83] acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML

2022-11-17 Thread Volker Rümelin
From: Igor Mammedov PCI-ISA bridges that are built in PIIX/Q35 are building its own AML using AcpiDevAmlIf interface. Now build_append_pci_bus_devices() gained AcpiDevAmlIf interface support to get AML of devices atached to PCI slots. So drop ad-hoc build_q35_isa_bridge()/build_piix4_isa_bridge()

Re: [PULL v4 46/83] acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML

2022-11-19 Thread Volker Rümelin
Am 18.11.22 um 15:55 schrieb Igor Mammedov: On Fri, 18 Nov 2022 14:08:36 +0100 Igor Mammedov wrote: On Thu, 17 Nov 2022 22:51:46 +0100 Volker Rümelin wrote: [...] since this patch SeaBIOS no longer detects the PS/2 keyboard. This means there's no keyboard in SeaBIOS, GRUB or FreeDOS.

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

2023-07-20 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: [PULL 06/19] ui/gtk: set scanout-mode right before scheduling draw

2023-07-24 Thread Volker Rümelin
backing_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:

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

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

2024-02-18 Thread Volker Rümelin
iable 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/virti

[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 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 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 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 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

[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 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

[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 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

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 u

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: [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 incorrect

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

[PATCH 00/17] audio: improve callback interface for audio frontends

2023-01-15 Thread Volker Rümelin
t->rpos += written; if (chunk != written) { +    fprintf(stderr, "%s: could not write %u bytes\n", __func__, +    chunk - written); break; } } hda_timer_sync_adjust(st, (wpos - rpos) - (B_SIZE >> 1)); +    if (avail != total_written)

[PATCH 03/17] audio: make the resampling code greedy

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Read the maximum possible number of audio frames instead of the minimum necessary number of frames when the audio stream is downsampled and the output buffer is limited. This makes the function symmetrical to upsampling when the input buffer is limited. The maximum possible

[PATCH 01/17] audio: change type of mix_buf and conv_buf

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Change the type of mix_buf in struct HWVoiceOut and conv_buf in struct HWVoiceIn from STSampleBuffer * to STSampleBuffer. However, a buffer pointer is still needed. For this reason in struct STSampleBuffer samples[] is changed to *buffer. This is a preparation for the next

[PATCH 07/17] audio: don't misuse audio_pcm_sw_write()

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin The audio_pcm_sw_write() function is intended to convert a PCM audio stream to the internal representation, adjust the volume, and then mix it with the other audio streams with a possibly changed sample rate in mix_buf. In order for the audio_capture_mix_and_clear() function

[PATCH 04/17] audio: replace the resampling loop in audio_pcm_sw_write()

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Replace the resampling loop in audio_pcm_sw_write() with the new function audio_pcm_sw_resample_out(). Unlike the old resample loop the new function will try to consume input frames even if the output buffer is full. This is necessary when downsampling to avoid reading less

[PATCH 16/17] audio/audio_template: substitute sw->hw with hw

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Substitute sw->hw with hw in the audio_pcm_sw_alloc_resources_* functions. Signed-off-by: Volker Rümelin --- audio/audio_template.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index a9a550a

[PATCH 14/17] audio: wire up st_rate_frames_out()

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Wire up the st_rate_frames_out() function and replace audio_frontend_frames_in() to make audio packet length calculation exact. Signed-off-by: Volker Rümelin --- audio/audio.c | 29 - 1 file changed, 8 insertions(+), 21 deletions(-) diff --git

[PATCH 05/17] audio: remove sw == NULL check

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin All call sites of audio_pcm_sw_write() guarantee that sw is not NULL. Remove the unnecessary NULL check. Signed-off-by: Volker Rümelin --- audio/audio.c | 4 1 file changed, 4 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index b0a270ba85..9d6ffa500a

[PATCH 11/17] audio: replace the resampling loop in audio_pcm_sw_read()

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Replace the resampling loop in audio_pcm_sw_read() with the new function audio_pcm_sw_resample_in(). Unlike the old resample loop the new function will try to consume input frames even if the output buffer is full. This is necessary when downsampling to avoid reading less

[PATCH 08/17] audio: remove unused noop_conv() function

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin The function audio_capture_mix_and_clear() no longer uses audio_pcm_sw_write() to resample audio frames from one internal buffer to another. For this reason, the noop_conv() function is now unused. Remove it. Signed-off-by: Volker Rümelin --- audio/audio.c | 8 1

[PATCH 10/17] audio: wire up st_rate_frames_in()

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Wire up the st_rate_frames_in() function and replace audio_frontend_frames_out() to make audio packet length calculation exact. When upsampling, it's still possible that the audio frontends can't write the last audio frame. This will be fixed later. Signed-off-

[PATCH 06/17] audio: rename variables in audio_pcm_sw_write()

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin The audio_pcm_sw_write() function uses a lot of very unspecific variable names. Rename them for better readability. ret => total_in total => total_out size => buf_len hwsamples => hw->mix_buf.size samples => frames_in_max Signed-off-by: Volker Rümelin

[PATCH 13/17] audio/mixeng: calculate number of output frames

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Calculate the exact number of audio output frames the resampling code can generate from a given number of audio input frames. When upsampling, this function returns the maximum number of output frames. This function will later replace the audio_frontend_frames_in() function

[PATCH 17/17] audio: remove sw->ratio

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Simplify the resample buffer size calculation. For audio playback we have sw->ratio = ((int64_t)sw->hw->info.freq << 32) / sw->info.freq; samples = ((int64_t)sw->HWBUF.size << 32) / sw->ratio; This can be simplified to samples = muldiv64(sw-

[PATCH 02/17] audio: change type and name of the resample buffer

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Change the type of the resample buffer from struct st_sample * to STSampleBuffer. Also change the name from buf to resample_buf for better readability. The new variables resample_buf.size and resample_buf.pos will be used after the next patches. There is no functional

[PATCH 12/17] audio: rename variables in audio_pcm_sw_read()

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin The audio_pcm_sw_read() function uses a few very unspecific variable names. Rename them for better readability. ret => total_out total => total_in size => buf_len samples => frames_out_max Signed-off-by: Volker Rümelin --- audio/audio.c | 18 +-

[PATCH 15/17] audio: handle leftover audio frame from upsampling

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Upsampling may leave one remaining audio frame in the input buffer. The emulated audio playback devices are currently resposible to write this audio frame again in the next write cycle. Push that task down to audio_pcm_sw_write. This is another step towards an audio

[PATCH 09/17] audio/mixeng: calculate number of input frames

2023-01-15 Thread Volker Rümelin
From: Volker Rümelin Calculate the exact number of audio input frames needed to get a given number of audio output frames. The exact number of frames depends only on the difference of opos - ipos and the number of output frames. When downsampling, this function returns the maximum number of

Re: [PATCH 00/17] audio: improve callback interface for audio frontends

2023-01-15 Thread Volker Rümelin
Am 15.01.23 um 14:08 schrieb Volker Rümelin: Ccing a few more people who might be interested in this patch series. @Mark: After this patch series, the code in your out of tree ASC audio device (and a few in tree audio devices) could be simplified. write_audio() and the loops calling

Re: [PATCH 2/9] audio: remove special audio_calloc function

2023-01-15 Thread Volker Rümelin
Am 13.01.23 um 17:21 schrieb Daniel P. Berrangé: The audio_calloc function does various checks on the size and nmembers parameters to detect various error conditions. There are only 5 callers * alsa_poll_helper: the pollfd count is small and bounded, * audio_pcm_create_voice_pair_: allocatin

Re: [PATCH 1/9] audio: don't check qemu_add_vm_change_state_handler failure

2023-01-15 Thread Volker Rümelin
properly here. It should report: ERROR: space prohibited between function name and open parenthesis '(' With this changed, Reviewed-by: Volker Rümelin QTAILQ_INSERT_TAIL(&audio_states, s, list); QLIST_INIT (&s->card_head);

Re: [PATCH 08/11] audio/audio_template: use g_new0() to replace audio_calloc()

2023-01-16 Thread Volker Rümelin
Am 16.01.23 um 10:03 schrieb Daniel P. Berrangé: On Sun, Dec 18, 2022 at 06:15:36PM +0100, Volker Rümelin wrote: Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument >= 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Signed-off-by: Vol

Re: [PATCH 07/11] audio/audio_template: use g_malloc0() to replace audio_calloc()

2023-01-16 Thread Volker Rümelin
Am 16.01.23 um 09:58 schrieb Daniel P. Berrangé: On Sun, Dec 18, 2022 at 06:39:00PM +0100, Volker Rümelin wrote: Am 18.12.22 um 18:26 schrieb Philippe Mathieu-Daudé: On 18/12/22 18:15, Volker Rümelin wrote: Use g_malloc0() as a direct replacement for audio_calloc(). Signed-off-by: Volker

Re: Audio playback speed issue on sam460ex and pegasos2

2023-03-26 Thread Volker Rümelin
Am 19.03.23 um 21:03 schrieb Volker Rümelin: Am 19.03.23 um 18:49 schrieb BALATON Zoltan: Not sure this helps but I get these with DEBUG enabled in qemu/audio on Linux host with alsa set to 44100 Hz dmix rate with default settings without any -audiodev options with AmigaOS guest. With

Re: Audio playback speed issue on sam460ex and pegasos2

2023-03-28 Thread Volker Rümelin
es_out 0.000 pid=8358 hw_free=0x38c hw_written=0x372 Hi Rene, it seems your Mac uses a 48kHz sample rate, although QEMU requested a 44.1kHz sample rate. Could you add -audiodev coreaudio,id=audio0,out.frequency=48000 to your command line and test if the playback speed and pitch is now correct

Re: Audio playback speed issue on sam460ex and pegasos2

2023-03-29 Thread Volker Rümelin
/-/issues/1191. I can't really help to fix this Core Audio backend issue. I don't have a Mac. Until this bug is fixed, you will have to live with the workaround. With best regards, Volker --- Ursprüngliche Nachricht --- Von: Volker Rümelin Datum: 28.03.2023 20:26:14 An: Rene Engel B

Re: Audio playback speed issue on sam460ex and pegasos2

2023-03-29 Thread Volker Rümelin
Am 29.03.23 um 21:20 schrieb BALATON Zoltan: On Tue, 28 Mar 2023, Volker Rümelin wrote: it seems your Mac uses a 48kHz sample rate, although QEMU requested a 44.1kHz sample rate. Could you add -audiodev coreaudio,id=audio0,out.frequency=48000 to your command line and test if the playback

Re: [PATCH v9] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-02 Thread Volker Rümelin
Am 28.03.23 um 15:08 schrieb Dorinda Bassey: Hi Dorinda, This commit adds a new audiodev backend to allow QEMU to use Pipewire as both an audio sink and source. This backend is available on most systems Add Pipewire entry points for QEMU Pipewire audio backend Add wrappers for QEMU Pipewire au

Re: [PATCH v8] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-02 Thread Volker Rümelin
code to connect to the specified source/sink. I would prefer the latter. PW_KEY_TARGET_OBJECT looks promising. Ack. Thanks, Dorinda. On Mon, Mar 20, 2023 at 7:31 AM Volker Rümelin wrote: > diff --git a/audio/trace-events b/audio/trace-events > index e1ab643add..e0acf9ac5

Re: [PATCH v8] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-03 Thread Volker Rümelin
ink was already in your email. With best regards, Volker Thanks, Dorinda On Mon, Apr 3, 2023 at 8:51 AM Volker Rümelin wrote: Am 28.03.23 um 13:56 schrieb Dorinda Bassey: Hi Dorinda, > Hi Volker, > > Thanks for the feedback. > >     This term is

Re: [PATCH v10] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-09 Thread Volker Rümelin
Hi Dorinda, This commit adds a new audiodev backend to allow QEMU to use Pipewire as both an audio sink and source. This backend is available on most systems Add Pipewire entry points for QEMU Pipewire audio backend Add wrappers for QEMU Pipewire audio backend in qpw_pcm_ops() qpw_write functio

Re: [PATCH v10] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-10 Thread Volker Rümelin
Hi Dorinda, This commit adds a new audiodev backend to allow QEMU to use Pipewire as both an audio sink and source. This backend is available on most systems Add Pipewire entry points for QEMU Pipewire audio backend Add wrappers for QEMU Pipewire audio backend in qpw_pcm_ops() qpw_write functio

[PATCH v2 00/11] audio: more improvements

2023-01-21 Thread Volker Rümelin
dio/audio_template: use g_new0() to replace audio_calloc() Check samples for negative values. It's possible to have negative samples due to overflows or unsigned to signed conversions. Patch 01/11 takes care of samples == 0. Volker Rümelin (11):   audio: log unimplemented audio device samp

[PATCH v2 04/11] audio: remove unused #define AUDIO_STRINGIFY

2023-01-21 Thread Volker Rümelin
Remove the unused #define AUDIO_STRINGIFY. It was last used before commit 470bcabd8f ("audio: Replace AUDIO_FUNC with __func__"). Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Volker Rümelin --- audio/audio_int.h | 3 --- 1 file changed, 3 deletion

[PATCH v2 11/11] alsaaudio: reintroduce default recording settings

2023-01-21 Thread Volker Rümelin
fault recording settings and use the same default settings for recording as for playback. The term "reintroduce" is correct because commit a93f328177 ("alsaaudio: port to -audiodev config") removed the default settings for recording. Signed-off-by: Volker Rümelin --

[PATCH v2 05/11] audio/mixeng: use g_new0() instead of audio_calloc()

2023-01-21 Thread Volker Rümelin
Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument of 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Reviewed-by: Richard Henderson Signed-off-by: Volker Rümelin --- audio/audio.c | 5 - audio/audio_template.h | 6

[PATCH v2 02/11] audio: don't show unnecessary error messages

2023-01-21 Thread Volker Rümelin
Let the audio_pcm_create_voice_pair_* functions handle error reporting. This avoids an additional error message in case the guest selected an unimplemented sample rate. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin --- audio/audio_template.h | 2 +- 1 file changed, 1

[PATCH v2 08/11] audio/audio_template: use g_new0() to replace audio_calloc()

2023-01-21 Thread Volker Rümelin
Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument >= 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Signed-off-by: Volker Rümelin --- audio/audio_template.h | 29 - 1 file changed, 12 insertions(+), 17 deleti

[PATCH v2 09/11] audio: remove audio_calloc() function

2023-01-21 Thread Volker Rümelin
Now that the last call site of audio_calloc() was removed, remove the unused audio_calloc() function. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Volker Rümelin --- audio/audio.c | 20 audio/audio_int.h | 1 - 2 files changed, 21 deletions(-) diff --git a

[PATCH v2 06/11] audio/alsaaudio: use g_new0() instead of audio_calloc()

2023-01-21 Thread Volker Rümelin
Replace audio_calloc() with the equivalent g_new0(). The value of the g_new0() argument count is >= 1, which means g_new0() will never return NULL. Also remove the unnecessary NULL check. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Volker Rüme

[PATCH v2 10/11] alsaaudio: change default playback settings

2023-01-21 Thread Volker Rümelin
since last alsa run (running): 0.006084 Acked-by: Christian Schoenebeck Signed-off-by: Volker Rümelin --- audio/alsaaudio.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 5f50dfa0bf..0cc982e61f 100644 --- a/audio

[PATCH v2 01/11] audio: log unimplemented audio device sample rates

2023-01-21 Thread Volker Rümelin
he AUD_read and AUD_write functions return early in this case. This is necessary because, for example, the Sound Blaster 16 emulation calls AUD_write from the DMA callback function. Acked-by: Christian Schoenebeck Signed-off-by: Volker Rümelin --- audio/audio.c | 1 + audio/audio_

[PATCH v2 07/11] audio/audio_template: use g_malloc0() to replace audio_calloc()

2023-01-21 Thread Volker Rümelin
negative values. Signed-off-by: Volker Rümelin --- audio/audio_int.h | 4 ++-- audio/audio_template.h | 18 -- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/audio/audio_int.h b/audio/audio_int.h index 4632cdf9cc..ce2d6bf92c 100644 --- a/audio/audio_int.h

[PATCH v2 03/11] audio: rename hardware store to backend

2023-01-21 Thread Volker Rümelin
Use a consistent friendly name for the HWVoiceOut and HWVoiceIn structures. Reviewed-by: Thomas Huth Signed-off-by: Volker Rümelin --- audio/audio_template.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index ee320a2e3f

Re: [PATCH v2 10/11] alsaaudio: change default playback settings

2023-01-23 Thread Volker Rümelin
Am 23.01.23 um 08:43 schrieb Philippe Mathieu-Daudé: On 21/1/23 10:47, Volker Rümelin wrote: The currently used default playback settings in the ALSA audio backend are a bit unfortunate. With a few emulated audio devices, audio playback does not work properly. Here is a short part of the debug

Re: [PATCH 00/17] audio: improve callback interface for audio frontends

2023-01-28 Thread Volker Rümelin
Am 22.01.23 um 19:13 schrieb Mark Cave-Ayland: On 15/01/2023 13:45, Volker Rümelin wrote: Am 15.01.23 um 14:08 schrieb Volker Rümelin: Ccing a few more people who might be interested in this patch series. @Mark: After this patch series, the code in your out of tree ASC audio device (and a

Re: [PATCH 00/17] audio: improve callback interface for audio frontends

2023-01-31 Thread Volker Rümelin
Am 31.01.23 um 15:53 schrieb Marc-André Lureau: Hi On Sun, Jan 15, 2023 at 5:10 PM Volker Rümelin wrote: Based-on: <3b1404eb-a7c5-f64c-3e47-1397c54c4...@t-online.de> ([PATCH 00/11] audio: more improvements) Something didn't work with patchew (https://patchew.org/QEMU/61bd351f-068

Re: [PATCH] audio: Add sndio backend

2021-11-13 Thread Volker Rümelin
Hi Brad, audio: Add sndio backend Add a sndio backend. sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). The C code is from Alexandre Ratchov and the rest of the bits are from me. --- audio/audio.

Re: [PATCH] audio: Add sndio backend

2021-11-19 Thread Volker Rümelin
Hi Brad, just a few white space and coding style issues. +/* + * stop polling descriptors + */ +static void sndio_poll_clear(SndioVoice *self) +{ +struct pollfd *pfd; +int i; + +for (i = 0; i < self->nfds; i++) { +pfd = &self->pfds[i]; +qemu_set_fd_handler (pfd->fd,

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

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 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 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 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 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 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 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 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 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 v11] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-12 Thread Volker Rümelin
Am 12.04.23 um 15:59 schrieb Dorinda Bassey: > Hi Volker, > > It seems that for some unknown reason using audio_pcm_info_clear_buf in > playback_process causes segmentation fault. Hence I moved the handling of > buffer underruns from the playback process to the qpw_write process because > that i

Re: [PATCH 0/3] SDL2 usability fixes

2023-04-13 Thread Volker Rümelin
I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI doesn't seem to support OpenGL under Windows the SDL2 GUI does. Hence I used the SDL2 GUI where I ran into several issues of which three are fixed in this series, which are: * Alt+Tab switches tasks on the host rath

Re: [PATCH 0/3] SDL2 usability fixes

2023-04-13 Thread Volker Rümelin
Am 13.04.23 um 22:43 schrieb Bernhard Beschow: Am 13. April 2023 17:54:34 UTC schrieb "Volker Rümelin" : I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI doesn't seem to support OpenGL under Windows the SDL2 GUI does. Hence I used the SDL2

Re: [PATCH 0/3] SDL2 usability fixes

2023-04-14 Thread Volker Rümelin
Am 13.04.23 um 22:43 schrieb Bernhard Beschow: Am 13. April 2023 17:54:34 UTC schrieb "Volker Rümelin" : I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI doesn't seem to support OpenGL under Windows the SDL2 GUI does. Hence I used the SDL2

Re: [PATCH 0/3] SDL2 usability fixes

2023-04-14 Thread Volker Rümelin
Am 13.04.23 um 22:43 schrieb Bernhard Beschow: Am 13. April 2023 17:54:34 UTC schrieb "Volker Rümelin" : I'm trying to use QEMU on Windows hosts for fun and for profit. While the GTK GUI doesn't seem to support OpenGL under Windows the SDL2 GUI does. Hence I used the

Re: [PATCH v11] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-15 Thread Volker Rümelin
Hi Dorinda, This commit adds a new audiodev backend to allow QEMU to use Pipewire as both an audio sink and source. This backend is available on most systems Add Pipewire entry points for QEMU Pipewire audio backend Add wrappers for QEMU Pipewire audio backend in qpw_pcm_ops() qpw_write functio

Re: [PATCH v2 1/2] ui/sdl2: Grab Alt+Tab also in fullscreen mode

2023-04-17 Thread Volker Rümelin
be switched in the VM. Signed-off-by: Bernhard Beschow --- ui/sdl2.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Volker Rümelin diff --git a/ui/sdl2.c b/ui/sdl2.c index b12dec4caf..8af8b89f1d 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -856,6 +856,9 @@ static void

Re: [PATCH v2 2/2] ui/sdl2: Grab Alt+F4 also under Windows

2023-04-17 Thread Volker Rümelin
rtion(+) Reviewed-by: Volker Rümelin diff --git a/ui/sdl2.c b/ui/sdl2.c index 8af8b89f1d..00aadfae37 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -859,6 +859,7 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o) #ifdef SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED SDL_Se

SDL2: fix handling of the AltGr key on Windows again

2023-04-17 Thread Volker Rümelin
hen enabled with a grabbed keyboard, this disables the special left control key filter and handling of the AltGr key on Windows is broken again. This patch fixes handling of the AltGr key on Windows with international keyboard layout. Volker Rümelin (1):   ui/sdl2: disable SDL_HINT_GRAB_KEYBO

[PATCH] ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows

2023-04-17 Thread Volker Rümelin
r when the keyboard is grabbed. To fix the problem, disable the SDL2 Windows low level keyboard hook procedure. Reported-by: Bernhard Beschow Signed-off-by: Volker Rümelin --- ui/sdl2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 00aadfae37..9d703200bf 10

[PATCH v2 0/1] SDL2: fix handling of the AltGr key on Windows again

2023-04-17 Thread Volker Rümelin
the correct QEMU branch. Volker Rümelin (1):   ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows  ui/sdl2.c | 3 +++  1 file changed, 3 insertions(+) -- 2.35.3

[PATCH v2 1/1] ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows

2023-04-17 Thread Volker Rümelin
r when the keyboard is grabbed. To fix the problem, disable the SDL2 Windows low level keyboard hook procedure. Reported-by: Bernhard Beschow Signed-off-by: Volker Rümelin --- ui/sdl2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 00aadfae37..9d703200bf 10

Re: [PATCH v12] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-04-19 Thread Volker Rümelin
0644 audio/pwaudio.c I think the program code is ok now. Reviewed-by: Volker Rümelin

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

2023-05-20 Thread Volker Rümelin
: 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] meson: remove -no-pie linker flag

2023-05-22 Thread Volker Rümelin
wrap should be at least fc5eaaf6f68d5cff76468c63984c33c4fb51506d. Building QEMU on my Linux system works fine. Tested-by: Volker Rümelin

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

2023-05-23 Thread Volker Rümelin
abled() I tested that QEMU builds on Windows with MSYS2 mingw64. One unrelated note: The DLL loader 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

  1   2   3   4   5   6   7   >