All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] add build option to disable audio subsystem
@ 2026-02-23 20:25 Sergei Heifetz
  2026-02-23 20:25 ` [PATCH v2 01/10] audio: add `audio` build option for meson and Kconfig Sergei Heifetz
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Sergei Heifetz @ 2026-02-23 20:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Gerd Hoffmann, Marcel Apfelbaum, Marc-André Lureau,
	Paolo Bonzini, Daniel P. Berrangé, Fabiano Rosas,
	Laurent Vivier, Thomas Huth, Eduardo Habkost,
	Philippe Mathieu-Daudé, Eric Blake, Alex Bennée,
	Richard Henderson, Michael S. Tsirkin, Markus Armbruster,
	Dr. David Alan Gilbert

This series adds a compile-time option to disable building
audio-related sources (mostly, files under `audio/` and `hw/audio/`).
It adds `--disable-audio` and `--enable-audio` options to the
`configure` script. Audio remains enabled by default, and the changes are
harmless in that case.

When audio is disabled, it may not be possible to build a number of
devices and machines. This is expected, and can be addressed on a
case-by-case basis if needed. For now, this is done only for the
PC Speaker (PCSPK).

This feature may be useful in production environments which only use a
specific subset of QEMU’s functionality and, in particular, do not need
the audio subsystem. In such environments it is generally beneficial to
avoid building unused code, for both security and maintenance reasons
(for example, to satisfy various static code analysers).

Changes since v1:
- Rebased onto the master branch (in particular, onto the changes from the
  large series submitted by Marc-André Lureau).
- D-Bus is now handled differently when audio is disabled: instead of
  interrupting initialisation, we simply don’t initialise the audio
  interface.
- Incorporated a few changes suggested by Paolo Bonzini and Thomas Huth.
  The main ones are:
  - Cleaned up the PCSPK changes (removed redundant ifdefs and the
    `audio_be` field).
  - Removed the HMP commands rather than stubbing them out.
  - Replaced the `configure` change with a change in
    `scripts/meson-buildoptions.sh`.
  - Removed `qdev_prop_audiodev` in `hw/core/qdev-properties-system.c`
    rather than stubbing out `audio_be_get_id`.
  (Here "removed" means adding an appropriate ifdef.)

Sergei Heifetz (10):
  audio: add `audio` build option for meson and Kconfig
  ui/vnc: disable audio feature when configured with --disable-audio
  tests/qtest: remove -audio none when configured with --disable-audio
  hw/audio/pcspk: change PCSPK behaviour with --disable-audio
  Kconfig: add AUDIO dependency to audio-related devices
  system/vl: remove audio and audiodev options when audio is disabled
  ui/dbus: run without Audio interface when audio is disabled
  tests/audio: do not compile if audio is disabled
  audio: do not build audio-related sources with --disable-audio
  meson.build: ignore audio drivers when configured with --disable-audio

 Kconfig.host                     |  3 ++
 audio/audio-stub.c               | 22 +++++++++
 audio/meson.build                |  5 ++
 hmp-commands-info.hx             |  2 +
 hmp-commands.hx                  |  2 +
 hw/audio/Kconfig                 | 21 ++++----
 hw/audio/pcspk.c                 | 12 ++++-
 hw/core/qdev-properties-system.c |  2 +
 hw/i386/pc.c                     |  2 +
 hw/usb/Kconfig                   |  2 +-
 meson.build                      | 83 ++++++++++++++++++--------------
 meson_options.txt                |  3 ++
 qapi/audio.json                  |  3 +-
 replay/meson.build               |  9 +++-
 replay/replay-audio-stub.c       | 21 ++++++++
 replay/stubs-system.c            | 12 -----
 scripts/meson-buildoptions.sh    |  3 ++
 system/vl.c                      |  6 +++
 tests/audio/meson.build          |  2 +-
 tests/qtest/libqtest.c           |  2 +
 ui/dbus.c                        |  2 +
 ui/vnc.c                         | 31 ++++++++++--
 22 files changed, 186 insertions(+), 64 deletions(-)
 create mode 100644 audio/audio-stub.c
 create mode 100644 replay/replay-audio-stub.c

-- 
2.34.1



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2026-02-25  7:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 20:25 [PATCH v2 00/10] add build option to disable audio subsystem Sergei Heifetz
2026-02-23 20:25 ` [PATCH v2 01/10] audio: add `audio` build option for meson and Kconfig Sergei Heifetz
2026-02-24 11:05   ` Marc-André Lureau
2026-02-23 20:25 ` [PATCH v2 02/10] ui/vnc: disable audio feature when configured with --disable-audio Sergei Heifetz
2026-02-24 11:05   ` Marc-André Lureau
2026-02-25  7:26     ` Sergei Heifetz
2026-02-23 20:25 ` [PATCH v2 03/10] tests/qtest: remove -audio none " Sergei Heifetz
2026-02-24 11:05   ` Marc-André Lureau
2026-02-25  7:31     ` Sergei Heifetz
2026-02-23 20:25 ` [PATCH v2 04/10] hw/audio/pcspk: change PCSPK behaviour " Sergei Heifetz
2026-02-24 11:05   ` Marc-André Lureau
2026-02-23 20:25 ` [PATCH v2 05/10] Kconfig: add AUDIO dependency to audio-related devices Sergei Heifetz
2026-02-24 11:06   ` Marc-André Lureau
2026-02-23 20:25 ` [PATCH v2 06/10] system/vl: remove audio and audiodev options when audio is disabled Sergei Heifetz
2026-02-24 11:06   ` Marc-André Lureau
2026-02-25  7:39     ` Sergei Heifetz
2026-02-23 20:25 ` [PATCH v2 07/10] ui/dbus: run without Audio interface " Sergei Heifetz
2026-02-24 11:06   ` Marc-André Lureau
2026-02-25  7:35     ` Sergei Heifetz
2026-02-23 20:25 ` [PATCH v2 08/10] tests/audio: do not compile if " Sergei Heifetz
2026-02-24 11:06   ` Marc-André Lureau
2026-02-23 20:25 ` [PATCH v2 09/10] audio: do not build audio-related sources with --disable-audio Sergei Heifetz
2026-02-24  8:02   ` Markus Armbruster
2026-02-24  8:33     ` Paolo Bonzini
2026-02-25  7:56     ` Sergei Heifetz
2026-02-23 20:25 ` [PATCH v2 10/10] meson.build: ignore audio drivers when configured " Sergei Heifetz
2026-02-24 11:05   ` Marc-André Lureau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.