- Jan 08, 2024
-
-
Michael Tokarev authored
error_setg() appends newline to the formatted message. Fixes: cb94ff5f ("audio: propagate Error * out of audio_init") Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> (cherry picked from commit 09a36158c283f7448d1b00fdbb6634f05d27f922) Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Nov 24, 2023
-
-
Akihiko Odaki authored
Failed default audio devices were removed from the list but not freed, and that made LeakSanitizer sad. Free default audio devices as they are consumed. Signed-off-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Acked-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20231120112804.9736-1-akihiko.odaki@daynix.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Nov 07, 2023
-
-
Daniel P. Berrangé authored
Print a debug message as is done for other unsupported audio formats to give the user the chance to understand their mistake. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Nov 01, 2023
-
-
Juan Quintela authored
We can have more than one audio backend. void audio_init_audiodevs(void) { AudiodevListEntry *e; QSIMPLEQ_FOREACH(e, &audiodevs, next) { audio_init(e->dev, &error_fatal); } } Reviewed-by:
Stefan Berger <stefanb@linux.ibm.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20231020090731.28701-12-quintela@redhat.com>
-
- Oct 08, 2023
-
-
Paolo Bonzini authored
Default audio devices can now be created with "-audio". Tests for soundcards were already using "-audiodev" if they want to specify a particular backend, for the others remove the last remnants of legacy audio configuration. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Make VNC use the default backend again if one is defined. The recently introduced support for disabling the VNC audio extension is still used, in case no default backend exists. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
It is now possible to specify the options for the default audio device using -audio, so there is no need anymore to use a fake -audiodev option. Remove the fall back to QTAILQ_FIRST(&audio_states), instead remember the AudioState that was created from default_audiodevs and use that one. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
If "-audio BACKEND" is used without a model, the resulting backend will be used whenever the audiodev property is not specified. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
It will be used soon to define a default audio device from the command line. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Match what is done for other options, for example -monitor, and also the behavior of QEMU 8.1 (see the "legacy_config" variable). Require the user to specify a backend if one is specified on the command line. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 06, 2023
-
-
Thomas Huth authored
The "err" variable is only used twice in this code, in a very local fashion of first assigning it and then checking it in the next line. So there is no need to declare this variable a second time in the innermost block, we can re-use the variable that is declared at the beginning of the function. This fixes the compiler warning that occurs with "-Wshadow". Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-ID: <20231004083900.95856-1-thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Oct 03, 2023
-
-
Paolo Bonzini authored
Now that all callers support setting an audiodev, forbid using the default audiodev if -nodefaults is provided on the command line. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Martin Kletzander authored
Starting from audio_driver_init, propagate errors via Error ** so that audio_init_audiodevs can simply pass &error_fatal, and AUD_register_card can signal faiure. Signed-off-by:
Martin Kletzander <mkletzan@redhat.com> [Reworked the audio/audio.c parts, while keeping Martin's hw/ changes. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
These have been deprecated for a long time, and the introduction of -audio in 7.1.0 has cemented the new way of specifying an audio backend's parameters. However, there is still a need for simple configuration of the audio backend in the desktop case; therefore, if no audiodev is passed to audio_init(), go through a bunch of simple Audiodev* structures and pick the first that can be initialized successfully. The only QEMU_AUDIO_* option that is left in, waiting for a better idea, is QEMU_AUDIO_DRV=none which is used by qtest. Remove all the parsing code, including the concept of "can_be_default" audio drivers: now that audio_prio_list[] is only used in a single place, wav can be excluded directly in that function. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Merge two ifs into one. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Move some mostly irrelevant code out of audio_init. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Remove duplicate error formatting code. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
An error is already printed by audio_driver_init, but we can make it more precise if the driver can return an Error *. Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Martin Kletzander authored
Since all callers require a valid audiodev this function can now safely abort in case of missing AudioState. Signed-off-by:
Martin Kletzander <mkletzan@redhat.com> Message-ID: <c6e87e678e914df0f59da2145c2753cdb4a16f63.1650874791.git.mkletzan@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 26, 2023
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 21, 2023
-
-
Peter Maydell authored
Avoid a dynamic stack allocation in qjack_process(). Since this function is a JACK process callback, we are not permitted to malloc() here, so we allocate a working buffer in qjack_client_init() instead. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Francisco Iglesias <frasse.iglesias@gmail.com> Reviewed-by:
Christian Schoenebeck <qemu_oss@crudebyte.com> Message-id: 20230818155846.1651287-3-peter.maydell@linaro.org
-
Peter Maydell authored
Avoid a dynamic stack allocation in qjack_client_init(), by using a g_autofree heap allocation instead. (We stick with allocate + snprintf() because the JACK API requires the name to be no more than its maximum size, so g_strdup_printf() would require an extra truncation step.) The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Francisco Iglesias <frasse.iglesias@gmail.com> Reviewed-by:
Christian Schoenebeck <qemu_oss@crudebyte.com> Message-id: 20230818155846.1651287-2-peter.maydell@linaro.org
-
- Sep 08, 2023
-
-
Michael Tokarev authored
Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org>
-
- Jul 17, 2023
-
-
Marc-André Lureau authored
Follow PulseAudio backend comment and code, and only implement the channels QEMU actually supports at this point, and add the same comment about limits and future mappings. Simplify a bit the code. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-13-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
The stream is actually created connected. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-12-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
create_stream() now reports on all error paths. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-11-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-10-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-9-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
PipeWire uses errno to report error details. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-8-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-7-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
g_clear_pointer() already checks for NULL. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-6-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-5-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
"PipeWire" is the correct case. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230506163735.3481387-4-marcandre.lureau@redhat.com>
-
- Jul 01, 2023
-
-
Marc-André Lureau authored
Commit commit 6cc5a615 ("ui/dbus: win32 support") has broken audio/dbus compilation when pixman is not included. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1739 Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230630214156.2181558-1-marcandre.lureau@redhat.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jun 27, 2023
-
-
Marc-André Lureau authored
D-Bus doesn't support fd-passing on Windows (AF_UNIX doesn't have SCM_RIGHTS yet, but there are other means to share objects. I have proposed various solutions upstream, but none seem fitting enough atm). To make the "-display dbus" work on Windows, implement an alternative D-Bus interface where all the 'h' (FDs) arguments are replaced with 'ay' (WSASocketW data), and sockets are passed to the other end via WSADuplicateSocket(). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230606115658.677673-6-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
D-Bus on windows doesn't support fd-passing. Let's isolate the fdlist-related code as a first step, before adding Windows support, using another mechanism. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230606115658.677673-4-marcandre.lureau@redhat.com>
-
- Jun 20, 2023
-
-
Philippe Mathieu-Daudé authored
We use the user_ss[] array to hold the user emulation sources, and the softmmu_ss[] array to hold the system emulation ones. Hold the latter in the 'system_ss[]' array for parity with user emulation. Mechanical change doing: $ sed -i -e s/softmmu_ss/system_ss/g $(git grep -l softmmu_ss) Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230613133347.82210-10-philmd@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jun 02, 2023
-
-
Eric Blake authored
It's already confusing that we have two very similar functions for wrapping the parse of a 64-bit unsigned value, differing mainly on whether they permit leading '-'. Adjust the signature of parse_uint() and parse_uint_full() to be like all of qemu_strto*(): put the result parameter last, use the same types (uint64_t and unsigned long long have the same width, but are not always the same type), and mark endptr const (this latter change only affects the rare caller of parse_uint). Adjust all callers in the tree. While at it, note that since cutils.c already includes: QEMU_BUILD_BUG_ON(sizeof(int64_t) != sizeof(long long)); we are guaranteed that the result of parse_uint* cannot exceed UINT64_MAX (or the build would have failed), so we can drop pre-existing dead comparisons in opts-visitor.c that were never false. Reviewed-by:
Hanna Czenczek <hreitz@redhat.com> Message-Id: <20230522190441.64278-8-eblake@redhat.com> [eblake: Drop dead code spotted by Markus] Signed-off-by:
Eric Blake <eblake@redhat.com>
-
- May 05, 2023
-
-
Dorinda Bassey authored
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 function returns the current state of the stream to pwaudio and Writes some data to the server for playback streams using pipewire spa_ringbuffer implementation. qpw_read function returns the current state of the stream to pwaudio and reads some data from the server for capture streams using pipewire spa_ringbuffer implementation. These functions qpw_write and qpw_read are called during playback and capture. Added some functions that convert pw audio formats to QEMU audio format and vice versa which would be needed in the pipewire audio sink and source functions qpw_init_in() & qpw_init_out(). These methods that implement playback and recording will create streams for playback and capture that will start processing and will result in the on_process callbacks to be called. Built a connection to the Pipewire sound system server in the qpw_audio_init() method. Signed-off-by:
Dorinda Bassey <dbassey@redhat.com> Reviewed-by:
Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230417105654.32328-1-dbassey@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-