diff --git a/repos/base/run/platform_drv.inc b/repos/base/run/platform_drv.inc index bcb62099bf..2f05d367af 100644 --- a/repos/base/run/platform_drv.inc +++ b/repos/base/run/platform_drv.inc @@ -40,6 +40,15 @@ proc nic_drv_binary { } { } +## +# Return name of the audio driver binary +# +proc audio_drv_binary { } { + if {[have_spec linux]} { return linux_audio_drv } + if {[have_spec x86]} { return audio_drv } +} + + proc platform_drv_build_components {} { set drv_build_components "" lappend_if [have_platform_drv] drv_build_components drivers/platform diff --git a/repos/dde_bsd/run/audio_out.run b/repos/dde_bsd/run/audio_out.run index 94a2ddfb9d..853c02a426 100644 --- a/repos/dde_bsd/run/audio_out.run +++ b/repos/dde_bsd/run/audio_out.run @@ -71,6 +71,7 @@ append_if $use_mixer config { append config { + @@ -113,8 +114,10 @@ if {![file exists bin/sample.raw]} { # Boot modules # -set boot_modules { - core ld.lib.so init timer audio_drv test-audio_out sample.raw } +append boot_modules { + core ld.lib.so init timer } [audio_drv_binary] { + test-audio_out sample.raw +} lappend_if $use_mixer boot_modules mixer diff --git a/repos/libports/run/avplay.run b/repos/libports/run/avplay.run index eb3ce85f4a..b56aa7e7b7 100644 --- a/repos/libports/run/avplay.run +++ b/repos/libports/run/avplay.run @@ -78,6 +78,7 @@ append config { + @@ -114,8 +115,8 @@ install_config $config # Boot modules # -set boot_modules { - core init timer audio_drv avplay +append boot_modules { + core init timer } [audio_drv_binary] { avplay ld.lib.so libc.lib.so libm.lib.so pthread.lib.so zlib.lib.so sdl.lib.so avfilter.lib.so avutil.lib.so avcodec.lib.so avformat.lib.so swscale.lib.so avresample.lib.so diff --git a/repos/libports/run/qt5_drivers.inc b/repos/libports/run/qt5_drivers.inc index b06ed81718..a6ac761b16 100644 --- a/repos/libports/run/qt5_drivers.inc +++ b/repos/libports/run/qt5_drivers.inc @@ -152,6 +152,7 @@ proc drivers_start_nodes { feature_arg } { append_if [use_audio_drv feature] start_nodes { + @@ -305,7 +306,7 @@ proc drivers_boot_modules { feature_arg } { # local version defined above. append_platform_drv_boot_modules - lappend_if [use_audio_drv feature] boot_modules audio_drv + lappend_if [use_audio_drv feature] boot_modules [audio_drv_binary] lappend_if [use_fb_drv feature] boot_modules fb_drv lappend_if [use_fb_sdl feature] boot_modules fb_sdl lappend_if [use_gpio_drv feature] boot_modules [gpio_drv] diff --git a/repos/os/run/audio_out_click.run b/repos/os/run/audio_out_click.run index adfe08f63a..3e4feeef94 100644 --- a/repos/os/run/audio_out_click.run +++ b/repos/os/run/audio_out_click.run @@ -62,6 +62,7 @@ append config { + @@ -102,8 +103,8 @@ if {[expr ![file exists bin/sample.raw] || ![file exists bin/click.raw]]} { # Boot modules # -set boot_modules { - core ld.lib.so init timer mixer ps2_drv audio_drv +append boot_modules { + core ld.lib.so init timer mixer ps2_drv } [audio_drv_binary] { test-audio_out test-audio_out_click sample.raw click.raw } diff --git a/repos/os/run/mixer.run b/repos/os/run/mixer.run index 0261205c8a..74b6485b6a 100644 --- a/repos/os/run/mixer.run +++ b/repos/os/run/mixer.run @@ -51,6 +51,7 @@ append config { + @@ -171,10 +172,10 @@ if {[expr ![file exists bin/client1.f32] || ![file exists bin/client2.f32]]} { # # generic modules -set boot_modules { +append boot_modules { core ld.lib.so init timer report_rom dynamic_rom - audio_drv test-audio_out + } [audio_drv_binary] { test-audio_out mixer client1.f32 client2.f32 } diff --git a/repos/os/src/drivers/audio/spec/linux/target.mk b/repos/os/src/drivers/audio/spec/linux/target.mk index 924125f1ae..f0957b49b3 100644 --- a/repos/os/src/drivers/audio/spec/linux/target.mk +++ b/repos/os/src/drivers/audio/spec/linux/target.mk @@ -1,5 +1,5 @@ +TARGET = linux_audio_drv REQUIRES = linux -TARGET = audio_drv LIBS = lx_hybrid SRC_CC = main.cc SRC_C = alsa.c diff --git a/repos/ports/run/dosbox.run b/repos/ports/run/dosbox.run index 34345ce7e6..43d8cecfe1 100644 --- a/repos/ports/run/dosbox.run +++ b/repos/ports/run/dosbox.run @@ -80,6 +80,7 @@ append_if [have_spec ps2] config { append config { + @@ -117,8 +118,8 @@ if {![file exists bin/dosbox.tar]} { # # generic modules -set boot_modules { - core init timer audio_drv +append boot_modules { + core init timer } [audio_drv_binary] { ld.lib.so libc.lib.so libm.lib.so lwip.lib.so libpng.lib.so