From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/5] qdev: add audio capability
Date: Mon, 31 Aug 2009 12:27:36 +0200 [thread overview]
Message-ID: <1251714459-2467-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1251714459-2467-1-git-send-email-kraxel@redhat.com>
... 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(-)
diff --git a/hw/ac97.c b/hw/ac97.c
index 610ca60..cceb66b 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -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,
};
diff --git a/hw/es1370.c b/hw/es1370.c
index 9071a48..2dfec15 100644
--- a/hw/es1370.c
+++ b/hw/es1370.c
@@ -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,
};
diff --git a/hw/qdev.c b/hw/qdev.c
index 0d21152..760efd4 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 3d07a24..ef05903 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
next prev parent reply other threads:[~2009-08-31 10:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 10:27 [Qemu-devel] [PATCH 0/5] qdev: device capabilities Gerd Hoffmann
2009-08-31 10:27 ` [Qemu-devel] [PATCH 1/5] " Gerd Hoffmann
2009-08-31 10:27 ` Gerd Hoffmann [this message]
2009-08-31 10:27 ` [Qemu-devel] [PATCH 3/5] qdev: add ethernet capability Gerd Hoffmann
2009-08-31 10:27 ` [Qemu-devel] [PATCH 4/5] qdev: add display capability Gerd Hoffmann
2009-08-31 10:27 ` [Qemu-devel] [PATCH 5/5] qdev: add watchdog capability Gerd Hoffmann
2009-09-04 15:08 ` [Qemu-devel] [PATCH 0/5] qdev: device capabilities Anthony Liguori
2009-09-04 15:16 ` Gerd Hoffmann
2009-09-05 13:39 ` Anthony Liguori
2009-09-07 10:47 ` Gerd Hoffmann
2009-09-07 20:36 ` Anthony Liguori
2009-09-08 6:52 ` Gerd Hoffmann
2009-09-10 16:30 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1251714459-2467-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).