aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/wm8750.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-08-19 01:06:49 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-08-21 09:13:37 +0200
commit88e47b9a450f6dabc3429a4d2c421408b07d22bb (patch)
tree9e1d5d5cd779d6a2a4d4c1578b3dcb36116b4cdd /hw/audio/wm8750.c
parentf0b9f36d71a373d469da9feb133c91546d37643c (diff)
audio: add audiodev properties to frontends
Finally add audiodev= options to audio frontends so users can specify which backend to use when multiple backends exist. Not specifying an audiodev= option currently causes the first audiodev to be used, this is fixed in the next commit. Example usage: -audiodev pa,id=foo -device AC97,audiodev=foo Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: d64db52dda2d0e9d97bc5ab1dd9adf724280fea1.1566168923.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio/wm8750.c')
-rw-r--r--hw/audio/wm8750.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c
index 9f6df5d59c..a8725abf6a 100644
--- a/hw/audio/wm8750.c
+++ b/hw/audio/wm8750.c
@@ -702,6 +702,11 @@ void wm8750_set_bclk_in(void *opaque, int new_hz)
wm8750_clk_update(s, 1);
}
+static Property wm8750_properties[] = {
+ DEFINE_AUDIO_PROPERTIES(WM8750State, card),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void wm8750_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -712,6 +717,7 @@ static void wm8750_class_init(ObjectClass *klass, void *data)
sc->recv = wm8750_rx;
sc->send = wm8750_tx;
dc->vmsd = &vmstate_wm8750;
+ dc->props = wm8750_properties;
}
static const TypeInfo wm8750_info = {