Skip to contentSkip to conversation

package/pipewire: compress-offload needs kernel >= 5.7

Buildroot Arnout Vandecappelle 1 participant 1 message Feb 15, 2023

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=854314d15361dc3b69b97ee29d483ee920b9098f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

SND_AUDIOCODEC_A{LAC,PE} are only available since kernel 5.7 and
https://github.com/torvalds/linux/commit/0f546d6f0292fb624b4cf0cc70096ddb9ea070e6
resulting in the following build failure since bump to version 0.3.65 in commit 247e2d0eb1e60f483044d58bed58c5ed321528f7 and
https://git.buildroot.net/buildroot/commit/?id=247e2d0eb1e60f483044d58bed58c5ed321528f7:

../spa/plugins/alsa/alsa-compress-offload-sink.c:183:11: error: 'SND_AUDIOCODEC_ALAC' undeclared here (not in a function); did you mean 'SND_AUDIOCODEC_AAC'?

  183 |         { SND_AUDIOCODEC_ALAC, },
      |           ^~~~~~~~~~~~~~~~~~~
      |           SND_AUDIOCODEC_AAC

Moreover, flac_d is also only available since kernel 5.5 and
https://github.com/torvalds/linux/commit/d2522335c92c090bf58531a2b696d7fe80ab2a7a

Take this opportunity to make compress offload an explicit option rather than automatic based on the availability of tinycompress. The relationship between them is not obvious.

Fixes:
- http://autobuild.buildroot.org/results/9ecd9aca5edc3756154da59573157954f06e6537

---
 package/pipewire/Config.in   | 12 ++++++++++++
 package/pipewire/pipewire.mk |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)
package/pipewire/Config.in +12 -0
index f038291e87..4929e5d3d1 100644
@@ -15,6 +15,18 @@ config BR2_PACKAGE_PIPEWIRE
 
 if BR2_PACKAGE_PIPEWIRE
 
+config BR2_PACKAGE_PIPEWIRE_COMPRESS_OFFLOAD
+	bool "pipewire Compress-Offload"
+	depends on !BR2_STATIC_LIBS # tinycompress
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
+	select BR2_PACKAGE_TINYCOMPRESS
+	help
+	  Enable ALSA Compress-Offload support
+
+comment "pipewire Compress-Offload needs a toolchain w/ dynamic library, headers >= 5.7"
+	depends on BR2_STATIC_LIBS || \
+		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
+
 config BR2_PACKAGE_PIPEWIRE_EXAMPLES
 	bool "pipewire examples"
 	help
package/pipewire/pipewire.mk +1 -1
index 976d7783b9..ecf4a035ec 100644
@@ -215,7 +215,7 @@ else
 PIPEWIRE_CONF_OPTS += -Dsdl2=disabled
 endif
 
-ifeq ($(BR2_PACKAGE_TINYCOMPRESS),y)
+ifeq ($(BR2_PACKAGE_PIPEWIRE_COMPRESS_OFFLOAD),y)
 PIPEWIRE_CONF_OPTS += -Dcompress-offload=enabled
 PIPEWIRE_DEPENDENCIES += tinycompress
 else

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot