From nobody Fri Oct 24 21:57:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 15203225026871015.1146157966998; Mon, 5 Mar 2018 23:48:22 -0800 (PST) Received: from localhost ([::1]:53956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7KW-0008Cn-Fy for importer@patchew.org; Tue, 06 Mar 2018 02:48:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Di-0002jR-5y for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et7De-0000Be-9p for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:10 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53730 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et7De-0000Ad-4X for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:06 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 810E04061B88 for ; Tue, 6 Mar 2018 07:41:01 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id D50E8AFD70; Tue, 6 Mar 2018 07:40:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4EB881751D; Tue, 6 Mar 2018 08:40:54 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2018 08:40:47 +0100 Message-Id: <20180306074053.22856-2-kraxel@redhat.com> In-Reply-To: <20180306074053.22856-1-kraxel@redhat.com> References: <20180306074053.22856-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 06 Mar 2018 07:41:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 06 Mar 2018 07:41:01 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 1/7] audio: add driver registry X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Marc-Andr=C3=A9 Lureau --- audio/audio_int.h | 14 ++++-------- audio/alsaaudio.c | 8 ++++++- audio/audio.c | 63 ++++++++++++++++++++++++++++++-----------------= ---- audio/coreaudio.c | 8 ++++++- audio/dsoundaudio.c | 8 ++++++- audio/noaudio.c | 8 ++++++- audio/ossaudio.c | 8 ++++++- audio/paaudio.c | 8 ++++++- audio/sdlaudio.c | 8 ++++++- audio/spiceaudio.c | 8 ++++++- audio/wavaudio.c | 8 ++++++- scripts/create_config | 2 +- 12 files changed, 106 insertions(+), 45 deletions(-) diff --git a/audio/audio_int.h b/audio/audio_int.h index 700bd43143..244b454012 100644 --- a/audio/audio_int.h +++ b/audio/audio_int.h @@ -141,6 +141,7 @@ struct SWVoiceIn { QLIST_ENTRY (SWVoiceIn) entries; }; =20 +typedef struct audio_driver audio_driver; struct audio_driver { const char *name; const char *descr; @@ -154,6 +155,7 @@ struct audio_driver { int voice_size_out; int voice_size_in; int ctl_caps; + QLIST_ENTRY(audio_driver) next; }; =20 struct audio_pcm_ops { @@ -203,17 +205,11 @@ struct AudioState { int vm_running; }; =20 -extern struct audio_driver no_audio_driver; -extern struct audio_driver oss_audio_driver; -extern struct audio_driver sdl_audio_driver; -extern struct audio_driver wav_audio_driver; -extern struct audio_driver alsa_audio_driver; -extern struct audio_driver coreaudio_audio_driver; -extern struct audio_driver dsound_audio_driver; -extern struct audio_driver pa_audio_driver; -extern struct audio_driver spice_audio_driver; extern const struct mixeng_volume nominal_volume; =20 +void audio_driver_register(audio_driver *drv); +audio_driver *audio_driver_lookup(const char *name); + void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings = *as); void audio_pcm_info_clear_buf (struct audio_pcm_info *info, void *buf, int= len); =20 diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 92a96f8b2b..362a2276fd 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -1213,7 +1213,7 @@ static struct audio_pcm_ops alsa_pcm_ops =3D { .ctl_in =3D alsa_ctl_in, }; =20 -struct audio_driver alsa_audio_driver =3D { +static struct audio_driver alsa_audio_driver =3D { .name =3D "alsa", .descr =3D "ALSA http://www.alsa-project.org", .options =3D alsa_options, @@ -1226,3 +1226,9 @@ struct audio_driver alsa_audio_driver =3D { .voice_size_out =3D sizeof (ALSAVoiceOut), .voice_size_in =3D sizeof (ALSAVoiceIn) }; + +static void register_audio_alsa(void) +{ + audio_driver_register(&alsa_audio_driver); +} +type_init(register_audio_alsa); diff --git a/audio/audio.c b/audio/audio.c index 7658d2af66..2384612b87 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -45,15 +45,32 @@ The 1st one is the one used by default, that is the reason that we generate the list. */ -static struct audio_driver *drvtab[] =3D { -#ifdef CONFIG_SPICE - &spice_audio_driver, -#endif +static const char *audio_prio_list[] =3D { + "spice", CONFIG_AUDIO_DRIVERS - &no_audio_driver, - &wav_audio_driver + "none", + "wav", }; =20 +static QLIST_HEAD(, audio_driver) audio_drivers; + +void audio_driver_register(audio_driver *drv) +{ + QLIST_INSERT_HEAD(&audio_drivers, drv, next); +} + +audio_driver *audio_driver_lookup(const char *name) +{ + struct audio_driver *d; + + QLIST_FOREACH(d, &audio_drivers, next) { + if (strcmp(name, d->name) =3D=3D 0) { + return d; + } + } + return NULL; +} + struct fixed_settings { int enabled; int nb_voices; @@ -1656,11 +1673,10 @@ static void audio_pp_nb_voices (const char *typ, in= t nb) =20 void AUD_help (void) { - size_t i; + struct audio_driver *d; =20 audio_process_options ("AUDIO", audio_options); - for (i =3D 0; i < ARRAY_SIZE (drvtab); i++) { - struct audio_driver *d =3D drvtab[i]; + QLIST_FOREACH(d, &audio_drivers, next) { if (d->options) { audio_process_options (d->name, d->options); } @@ -1672,8 +1688,7 @@ void AUD_help (void) =20 printf ("Available drivers:\n"); =20 - for (i =3D 0; i < ARRAY_SIZE (drvtab); i++) { - struct audio_driver *d =3D drvtab[i]; + QLIST_FOREACH(d, &audio_drivers, next) { =20 printf ("Name: %s\n", d->name); printf ("Description: %s\n", d->descr); @@ -1807,6 +1822,7 @@ static void audio_init (void) const char *drvname; VMChangeStateEntry *e; AudioState *s =3D &glob_audio_state; + struct audio_driver *driver; =20 if (s->drv) { return; @@ -1842,32 +1858,27 @@ static void audio_init (void) } =20 if (drvname) { - int found =3D 0; - - for (i =3D 0; i < ARRAY_SIZE (drvtab); i++) { - if (!strcmp (drvname, drvtab[i]->name)) { - done =3D !audio_driver_init (s, drvtab[i]); - found =3D 1; - break; - } - } - - if (!found) { + driver =3D audio_driver_lookup(drvname); + if (driver) { + done =3D !audio_driver_init(s, driver); + } else { dolog ("Unknown audio driver `%s'\n", drvname); dolog ("Run with -audio-help to list available drivers\n"); } } =20 if (!done) { - for (i =3D 0; !done && i < ARRAY_SIZE (drvtab); i++) { - if (drvtab[i]->can_be_default) { - done =3D !audio_driver_init (s, drvtab[i]); + for (i =3D 0; !done && i < ARRAY_SIZE(audio_prio_list); i++) { + driver =3D audio_driver_lookup(audio_prio_list[i]); + if (driver && driver->can_be_default) { + done =3D !audio_driver_init(s, driver); } } } =20 if (!done) { - done =3D !audio_driver_init (s, &no_audio_driver); + driver =3D audio_driver_lookup("none"); + done =3D !audio_driver_init(s, driver); assert(done); dolog("warning: Using timer based audio emulation\n"); } diff --git a/audio/coreaudio.c b/audio/coreaudio.c index c75142084f..638c60b300 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c @@ -722,7 +722,7 @@ static struct audio_pcm_ops coreaudio_pcm_ops =3D { .ctl_out =3D coreaudio_ctl_out }; =20 -struct audio_driver coreaudio_audio_driver =3D { +static struct audio_driver coreaudio_audio_driver =3D { .name =3D "coreaudio", .descr =3D "CoreAudio http://developer.apple.com/audio/coreau= dio.html", .options =3D coreaudio_options, @@ -735,3 +735,9 @@ struct audio_driver coreaudio_audio_driver =3D { .voice_size_out =3D sizeof (coreaudioVoiceOut), .voice_size_in =3D 0 }; + +static void register_audio_coreaudio(void) +{ + audio_driver_register(&coreaudio_audio_driver); +} +type_init(register_audio_coreaudio); diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index bc39cb9b4d..3ed73a30d1 100644 --- a/audio/dsoundaudio.c +++ b/audio/dsoundaudio.c @@ -890,7 +890,7 @@ static struct audio_pcm_ops dsound_pcm_ops =3D { .ctl_in =3D dsound_ctl_in }; =20 -struct audio_driver dsound_audio_driver =3D { +static struct audio_driver dsound_audio_driver =3D { .name =3D "dsound", .descr =3D "DirectSound http://wikipedia.org/wiki/DirectSound= ", .options =3D dsound_options, @@ -903,3 +903,9 @@ struct audio_driver dsound_audio_driver =3D { .voice_size_out =3D sizeof (DSoundVoiceOut), .voice_size_in =3D sizeof (DSoundVoiceIn) }; + +static void register_audio_dsound(void) +{ + audio_driver_register(&dsound_audio_driver); +} +type_init(register_audio_dsound); diff --git a/audio/noaudio.c b/audio/noaudio.c index 9ca9eaf01f..1bfebeca7d 100644 --- a/audio/noaudio.c +++ b/audio/noaudio.c @@ -160,7 +160,7 @@ static struct audio_pcm_ops no_pcm_ops =3D { .ctl_in =3D no_ctl_in }; =20 -struct audio_driver no_audio_driver =3D { +static struct audio_driver no_audio_driver =3D { .name =3D "none", .descr =3D "Timer based audio emulation", .options =3D NULL, @@ -173,3 +173,9 @@ struct audio_driver no_audio_driver =3D { .voice_size_out =3D sizeof (NoVoiceOut), .voice_size_in =3D sizeof (NoVoiceIn) }; + +static void register_audio_none(void) +{ + audio_driver_register(&no_audio_driver); +} +type_init(register_audio_none); diff --git a/audio/ossaudio.c b/audio/ossaudio.c index a0428881c2..6c69622b4c 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -922,7 +922,7 @@ static struct audio_pcm_ops oss_pcm_ops =3D { .ctl_in =3D oss_ctl_in }; =20 -struct audio_driver oss_audio_driver =3D { +static struct audio_driver oss_audio_driver =3D { .name =3D "oss", .descr =3D "OSS http://www.opensound.com", .options =3D oss_options, @@ -935,3 +935,9 @@ struct audio_driver oss_audio_driver =3D { .voice_size_out =3D sizeof (OSSVoiceOut), .voice_size_in =3D sizeof (OSSVoiceIn) }; + +static void register_audio_oss(void) +{ + audio_driver_register(&oss_audio_driver); +} +type_init(register_audio_oss); diff --git a/audio/paaudio.c b/audio/paaudio.c index aa0a7477d3..949769774d 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -937,7 +937,7 @@ static struct audio_pcm_ops qpa_pcm_ops =3D { .ctl_in =3D qpa_ctl_in }; =20 -struct audio_driver pa_audio_driver =3D { +static struct audio_driver pa_audio_driver =3D { .name =3D "pa", .descr =3D "http://www.pulseaudio.org/", .options =3D qpa_options, @@ -951,3 +951,9 @@ struct audio_driver pa_audio_driver =3D { .voice_size_in =3D sizeof (PAVoiceIn), .ctl_caps =3D VOICE_VOLUME_CAP }; + +static void register_audio_pa(void) +{ + audio_driver_register(&pa_audio_driver); +} +type_init(register_audio_pa); diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c index e92135bd2f..9db5ac92bc 100644 --- a/audio/sdlaudio.c +++ b/audio/sdlaudio.c @@ -500,7 +500,7 @@ static struct audio_pcm_ops sdl_pcm_ops =3D { .ctl_out =3D sdl_ctl_out, }; =20 -struct audio_driver sdl_audio_driver =3D { +static struct audio_driver sdl_audio_driver =3D { .name =3D "sdl", .descr =3D "SDL http://www.libsdl.org", .options =3D sdl_options, @@ -513,3 +513,9 @@ struct audio_driver sdl_audio_driver =3D { .voice_size_out =3D sizeof (SDLVoiceOut), .voice_size_in =3D 0 }; + +static void register_audio_sdl(void) +{ + audio_driver_register(&sdl_audio_driver); +} +type_init(register_audio_sdl); diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index 5580e76307..6ad0eafbc6 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -391,7 +391,7 @@ static struct audio_pcm_ops audio_callbacks =3D { .ctl_in =3D line_in_ctl, }; =20 -struct audio_driver spice_audio_driver =3D { +static struct audio_driver spice_audio_driver =3D { .name =3D "spice", .descr =3D "spice audio driver", .options =3D audio_options, @@ -411,3 +411,9 @@ void qemu_spice_audio_init (void) { spice_audio_driver.can_be_default =3D 1; } + +static void register_audio_spice(void) +{ + audio_driver_register(&spice_audio_driver); +} +type_init(register_audio_spice); diff --git a/audio/wavaudio.c b/audio/wavaudio.c index 068a595732..40adfa30c3 100644 --- a/audio/wavaudio.c +++ b/audio/wavaudio.c @@ -278,7 +278,7 @@ static struct audio_pcm_ops wav_pcm_ops =3D { .ctl_out =3D wav_ctl_out, }; =20 -struct audio_driver wav_audio_driver =3D { +static struct audio_driver wav_audio_driver =3D { .name =3D "wav", .descr =3D "WAV renderer http://wikipedia.org/wiki/WAV", .options =3D wav_options, @@ -291,3 +291,9 @@ struct audio_driver wav_audio_driver =3D { .voice_size_out =3D sizeof (WAVVoiceOut), .voice_size_in =3D 0 }; + +static void register_audio_wav(void) +{ + audio_driver_register(&wav_audio_driver); +} +type_init(register_audio_wav); diff --git a/scripts/create_config b/scripts/create_config index 603b826886..d727e5e36e 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -36,7 +36,7 @@ case $line in drivers=3D${line#*=3D} echo "#define CONFIG_AUDIO_DRIVERS \\" for drv in $drivers; do - echo " &${drv}_audio_driver,\\" + echo " \"${drv}\",\\" done echo "" ;; --=20 2.9.3 From nobody Fri Oct 24 21:57:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520322188175125.66612368500034; Mon, 5 Mar 2018 23:43:08 -0800 (PST) Received: from localhost ([::1]:53931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7FU-0003dV-K1 for importer@patchew.org; Tue, 06 Mar 2018 02:43:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Dj-0002jU-3r for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et7De-0000BQ-8M for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:11 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46640 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et7De-0000Ab-4D for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:06 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6FE96EAEA0 for ; Tue, 6 Mar 2018 07:41:01 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DC0B10B0F2E; Tue, 6 Mar 2018 07:40:55 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7E82F1751E; Tue, 6 Mar 2018 08:40:54 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2018 08:40:48 +0100 Message-Id: <20180306074053.22856-3-kraxel@redhat.com> In-Reply-To: <20180306074053.22856-1-kraxel@redhat.com> References: <20180306074053.22856-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 06 Mar 2018 07:41:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 06 Mar 2018 07:41:01 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 2/7] audio: add module loading support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Make audio_driver_lookup() try load the module in case it doesn't find the driver in the registry. Also load all modules for -audio-help, so the help output includes the help text for modular audio drivers. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- include/qemu/module.h | 1 + audio/audio.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 9fea75aaeb..54300ab6e5 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -54,6 +54,7 @@ typedef enum { =20 #define block_module_load_one(lib) module_load_one("block-", lib) #define ui_module_load_one(lib) module_load_one("ui-", lib) +#define audio_module_load_one(lib) module_load_one("audio-", lib) =20 void register_module_init(void (*fn)(void), module_init_type type); void register_dso_module_init(void (*fn)(void), module_init_type type); diff --git a/audio/audio.c b/audio/audio.c index 2384612b87..6eccdb17ee 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -68,9 +68,26 @@ audio_driver *audio_driver_lookup(const char *name) return d; } } + + audio_module_load_one(name); + QLIST_FOREACH(d, &audio_drivers, next) { + if (strcmp(name, d->name) =3D=3D 0) { + return d; + } + } + return NULL; } =20 +static void audio_module_load_all(void) +{ + int i; + + for (i =3D 0; i < ARRAY_SIZE(audio_prio_list); i++) { + audio_driver_lookup(audio_prio_list[i]); + } +} + struct fixed_settings { int enabled; int nb_voices; @@ -1675,6 +1692,9 @@ void AUD_help (void) { struct audio_driver *d; =20 + /* make sure we print the help text for modular drivers too */ + audio_module_load_all(); + audio_process_options ("AUDIO", audio_options); QLIST_FOREACH(d, &audio_drivers, next) { if (d->options) { --=20 2.9.3 From nobody Fri Oct 24 21:57:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520322320792980.3281364339796; Mon, 5 Mar 2018 23:45:20 -0800 (PST) Received: from localhost ([::1]:53942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Hj-000665-UB for importer@patchew.org; Tue, 06 Mar 2018 02:45:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Dj-0002jZ-CI for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et7Di-0000GP-Az for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:11 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36061 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et7Di-0000Fh-78 for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:10 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D8DF84221 for ; Tue, 6 Mar 2018 07:40:59 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38F312024CAB; Tue, 6 Mar 2018 07:40:55 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9FC0A17528; Tue, 6 Mar 2018 08:40:54 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2018 08:40:49 +0100 Message-Id: <20180306074053.22856-4-kraxel@redhat.com> In-Reply-To: <20180306074053.22856-1-kraxel@redhat.com> References: <20180306074053.22856-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 06 Mar 2018 07:41:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 06 Mar 2018 07:41:00 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 3/7] build: enable audio modules X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add audio/ to common-obj-m variable. Also run both audio and ui variables through unnest-vars. This avoids sdl.mo (exists in both audio/ and ui/) name clashes. Signed-off-by: Gerd Hoffmann --- Makefile | 4 ++++ Makefile.objs | 1 + 2 files changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 4df1f67fe4..20abbe66ad 100644 --- a/Makefile +++ b/Makefile @@ -425,6 +425,10 @@ dummy :=3D $(call unnest-vars,, \ io-obj-y \ common-obj-y \ common-obj-m \ + ui-obj-y \ + ui-obj-m \ + audio-obj-y \ + audio-obj-m \ trace-obj-y) =20 include $(SRC_PATH)/tests/Makefile.include diff --git a/Makefile.objs b/Makefile.objs index 69413d33b1..ffae665ea9 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -104,6 +104,7 @@ common-obj-$(CONFIG_LINUX) +=3D fsdev/ common-obj-y +=3D migration/ =20 common-obj-y +=3D audio/ +common-obj-m +=3D audio/ common-obj-y +=3D hw/ =20 common-obj-y +=3D replay/ --=20 2.9.3 From nobody Fri Oct 24 21:57:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520322320662110.74780501872624; Mon, 5 Mar 2018 23:45:20 -0800 (PST) Received: from localhost ([::1]:53940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Hj-00065W-SM for importer@patchew.org; Tue, 06 Mar 2018 02:45:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Dj-0002jT-3J for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et7De-0000BK-8c for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:11 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44838 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et7De-0000Aa-4I for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:06 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 78CF34067734 for ; Tue, 6 Mar 2018 07:41:01 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5692410B0F2F; Tue, 6 Mar 2018 07:40:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CDFEC17533; Tue, 6 Mar 2018 08:40:54 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2018 08:40:50 +0100 Message-Id: <20180306074053.22856-5-kraxel@redhat.com> In-Reply-To: <20180306074053.22856-1-kraxel@redhat.com> References: <20180306074053.22856-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 06 Mar 2018 07:41:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 06 Mar 2018 07:41:01 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 4/7] audio/alsa: build as module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- configure | 7 ++++++- audio/Makefile.objs | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 27d3f66bd5..46274301bd 100755 --- a/configure +++ b/configure @@ -5982,7 +5982,12 @@ fi echo "CONFIG_AUDIO_DRIVERS=3D$audio_drv_list" >> $config_host_mak for drv in $audio_drv_list; do def=3DCONFIG_AUDIO_$(echo $drv | LC_ALL=3DC tr '[a-z]' '[A-Z]') - echo "$def=3Dy" >> $config_host_mak + case "$drv" in + alsa) + echo "$def=3Dm" >> $config_host_mak ;; + *) + echo "$def=3Dy" >> $config_host_mak ;; + esac done echo "ALSA_LIBS=3D$alsa_libs" >> $config_host_mak echo "PULSE_LIBS=3D$pulse_libs" >> $config_host_mak diff --git a/audio/Makefile.objs b/audio/Makefile.objs index f6ce5c6744..97f22ec097 100644 --- a/audio/Makefile.objs +++ b/audio/Makefile.objs @@ -3,7 +3,6 @@ common-obj-$(CONFIG_AUDIO_SDL) +=3D sdlaudio.o common-obj-$(CONFIG_AUDIO_OSS) +=3D ossaudio.o common-obj-$(CONFIG_SPICE) +=3D spiceaudio.o common-obj-$(CONFIG_AUDIO_COREAUDIO) +=3D coreaudio.o -common-obj-$(CONFIG_AUDIO_ALSA) +=3D alsaaudio.o common-obj-$(CONFIG_AUDIO_DSOUND) +=3D dsoundaudio.o common-obj-$(CONFIG_AUDIO_PA) +=3D paaudio.o common-obj-$(CONFIG_AUDIO_PT_INT) +=3D audio_pt_int.o @@ -12,8 +11,12 @@ common-obj-y +=3D wavcapture.o =20 sdlaudio.o-cflags :=3D $(SDL_CFLAGS) sdlaudio.o-libs :=3D $(SDL_LIBS) -alsaaudio.o-libs :=3D $(ALSA_LIBS) paaudio.o-libs :=3D $(PULSE_LIBS) coreaudio.o-libs :=3D $(COREAUDIO_LIBS) dsoundaudio.o-libs :=3D $(DSOUND_LIBS) ossaudio.o-libs :=3D $(OSS_LIBS) + +# alsa module +common-obj-$(CONFIG_AUDIO_ALSA) +=3D alsa.mo +alsa.mo-objs =3D alsaaudio.o +alsa.mo-libs :=3D $(ALSA_LIBS) --=20 2.9.3 From nobody Fri Oct 24 21:57:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520322189131813.6245109544464; Mon, 5 Mar 2018 23:43:09 -0800 (PST) Received: from localhost ([::1]:53930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7FT-0003dQ-Ih for importer@patchew.org; Tue, 06 Mar 2018 02:42:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Dj-0002ja-Dv for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et7Di-0000GN-B2 for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:11 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36060 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et7Di-0000Fi-7R for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:10 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 644D984222 for ; Tue, 6 Mar 2018 07:41:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25C4A2024CAD; Tue, 6 Mar 2018 07:40:59 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 01135A1EB; Tue, 6 Mar 2018 08:40:55 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2018 08:40:51 +0100 Message-Id: <20180306074053.22856-6-kraxel@redhat.com> In-Reply-To: <20180306074053.22856-1-kraxel@redhat.com> References: <20180306074053.22856-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 06 Mar 2018 07:41:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 06 Mar 2018 07:41:00 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 5/7] audio/oss: build as module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- configure | 2 +- audio/Makefile.objs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 46274301bd..5014c900bd 100755 --- a/configure +++ b/configure @@ -5983,7 +5983,7 @@ echo "CONFIG_AUDIO_DRIVERS=3D$audio_drv_list" >> $con= fig_host_mak for drv in $audio_drv_list; do def=3DCONFIG_AUDIO_$(echo $drv | LC_ALL=3DC tr '[a-z]' '[A-Z]') case "$drv" in - alsa) + alsa | oss) echo "$def=3Dm" >> $config_host_mak ;; *) echo "$def=3Dy" >> $config_host_mak ;; diff --git a/audio/Makefile.objs b/audio/Makefile.objs index 97f22ec097..9ea19c6a87 100644 --- a/audio/Makefile.objs +++ b/audio/Makefile.objs @@ -1,6 +1,5 @@ common-obj-y =3D audio.o noaudio.o wavaudio.o mixeng.o common-obj-$(CONFIG_AUDIO_SDL) +=3D sdlaudio.o -common-obj-$(CONFIG_AUDIO_OSS) +=3D ossaudio.o common-obj-$(CONFIG_SPICE) +=3D spiceaudio.o common-obj-$(CONFIG_AUDIO_COREAUDIO) +=3D coreaudio.o common-obj-$(CONFIG_AUDIO_DSOUND) +=3D dsoundaudio.o @@ -14,9 +13,13 @@ sdlaudio.o-libs :=3D $(SDL_LIBS) paaudio.o-libs :=3D $(PULSE_LIBS) coreaudio.o-libs :=3D $(COREAUDIO_LIBS) dsoundaudio.o-libs :=3D $(DSOUND_LIBS) -ossaudio.o-libs :=3D $(OSS_LIBS) =20 # alsa module common-obj-$(CONFIG_AUDIO_ALSA) +=3D alsa.mo alsa.mo-objs =3D alsaaudio.o alsa.mo-libs :=3D $(ALSA_LIBS) + +# oss module +common-obj-$(CONFIG_AUDIO_OSS) +=3D oss.mo +oss.mo-objs =3D ossaudio.o +oss.mo-libs :=3D $(OSS_LIBS) --=20 2.9.3 From nobody Fri Oct 24 21:57:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520322188340452.70167137749786; Mon, 5 Mar 2018 23:43:08 -0800 (PST) Received: from localhost ([::1]:53932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7FT-0003db-8g for importer@patchew.org; Tue, 06 Mar 2018 02:42:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Dj-0002jX-AD for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et7Di-0000GI-As for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:11 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44840 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et7Di-0000Ff-7T for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:10 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B270406770C for ; Tue, 6 Mar 2018 07:41:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25CE4215672D; Tue, 6 Mar 2018 07:40:59 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1D271A1F0; Tue, 6 Mar 2018 08:40:55 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2018 08:40:52 +0100 Message-Id: <20180306074053.22856-7-kraxel@redhat.com> In-Reply-To: <20180306074053.22856-1-kraxel@redhat.com> References: <20180306074053.22856-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 06 Mar 2018 07:41:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 06 Mar 2018 07:41:00 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 6/7] audio/pulseaudio: build as module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- configure | 2 +- audio/Makefile.objs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 5014c900bd..3abee54cfc 100755 --- a/configure +++ b/configure @@ -5983,7 +5983,7 @@ echo "CONFIG_AUDIO_DRIVERS=3D$audio_drv_list" >> $con= fig_host_mak for drv in $audio_drv_list; do def=3DCONFIG_AUDIO_$(echo $drv | LC_ALL=3DC tr '[a-z]' '[A-Z]') case "$drv" in - alsa | oss) + alsa | oss | pa) echo "$def=3Dm" >> $config_host_mak ;; *) echo "$def=3Dy" >> $config_host_mak ;; diff --git a/audio/Makefile.objs b/audio/Makefile.objs index 9ea19c6a87..b98835934d 100644 --- a/audio/Makefile.objs +++ b/audio/Makefile.objs @@ -3,14 +3,12 @@ common-obj-$(CONFIG_AUDIO_SDL) +=3D sdlaudio.o common-obj-$(CONFIG_SPICE) +=3D spiceaudio.o common-obj-$(CONFIG_AUDIO_COREAUDIO) +=3D coreaudio.o common-obj-$(CONFIG_AUDIO_DSOUND) +=3D dsoundaudio.o -common-obj-$(CONFIG_AUDIO_PA) +=3D paaudio.o common-obj-$(CONFIG_AUDIO_PT_INT) +=3D audio_pt_int.o common-obj-$(CONFIG_AUDIO_WIN_INT) +=3D audio_win_int.o common-obj-y +=3D wavcapture.o =20 sdlaudio.o-cflags :=3D $(SDL_CFLAGS) sdlaudio.o-libs :=3D $(SDL_LIBS) -paaudio.o-libs :=3D $(PULSE_LIBS) coreaudio.o-libs :=3D $(COREAUDIO_LIBS) dsoundaudio.o-libs :=3D $(DSOUND_LIBS) =20 @@ -23,3 +21,8 @@ alsa.mo-libs :=3D $(ALSA_LIBS) common-obj-$(CONFIG_AUDIO_OSS) +=3D oss.mo oss.mo-objs =3D ossaudio.o oss.mo-libs :=3D $(OSS_LIBS) + +# pulseaudio module +common-obj-$(CONFIG_AUDIO_PA) +=3D pa.mo +pa.mo-objs =3D paaudio.o +pa.mo-libs :=3D $(PULSE_LIBS) --=20 2.9.3 From nobody Fri Oct 24 21:57:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520322502426529.2630099724682; Mon, 5 Mar 2018 23:48:22 -0800 (PST) Received: from localhost ([::1]:53957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7KW-0008DR-1I for importer@patchew.org; Tue, 06 Mar 2018 02:48:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et7Dj-0002jV-5I for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et7De-0000BR-8U for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:11 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46642 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et7De-0000Ac-4R for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:41:06 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3598DEAE98 for ; Tue, 6 Mar 2018 07:41:01 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 666B9AFD74; Tue, 6 Mar 2018 07:41:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 39AECA1FC; Tue, 6 Mar 2018 08:40:55 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2018 08:40:53 +0100 Message-Id: <20180306074053.22856-8-kraxel@redhat.com> In-Reply-To: <20180306074053.22856-1-kraxel@redhat.com> References: <20180306074053.22856-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 06 Mar 2018 07:41:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 06 Mar 2018 07:41:01 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 7/7] audio/sdl: build as module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- configure | 2 +- audio/Makefile.objs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 3abee54cfc..b1930cd828 100755 --- a/configure +++ b/configure @@ -5983,7 +5983,7 @@ echo "CONFIG_AUDIO_DRIVERS=3D$audio_drv_list" >> $con= fig_host_mak for drv in $audio_drv_list; do def=3DCONFIG_AUDIO_$(echo $drv | LC_ALL=3DC tr '[a-z]' '[A-Z]') case "$drv" in - alsa | oss | pa) + alsa | oss | pa | sdl) echo "$def=3Dm" >> $config_host_mak ;; *) echo "$def=3Dy" >> $config_host_mak ;; diff --git a/audio/Makefile.objs b/audio/Makefile.objs index b98835934d..db4fa7f18f 100644 --- a/audio/Makefile.objs +++ b/audio/Makefile.objs @@ -1,5 +1,4 @@ common-obj-y =3D audio.o noaudio.o wavaudio.o mixeng.o -common-obj-$(CONFIG_AUDIO_SDL) +=3D sdlaudio.o common-obj-$(CONFIG_SPICE) +=3D spiceaudio.o common-obj-$(CONFIG_AUDIO_COREAUDIO) +=3D coreaudio.o common-obj-$(CONFIG_AUDIO_DSOUND) +=3D dsoundaudio.o @@ -7,8 +6,6 @@ common-obj-$(CONFIG_AUDIO_PT_INT) +=3D audio_pt_int.o common-obj-$(CONFIG_AUDIO_WIN_INT) +=3D audio_win_int.o common-obj-y +=3D wavcapture.o =20 -sdlaudio.o-cflags :=3D $(SDL_CFLAGS) -sdlaudio.o-libs :=3D $(SDL_LIBS) coreaudio.o-libs :=3D $(COREAUDIO_LIBS) dsoundaudio.o-libs :=3D $(DSOUND_LIBS) =20 @@ -26,3 +23,9 @@ oss.mo-libs :=3D $(OSS_LIBS) common-obj-$(CONFIG_AUDIO_PA) +=3D pa.mo pa.mo-objs =3D paaudio.o pa.mo-libs :=3D $(PULSE_LIBS) + +# sdl module +common-obj-$(CONFIG_AUDIO_SDL) +=3D sdl.mo +sdl.mo-objs =3D sdlaudio.o +sdl.mo-cflags :=3D $(SDL_CFLAGS) +sdl.mo-libs :=3D $(SDL_LIBS) --=20 2.9.3