From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- meta/recipes-multimedia/alsa/alsa-fpu.inc | 6 + ...al.h-include-time.h-to-enable-CLOCK_MONOT.patch | 32 ++ ...1-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch | 34 ++ ...se-get32-for-multi-source-route-calculati.patch | 345 +++++++++++++++++++++ .../Check-if-wordexp-function-is-supported.patch | 51 +++ .../alsa/alsa-lib/fix-tstamp-declaration.patch | 21 ++ meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb | 54 ++++ .../alsa/alsa-tools/autotools.patch | 32 ++ .../alsa/alsa-tools/makefile_no_gtk.patch | 25 ++ meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb | 35 +++ .../alsa/alsa-utils-alsaconf_1.0.28.bb | 17 + ...-t-let-systemd-unit-restore-the-volume-wh.patch | 52 ++++ ...lsa-utils-aplay-interrupt-signal-handling.patch | 48 +++ meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb | 95 ++++++ 14 files changed, 847 insertions(+) create mode 100644 meta/recipes-multimedia/alsa/alsa-fpu.inc create mode 100755 meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch create mode 100755 meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch create mode 100755 meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib/fix-tstamp-declaration.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-tools/autotools.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb create mode 100644 meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch create mode 100644 meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb (limited to 'meta/recipes-multimedia/alsa') diff --git a/meta/recipes-multimedia/alsa/alsa-fpu.inc b/meta/recipes-multimedia/alsa/alsa-fpu.inc new file mode 100644 index 0000000000..50402307c5 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-fpu.inc @@ -0,0 +1,6 @@ + +def get_alsa_fpu_setting(bb, d): + if d.getVar('TARGET_FPU', True) in [ 'soft' ]: + return "--with-softfloat" + return "" + diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch new file mode 100755 index 0000000000..06cdcb9894 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch @@ -0,0 +1,32 @@ +From f6b879e7cc87d83343f5004369146881d1d1e335 Mon Sep 17 00:00:00 2001 +From: Shengjiu Wang +Date: Wed, 23 Jul 2014 15:09:58 +0800 +Subject: [PATCH] pcm: pcm_local.h: include to enable CLOCK_MONOTONIC + +CLOCK_MONITONIC is defined in , add before . + +Commit f6b879e7cc87d83343f5004369146881d1d1e335 in master branch + +Upstream Status: Backported + +Signed-off-by: Shengjiu Wang +Signed-off-by: Takashi Iwai +--- + src/pcm/pcm_local.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h +index 2206afe..80bbe59 100644 +--- a/src/pcm/pcm_local.h ++++ b/src/pcm/pcm_local.h +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #include + + #define _snd_mask sndrv_mask +-- +1.7.9.5 + diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch new file mode 100755 index 0000000000..8be3d757a1 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch @@ -0,0 +1,34 @@ +From 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 Mon Sep 17 00:00:00 2001 +From: Shengjiu Wang +Date: Mon, 14 Jul 2014 16:55:48 +0800 +Subject: [PATCH] pcm: rate: fix hw_ptr exceed the boundary + +For long time test case, the hw_ptr will exceed the boundary, then cause +the avail size wrong. + +Commit is 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 in master branch + +Upstream Status: Backported + +Signed-off-by: Shengjiu Wang +Signed-off-by: Takashi Iwai +--- + src/pcm/pcm_rate.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c +index 7f667d4..2563d82 100644 +--- a/src/pcm/pcm_rate.c ++++ b/src/pcm/pcm_rate.c +@@ -574,6 +574,8 @@ static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm) + rate->hw_ptr = + (slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size + + rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size); ++ ++ rate->hw_ptr %= pcm->boundary; + } + + static int snd_pcm_rate_hwsync(snd_pcm_t *pcm) +-- +1.7.9.5 + diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch new file mode 100755 index 0000000000..89363d55d2 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch @@ -0,0 +1,345 @@ +From 3f179d6cc7c222dfa42fe094b7ef1e21685a05bc Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 22 Jul 2014 11:55:40 +0200 +Subject: [PATCH] pcm: route: Use get32 for multi-source route calculation + +The PCM route plugin can assign the destination value from average of +multiple sources with attenuation. This requires the read of each +channel value, sums and writes the resultant value in the requested +format. + +Currently, get_labels is used for reading source values while +put32_labels is used for writing the dest value. This is, however, +a buggy implementation; get_labels gives the value as is only with +endianness and signedness conversions, but put32_labels assumes that +the value is normalized to 32bit int and it shifts down to the dest +format. In addition, the current code lacks get_labels entries for +the 24bit formats, as Shengjiu Wang spotted out. + +For fixing these bugs, this patch replaces the read with +get32_labels and use always 64bit int for sum. This simplifies the +code a lot and drops many lines. + +Commit fd84adc63e307572d05274be44c782a787087cda in master branch + +Upstream Status: Backported + +Signed-off-by: Takashi Iwai +--- + src/pcm/pcm_route.c | 128 +++++++++----------------------------------------- + src/pcm/plugin_ops.h | 81 -------------------------------- + 2 files changed, 23 insertions(+), 186 deletions(-) + +diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c +index 2beedf6..1ed9c5f 100644 +--- a/src/pcm/pcm_route.c ++++ b/src/pcm/pcm_route.c +@@ -60,7 +60,7 @@ typedef struct { + typedef struct snd_pcm_route_ttable_dst snd_pcm_route_ttable_dst_t; + + typedef struct { +- enum {UINT32=0, UINT64=1, FLOAT=2} sum_idx; ++ enum {UINT64, FLOAT} sum_idx; + unsigned int get_idx; + unsigned int put_idx; + unsigned int conv_idx; +@@ -232,55 +232,34 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, + const snd_pcm_route_ttable_dst_t* ttable, + const snd_pcm_route_params_t *params) + { +-#define GETS_LABELS ++#define GET32_LABELS + #define PUT32_LABELS + #include "plugin_ops.h" +-#undef GETS_LABELS ++#undef GET32_LABELS + #undef PUT32_LABELS +- static void *const zero_labels[3] = { +- &&zero_int32, &&zero_int64, ++ static void *const zero_labels[2] = { ++ &&zero_int64, + #if SND_PCM_PLUGIN_ROUTE_FLOAT + &&zero_float + #endif + }; + /* sum_type att */ +- static void *const add_labels[3 * 2] = { +- &&add_int32_noatt, &&add_int32_att, ++ static void *const add_labels[2 * 2] = { + &&add_int64_noatt, &&add_int64_att, + #if SND_PCM_PLUGIN_ROUTE_FLOAT + &&add_float_noatt, &&add_float_att + #endif + }; +- /* sum_type att shift */ +- static void *const norm_labels[3 * 2 * 4] = { +- 0, +- &&norm_int32_8_noatt, +- &&norm_int32_16_noatt, +- &&norm_int32_24_noatt, +- 0, +- &&norm_int32_8_att, +- &&norm_int32_16_att, +- &&norm_int32_24_att, +- &&norm_int64_0_noatt, +- &&norm_int64_8_noatt, +- &&norm_int64_16_noatt, +- &&norm_int64_24_noatt, +- &&norm_int64_0_att, +- &&norm_int64_8_att, +- &&norm_int64_16_att, +- &&norm_int64_24_att, ++ /* sum_type att */ ++ static void *const norm_labels[2 * 2] = { ++ &&norm_int64_noatt, ++ &&norm_int64_att, + #if SND_PCM_PLUGIN_ROUTE_FLOAT +- &&norm_float_0, +- &&norm_float_8, +- &&norm_float_16, +- &&norm_float_24, +- &&norm_float_0, +- &&norm_float_8, +- &&norm_float_16, +- &&norm_float_24, ++ &&norm_float, ++ &&norm_float, + #endif + }; +- void *zero, *get, *add, *norm, *put32; ++ void *zero, *get32, *add, *norm, *put32; + int nsrcs = ttable->nsrcs; + char *dst; + int dst_step; +@@ -322,9 +301,9 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, + } + + zero = zero_labels[params->sum_idx]; +- get = gets_labels[params->get_idx]; ++ get32 = get32_labels[params->get_idx]; + add = add_labels[params->sum_idx * 2 + ttable->att]; +- norm = norm_labels[params->sum_idx * 8 + ttable->att * 4 + 4 - params->src_size]; ++ norm = norm_labels[params->sum_idx * 2 + ttable->att]; + put32 = put32_labels[params->put_idx]; + dst = snd_pcm_channel_area_addr(dst_area, dst_offset); + dst_step = snd_pcm_channel_area_step(dst_area); +@@ -335,9 +314,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, + + /* Zero sum */ + goto *zero; +- zero_int32: +- sum.as_sint32 = 0; +- goto zero_end; + zero_int64: + sum.as_sint64 = 0; + goto zero_end; +@@ -351,21 +327,14 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, + const char *src = srcs[srcidx]; + + /* Get sample */ +- goto *get; +-#define GETS_END after_get ++ goto *get32; ++#define GET32_END after_get + #include "plugin_ops.h" +-#undef GETS_END ++#undef GET32_END + after_get: + + /* Sum */ + goto *add; +- add_int32_att: +- sum.as_sint32 += sample * ttp->as_int; +- goto after_sum; +- add_int32_noatt: +- if (ttp->as_int) +- sum.as_sint32 += sample; +- goto after_sum; + add_int64_att: + sum.as_sint64 += (int64_t) sample * ttp->as_int; + goto after_sum; +@@ -389,48 +358,10 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, + + /* Normalization */ + goto *norm; +- norm_int32_8_att: +- sum.as_sint64 = sum.as_sint32; +- norm_int64_8_att: +- sum.as_sint64 <<= 8; +- norm_int64_0_att: +- div(sum.as_sint64); +- goto norm_int; +- +- norm_int32_16_att: +- sum.as_sint64 = sum.as_sint32; +- norm_int64_16_att: +- sum.as_sint64 <<= 16; ++ norm_int64_att: + div(sum.as_sint64); +- goto norm_int; +- +- norm_int32_24_att: +- sum.as_sint64 = sum.as_sint32; +- norm_int64_24_att: +- sum.as_sint64 <<= 24; +- div(sum.as_sint64); +- goto norm_int; +- +- norm_int32_8_noatt: +- sum.as_sint64 = sum.as_sint32; +- norm_int64_8_noatt: +- sum.as_sint64 <<= 8; +- goto norm_int; +- +- norm_int32_16_noatt: +- sum.as_sint64 = sum.as_sint32; +- norm_int64_16_noatt: +- sum.as_sint64 <<= 16; +- goto norm_int; +- +- norm_int32_24_noatt: +- sum.as_sint64 = sum.as_sint32; +- norm_int64_24_noatt: +- sum.as_sint64 <<= 24; +- goto norm_int; +- +- norm_int64_0_noatt: +- norm_int: ++ /* fallthru */ ++ norm_int64_noatt: + if (sum.as_sint64 > (int64_t)0x7fffffff) + sample = 0x7fffffff; /* maximum positive value */ + else if (sum.as_sint64 < -(int64_t)0x80000000) +@@ -440,16 +371,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, + goto after_norm; + + #if SND_PCM_PLUGIN_ROUTE_FLOAT +- norm_float_8: +- sum.as_float *= 1 << 8; +- goto norm_float; +- norm_float_16: +- sum.as_float *= 1 << 16; +- goto norm_float; +- norm_float_24: +- sum.as_float *= 1 << 24; +- goto norm_float; +- norm_float_0: + norm_float: + sum.as_float = rint(sum.as_float); + if (sum.as_float > (int64_t)0x7fffffff) +@@ -644,7 +565,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) + return err; + route->params.use_getput = snd_pcm_format_physical_width(src_format) == 24 || + snd_pcm_format_physical_width(dst_format) == 24; +- route->params.get_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S16); ++ route->params.get_idx = snd_pcm_linear_get32_index(src_format, SND_PCM_FORMAT_S32); + route->params.put_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, dst_format); + route->params.conv_idx = snd_pcm_linear_convert_index(src_format, dst_format); + route->params.src_size = snd_pcm_format_width(src_format) / 8; +@@ -652,10 +573,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) + #if SND_PCM_PLUGIN_ROUTE_FLOAT + route->params.sum_idx = FLOAT; + #else +- if (snd_pcm_format_width(src_format) == 32) +- route->params.sum_idx = UINT64; +- else +- route->params.sum_idx = UINT32; ++ route->params.sum_idx = UINT64; + #endif + return 0; + } +diff --git a/src/pcm/plugin_ops.h b/src/pcm/plugin_ops.h +index 21535c9..eb8c2c4 100644 +--- a/src/pcm/plugin_ops.h ++++ b/src/pcm/plugin_ops.h +@@ -668,87 +668,6 @@ getu_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GETU_END; + } + #endif + +-#ifdef GETS_LABELS +-/* width endswap sign_toggle */ +-static void *const gets_labels[4 * 2 * 2] = { +- &&gets_1_1, /* 8h -> 8h */ +- &&gets_1_9, /* 8h ^> 8h */ +- &&gets_1_1, /* 8s -> 8h */ +- &&gets_1_9, /* 8s ^> 8h */ +- &&gets_12_12, /* 16h -> 16h */ +- &&gets_12_92, /* 16h ^> 16h */ +- &&gets_12_21, /* 16s -> 16h */ +- &&gets_12_A1, /* 16s ^> 16h */ +- &&gets_0123_0123, /* 24h -> 24h */ +- &&gets_0123_0923, /* 24h ^> 24h */ +- &&gets_1230_0321, /* 24s -> 24h */ +- &&gets_1230_0B21, /* 24s ^> 24h */ +- &&gets_1234_1234, /* 32h -> 32h */ +- &&gets_1234_9234, /* 32h ^> 32h */ +- &&gets_1234_4321, /* 32s -> 32h */ +- &&gets_1234_C321, /* 32s ^> 32h */ +-}; +-#endif +- +-#ifdef GETS_END +-while (0) { +-gets_1_1: sample = as_s8c(src); goto GETS_END; +-gets_1_9: sample = (int8_t)(as_s8c(src) ^ 0x80); goto GETS_END; +-gets_12_12: sample = as_s16c(src); goto GETS_END; +-gets_12_92: sample = (int16_t)(as_s16c(src) ^ 0x8000); goto GETS_END; +-gets_12_21: sample = (int16_t)bswap_16(as_s16c(src)); goto GETS_END; +-gets_12_A1: sample = (int16_t)bswap_16(as_s16c(src) ^ 0x80); goto GETS_END; +-gets_0123_0123: sample = sx24((int32_t)(as_s32c(src) << 8) >> 8); goto GETS_END; +-gets_0123_0923: sample = sx24((int32_t)((as_s32c(src) ^ 0x800000) << 8) >> 8); goto GETS_END; +-gets_1230_0321: sample = sx24((int32_t)(bswap_32(as_s32c(src)) << 8) >> 8); goto GETS_END; +-gets_1230_0B21: sample = sx24((int32_t)(bswap_32(as_s32c(src) ^ 0x8000) << 8) >> 8); goto GETS_END; +-gets_1234_1234: sample = as_s32c(src); goto GETS_END; +-gets_1234_9234: sample = (int32_t)(as_s32c(src) ^ 0x80000000); goto GETS_END; +-gets_1234_4321: sample = (int32_t)bswap_32(as_s32c(src)); goto GETS_END; +-gets_1234_C321: sample = (int32_t)bswap_32(as_s32c(src) ^ 0x80); goto GETS_END; +-} +-#endif +- +-#ifdef PUT_LABELS +-/* width endswap sign_toggle */ +-static void *const put_labels[4 * 2 * 2] = { +- &&put_1_1, /* 8h -> 8h */ +- &&put_1_9, /* 8h ^> 8h */ +- &&put_1_1, /* 8h -> 8s */ +- &&put_1_9, /* 8h ^> 8s */ +- &&put_12_12, /* 16h -> 16h */ +- &&put_12_92, /* 16h ^> 16h */ +- &&put_12_21, /* 16h -> 16s */ +- &&put_12_29, /* 16h ^> 16s */ +- &&put_0123_0123, /* 24h -> 24h */ +- &&put_0123_0923, /* 24h ^> 24h */ +- &&put_0123_3210, /* 24h -> 24s */ +- &&put_0123_3290, /* 24h ^> 24s */ +- &&put_1234_1234, /* 32h -> 32h */ +- &&put_1234_9234, /* 32h ^> 32h */ +- &&put_1234_4321, /* 32h -> 32s */ +- &&put_1234_4329, /* 32h ^> 32s */ +-}; +-#endif +- +-#ifdef PUT_END +-put_1_1: as_s8(dst) = sample; goto PUT_END; +-put_1_9: as_u8(dst) = sample ^ 0x80; goto PUT_END; +-put_12_12: as_s16(dst) = sample; goto PUT_END; +-put_12_92: as_u16(dst) = sample ^ 0x8000; goto PUT_END; +-put_12_21: as_s16(dst) = bswap_16(sample); goto PUT_END; +-put_12_29: as_u16(dst) = bswap_16(sample) ^ 0x80; goto PUT_END; +-/* this always writes the unused byte in 24-bit formats as 0x00 */ +-put_0123_0123: as_s32(dst) = sx24(sample & 0x00ffffff); goto PUT_END; +-put_0123_0923: as_u32(dst) = sx24((sample & 0x00ffffff) ^ 0x800000); goto PUT_END; +-put_0123_3210: as_s32(dst) = sx24s(bswap_32(sample) & 0xffffff00); goto PUT_END; +-put_0123_3290: as_u32(dst) = sx24s((bswap_32(sample) & 0xffffff00) ^ 0x8000); goto PUT_END; +-put_1234_1234: as_s32(dst) = sample; goto PUT_END; +-put_1234_9234: as_u32(dst) = sample ^ 0x80000000; goto PUT_END; +-put_1234_4321: as_s32(dst) = bswap_32(sample); goto PUT_END; +-put_1234_4329: as_u32(dst) = bswap_32(sample) ^ 0x80; goto PUT_END; +-#endif +- + #ifdef PUT32F_LABELS + /* type (0 = float, 1 = float64), endswap */ + static void *const put32float_labels[2 * 2] = { +-- +1.7.9.5 + diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch new file mode 100644 index 0000000000..75a6eb8a3c --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch @@ -0,0 +1,51 @@ +From e33357b59a10d44e9bec5d24100ce23ca300cc79 Mon Sep 17 00:00:00 2001 +From: "Hong H. Pham" +Date: Fri, 29 Aug 2014 17:13:55 +0300 +Subject: [PATCH] Check if wordexp function is supported + +eglibc could be configured to build without wordexp, so it is not enough +to check if wordexp.h exists (the header file could be installed, but it's +possible that the wordexp() function is not supported). An additional +check if wordexp() is supported by the system C library is needed. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Hong H. Pham +Signed-off-by: Cristian Iorga +--- + configure.ac | 5 ++++- + src/userfile.c | 2 +- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b8353a0..773b72f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -311,7 +311,10 @@ fi + AC_SUBST(ALSA_DEPLIBS) + + dnl Check for headers +-AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h]) ++AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h], ++ dnl Make sure wordexp is supported by the C library ++ AC_CHECK_FUNCS([wordexp]) ++) + + dnl Check for resmgr support... + AC_MSG_CHECKING(for resmgr support) +diff --git a/src/userfile.c b/src/userfile.c +index 3a73836..b8ce809 100644 +--- a/src/userfile.c ++++ b/src/userfile.c +@@ -32,7 +32,7 @@ + * stores the first matchine one. The returned string is strdup'ed. + */ + +-#ifdef HAVE_WORDEXP_H ++#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP)) + #include + #include + int snd_user_file(const char *file, char **result) +-- +1.9.1 + diff --git a/meta/recipes-multimedia/alsa/alsa-lib/fix-tstamp-declaration.patch b/meta/recipes-multimedia/alsa/alsa-lib/fix-tstamp-declaration.patch new file mode 100644 index 0000000000..32b84b7d7e --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib/fix-tstamp-declaration.patch @@ -0,0 +1,21 @@ +# Author: Michael Lauer +# Date: Thu Jan 18 00:27:21 2007 +0000 +# alsa-lib: fix "error: field 'tstamp' has incomplete type" when including alsa headers with strict compilation options +# +# Acquired from OpenEmbedded + +Upstream-Status: Pending + +Index: alsa-lib-1.0.13/include/global.h +=================================================================== +--- alsa-lib-1.0.13.orig/include/global.h ++++ alsa-lib-1.0.13/include/global.h +@@ -29,6 +29,8 @@ + #define __ALSA_GLOBAL_H_ + + /* for timeval and timespec */ ++#define __need_timeval ++#define __need_timespec + #include + + #ifdef __cplusplus diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb new file mode 100644 index 0000000000..9a4aab44d4 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb @@ -0,0 +1,54 @@ +SUMMARY = "ALSA sound library" +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" +SECTION = "libs/multimedia" +LICENSE = "LGPLv2.1 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \ + file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545" + +BBCLASSEXTEND = "native nativesdk" + +# configure.in sets -D__arm__ on the command line for any arm system +# (not just those with the ARM instruction set), this should be removed, +# (or replaced by a permitted #define). +#FIXME: remove the following +ARM_INSTRUCTION_SET = "arm" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \ + file://Check-if-wordexp-function-is-supported.patch \ + file://fix-tstamp-declaration.patch \ + file://0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch \ + file://0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch \ + file://0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch \ +" +SRC_URI[md5sum] = "c9e21b88a2b3e6e12ea7ba0f3b271fc3" +SRC_URI[sha256sum] = "3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d" + +inherit autotools pkgconfig + +require alsa-fpu.inc +EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} " + +EXTRA_OECONF = "--disable-python" + +EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no " + +PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc" +FILES_${PN} += "${libdir}/${BPN}/smixer/*.so" +FILES_${PN}-dbg += "${libdir}/${BPN}/smixer/.debug" +FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la" +FILES_libasound = "${libdir}/libasound.so.*" +FILES_alsa-server = "${bindir}/*" +FILES_alsa-conf = "${datadir}/alsa/" +FILES_alsa-conf-base = "\ +${datadir}/alsa/alsa.conf \ +${datadir}/alsa/cards/aliases.conf \ +${datadir}/alsa/pcm/default.conf \ +${datadir}/alsa/pcm/dmix.conf \ +${datadir}/alsa/pcm/dsnoop.conf" + +RDEPENDS_libasound = "alsa-conf-base alsa-conf" +# upgrade path +RPROVIDES_${PN}-dev = "alsa-dev" +RREPLACES_${PN}-dev = "alsa-dev" +RCONFLICTS_${PN}-dev = "alsa-dev" diff --git a/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch new file mode 100644 index 0000000000..5aec84c60d --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch @@ -0,0 +1,32 @@ +Add parameters to autoreconf to support cross compile. +Remove some sub-components which needs further recipe support. + +Signed-off-by: Dongxiao Xu + +Upstream-Status: Inappropriate [configuration] + +diff -ruN alsa-tools-1.0.24.1-orig//ld10k1/gitcompile alsa-tools-1.0.24.1/ld10k1/gitcompile +--- alsa-tools-1.0.24.1-orig//ld10k1/gitcompile 2011-07-06 11:27:40.227665002 +0800 ++++ alsa-tools-1.0.24.1/ld10k1/gitcompile 2011-07-14 13:26:18.017665004 +0800 +@@ -1,6 +1,6 @@ + #!/bin/bash + +-autoreconf -fi || exit 1 ++autoreconf $ACLOCAL_FLAGS -fi || exit 1 + export CFLAGS='-O2 -Wall -pipe -g' + echo "CFLAGS=$CFLAGS" + echo "./configure $@" +diff -ruN alsa-tools-1.0.24.1-orig//Makefile alsa-tools-1.0.24.1/Makefile +--- alsa-tools-1.0.24.1-orig//Makefile 2011-07-06 11:27:40.207665000 +0800 ++++ alsa-tools-1.0.24.1/Makefile 2011-07-14 15:08:08.877665009 +0800 +@@ -1,8 +1,8 @@ + VERSION = 1.0.27 + TOP = . +-SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \ ++SUBDIRS = as10k1 envy24control \ + mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ +- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \ ++ us428control usx2yloader vxloader echomixer \ + hwmixvolume hdajackretask hda-verb + + all: diff --git a/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch new file mode 100644 index 0000000000..26657266a8 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch @@ -0,0 +1,25 @@ +Remove some sub-components which need gtk+. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Rogerio Nunes +Signed-off-by: Otavio Salvador + +diff --git a/Makefile b/Makefile +index 2457a1c..72346d9 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,9 +1,9 @@ + VERSION = 1.0.27 + TOP = . +-SUBDIRS = as10k1 envy24control \ +- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ +- us428control usx2yloader vxloader echomixer \ +- hwmixvolume hdajackretask hda-verb ++SUBDIRS = as10k1 \ ++ mixartloader pcxhrloader sb16_csp seq sscape_ctl \ ++ us428control usx2yloader vxloader \ ++ hwmixvolume hda-verb + + all: + @for i in $(SUBDIRS); do \ diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb new file mode 100644 index 0000000000..4b9509e863 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb @@ -0,0 +1,35 @@ +SUMMARY = "Advanced tools for certain ALSA sound card drivers" +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" +SECTION = "console/utils" +LICENSE = "GPLv2 & LGPLv2+" +DEPENDS = "alsa-lib ncurses" + +LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \ + file://autotools.patch \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \ + 'file://makefile_no_gtk.patch', d)}" + +SRC_URI[md5sum] = "e6c929175d8ee729c06d49b51439bad6" +SRC_URI[sha256sum] = "76e59711c6d0f39cbddce83ce1ed8da00bad112fee021f94fa990d8685cc3761" + +inherit autotools-brokensep pkgconfig + +EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}" +PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3," + +# configure.ac/.in doesn't exist so force copy +AUTOTOOLS_COPYACLOCAL = "1" + +do_compile_prepend () { + #Automake dir is not correctly detected in cross compilation case + export AUTOMAKE_DIR="$(automake --print-libdir)" + export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/" +} + +FILES_${PN} += "${datadir}/ld10k1" diff --git a/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb new file mode 100644 index 0000000000..968c81ee2b --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb @@ -0,0 +1,17 @@ +require alsa-utils_${PV}.bb + +SUMMARY = "Shell script that creates ALSA configuration files" + +FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:" + +PACKAGES = "${PN}" +RDEPENDS_${PN} += "bash" + +FILES_${PN} = "${sbindir}/alsaconf" + +S = "${WORKDIR}/alsa-utils-${PV}" + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${S}/alsaconf/alsaconf ${D}${sbindir}/ +} diff --git a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch new file mode 100644 index 0000000000..e99dd515f0 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch @@ -0,0 +1,52 @@ +From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Fri, 29 Aug 2014 18:58:56 +0300 +Subject: [PATCH] alsactl: don't let systemd unit restore the volume when + asound.state is missing + +This avoids an error on bootup + +Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459 + +Upstream-Status: Pending + +Signed-off-by: Koen Kooi +Signed-off-by: Cristian Iorga +--- + alsactl/Makefile.am | 7 ++++--- + alsactl/alsa-restore.service.in | 1 + + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am +index 47f06e9..b728c06 100644 +--- a/alsactl/Makefile.am ++++ b/alsactl/Makefile.am +@@ -43,9 +43,10 @@ install-data-hook: + endif + + edit = \ +- $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ +- -e 's,@mydatadir\@,$(mydatadir),g' \ +- -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ ++ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \ ++ -e 's,@sbindir\@,$(sbindir),g' \ ++ -e 's,@mydatadir\@,$(mydatadir),g' \ ++ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ + < $< > $@ || rm $@ + + alsa-state.service: alsa-state.service.in +diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in +index 245a439..b017854 100644 +--- a/alsactl/alsa-restore.service.in ++++ b/alsactl/alsa-restore.service.in +@@ -10,6 +10,7 @@ DefaultDependencies=no + After=alsa-state.service + Before=shutdown.target + Conflicts=shutdown.target ++ConditionPathExists=@localstatedir@/lib/alsa/asound.state + + [Service] + Type=oneshot +-- +1.9.1 + diff --git a/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch new file mode 100644 index 0000000000..5df004aeae --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch @@ -0,0 +1,48 @@ +Upstream-Status: Pending + +aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming +via CTRL-C. Fixed the issue by reverting buggy patches and +properly handling 'in_aborting' flag in appropriate functions. + +Signed-off-by: Anant Agrawal +Signed-off-by: Mikhail Durnev + +--- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530 ++++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530 +@@ -392,14 +392,22 @@ + putchar('\n'); + if (!quiet_mode) + fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig)); +- if (handle) ++ if (stream == SND_PCM_STREAM_CAPTURE) { ++ if (fmt_rec_table[file_type].end) { ++ fmt_rec_table[file_type].end(fd); ++ fd = -1; ++ } ++ stream = -1; ++ } ++ if (fd > 1) { ++ close(fd); ++ fd = -1; ++ } ++ if (handle && sig != SIGABRT) { + snd_pcm_abort(handle); +- if (sig == SIGABRT) { +- /* do not call snd_pcm_close() and abort immediately */ + handle = NULL; +- prg_exit(EXIT_FAILURE); + } +- signal(sig, signal_handler); ++ prg_exit(EXIT_FAILURE); + } + + /* call on SIGUSR1 signal. */ +@@ -2096,7 +2104,7 @@ + ssize_t result = count, r; + size_t size; + +- while (count > 0) { ++ while (count > 0 && !in_aborting) { + size = count; + if (size > chunk_bytes - buffer_pos) + size = chunk_bytes - buffer_pos; diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb new file mode 100644 index 0000000000..5f35d76a6e --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb @@ -0,0 +1,95 @@ +SUMMARY = "ALSA sound utilities" +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" +SECTION = "console/utils" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9" +DEPENDS = "alsa-lib ncurses libsamplerate0 udev" + +PACKAGECONFIG ??= "udev" +PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev" +PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ + file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \ + file://alsa-utils-aplay-interrupt-signal-handling.patch \ + " + +SRC_URI[md5sum] = "361552d5b1cacd0a1e7ba09e69990211" +SRC_URI[sha256sum] = "f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc" + +# lazy hack. needs proper fixing in gettext.m4, see +# http://bugs.openembedded.org/show_bug.cgi?id=2348 +# please close bug and remove this comment when properly fixed +# +EXTRA_OECONF_append_libc-uclibc = " --disable-nls" + +inherit autotools-brokensep gettext pkgconfig + +# This are all packages that we need to make. Also, the now empty alsa-utils +# ipk depends on them. + +ALSA_UTILS_PKGS = "\ + alsa-utils-alsamixer \ + alsa-utils-midi \ + alsa-utils-aplay \ + alsa-utils-amixer \ + alsa-utils-aconnect \ + alsa-utils-iecset \ + alsa-utils-speakertest \ + alsa-utils-aseqnet \ + alsa-utils-aseqdump \ + alsa-utils-alsactl \ + alsa-utils-alsaloop \ + alsa-utils-alsaucm \ + " + +PACKAGES += "${ALSA_UTILS_PKGS}" +RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}" + +FILES_${PN} = "" +FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord" +FILES_alsa-utils-amixer = "${bindir}/amixer" +FILES_alsa-utils-alsamixer = "${bindir}/alsamixer" +FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" +FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" +FILES_alsa-utils-aconnect = "${bindir}/aconnect" +FILES_alsa-utils-aseqnet = "${bindir}/aseqnet" +FILES_alsa-utils-iecset = "${bindir}/iecset" +FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" +FILES_alsa-utils-aseqdump = "${bindir}/aseqdump" +FILES_alsa-utils-alsaloop = "${bindir}/alsaloop" +FILES_alsa-utils-alsaucm = "${bindir}/alsaucm" + + +SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA" +SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings" +SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings" +SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility" +SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA" +SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager" +SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer" +SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits" +SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state" +SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port" +SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility" +SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager" + +RRECOMMENDS_alsa-utils-alsactl = "alsa-states" + +ALLOW_EMPTY_alsa-utils = "1" + +do_install() { + autotools_do_install + + # We don't ship this here because it requires a dependency on bash. + # See alsa-utils-alsaconf_${PV}.bb + rm ${D}${sbindir}/alsaconf + + if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then + # This is where alsa-utils will install its rules if we don't tell it anything else. + rm -rf ${D}/lib/udev + rmdir --ignore-fail-on-non-empty ${D}/lib + fi +} -- cgit v1.2.3-54-g00ecf