|
@@ -34,6 +34,7 @@
|
|
#include "qemu/module.h"
|
|
#include "qemu/module.h"
|
|
#include "sysemu/replay.h"
|
|
#include "sysemu/replay.h"
|
|
#include "sysemu/runstate.h"
|
|
#include "sysemu/runstate.h"
|
|
|
|
+#include "ui/qemu-spice.h"
|
|
#include "trace.h"
|
|
#include "trace.h"
|
|
|
|
|
|
#define AUDIO_CAP "audio"
|
|
#define AUDIO_CAP "audio"
|
|
@@ -1696,6 +1697,21 @@ static AudioState *audio_init(Audiodev *dev, const char *name)
|
|
/* silence gcc warning about uninitialized variable */
|
|
/* silence gcc warning about uninitialized variable */
|
|
AudiodevListHead head = QSIMPLEQ_HEAD_INITIALIZER(head);
|
|
AudiodevListHead head = QSIMPLEQ_HEAD_INITIALIZER(head);
|
|
|
|
|
|
|
|
+ if (using_spice) {
|
|
|
|
+ /*
|
|
|
|
+ * When using spice allow the spice audio driver being picked
|
|
|
|
+ * as default.
|
|
|
|
+ *
|
|
|
|
+ * Temporary hack. Using audio devices without explicit
|
|
|
|
+ * audiodev= property is already deprecated. Same goes for
|
|
|
|
+ * the -soundhw switch. Once this support gets finally
|
|
|
|
+ * removed we can also drop the concept of a default audio
|
|
|
|
+ * backend and this can go away.
|
|
|
|
+ */
|
|
|
|
+ driver = audio_driver_lookup("spice");
|
|
|
|
+ driver->can_be_default = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (dev) {
|
|
if (dev) {
|
|
/* -audiodev option */
|
|
/* -audiodev option */
|
|
legacy_config = false;
|
|
legacy_config = false;
|