@@ -1350,6 +1350,7 @@ static PCIDeviceInfo ac97_info = {
.qdev.name = "AC97",
.qdev.desc = "Intel 82801AA AC97 Audio",
.qdev.size = sizeof (AC97LinkState),
+ .qdev.caps = DEV_CAP_AUDIO,
.init = ac97_initfn,
};
@@ -1046,6 +1046,7 @@ static PCIDeviceInfo es1370_info = {
.qdev.name = "ES1370",
.qdev.desc = "ENSONIQ AudioPCI ES1370",
.qdev.size = sizeof (ES1370State),
+ .qdev.caps = DEV_CAP_AUDIO,
.init = es1370_initfn,
};
@@ -108,6 +108,7 @@ DeviceState *qdev_create(BusState *bus, const char *name)
static int qdev_print_devinfo(DeviceInfo *info, char *dest, int len)
{
static const char *capname[] = {
+ [ DEV_CAP_BIT_AUDIO ] = "audio",
};
const char *sep;
int pos = 0;
@@ -103,9 +103,11 @@ typedef void (*SCSIAttachFn)(DeviceState *host, BlockDriverState *bdrv,
int unit);
enum DeviceCapBits {
- dummy
+ DEV_CAP_BIT_AUDIO = 0,
};
+#define DEV_CAP_AUDIO (1 << DEV_CAP_BIT_AUDIO)
+
struct DeviceInfo {
const char *name;
const char *alias;
... and tag sound drivers (well, only the pci ones as the others are not yet converted to qdev). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/ac97.c | 1 + hw/es1370.c | 1 + hw/qdev.c | 1 + hw/qdev.h | 4 +++- 4 files changed, 6 insertions(+), 1 deletions(-)