diff --git a/extra/alsa-lib/build b/extra/alsa-lib/build index d6f70b3d..5d847b2c 100755 --- a/extra/alsa-lib/build +++ b/extra/alsa-lib/build @@ -1,5 +1,7 @@ #!/bin/sh -e +patch -p1 < musl-string.patch + ./configure \ --without-debug \ --prefix=/usr diff --git a/extra/alsa-lib/checksums b/extra/alsa-lib/checksums index cf2c4f39..5425cf67 100644 --- a/extra/alsa-lib/checksums +++ b/extra/alsa-lib/checksums @@ -1,2 +1,2 @@ -c20453a68df576a3bc388740cf0c667ee2cbb8db86f2af44180c46992e9c2b8163 -26b9ce0b88b67eb48fae18ed914f567a2a38ca1df4466efe4c548cfd37ed9276c9 +2b4135a78ec571bc2c03cc816f606241192ca695a808a30a4b59f2c01a197b370f +87d72a868cd73f26e4794bf4430e16a866dc5c63649d27edbbcf43b7b02d936470 diff --git a/extra/alsa-lib/patches/fix-dlo.patch b/extra/alsa-lib/patches/fix-dlo.patch deleted file mode 100644 index b88dd3c2..00000000 --- a/extra/alsa-lib/patches/fix-dlo.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ad8c8e5503980295dd8e5e54a6285d2d7e32eb1e Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 22 Oct 2020 20:57:32 +0200 -Subject: [PATCH] dlmisc: the snd_plugin_dir_set / snd_plugin_dir must be - declared even for \!DL_ORIGIN_AVAILABLE - -Fixes: 8580c081c2 ("dlsym: add support for ALSA_PLUGIN_DIR environment variable") -BugLink: https://github.com/alsa-project/alsa-lib/issues/91 -Signed-off-by: Jaroslav Kysela ---- - src/dlmisc.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/dlmisc.c b/src/dlmisc.c -index c9517c55..f20eb593 100644 ---- a/src/dlmisc.c -+++ b/src/dlmisc.c -@@ -42,11 +42,9 @@ - #ifndef PIC - struct snd_dlsym_link *snd_dlsym_start = NULL; - #endif --#ifdef DL_ORIGIN_AVAILABLE - static int snd_plugin_dir_set = 0; - static char *snd_plugin_dir = NULL; - #endif --#endif - - #if defined(DL_ORIGIN_AVAILABLE) && defined(HAVE_LIBPTHREAD) - static pthread_mutex_t snd_dlpath_mutex = PTHREAD_MUTEX_INITIALIZER; diff --git a/extra/alsa-lib/patches/musl-string.patch b/extra/alsa-lib/patches/musl-string.patch new file mode 100644 index 00000000..49747dcf --- /dev/null +++ b/extra/alsa-lib/patches/musl-string.patch @@ -0,0 +1,40 @@ +From https://github.com/alsa-project/alsa-lib/commit/10bd599970acc71c92f85eb08943eb8d3d702a9c Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Wed, 6 Sep 2023 15:16:44 +0200 +Subject: [PATCH] global.h: move __STRING() macro outside !PIC ifdef block + +It solves the musl libc compilation issue. + +control.c: In function 'snd_ctl_open_conf': +../../include/global.h:98:36: warning: implicit declaration of function '__STRING' [-Wimplicit-function-declaratio] + 98 | #define SND_DLSYM_VERSION(version) __STRING(version) + | ^~~~~~~~ + +Fixes: https://github.com/alsa-project/alsa-lib/issues/350 +Signed-off-by: Jaroslav Kysela +--- a/include/global.h ++++ b/include/global.h +@@ -51,6 +51,11 @@ const char *snd_asoundlib_version(void); + #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) + #endif + ++#ifndef __STRING ++/** \brief Return 'x' argument as string */ ++#define __STRING(x) #x ++#endif ++ + #ifdef PIC /* dynamic build */ + + /** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */ +@@ -71,11 +76,6 @@ struct snd_dlsym_link { + + extern struct snd_dlsym_link *snd_dlsym_start; + +-#ifndef __STRING +-/** \brief Return 'x' argument as string */ +-#define __STRING(x) #x +-#endif +- + /** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */ + #define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version + /** diff --git a/extra/alsa-lib/sources b/extra/alsa-lib/sources index d5fbb6f0..61a824ff 100644 --- a/extra/alsa-lib/sources +++ b/extra/alsa-lib/sources @@ -1,2 +1,2 @@ -https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.9.tar.bz2 -patches/fix-dlo.patch +https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.10.tar.bz2 +patches/musl-string.patch diff --git a/extra/alsa-lib/version b/extra/alsa-lib/version index 665d14d5..610f0a11 100644 --- a/extra/alsa-lib/version +++ b/extra/alsa-lib/version @@ -1 +1 @@ -1.2.9 1 +1.2.10 1 diff --git a/extra/alsa-utils/build b/extra/alsa-utils/build index 22c739fe..8cfa2de4 100755 --- a/extra/alsa-utils/build +++ b/extra/alsa-utils/build @@ -1,5 +1,7 @@ #!/bin/sh -e +patch -p1 < nhlt-use-stdint.h-types.patch + ./configure \ --prefix=/usr \ --sbindir=/usr/bin \ diff --git a/extra/alsa-utils/checksums b/extra/alsa-utils/checksums index 50eba55e..23b4a7fa 100644 --- a/extra/alsa-utils/checksums +++ b/extra/alsa-utils/checksums @@ -1 +1,2 @@ -bccd795c8ca464c72109cc823863e1e33741a4491d231611cf351cf445505903ae +9a57043733809e23d6cc4b3000f5add720f24e20384eed51251c7f0af00318b1e3 +11ac8f9c7f9fed3c6e9f8c78b12bbe25fec9680407af645c56e43fe4f6428fefb3 diff --git a/extra/alsa-utils/patches/nhlt-use-stdint.h-types.patch b/extra/alsa-utils/patches/nhlt-use-stdint.h-types.patch new file mode 100644 index 00000000..35cfddf6 --- /dev/null +++ b/extra/alsa-utils/patches/nhlt-use-stdint.h-types.patch @@ -0,0 +1,103 @@ +https://github.com/alsa-project/alsa-utils/pull/234 + +From ef33d261ee3085512fd6387dafea46cacc6617a4 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Thu, 7 Sep 2023 21:24:16 +0100 +Subject: [PATCH 2/3] nhlt: use stdint.h types + +u_int_* aren't standard, but uint* are. Use those instead for musl compat. + +Bug: https://bugs.gentoo.org/913758 +Signed-off-by: Sam James +--- a/nhlt/nhlt-dmic-info.c ++++ b/nhlt/nhlt-dmic-info.c +@@ -45,7 +45,7 @@ int debug = 0; + #define NHLT_EP_HDR_SIZE (4 + 1 + 1 + 2 + 2 + 2 + 4 + 1 + 1 + 1) + #define VENDOR_MIC_CFG_SIZE (1 + 1 + 2 + 2 + 2 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 2) + +-static const char *microphone_type(u_int8_t type) ++static const char *microphone_type(uint8_t type) + { + switch (type) { + case 0: return "omnidirectional"; +@@ -59,7 +59,7 @@ static const char *microphone_type(u_int8_t type) + return "unknown"; + } + +-static const char *microphone_location(u_int8_t location) ++static const char *microphone_location(uint8_t location) + { + switch (location) { + case 0: return "laptop-top-panel"; +@@ -73,21 +73,21 @@ static const char *microphone_location(u_int8_t location) + } + + +-static inline u_int8_t get_u8(u_int8_t *base, u_int32_t off) ++static inline uint8_t get_u8(uint8_t *base, uint32_t off) + { + return *(base + off); + } + +-static inline int32_t get_s16le(u_int8_t *base, u_int32_t off) ++static inline int32_t get_s16le(uint8_t *base, uint32_t off) + { +- u_int32_t v = *(base + off + 0) | ++ uint32_t v = *(base + off + 0) | + (*(base + off + 1) << 8); + if (v & 0x8000) + return -((int32_t)0x10000 - (int32_t)v); + return v; + } + +-static inline u_int32_t get_u32le(u_int8_t *base, u_int32_t off) ++static inline uint32_t get_u32le(uint8_t *base, uint32_t off) + { + return *(base + off + 0) | + (*(base + off + 1) << 8) | +@@ -137,10 +137,10 @@ static int nhlt_dmic_config(FILE *out, uint8_t *dmic, uint8_t mic) + return 0; + } + +-static int nhlt_dmic_ep_to_json(FILE *out, uint8_t *ep, u_int32_t ep_size) ++static int nhlt_dmic_ep_to_json(FILE *out, uint8_t *ep, uint32_t ep_size) + { +- u_int32_t off, specific_cfg_size; +- u_int8_t config_type, array_type, mic, num_mics; ++ uint32_t off, specific_cfg_size; ++ uint8_t config_type, array_type, mic, num_mics; + int res; + + off = NHLT_EP_HDR_SIZE; +@@ -181,15 +181,15 @@ oob: + return -EINVAL; + } + +-static int nhlt_table_to_json(FILE *out, u_int8_t *nhlt, u_int32_t size) ++static int nhlt_table_to_json(FILE *out, uint8_t *nhlt, uint32_t size) + { +- u_int32_t _size, off, ep_size; +- u_int8_t sum = 0, ep, ep_count, link_type, dmics = 0; ++ uint32_t _size, off, ep_size; ++ uint8_t sum = 0, ep, ep_count, link_type, dmics = 0; + int res; + + _size = get_u32le(nhlt, 4); + if (_size != size) { +- fprintf(stderr, "Table size mismatch (%08x != %08x)\n", _size, (u_int32_t)size); ++ fprintf(stderr, "Table size mismatch (%08x != %08x)\n", _size, (uint32_t)size); + return -EINVAL; + } + for (off = 0; off < size; off++) +@@ -231,7 +231,7 @@ oob: + static int nhlt_to_json(FILE *out, const char *nhlt_file) + { + struct stat st; +- u_int8_t *buf; ++ uint8_t *buf; + int _errno, fd, res; + size_t pos, size; + ssize_t ret; +-- +2.42.0 + diff --git a/extra/alsa-utils/sources b/extra/alsa-utils/sources index 16505187..497ed630 100644 --- a/extra/alsa-utils/sources +++ b/extra/alsa-utils/sources @@ -1 +1,2 @@ -https://www.alsa-project.org/files/pub/utils/alsa-utils-1.2.9.tar.bz2 +https://www.alsa-project.org/files/pub/utils/alsa-utils-1.2.10.tar.bz2 +patches/nhlt-use-stdint.h-types.patch diff --git a/extra/alsa-utils/version b/extra/alsa-utils/version index 665d14d5..610f0a11 100644 --- a/extra/alsa-utils/version +++ b/extra/alsa-utils/version @@ -1 +1 @@ -1.2.9 1 +1.2.10 1