aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/dev-audio.c')
-rw-r--r--hw/usb/dev-audio.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c
index 1371c44f48..65247ca799 100644
--- a/hw/usb/dev-audio.c
+++ b/hw/usb/dev-audio.c
@@ -36,6 +36,7 @@
#include "migration/vmstate.h"
#include "desc.h"
#include "audio/audio.h"
+#include "qom/object.h"
static void usb_audio_reinit(USBDevice *dev, unsigned channels);
@@ -633,7 +634,7 @@ static uint8_t *streambuf_get(struct streambuf *buf, size_t *len)
return data;
}
-typedef struct USBAudioState {
+struct USBAudioState {
/* qemu interfaces */
USBDevice dev;
QEMUSoundCard card;
@@ -652,10 +653,12 @@ typedef struct USBAudioState {
uint32_t debug;
uint32_t buffer_user, buffer;
bool multi;
-} USBAudioState;
+};
+typedef struct USBAudioState USBAudioState;
#define TYPE_USB_AUDIO "usb-audio"
-#define USB_AUDIO(obj) OBJECT_CHECK(USBAudioState, (obj), TYPE_USB_AUDIO)
+DECLARE_INSTANCE_CHECKER(USBAudioState, USB_AUDIO,
+ TYPE_USB_AUDIO)
static void output_callback(void *opaque, int avail)
{