mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
audio: add driver registry
Add registry for audio drivers, using the existing audio_driver struct. Make all drivers register themself. The old list of audio_driver struct pointers is now a list of audio driver names, specifying the priority (aka probe order) in case no driver is explicitly asked for. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20180306074053.22856-2-kraxel@redhat.com
This commit is contained in:
parent
a88afc649e
commit
d3893a39eb
12 changed files with 106 additions and 45 deletions
|
@ -922,7 +922,7 @@ static struct audio_pcm_ops oss_pcm_ops = {
|
|||
.ctl_in = oss_ctl_in
|
||||
};
|
||||
|
||||
struct audio_driver oss_audio_driver = {
|
||||
static struct audio_driver oss_audio_driver = {
|
||||
.name = "oss",
|
||||
.descr = "OSS http://www.opensound.com",
|
||||
.options = oss_options,
|
||||
|
@ -935,3 +935,9 @@ struct audio_driver oss_audio_driver = {
|
|||
.voice_size_out = sizeof (OSSVoiceOut),
|
||||
.voice_size_in = sizeof (OSSVoiceIn)
|
||||
};
|
||||
|
||||
static void register_audio_oss(void)
|
||||
{
|
||||
audio_driver_register(&oss_audio_driver);
|
||||
}
|
||||
type_init(register_audio_oss);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue