mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/arm: Support machine-default audiodev with fallback
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7a2c7da644
commit
b8ab0303de
12 changed files with 92 additions and 9 deletions
|
@ -37,6 +37,7 @@
|
|||
#include "hw/block/flash.h"
|
||||
#include "hw/arm/soc_dma.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/boards.h"
|
||||
#include "audio/audio.h"
|
||||
|
||||
/* Enhanced Audio Controller (CODEC only) */
|
||||
|
@ -609,6 +610,10 @@ static struct omap_eac_s *omap_eac_init(struct omap_target_agent_s *ta,
|
|||
s->codec.txdrq = *drq;
|
||||
omap_eac_reset(s);
|
||||
|
||||
if (current_machine->audiodev) {
|
||||
s->codec.card.name = g_strdup(current_machine->audiodev);
|
||||
s->codec.card.state = audio_state_by_name(s->codec.card.name, &error_fatal);
|
||||
}
|
||||
AUD_register_card("OMAP EAC", &s->codec.card);
|
||||
|
||||
memory_region_init_io(&s->iomem, NULL, &omap_eac_ops, s, "omap.eac",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue