From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ManmW-0000IQ-2I for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:36:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ManmD-0008Pr-VP for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:36:23 -0400 Received: from [199.232.76.173] (port=33768 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ManmD-0008PD-JC for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:36:17 -0400 Received: from mx2.redhat.com ([66.187.237.31]:39847) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ManmC-0007iO-SH for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:36:17 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7B9KYm0010386 for ; Tue, 11 Aug 2009 05:20:34 -0400 From: Gerd Hoffmann Date: Tue, 11 Aug 2009 11:20:25 +0200 Message-Id: <1249982427-14481-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1249982427-14481-1-git-send-email-kraxel@redhat.com> References: <1249982427-14481-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 2/4] qdev: add audio capability List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann ... and tag sound drivers (well, only the pci ones as the others are not yet converted to qdev). Signed-off-by: Gerd Hoffmann --- hw/ac97.c | 1 + hw/es1370.c | 1 + hw/qdev.c | 1 + hw/qdev.h | 4 +++- 4 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 6c818c9..8d9c202 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -1368,6 +1368,7 @@ static PCIDeviceInfo ac97_info = { .qdev.name = "AC97", .qdev.desc = "Intel 82801AA AC97 Audio", .qdev.size = sizeof (PCIAC97LinkState), + .qdev.caps = DEV_CAP_AUDIO, .init = ac97_initfn, }; diff --git a/hw/es1370.c b/hw/es1370.c index 5c9af0e..028db61 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -1056,6 +1056,7 @@ static PCIDeviceInfo es1370_info = { .qdev.name = "ES1370", .qdev.desc = "ENSONIQ AudioPCI ES1370", .qdev.size = sizeof (PCIES1370State), + .qdev.caps = DEV_CAP_AUDIO, .init = es1370_initfn, }; diff --git a/hw/qdev.c b/hw/qdev.c index 568d249..e501610 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -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; diff --git a/hw/qdev.h b/hw/qdev.h index 7beb756..90a4446 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -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; -- 1.6.2.5