qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 12/12] [RFC] audio: try use onboard audiodev for pcspk


From: Gerd Hoffmann
Subject: [PATCH 12/12] [RFC] audio: try use onboard audiodev for pcspk
Date: Wed, 29 Apr 2020 13:02:14 +0200

New naming convention:  Use "onboard" audiodev for onboard audio
devices.

This patchs implements it for pcspk.  If we want go this route we should
do the same for other onboard audio devices too (arm boards, ...).

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 hw/audio/pcspk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
index 72e7234d5f65..102cac21b3be 100644
--- a/hw/audio/pcspk.c
+++ b/hw/audio/pcspk.c
@@ -190,6 +190,9 @@ static void pcspk_realizefn(DeviceState *dev, Error **errp)
 
     isa_register_ioport(isadev, &s->ioport, s->iobase);
 
+    if (!s->card.state) {
+        s->card.state = audio_state_by_name("onboard");
+    }
     if (s->card.state) {
         pcspk_audio_init(s);
     }
-- 
2.18.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]