From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: balaton@eik.bme.hu, berrange@redhat.com
Subject: [PATCH 7/7] audio, qtest: get rid of QEMU_AUDIO_DRV
Date: Thu, 5 Oct 2023 14:58:15 +0200 [thread overview]
Message-ID: <20231005125815.66082-8-pbonzini@redhat.com> (raw)
In-Reply-To: <20231005125815.66082-1-pbonzini@redhat.com>
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>
---
audio/audio.c | 12 ------------
tests/qtest/libqtest.c | 4 +---
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index ca0df29555a..feecbc1889a 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1690,19 +1690,7 @@ static const VMStateDescription vmstate_audio = {
void audio_create_default_audiodevs(void)
{
- const char *drvname = getenv("QEMU_AUDIO_DRV");
-
- /* QEMU_AUDIO_DRV=none is used by libqtest. */
- if (drvname && !g_str_equal(drvname, "none")) {
- error_report("Please use -audiodev instead of QEMU_AUDIO_*");
- exit(1);
- }
-
for (int i = 0; audio_prio_list[i]; i++) {
- if (drvname && !g_str_equal(drvname, audio_prio_list[i])) {
- continue;
- }
-
if (audio_driver_lookup(audio_prio_list[i])) {
QDict *dict = qdict_new();
Audiodev *dev = NULL;
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index b1eba71ffe5..3f94a4f4773 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -421,9 +421,6 @@ static QTestState *G_GNUC_PRINTF(1, 2) qtest_spawn_qemu(const char *fmt, ...)
int sig = SIGKILL;
procctl(P_PID, getpid(), PROC_PDEATHSIG_CTL, &sig);
#endif /* __FreeBSD__ */
- if (!g_setenv("QEMU_AUDIO_DRV", "none", true)) {
- exit(1);
- }
execlp("/bin/sh", "sh", "-c", command->str, NULL);
exit(1);
}
@@ -464,6 +461,7 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args)
"-chardev socket,path=%s,id=char0 "
"-mon chardev=char0,mode=control "
"-display none "
+ "-audio none "
"%s"
" -accel qtest",
socket_path,
--
2.41.0
next prev parent reply other threads:[~2023-10-05 12:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 12:58 [PATCH 0/7] audio: redo default audio backend creation Paolo Bonzini
2023-10-05 12:58 ` [PATCH 1/7] audio: error hints need a trailing \n Paolo Bonzini
2023-10-05 12:58 ` [PATCH 2/7] audio: disable default backends if -audio/-audiodev is used Paolo Bonzini
2023-10-05 12:58 ` [PATCH 3/7] audio: extract audio_define_default Paolo Bonzini
2023-10-05 12:58 ` [PATCH 4/7] audio: extend -audio to allow creating a default backend Paolo Bonzini
2023-10-05 12:58 ` [PATCH 5/7] audio: do not use first -audiodev as default audio device Paolo Bonzini
2023-10-05 13:33 ` BALATON Zoltan
2023-10-05 13:38 ` BALATON Zoltan
2023-10-05 15:09 ` Paolo Bonzini
2023-10-05 15:40 ` BALATON Zoltan
2023-10-05 16:41 ` Paolo Bonzini
2023-10-05 18:20 ` BALATON Zoltan
2023-10-05 12:58 ` [PATCH 6/7] audio: reintroduce default audio backend for VNC Paolo Bonzini
2023-10-05 12:58 ` Paolo Bonzini [this message]
2023-10-09 10:46 ` [PATCH 0/7] audio: redo default audio backend creation Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231005125815.66082-8-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=balaton@eik.bme.hu \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).