diff options
Diffstat (limited to 'meta/recipes-multimedia/alsa')
14 files changed, 847 insertions, 0 deletions
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 @@ | |||
1 | |||
2 | def get_alsa_fpu_setting(bb, d): | ||
3 | if d.getVar('TARGET_FPU', True) in [ 'soft' ]: | ||
4 | return "--with-softfloat" | ||
5 | return "" | ||
6 | |||
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 @@ | |||
1 | From f6b879e7cc87d83343f5004369146881d1d1e335 Mon Sep 17 00:00:00 2001 | ||
2 | From: Shengjiu Wang <shengjiu.wang@freescale.com> | ||
3 | Date: Wed, 23 Jul 2014 15:09:58 +0800 | ||
4 | Subject: [PATCH] pcm: pcm_local.h: include <time.h> to enable CLOCK_MONOTONIC | ||
5 | |||
6 | CLOCK_MONITONIC is defined in <bits/time.h>, add <time.h> before <sys/time.h>. | ||
7 | |||
8 | Commit f6b879e7cc87d83343f5004369146881d1d1e335 in master branch | ||
9 | |||
10 | Upstream Status: Backported | ||
11 | |||
12 | Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> | ||
13 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
14 | --- | ||
15 | src/pcm/pcm_local.h | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h | ||
19 | index 2206afe..80bbe59 100644 | ||
20 | --- a/src/pcm/pcm_local.h | ||
21 | +++ b/src/pcm/pcm_local.h | ||
22 | @@ -24,6 +24,7 @@ | ||
23 | #include <stdlib.h> | ||
24 | #include <limits.h> | ||
25 | #include <sys/uio.h> | ||
26 | +#include <time.h> | ||
27 | #include <sys/time.h> | ||
28 | |||
29 | #define _snd_mask sndrv_mask | ||
30 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
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 @@ | |||
1 | From 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 Mon Sep 17 00:00:00 2001 | ||
2 | From: Shengjiu Wang <shengjiu.wang@freescale.com> | ||
3 | Date: Mon, 14 Jul 2014 16:55:48 +0800 | ||
4 | Subject: [PATCH] pcm: rate: fix hw_ptr exceed the boundary | ||
5 | |||
6 | For long time test case, the hw_ptr will exceed the boundary, then cause | ||
7 | the avail size wrong. | ||
8 | |||
9 | Commit is 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 in master branch | ||
10 | |||
11 | Upstream Status: Backported | ||
12 | |||
13 | Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> | ||
14 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
15 | --- | ||
16 | src/pcm/pcm_rate.c | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
18 | |||
19 | diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c | ||
20 | index 7f667d4..2563d82 100644 | ||
21 | --- a/src/pcm/pcm_rate.c | ||
22 | +++ b/src/pcm/pcm_rate.c | ||
23 | @@ -574,6 +574,8 @@ static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm) | ||
24 | rate->hw_ptr = | ||
25 | (slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size + | ||
26 | rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size); | ||
27 | + | ||
28 | + rate->hw_ptr %= pcm->boundary; | ||
29 | } | ||
30 | |||
31 | static int snd_pcm_rate_hwsync(snd_pcm_t *pcm) | ||
32 | -- | ||
33 | 1.7.9.5 | ||
34 | |||
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 @@ | |||
1 | From 3f179d6cc7c222dfa42fe094b7ef1e21685a05bc Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Tue, 22 Jul 2014 11:55:40 +0200 | ||
4 | Subject: [PATCH] pcm: route: Use get32 for multi-source route calculation | ||
5 | |||
6 | The PCM route plugin can assign the destination value from average of | ||
7 | multiple sources with attenuation. This requires the read of each | ||
8 | channel value, sums and writes the resultant value in the requested | ||
9 | format. | ||
10 | |||
11 | Currently, get_labels is used for reading source values while | ||
12 | put32_labels is used for writing the dest value. This is, however, | ||
13 | a buggy implementation; get_labels gives the value as is only with | ||
14 | endianness and signedness conversions, but put32_labels assumes that | ||
15 | the value is normalized to 32bit int and it shifts down to the dest | ||
16 | format. In addition, the current code lacks get_labels entries for | ||
17 | the 24bit formats, as Shengjiu Wang spotted out. | ||
18 | |||
19 | For fixing these bugs, this patch replaces the read with | ||
20 | get32_labels and use always 64bit int for sum. This simplifies the | ||
21 | code a lot and drops many lines. | ||
22 | |||
23 | Commit fd84adc63e307572d05274be44c782a787087cda in master branch | ||
24 | |||
25 | Upstream Status: Backported | ||
26 | |||
27 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
28 | --- | ||
29 | src/pcm/pcm_route.c | 128 +++++++++----------------------------------------- | ||
30 | src/pcm/plugin_ops.h | 81 -------------------------------- | ||
31 | 2 files changed, 23 insertions(+), 186 deletions(-) | ||
32 | |||
33 | diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c | ||
34 | index 2beedf6..1ed9c5f 100644 | ||
35 | --- a/src/pcm/pcm_route.c | ||
36 | +++ b/src/pcm/pcm_route.c | ||
37 | @@ -60,7 +60,7 @@ typedef struct { | ||
38 | typedef struct snd_pcm_route_ttable_dst snd_pcm_route_ttable_dst_t; | ||
39 | |||
40 | typedef struct { | ||
41 | - enum {UINT32=0, UINT64=1, FLOAT=2} sum_idx; | ||
42 | + enum {UINT64, FLOAT} sum_idx; | ||
43 | unsigned int get_idx; | ||
44 | unsigned int put_idx; | ||
45 | unsigned int conv_idx; | ||
46 | @@ -232,55 +232,34 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, | ||
47 | const snd_pcm_route_ttable_dst_t* ttable, | ||
48 | const snd_pcm_route_params_t *params) | ||
49 | { | ||
50 | -#define GETS_LABELS | ||
51 | +#define GET32_LABELS | ||
52 | #define PUT32_LABELS | ||
53 | #include "plugin_ops.h" | ||
54 | -#undef GETS_LABELS | ||
55 | +#undef GET32_LABELS | ||
56 | #undef PUT32_LABELS | ||
57 | - static void *const zero_labels[3] = { | ||
58 | - &&zero_int32, &&zero_int64, | ||
59 | + static void *const zero_labels[2] = { | ||
60 | + &&zero_int64, | ||
61 | #if SND_PCM_PLUGIN_ROUTE_FLOAT | ||
62 | &&zero_float | ||
63 | #endif | ||
64 | }; | ||
65 | /* sum_type att */ | ||
66 | - static void *const add_labels[3 * 2] = { | ||
67 | - &&add_int32_noatt, &&add_int32_att, | ||
68 | + static void *const add_labels[2 * 2] = { | ||
69 | &&add_int64_noatt, &&add_int64_att, | ||
70 | #if SND_PCM_PLUGIN_ROUTE_FLOAT | ||
71 | &&add_float_noatt, &&add_float_att | ||
72 | #endif | ||
73 | }; | ||
74 | - /* sum_type att shift */ | ||
75 | - static void *const norm_labels[3 * 2 * 4] = { | ||
76 | - 0, | ||
77 | - &&norm_int32_8_noatt, | ||
78 | - &&norm_int32_16_noatt, | ||
79 | - &&norm_int32_24_noatt, | ||
80 | - 0, | ||
81 | - &&norm_int32_8_att, | ||
82 | - &&norm_int32_16_att, | ||
83 | - &&norm_int32_24_att, | ||
84 | - &&norm_int64_0_noatt, | ||
85 | - &&norm_int64_8_noatt, | ||
86 | - &&norm_int64_16_noatt, | ||
87 | - &&norm_int64_24_noatt, | ||
88 | - &&norm_int64_0_att, | ||
89 | - &&norm_int64_8_att, | ||
90 | - &&norm_int64_16_att, | ||
91 | - &&norm_int64_24_att, | ||
92 | + /* sum_type att */ | ||
93 | + static void *const norm_labels[2 * 2] = { | ||
94 | + &&norm_int64_noatt, | ||
95 | + &&norm_int64_att, | ||
96 | #if SND_PCM_PLUGIN_ROUTE_FLOAT | ||
97 | - &&norm_float_0, | ||
98 | - &&norm_float_8, | ||
99 | - &&norm_float_16, | ||
100 | - &&norm_float_24, | ||
101 | - &&norm_float_0, | ||
102 | - &&norm_float_8, | ||
103 | - &&norm_float_16, | ||
104 | - &&norm_float_24, | ||
105 | + &&norm_float, | ||
106 | + &&norm_float, | ||
107 | #endif | ||
108 | }; | ||
109 | - void *zero, *get, *add, *norm, *put32; | ||
110 | + void *zero, *get32, *add, *norm, *put32; | ||
111 | int nsrcs = ttable->nsrcs; | ||
112 | char *dst; | ||
113 | int dst_step; | ||
114 | @@ -322,9 +301,9 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, | ||
115 | } | ||
116 | |||
117 | zero = zero_labels[params->sum_idx]; | ||
118 | - get = gets_labels[params->get_idx]; | ||
119 | + get32 = get32_labels[params->get_idx]; | ||
120 | add = add_labels[params->sum_idx * 2 + ttable->att]; | ||
121 | - norm = norm_labels[params->sum_idx * 8 + ttable->att * 4 + 4 - params->src_size]; | ||
122 | + norm = norm_labels[params->sum_idx * 2 + ttable->att]; | ||
123 | put32 = put32_labels[params->put_idx]; | ||
124 | dst = snd_pcm_channel_area_addr(dst_area, dst_offset); | ||
125 | dst_step = snd_pcm_channel_area_step(dst_area); | ||
126 | @@ -335,9 +314,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, | ||
127 | |||
128 | /* Zero sum */ | ||
129 | goto *zero; | ||
130 | - zero_int32: | ||
131 | - sum.as_sint32 = 0; | ||
132 | - goto zero_end; | ||
133 | zero_int64: | ||
134 | sum.as_sint64 = 0; | ||
135 | goto zero_end; | ||
136 | @@ -351,21 +327,14 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, | ||
137 | const char *src = srcs[srcidx]; | ||
138 | |||
139 | /* Get sample */ | ||
140 | - goto *get; | ||
141 | -#define GETS_END after_get | ||
142 | + goto *get32; | ||
143 | +#define GET32_END after_get | ||
144 | #include "plugin_ops.h" | ||
145 | -#undef GETS_END | ||
146 | +#undef GET32_END | ||
147 | after_get: | ||
148 | |||
149 | /* Sum */ | ||
150 | goto *add; | ||
151 | - add_int32_att: | ||
152 | - sum.as_sint32 += sample * ttp->as_int; | ||
153 | - goto after_sum; | ||
154 | - add_int32_noatt: | ||
155 | - if (ttp->as_int) | ||
156 | - sum.as_sint32 += sample; | ||
157 | - goto after_sum; | ||
158 | add_int64_att: | ||
159 | sum.as_sint64 += (int64_t) sample * ttp->as_int; | ||
160 | goto after_sum; | ||
161 | @@ -389,48 +358,10 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, | ||
162 | |||
163 | /* Normalization */ | ||
164 | goto *norm; | ||
165 | - norm_int32_8_att: | ||
166 | - sum.as_sint64 = sum.as_sint32; | ||
167 | - norm_int64_8_att: | ||
168 | - sum.as_sint64 <<= 8; | ||
169 | - norm_int64_0_att: | ||
170 | - div(sum.as_sint64); | ||
171 | - goto norm_int; | ||
172 | - | ||
173 | - norm_int32_16_att: | ||
174 | - sum.as_sint64 = sum.as_sint32; | ||
175 | - norm_int64_16_att: | ||
176 | - sum.as_sint64 <<= 16; | ||
177 | + norm_int64_att: | ||
178 | div(sum.as_sint64); | ||
179 | - goto norm_int; | ||
180 | - | ||
181 | - norm_int32_24_att: | ||
182 | - sum.as_sint64 = sum.as_sint32; | ||
183 | - norm_int64_24_att: | ||
184 | - sum.as_sint64 <<= 24; | ||
185 | - div(sum.as_sint64); | ||
186 | - goto norm_int; | ||
187 | - | ||
188 | - norm_int32_8_noatt: | ||
189 | - sum.as_sint64 = sum.as_sint32; | ||
190 | - norm_int64_8_noatt: | ||
191 | - sum.as_sint64 <<= 8; | ||
192 | - goto norm_int; | ||
193 | - | ||
194 | - norm_int32_16_noatt: | ||
195 | - sum.as_sint64 = sum.as_sint32; | ||
196 | - norm_int64_16_noatt: | ||
197 | - sum.as_sint64 <<= 16; | ||
198 | - goto norm_int; | ||
199 | - | ||
200 | - norm_int32_24_noatt: | ||
201 | - sum.as_sint64 = sum.as_sint32; | ||
202 | - norm_int64_24_noatt: | ||
203 | - sum.as_sint64 <<= 24; | ||
204 | - goto norm_int; | ||
205 | - | ||
206 | - norm_int64_0_noatt: | ||
207 | - norm_int: | ||
208 | + /* fallthru */ | ||
209 | + norm_int64_noatt: | ||
210 | if (sum.as_sint64 > (int64_t)0x7fffffff) | ||
211 | sample = 0x7fffffff; /* maximum positive value */ | ||
212 | else if (sum.as_sint64 < -(int64_t)0x80000000) | ||
213 | @@ -440,16 +371,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area, | ||
214 | goto after_norm; | ||
215 | |||
216 | #if SND_PCM_PLUGIN_ROUTE_FLOAT | ||
217 | - norm_float_8: | ||
218 | - sum.as_float *= 1 << 8; | ||
219 | - goto norm_float; | ||
220 | - norm_float_16: | ||
221 | - sum.as_float *= 1 << 16; | ||
222 | - goto norm_float; | ||
223 | - norm_float_24: | ||
224 | - sum.as_float *= 1 << 24; | ||
225 | - goto norm_float; | ||
226 | - norm_float_0: | ||
227 | norm_float: | ||
228 | sum.as_float = rint(sum.as_float); | ||
229 | if (sum.as_float > (int64_t)0x7fffffff) | ||
230 | @@ -644,7 +565,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) | ||
231 | return err; | ||
232 | route->params.use_getput = snd_pcm_format_physical_width(src_format) == 24 || | ||
233 | snd_pcm_format_physical_width(dst_format) == 24; | ||
234 | - route->params.get_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S16); | ||
235 | + route->params.get_idx = snd_pcm_linear_get32_index(src_format, SND_PCM_FORMAT_S32); | ||
236 | route->params.put_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, dst_format); | ||
237 | route->params.conv_idx = snd_pcm_linear_convert_index(src_format, dst_format); | ||
238 | route->params.src_size = snd_pcm_format_width(src_format) / 8; | ||
239 | @@ -652,10 +573,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) | ||
240 | #if SND_PCM_PLUGIN_ROUTE_FLOAT | ||
241 | route->params.sum_idx = FLOAT; | ||
242 | #else | ||
243 | - if (snd_pcm_format_width(src_format) == 32) | ||
244 | - route->params.sum_idx = UINT64; | ||
245 | - else | ||
246 | - route->params.sum_idx = UINT32; | ||
247 | + route->params.sum_idx = UINT64; | ||
248 | #endif | ||
249 | return 0; | ||
250 | } | ||
251 | diff --git a/src/pcm/plugin_ops.h b/src/pcm/plugin_ops.h | ||
252 | index 21535c9..eb8c2c4 100644 | ||
253 | --- a/src/pcm/plugin_ops.h | ||
254 | +++ b/src/pcm/plugin_ops.h | ||
255 | @@ -668,87 +668,6 @@ getu_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GETU_END; | ||
256 | } | ||
257 | #endif | ||
258 | |||
259 | -#ifdef GETS_LABELS | ||
260 | -/* width endswap sign_toggle */ | ||
261 | -static void *const gets_labels[4 * 2 * 2] = { | ||
262 | - &&gets_1_1, /* 8h -> 8h */ | ||
263 | - &&gets_1_9, /* 8h ^> 8h */ | ||
264 | - &&gets_1_1, /* 8s -> 8h */ | ||
265 | - &&gets_1_9, /* 8s ^> 8h */ | ||
266 | - &&gets_12_12, /* 16h -> 16h */ | ||
267 | - &&gets_12_92, /* 16h ^> 16h */ | ||
268 | - &&gets_12_21, /* 16s -> 16h */ | ||
269 | - &&gets_12_A1, /* 16s ^> 16h */ | ||
270 | - &&gets_0123_0123, /* 24h -> 24h */ | ||
271 | - &&gets_0123_0923, /* 24h ^> 24h */ | ||
272 | - &&gets_1230_0321, /* 24s -> 24h */ | ||
273 | - &&gets_1230_0B21, /* 24s ^> 24h */ | ||
274 | - &&gets_1234_1234, /* 32h -> 32h */ | ||
275 | - &&gets_1234_9234, /* 32h ^> 32h */ | ||
276 | - &&gets_1234_4321, /* 32s -> 32h */ | ||
277 | - &&gets_1234_C321, /* 32s ^> 32h */ | ||
278 | -}; | ||
279 | -#endif | ||
280 | - | ||
281 | -#ifdef GETS_END | ||
282 | -while (0) { | ||
283 | -gets_1_1: sample = as_s8c(src); goto GETS_END; | ||
284 | -gets_1_9: sample = (int8_t)(as_s8c(src) ^ 0x80); goto GETS_END; | ||
285 | -gets_12_12: sample = as_s16c(src); goto GETS_END; | ||
286 | -gets_12_92: sample = (int16_t)(as_s16c(src) ^ 0x8000); goto GETS_END; | ||
287 | -gets_12_21: sample = (int16_t)bswap_16(as_s16c(src)); goto GETS_END; | ||
288 | -gets_12_A1: sample = (int16_t)bswap_16(as_s16c(src) ^ 0x80); goto GETS_END; | ||
289 | -gets_0123_0123: sample = sx24((int32_t)(as_s32c(src) << 8) >> 8); goto GETS_END; | ||
290 | -gets_0123_0923: sample = sx24((int32_t)((as_s32c(src) ^ 0x800000) << 8) >> 8); goto GETS_END; | ||
291 | -gets_1230_0321: sample = sx24((int32_t)(bswap_32(as_s32c(src)) << 8) >> 8); goto GETS_END; | ||
292 | -gets_1230_0B21: sample = sx24((int32_t)(bswap_32(as_s32c(src) ^ 0x8000) << 8) >> 8); goto GETS_END; | ||
293 | -gets_1234_1234: sample = as_s32c(src); goto GETS_END; | ||
294 | -gets_1234_9234: sample = (int32_t)(as_s32c(src) ^ 0x80000000); goto GETS_END; | ||
295 | -gets_1234_4321: sample = (int32_t)bswap_32(as_s32c(src)); goto GETS_END; | ||
296 | -gets_1234_C321: sample = (int32_t)bswap_32(as_s32c(src) ^ 0x80); goto GETS_END; | ||
297 | -} | ||
298 | -#endif | ||
299 | - | ||
300 | -#ifdef PUT_LABELS | ||
301 | -/* width endswap sign_toggle */ | ||
302 | -static void *const put_labels[4 * 2 * 2] = { | ||
303 | - &&put_1_1, /* 8h -> 8h */ | ||
304 | - &&put_1_9, /* 8h ^> 8h */ | ||
305 | - &&put_1_1, /* 8h -> 8s */ | ||
306 | - &&put_1_9, /* 8h ^> 8s */ | ||
307 | - &&put_12_12, /* 16h -> 16h */ | ||
308 | - &&put_12_92, /* 16h ^> 16h */ | ||
309 | - &&put_12_21, /* 16h -> 16s */ | ||
310 | - &&put_12_29, /* 16h ^> 16s */ | ||
311 | - &&put_0123_0123, /* 24h -> 24h */ | ||
312 | - &&put_0123_0923, /* 24h ^> 24h */ | ||
313 | - &&put_0123_3210, /* 24h -> 24s */ | ||
314 | - &&put_0123_3290, /* 24h ^> 24s */ | ||
315 | - &&put_1234_1234, /* 32h -> 32h */ | ||
316 | - &&put_1234_9234, /* 32h ^> 32h */ | ||
317 | - &&put_1234_4321, /* 32h -> 32s */ | ||
318 | - &&put_1234_4329, /* 32h ^> 32s */ | ||
319 | -}; | ||
320 | -#endif | ||
321 | - | ||
322 | -#ifdef PUT_END | ||
323 | -put_1_1: as_s8(dst) = sample; goto PUT_END; | ||
324 | -put_1_9: as_u8(dst) = sample ^ 0x80; goto PUT_END; | ||
325 | -put_12_12: as_s16(dst) = sample; goto PUT_END; | ||
326 | -put_12_92: as_u16(dst) = sample ^ 0x8000; goto PUT_END; | ||
327 | -put_12_21: as_s16(dst) = bswap_16(sample); goto PUT_END; | ||
328 | -put_12_29: as_u16(dst) = bswap_16(sample) ^ 0x80; goto PUT_END; | ||
329 | -/* this always writes the unused byte in 24-bit formats as 0x00 */ | ||
330 | -put_0123_0123: as_s32(dst) = sx24(sample & 0x00ffffff); goto PUT_END; | ||
331 | -put_0123_0923: as_u32(dst) = sx24((sample & 0x00ffffff) ^ 0x800000); goto PUT_END; | ||
332 | -put_0123_3210: as_s32(dst) = sx24s(bswap_32(sample) & 0xffffff00); goto PUT_END; | ||
333 | -put_0123_3290: as_u32(dst) = sx24s((bswap_32(sample) & 0xffffff00) ^ 0x8000); goto PUT_END; | ||
334 | -put_1234_1234: as_s32(dst) = sample; goto PUT_END; | ||
335 | -put_1234_9234: as_u32(dst) = sample ^ 0x80000000; goto PUT_END; | ||
336 | -put_1234_4321: as_s32(dst) = bswap_32(sample); goto PUT_END; | ||
337 | -put_1234_4329: as_u32(dst) = bswap_32(sample) ^ 0x80; goto PUT_END; | ||
338 | -#endif | ||
339 | - | ||
340 | #ifdef PUT32F_LABELS | ||
341 | /* type (0 = float, 1 = float64), endswap */ | ||
342 | static void *const put32float_labels[2 * 2] = { | ||
343 | -- | ||
344 | 1.7.9.5 | ||
345 | |||
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 @@ | |||
1 | From e33357b59a10d44e9bec5d24100ce23ca300cc79 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Hong H. Pham" <hong.pham@windriver.com> | ||
3 | Date: Fri, 29 Aug 2014 17:13:55 +0300 | ||
4 | Subject: [PATCH] Check if wordexp function is supported | ||
5 | |||
6 | eglibc could be configured to build without wordexp, so it is not enough | ||
7 | to check if wordexp.h exists (the header file could be installed, but it's | ||
8 | possible that the wordexp() function is not supported). An additional | ||
9 | check if wordexp() is supported by the system C library is needed. | ||
10 | |||
11 | Upstream-Status: Inappropriate [configuration] | ||
12 | |||
13 | Signed-off-by: Hong H. Pham <hong.pham@windriver.com> | ||
14 | Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> | ||
15 | --- | ||
16 | configure.ac | 5 ++++- | ||
17 | src/userfile.c | 2 +- | ||
18 | 2 files changed, 5 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/configure.ac b/configure.ac | ||
21 | index b8353a0..773b72f 100644 | ||
22 | --- a/configure.ac | ||
23 | +++ b/configure.ac | ||
24 | @@ -311,7 +311,10 @@ fi | ||
25 | AC_SUBST(ALSA_DEPLIBS) | ||
26 | |||
27 | dnl Check for headers | ||
28 | -AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h]) | ||
29 | +AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h], | ||
30 | + dnl Make sure wordexp is supported by the C library | ||
31 | + AC_CHECK_FUNCS([wordexp]) | ||
32 | +) | ||
33 | |||
34 | dnl Check for resmgr support... | ||
35 | AC_MSG_CHECKING(for resmgr support) | ||
36 | diff --git a/src/userfile.c b/src/userfile.c | ||
37 | index 3a73836..b8ce809 100644 | ||
38 | --- a/src/userfile.c | ||
39 | +++ b/src/userfile.c | ||
40 | @@ -32,7 +32,7 @@ | ||
41 | * stores the first matchine one. The returned string is strdup'ed. | ||
42 | */ | ||
43 | |||
44 | -#ifdef HAVE_WORDEXP_H | ||
45 | +#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP)) | ||
46 | #include <wordexp.h> | ||
47 | #include <assert.h> | ||
48 | int snd_user_file(const char *file, char **result) | ||
49 | -- | ||
50 | 1.9.1 | ||
51 | |||
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 @@ | |||
1 | # Author: Michael Lauer <mickey@vanille-media.de> | ||
2 | # Date: Thu Jan 18 00:27:21 2007 +0000 | ||
3 | # alsa-lib: fix "error: field 'tstamp' has incomplete type" when including alsa headers with strict compilation options | ||
4 | # | ||
5 | # Acquired from OpenEmbedded | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Index: alsa-lib-1.0.13/include/global.h | ||
10 | =================================================================== | ||
11 | --- alsa-lib-1.0.13.orig/include/global.h | ||
12 | +++ alsa-lib-1.0.13/include/global.h | ||
13 | @@ -29,6 +29,8 @@ | ||
14 | #define __ALSA_GLOBAL_H_ | ||
15 | |||
16 | /* for timeval and timespec */ | ||
17 | +#define __need_timeval | ||
18 | +#define __need_timespec | ||
19 | #include <time.h> | ||
20 | |||
21 | #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 @@ | |||
1 | SUMMARY = "ALSA sound library" | ||
2 | HOMEPAGE = "http://www.alsa-project.org" | ||
3 | BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" | ||
4 | SECTION = "libs/multimedia" | ||
5 | LICENSE = "LGPLv2.1 & GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \ | ||
7 | file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545" | ||
8 | |||
9 | BBCLASSEXTEND = "native nativesdk" | ||
10 | |||
11 | # configure.in sets -D__arm__ on the command line for any arm system | ||
12 | # (not just those with the ARM instruction set), this should be removed, | ||
13 | # (or replaced by a permitted #define). | ||
14 | #FIXME: remove the following | ||
15 | ARM_INSTRUCTION_SET = "arm" | ||
16 | |||
17 | SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \ | ||
18 | file://Check-if-wordexp-function-is-supported.patch \ | ||
19 | file://fix-tstamp-declaration.patch \ | ||
20 | file://0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch \ | ||
21 | file://0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch \ | ||
22 | file://0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch \ | ||
23 | " | ||
24 | SRC_URI[md5sum] = "c9e21b88a2b3e6e12ea7ba0f3b271fc3" | ||
25 | SRC_URI[sha256sum] = "3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d" | ||
26 | |||
27 | inherit autotools pkgconfig | ||
28 | |||
29 | require alsa-fpu.inc | ||
30 | EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} " | ||
31 | |||
32 | EXTRA_OECONF = "--disable-python" | ||
33 | |||
34 | EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no " | ||
35 | |||
36 | PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc" | ||
37 | FILES_${PN} += "${libdir}/${BPN}/smixer/*.so" | ||
38 | FILES_${PN}-dbg += "${libdir}/${BPN}/smixer/.debug" | ||
39 | FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la" | ||
40 | FILES_libasound = "${libdir}/libasound.so.*" | ||
41 | FILES_alsa-server = "${bindir}/*" | ||
42 | FILES_alsa-conf = "${datadir}/alsa/" | ||
43 | FILES_alsa-conf-base = "\ | ||
44 | ${datadir}/alsa/alsa.conf \ | ||
45 | ${datadir}/alsa/cards/aliases.conf \ | ||
46 | ${datadir}/alsa/pcm/default.conf \ | ||
47 | ${datadir}/alsa/pcm/dmix.conf \ | ||
48 | ${datadir}/alsa/pcm/dsnoop.conf" | ||
49 | |||
50 | RDEPENDS_libasound = "alsa-conf-base alsa-conf" | ||
51 | # upgrade path | ||
52 | RPROVIDES_${PN}-dev = "alsa-dev" | ||
53 | RREPLACES_${PN}-dev = "alsa-dev" | ||
54 | 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 @@ | |||
1 | Add parameters to autoreconf to support cross compile. | ||
2 | Remove some sub-components which needs further recipe support. | ||
3 | |||
4 | Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | diff -ruN alsa-tools-1.0.24.1-orig//ld10k1/gitcompile alsa-tools-1.0.24.1/ld10k1/gitcompile | ||
9 | --- alsa-tools-1.0.24.1-orig//ld10k1/gitcompile 2011-07-06 11:27:40.227665002 +0800 | ||
10 | +++ alsa-tools-1.0.24.1/ld10k1/gitcompile 2011-07-14 13:26:18.017665004 +0800 | ||
11 | @@ -1,6 +1,6 @@ | ||
12 | #!/bin/bash | ||
13 | |||
14 | -autoreconf -fi || exit 1 | ||
15 | +autoreconf $ACLOCAL_FLAGS -fi || exit 1 | ||
16 | export CFLAGS='-O2 -Wall -pipe -g' | ||
17 | echo "CFLAGS=$CFLAGS" | ||
18 | echo "./configure $@" | ||
19 | diff -ruN alsa-tools-1.0.24.1-orig//Makefile alsa-tools-1.0.24.1/Makefile | ||
20 | --- alsa-tools-1.0.24.1-orig//Makefile 2011-07-06 11:27:40.207665000 +0800 | ||
21 | +++ alsa-tools-1.0.24.1/Makefile 2011-07-14 15:08:08.877665009 +0800 | ||
22 | @@ -1,8 +1,8 @@ | ||
23 | VERSION = 1.0.27 | ||
24 | TOP = . | ||
25 | -SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \ | ||
26 | +SUBDIRS = as10k1 envy24control \ | ||
27 | mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ | ||
28 | - us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \ | ||
29 | + us428control usx2yloader vxloader echomixer \ | ||
30 | hwmixvolume hdajackretask hda-verb | ||
31 | |||
32 | 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 @@ | |||
1 | Remove some sub-components which need gtk+. | ||
2 | |||
3 | Upstream-Status: Inappropriate [configuration] | ||
4 | |||
5 | Signed-off-by: Rogerio Nunes <ronunes@gmail.com> | ||
6 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
7 | |||
8 | diff --git a/Makefile b/Makefile | ||
9 | index 2457a1c..72346d9 100644 | ||
10 | --- a/Makefile | ||
11 | +++ b/Makefile | ||
12 | @@ -1,9 +1,9 @@ | ||
13 | VERSION = 1.0.27 | ||
14 | TOP = . | ||
15 | -SUBDIRS = as10k1 envy24control \ | ||
16 | - mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ | ||
17 | - us428control usx2yloader vxloader echomixer \ | ||
18 | - hwmixvolume hdajackretask hda-verb | ||
19 | +SUBDIRS = as10k1 \ | ||
20 | + mixartloader pcxhrloader sb16_csp seq sscape_ctl \ | ||
21 | + us428control usx2yloader vxloader \ | ||
22 | + hwmixvolume hda-verb | ||
23 | |||
24 | all: | ||
25 | @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 @@ | |||
1 | SUMMARY = "Advanced tools for certain ALSA sound card drivers" | ||
2 | HOMEPAGE = "http://www.alsa-project.org" | ||
3 | BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" | ||
4 | SECTION = "console/utils" | ||
5 | LICENSE = "GPLv2 & LGPLv2+" | ||
6 | DEPENDS = "alsa-lib ncurses" | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
9 | file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34" | ||
10 | |||
11 | SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \ | ||
12 | file://autotools.patch \ | ||
13 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \ | ||
14 | 'file://makefile_no_gtk.patch', d)}" | ||
15 | |||
16 | SRC_URI[md5sum] = "e6c929175d8ee729c06d49b51439bad6" | ||
17 | SRC_URI[sha256sum] = "76e59711c6d0f39cbddce83ce1ed8da00bad112fee021f94fa990d8685cc3761" | ||
18 | |||
19 | inherit autotools-brokensep pkgconfig | ||
20 | |||
21 | EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'" | ||
22 | |||
23 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}" | ||
24 | PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3," | ||
25 | |||
26 | # configure.ac/.in doesn't exist so force copy | ||
27 | AUTOTOOLS_COPYACLOCAL = "1" | ||
28 | |||
29 | do_compile_prepend () { | ||
30 | #Automake dir is not correctly detected in cross compilation case | ||
31 | export AUTOMAKE_DIR="$(automake --print-libdir)" | ||
32 | export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/" | ||
33 | } | ||
34 | |||
35 | 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 @@ | |||
1 | require alsa-utils_${PV}.bb | ||
2 | |||
3 | SUMMARY = "Shell script that creates ALSA configuration files" | ||
4 | |||
5 | FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:" | ||
6 | |||
7 | PACKAGES = "${PN}" | ||
8 | RDEPENDS_${PN} += "bash" | ||
9 | |||
10 | FILES_${PN} = "${sbindir}/alsaconf" | ||
11 | |||
12 | S = "${WORKDIR}/alsa-utils-${PV}" | ||
13 | |||
14 | do_install() { | ||
15 | install -d ${D}${sbindir} | ||
16 | install -m 0755 ${S}/alsaconf/alsaconf ${D}${sbindir}/ | ||
17 | } | ||
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 @@ | |||
1 | From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 29 Aug 2014 18:58:56 +0300 | ||
4 | Subject: [PATCH] alsactl: don't let systemd unit restore the volume when | ||
5 | asound.state is missing | ||
6 | |||
7 | This avoids an error on bootup | ||
8 | |||
9 | Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459 | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
14 | Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> | ||
15 | --- | ||
16 | alsactl/Makefile.am | 7 ++++--- | ||
17 | alsactl/alsa-restore.service.in | 1 + | ||
18 | 2 files changed, 5 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am | ||
21 | index 47f06e9..b728c06 100644 | ||
22 | --- a/alsactl/Makefile.am | ||
23 | +++ b/alsactl/Makefile.am | ||
24 | @@ -43,9 +43,10 @@ install-data-hook: | ||
25 | endif | ||
26 | |||
27 | edit = \ | ||
28 | - $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ | ||
29 | - -e 's,@mydatadir\@,$(mydatadir),g' \ | ||
30 | - -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ | ||
31 | + $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \ | ||
32 | + -e 's,@sbindir\@,$(sbindir),g' \ | ||
33 | + -e 's,@mydatadir\@,$(mydatadir),g' \ | ||
34 | + -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ | ||
35 | < $< > $@ || rm $@ | ||
36 | |||
37 | alsa-state.service: alsa-state.service.in | ||
38 | diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in | ||
39 | index 245a439..b017854 100644 | ||
40 | --- a/alsactl/alsa-restore.service.in | ||
41 | +++ b/alsactl/alsa-restore.service.in | ||
42 | @@ -10,6 +10,7 @@ DefaultDependencies=no | ||
43 | After=alsa-state.service | ||
44 | Before=shutdown.target | ||
45 | Conflicts=shutdown.target | ||
46 | +ConditionPathExists=@localstatedir@/lib/alsa/asound.state | ||
47 | |||
48 | [Service] | ||
49 | Type=oneshot | ||
50 | -- | ||
51 | 1.9.1 | ||
52 | |||
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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming | ||
4 | via CTRL-C. Fixed the issue by reverting buggy patches and | ||
5 | properly handling 'in_aborting' flag in appropriate functions. | ||
6 | |||
7 | Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com> | ||
8 | Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com> | ||
9 | |||
10 | --- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530 | ||
11 | +++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530 | ||
12 | @@ -392,14 +392,22 @@ | ||
13 | putchar('\n'); | ||
14 | if (!quiet_mode) | ||
15 | fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig)); | ||
16 | - if (handle) | ||
17 | + if (stream == SND_PCM_STREAM_CAPTURE) { | ||
18 | + if (fmt_rec_table[file_type].end) { | ||
19 | + fmt_rec_table[file_type].end(fd); | ||
20 | + fd = -1; | ||
21 | + } | ||
22 | + stream = -1; | ||
23 | + } | ||
24 | + if (fd > 1) { | ||
25 | + close(fd); | ||
26 | + fd = -1; | ||
27 | + } | ||
28 | + if (handle && sig != SIGABRT) { | ||
29 | snd_pcm_abort(handle); | ||
30 | - if (sig == SIGABRT) { | ||
31 | - /* do not call snd_pcm_close() and abort immediately */ | ||
32 | handle = NULL; | ||
33 | - prg_exit(EXIT_FAILURE); | ||
34 | } | ||
35 | - signal(sig, signal_handler); | ||
36 | + prg_exit(EXIT_FAILURE); | ||
37 | } | ||
38 | |||
39 | /* call on SIGUSR1 signal. */ | ||
40 | @@ -2096,7 +2104,7 @@ | ||
41 | ssize_t result = count, r; | ||
42 | size_t size; | ||
43 | |||
44 | - while (count > 0) { | ||
45 | + while (count > 0 && !in_aborting) { | ||
46 | size = count; | ||
47 | if (size > chunk_bytes - buffer_pos) | ||
48 | 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 @@ | |||
1 | SUMMARY = "ALSA sound utilities" | ||
2 | HOMEPAGE = "http://www.alsa-project.org" | ||
3 | BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php" | ||
4 | SECTION = "console/utils" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | ||
7 | file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9" | ||
8 | DEPENDS = "alsa-lib ncurses libsamplerate0 udev" | ||
9 | |||
10 | PACKAGECONFIG ??= "udev" | ||
11 | PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev" | ||
12 | PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | ||
13 | |||
14 | SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ | ||
15 | file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \ | ||
16 | file://alsa-utils-aplay-interrupt-signal-handling.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[md5sum] = "361552d5b1cacd0a1e7ba09e69990211" | ||
20 | SRC_URI[sha256sum] = "f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc" | ||
21 | |||
22 | # lazy hack. needs proper fixing in gettext.m4, see | ||
23 | # http://bugs.openembedded.org/show_bug.cgi?id=2348 | ||
24 | # please close bug and remove this comment when properly fixed | ||
25 | # | ||
26 | EXTRA_OECONF_append_libc-uclibc = " --disable-nls" | ||
27 | |||
28 | inherit autotools-brokensep gettext pkgconfig | ||
29 | |||
30 | # This are all packages that we need to make. Also, the now empty alsa-utils | ||
31 | # ipk depends on them. | ||
32 | |||
33 | ALSA_UTILS_PKGS = "\ | ||
34 | alsa-utils-alsamixer \ | ||
35 | alsa-utils-midi \ | ||
36 | alsa-utils-aplay \ | ||
37 | alsa-utils-amixer \ | ||
38 | alsa-utils-aconnect \ | ||
39 | alsa-utils-iecset \ | ||
40 | alsa-utils-speakertest \ | ||
41 | alsa-utils-aseqnet \ | ||
42 | alsa-utils-aseqdump \ | ||
43 | alsa-utils-alsactl \ | ||
44 | alsa-utils-alsaloop \ | ||
45 | alsa-utils-alsaucm \ | ||
46 | " | ||
47 | |||
48 | PACKAGES += "${ALSA_UTILS_PKGS}" | ||
49 | RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}" | ||
50 | |||
51 | FILES_${PN} = "" | ||
52 | FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord" | ||
53 | FILES_alsa-utils-amixer = "${bindir}/amixer" | ||
54 | FILES_alsa-utils-alsamixer = "${bindir}/alsamixer" | ||
55 | FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" | ||
56 | FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" | ||
57 | FILES_alsa-utils-aconnect = "${bindir}/aconnect" | ||
58 | FILES_alsa-utils-aseqnet = "${bindir}/aseqnet" | ||
59 | FILES_alsa-utils-iecset = "${bindir}/iecset" | ||
60 | FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" | ||
61 | FILES_alsa-utils-aseqdump = "${bindir}/aseqdump" | ||
62 | FILES_alsa-utils-alsaloop = "${bindir}/alsaloop" | ||
63 | FILES_alsa-utils-alsaucm = "${bindir}/alsaucm" | ||
64 | |||
65 | |||
66 | SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA" | ||
67 | SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings" | ||
68 | SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings" | ||
69 | SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility" | ||
70 | SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA" | ||
71 | SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager" | ||
72 | SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer" | ||
73 | SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits" | ||
74 | SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state" | ||
75 | SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port" | ||
76 | SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility" | ||
77 | SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager" | ||
78 | |||
79 | RRECOMMENDS_alsa-utils-alsactl = "alsa-states" | ||
80 | |||
81 | ALLOW_EMPTY_alsa-utils = "1" | ||
82 | |||
83 | do_install() { | ||
84 | autotools_do_install | ||
85 | |||
86 | # We don't ship this here because it requires a dependency on bash. | ||
87 | # See alsa-utils-alsaconf_${PV}.bb | ||
88 | rm ${D}${sbindir}/alsaconf | ||
89 | |||
90 | if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then | ||
91 | # This is where alsa-utils will install its rules if we don't tell it anything else. | ||
92 | rm -rf ${D}/lib/udev | ||
93 | rmdir --ignore-fail-on-non-empty ${D}/lib | ||
94 | fi | ||
95 | } | ||