(no subject)
This patch adds support for a few config options in SDL2 that I had need of for a work project:
- video-wayland, to enable running SDL2 applications under weston without xorg
- video-vivante, to enable running using the etnaviv driver directly
- pulseaudio, to enable building SDL2 with sound support
The sound addition is heavily related to a decade old issue that still persists
as described here: http://forums.libsdl.org/viewtopic.php?t=7609&sid=40fdb9756b8e22e1b8253cda3338845f
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 1/1 package/sdl2: Add config for wayland, vivante, pulseaudio
Add support for building SDL2 with the following enabled as either optional or detected:
- Wayland video support, enables running SDL2 applications under
pure wayland desktops/compositors
- Vivante video device support, this enables SDL2 to run on devices using
this video chip without a full desktop (much like KMS/DRM)
- Pulseaudio support, this solves an ancient issue that still occurs in
some cases. Described at: http://forums.libsdl.org/viewtopic.php?t=7609&sid=40fdb9756b8e22e1b8253cda3338845f
--- package/sdl2/Config.in | 16 ++++++++++++++++ package/sdl2/sdl2.mk | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+)
package/sdl2/Config.in +16 -0
@@ -18,6 +18,22 @@ config BR2_PACKAGE_SDL2_DIRECTFB comment "DirectFB video driver needs directfb" depends on !BR2_PACKAGE_DIRECTFB +config BR2_PACKAGE_SDL2_WAYLAND + bool "wayland video driver" + depends on BR2_PACKAGE_WAYLAND + +comment "wayland video driver needs wayland" + depends on !BR2_PACKAGE_WAYLAND + +config BR2_PACKAGE_SDL2_PULSEAUDIO + bool "pulseaudio support" + depends on BR2_PACKAGE_PULSEAUDIO + depends on BR2_PACKAGE_ALSA_LIB + +comment "pulseaudio support needs the pulseaudio and alsa packages" + depends on !BR2_PACKAGE_PULSEAUDIO + depends on !BR2_PACKAGE_ALSA_LIB + config BR2_PACKAGE_SDL2_X11 bool "X11 video driver" depends on BR2_PACKAGE_XORG7
package/sdl2/sdl2.mk +21 -0
@@ -81,6 +81,20 @@ else SDL2_CONF_OPTS += --disable-video-directfb endif +ifeq ($(BR2_PACKAGE_SDL2_WAYLAND),y) +SDL2_DEPENDENCIES += wayland +SDL2_CONF_OPTS += --enable-video-wayland +else +SDL2_CONF_OPTS += --disable-video-wayland +endif + +ifeq ($(BR2_PACKAGE_SDL2_PULSEAUDIO),y) +SDL2_DEPENDENCIES += pulseaudio +SDL2_CONF_OPTS += --enable-pulseaudio +else +SDL2_CONF_OPTS += --disable-pulseaudio +endif + ifeq ($(BR2_PACKAGE_SDL2_OPENGLES)$(BR2_PACKAGE_RPI_USERLAND),yy) SDL2_DEPENDENCIES += rpi-userland SDL2_CONF_OPTS += --enable-video-rpi
@@ -181,4 +195,11 @@ else SDL2_CONF_OPTS += --disable-video-kmsdrm endif +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y) +SDL2_DEPENDENCIES += libdrm_etnaviv +SDL2_CONF_OPTS += --enable-video-vivante +else +SDL2_CONF_OPTS += --disable-video-vivante +endif + $(eval $(autotools-package))
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH] package/sdl2: Add config for wayland, vivante, pulseaudio
Quoted 1 line · Luke D. Jones
--enable-video-vivante
I made a mistake with -+SDL2_DEPENDENCIES += libdrm_etnaviv, this should have been +SDL2_DEPENDENCIES += libdrm
I will submit a revised patch later
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 1/1 package/sdl2: enable wayland support
In reply to Luke D. JonesFrom: Thomas Devoogdt <[email protected]>
--- package/sdl2/Config.in | 17 +++++++++++++++++ package/sdl2/sdl2.mk | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-)
package/sdl2/Config.in +17 -0
@@ -29,6 +29,23 @@ comment "X11 video driver needs X.org" depends on !BR2_PACKAGE_XORG7 depends on BR2_USE_MMU +config BR2_PACKAGE_SDL2_WAYLAND + bool "Wayland video driver" + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + depends on BR2_PACKAGE_WAYLAND + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_SDL2_OPENGLES + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_WAYLAND_PROTOCOLS + +comment "Wayland video driver needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +comment "Wayland video driver needs wayland with an OpenGLES+EGL backend" + depends on !BR2_PACKAGE_WAYLAND || \ + !BR2_PACKAGE_HAS_LIBEGL || \ + !BR2_PACKAGE_SDL2_OPENGLES + config BR2_PACKAGE_SDL2_KMSDRM bool "KMS/DRM video driver" depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
package/sdl2/sdl2.mk +7 -1
@@ -23,7 +23,6 @@ SDL2_CONF_OPTS += \ --disable-video-vivante \ --disable-video-cocoa \ --disable-video-metal \ - --disable-video-wayland \ --disable-video-dummy \ --disable-video-offscreen \ --disable-video-vulkan \
@@ -112,6 +111,13 @@ else SDL2_CONF_OPTS += --disable-video-x11-xcursor endif +ifeq ($(BR2_PACKAGE_SDL2_WAYLAND),y) +SDL2_DEPENDENCIES += libegl libxkbcommon wayland wayland-protocols +SDL2_CONF_OPTS += --enable-video-wayland +else +SDL2_CONF_OPTS += --disable-video-wayland +endif + ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) SDL2_DEPENDENCIES += xlib_libXi SDL2_CONF_OPTS += --enable-video-x11-xinput
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/sdl2: add wayland support
From: Thomas Devoogdt <[email protected]>
This adds a configuration option to enable the Wayland video driver support in SDL2.
---
v2:
- Added tested sign-off, see https://patchwork.ozlabs.org/comment/3457513/.
- Slightly changed the git message.
--- package/sdl2/Config.in | 17 +++++++++++++++++ package/sdl2/sdl2.mk | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-)
package/sdl2/Config.in +17 -0
@@ -22,6 +22,23 @@ comment "X11 video driver needs X.org" depends on !BR2_PACKAGE_XORG7 depends on BR2_USE_MMU +config BR2_PACKAGE_SDL2_WAYLAND + bool "Wayland video driver" + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + depends on BR2_PACKAGE_WAYLAND + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_SDL2_OPENGLES + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_WAYLAND_PROTOCOLS + +comment "Wayland video driver needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +comment "Wayland video driver needs wayland with an OpenGLES+EGL backend" + depends on !BR2_PACKAGE_WAYLAND || \ + !BR2_PACKAGE_HAS_LIBEGL || \ + !BR2_PACKAGE_SDL2_OPENGLES + config BR2_PACKAGE_SDL2_KMSDRM bool "KMS/DRM video driver" depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
package/sdl2/sdl2.mk +7 -1
@@ -23,7 +23,6 @@ SDL2_CONF_OPTS += \ --disable-video-vivante \ --disable-video-cocoa \ --disable-video-metal \ - --disable-video-wayland \ --disable-video-dummy \ --disable-video-offscreen \ --disable-video-vulkan \
@@ -105,6 +104,13 @@ else SDL2_CONF_OPTS += --disable-video-x11-xcursor endif +ifeq ($(BR2_PACKAGE_SDL2_WAYLAND),y) +SDL2_DEPENDENCIES += libegl libxkbcommon wayland wayland-protocols +SDL2_CONF_OPTS += --enable-video-wayland +else +SDL2_CONF_OPTS += --disable-video-wayland +endif + ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) SDL2_DEPENDENCIES += xlib_libXi SDL2_CONF_OPTS += --enable-video-x11-xinput
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2] package/sdl2: add wayland support
Quoted 33 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Devoogdt <[email protected]> writes:
From: Thomas Devoogdt <[email protected]> This adds a configuration option to enable the Wayland video driver support in SDL2.
Signed-off-by Thomas Devoogdt <[email protected]>Tested-by Alexander Shiyan <[email protected]>---
v2:
- Added tested sign-off, see https://patchwork.ozlabs.org/comment/3457513/.
- Slightly changed the git message.--- package/sdl2/Config.in | 17 +++++++++++++++++ package/sdl2/sdl2.mk | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-)package/sdl2/Config.in +8
-0@@ -22,6 +22,23 @@ comment "X11 video driver needs X.org" depends on !BR2_PACKAGE_XORG7 depends on BR2_USE_MMU +config BR2_PACKAGE_SDL2_WAYLAND + bool "Wayland video driver" + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + depends on BR2_PACKAGE_WAYLAND + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_SDL2_OPENGLES + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_WAYLAND_PROTOCOLS
package/sdl2/Config.in comment "X11 video driver needs X.org" · line 42
Quoted 10 lines
package/sdl2/Config.in +9
-0+ +comment "Wayland video driver needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +comment "Wayland video driver needs wayland with an OpenGLES+EGL backend" + depends on !BR2_PACKAGE_WAYLAND || \ + !BR2_PACKAGE_HAS_LIBEGL || \ + !BR2_PACKAGE_SDL2_OPENGLES + config BR2_PACKAGE_SDL2_KMSDRM
Moved it after KMSDRM and applied, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2] package/sdl2: add wayland support
Quoted 38 lines
Quoted 38 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
"Peter" == Peter Korsgaard <[email protected]> writes:
"Thomas" == Thomas Devoogdt <[email protected]> writes:
From: Thomas Devoogdt <[email protected]> This adds a configuration option to enable the Wayland video driver support in SDL2.
Signed-off-by Thomas Devoogdt <[email protected]>Tested-by Alexander Shiyan <[email protected]>---
v2:
- Added tested sign-off, see https://patchwork.ozlabs.org/comment/3457513/.
- Slightly changed the git message.
---
package/sdl2/Config.in | 17 +++++++++++++++++package/sdl2/sdl2.mk| 8 +++++++-2 files changed, 24 insertions(+), 1 deletion(-)package/sdl2/Config.in +0
-0@@ -22,6 +22,23 @@ comment "X11 video driver needs X.org"depends on !BR2_PACKAGE_XORG7
depends onBR2_USE_MMUpackage/sdl2/Config.in +12
-0+config BR2_PACKAGE_SDL2_WAYLAND + bool "Wayland video driver" + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + depends on BR2_PACKAGE_WAYLAND + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_SDL2_OPENGLES + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_WAYLAND_PROTOCOLS + +comment "Wayland video driver needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS +
Quoted 8 lines
Quoted 6 lines
package/sdl2/Config.in +5
-0+comment "Wayland video driver needs wayland with an OpenGLES+EGL backend" + depends on !BR2_PACKAGE_WAYLAND || \ + !BR2_PACKAGE_HAS_LIBEGL || \ + !BR2_PACKAGE_SDL2_OPENGLES +config
BR2_PACKAGE_SDL2_KMSDRMMoved it after KMSDRM and applied, thanks.
Wait, you added the .mk logic in the middle of the BR2_PACKAGE_SDL2_X11 conditional so it only works if the X11 driver is enabled. I'll send a fix.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/sdl2: add PulseAudio support
In reply to Luke D. JonesFrom: "Luke D. Jones" <[email protected]>
Build the PulseAudio audio driver of SDL2 when pulseaudio is enabled, as done for ALSA, so that SDL2 applications can play sound through a PulseAudio server.
---
Changes v1 -> v2:
- drop the Wayland video driver: Buildroot has it since commit
4662553088b8 ("package/sdl2: add wayland support") - drop the Vivante video driver: SDL2 builds it only with the headers of the proprietary Vivante driver (gc_vdk.h or EGL/eglvivante.h, from imx-gpu-viv), not with etnaviv. It needs its own patch.
- enable PulseAudio when the pulseaudio package is enabled, as done for ALSA, instead of a new option. SDL2 only needs libpulse: drop the alsa-lib dependency.
- rebase on master, where DirectFB support was removed
- new subject, as the patch now only adds PulseAudio support
Supersedes v1: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
package/sdl2/sdl2.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
package/sdl2/sdl2.mk +7 -1
@@ -19,7 +19,6 @@ SDL2_CONF_OPTS += \ --disable-arts \ --disable-esd \ --disable-dbus \ - --disable-pulseaudio \ --disable-video-vivante \ --disable-video-cocoa \ --disable-video-metal \
@@ -157,6 +156,13 @@ else SDL2_CONF_OPTS += --disable-alsa endif +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +SDL2_DEPENDENCIES += pulseaudio +SDL2_CONF_OPTS += --enable-pulseaudio +else +SDL2_CONF_OPTS += --disable-pulseaudio +endif + ifeq ($(BR2_PACKAGE_SDL2_KMSDRM),y) SDL2_DEPENDENCIES += libdrm libgbm libegl SDL2_CONF_OPTS += --enable-video-kmsdrm
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot