aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/soundhw.c
AgeCommit message (Collapse)AuthorFilesLines
2022-05-14introduce -audio as a replacement for -soundhwPaolo Bonzini1-4/+8
-audio is used like "-audio pa,model=sb16". It is almost as simple as -soundhw, but it reuses the -audiodev parsing machinery and attaches an audiodev to the newly-created device. The main 'feature' is that it knows about adding the codec device for model=intel-hda, and adding the audiodev to the codec device. In the future, it could be extended to support default models or builtin devices, just like -nic, or even a default backend. For now, keep it simple. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-14soundhw: move help handling to vl.cPaolo Bonzini1-15/+9
This will allow processing "-audio model=help" even if the backend part of the option is missing. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-14soundhw: unify initialization for ISA and PCI soundhwPaolo Bonzini1-9/+14
Use qdev_new instead of distinguishing isa_create_simple/pci_create_simple. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-14soundhw: extract soundhw help to a separate functionPaolo Bonzini1-14/+19
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-14soundhw: remove ability to create multiple soundcardsPaolo Bonzini1-56/+32
The usefulness of enabling a dozen soundcards is dubious. Simplify the code by allowing a single instance of -soundhw, with no support for parsing either comma-separated values or 'soundhw all'. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-07pc: remove -soundhw pcspkPaolo Bonzini1-23/+4
The pcspk device is the only user of the init_isa function, and the only -soundhw option which does not create a new device (it hacks into the PCSpkState by hand). Remove it, since it was deprecated. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-07-06audio: add deprecated_register_soundhwGerd Hoffmann1-1/+23
Add helper function for -soundhw deprecation. It can replace the simple init functions which just call {isa,pci}_create_simple() with a hardcoded type. It also prints a deprecation message. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20200702132525.6849-4-kraxel@redhat.com
2019-06-12Include qemu-common.h exactly where neededMarkus Armbruster1-1/+0
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-5-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and net/tap-bsd.c fixed up]
2017-05-19audio: Rename hw/audio/audio.h to hw/audio/soundhw.hEduardo Habkost1-1/+1
All the functions in hw/audio/audio.h are called "soundhw_*()" and live in hw/audio/audiohw.c. Rename the header file for consistency. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Hervé Poussineau <hpoussin@reactos.org> Message-id: 20170508205735.23444-4-ehabkost@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-19audio: Rename audio_init() to soundhw_init()Eduardo Habkost1-1/+1
To make it consistent with the remaining soundhw.c functions and avoid confusion with the audio_init() function in audio/audio.c, rename audio_init() to soundhw_init(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-id: 20170508205735.23444-3-ehabkost@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-19audio: Move arch_init audio code to hw/audio/soundhw.cEduardo Habkost1-0/+156
There's no reason to keep the soundhw table in arch_init.c. Move that code to a new hw/audio/soundhw.c file. While moving the code, trivial coding style issues were fixed. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20170508205735.23444-2-ehabkost@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>