audio, qtest: get rid of QEMU_AUDIO_DRV

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>
This commit is contained in:
Paolo Bonzini 2023-10-05 11:45:55 +02:00
parent 63a13c0805
commit 912eef205a
2 changed files with 1 additions and 15 deletions

View file

@ -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;