summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/alsaerror.patch527
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/autoconf_version.patch15
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/buildfix.patch15
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/fallback.patch340
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/gcc4-compile-fix.patch20
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/periodfix.patch75
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/volatiles.04_pulse2
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.15.bb21
8 files changed, 0 insertions, 1015 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/alsaerror.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/alsaerror.patch
deleted file mode 100644
index 0f09d2e646..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/alsaerror.patch
+++ /dev/null
@@ -1,527 +0,0 @@
1From: Lennart Poettering <lennart@poettering.net>
2Date: Sun, 19 Apr 2009 17:22:51 +0000 (+0200)
3Subject: alsa: properly convert return values of snd_strerror() to utf8
4X-Git-Url: http://git.0pointer.de/?p=pulseaudio.git;a=commitdiff_plain;h=98a25c506e692ab091b4af7e1b37e8432fc08e8f
5
6alsa: properly convert return values of snd_strerror() to utf8
7---
8
9Upstream-Status: Backport
10
11diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
12index 2fbcd7b..41e8b47 100644
13--- a/src/modules/alsa/alsa-sink.c
14+++ b/src/modules/alsa/alsa-sink.c
15@@ -281,7 +281,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
16 pa_assert(call);
17 pa_assert(err < 0);
18
19- pa_log_debug("%s: %s", call, snd_strerror(err));
20+ pa_log_debug("%s: %s", call, pa_alsa_strerror(err));
21
22 pa_assert(err != -EAGAIN);
23
24@@ -289,7 +289,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
25 pa_log_debug("%s: Buffer underrun!", call);
26
27 if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) < 0) {
28- pa_log("%s: %s", call, snd_strerror(err));
29+ pa_log("%s: %s", call, pa_alsa_strerror(err));
30 return -1;
31 }
32
33@@ -636,12 +636,12 @@ static void update_smoother(struct userdata *u) {
34 /* Let's update the time smoother */
35
36 if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->sink->sample_spec)) < 0)) {
37- pa_log_warn("Failed to query DSP status data: %s", snd_strerror(err));
38+ pa_log_warn("Failed to query DSP status data: %s", pa_alsa_strerror(err));
39 return;
40 }
41
42 if (PA_UNLIKELY((err = snd_pcm_status(u->pcm_handle, status)) < 0))
43- pa_log_warn("Failed to get timestamp: %s", snd_strerror(err));
44+ pa_log_warn("Failed to get timestamp: %s", pa_alsa_strerror(err));
45 else {
46 snd_htimestamp_t htstamp = { 0, 0 };
47 snd_pcm_status_get_htstamp(status, &htstamp);
48@@ -764,7 +764,7 @@ static int update_sw_params(struct userdata *u) {
49 pa_log_debug("setting avail_min=%lu", (unsigned long) avail_min);
50
51 if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min)) < 0) {
52- pa_log("Failed to set software parameters: %s", snd_strerror(err));
53+ pa_log("Failed to set software parameters: %s", pa_alsa_strerror(err));
54 return err;
55 }
56
57@@ -792,7 +792,7 @@ static int unsuspend(struct userdata *u) {
58 SND_PCM_NO_AUTO_RESAMPLE|
59 SND_PCM_NO_AUTO_CHANNELS|
60 SND_PCM_NO_AUTO_FORMAT)) < 0) {
61- pa_log("Error opening PCM device %s: %s", u->device_name, snd_strerror(err));
62+ pa_log("Error opening PCM device %s: %s", u->device_name, pa_alsa_strerror(err));
63 goto fail;
64 }
65
66@@ -803,7 +803,7 @@ static int unsuspend(struct userdata *u) {
67 d = u->use_tsched;
68
69 if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &nfrags, &period_size, u->hwbuf_size / u->frame_size, &b, &d, TRUE)) < 0) {
70- pa_log("Failed to set hardware parameters: %s", snd_strerror(err));
71+ pa_log("Failed to set hardware parameters: %s", pa_alsa_strerror(err));
72 goto fail;
73 }
74
75@@ -1030,7 +1030,7 @@ static void sink_get_volume_cb(pa_sink *s) {
76 return;
77
78 fail:
79- pa_log_error("Unable to read volume: %s", snd_strerror(err));
80+ pa_log_error("Unable to read volume: %s", pa_alsa_strerror(err));
81 }
82
83 static void sink_set_volume_cb(pa_sink *s) {
84@@ -1141,7 +1141,7 @@ static void sink_set_volume_cb(pa_sink *s) {
85 return;
86
87 fail:
88- pa_log_error("Unable to set volume: %s", snd_strerror(err));
89+ pa_log_error("Unable to set volume: %s", pa_alsa_strerror(err));
90 }
91
92 static void sink_get_mute_cb(pa_sink *s) {
93@@ -1152,7 +1152,7 @@ static void sink_get_mute_cb(pa_sink *s) {
94 pa_assert(u->mixer_elem);
95
96 if ((err = snd_mixer_selem_get_playback_switch(u->mixer_elem, 0, &sw)) < 0) {
97- pa_log_error("Unable to get switch: %s", snd_strerror(err));
98+ pa_log_error("Unable to get switch: %s", pa_alsa_strerror(err));
99 return;
100 }
101
102@@ -1167,7 +1167,7 @@ static void sink_set_mute_cb(pa_sink *s) {
103 pa_assert(u->mixer_elem);
104
105 if ((err = snd_mixer_selem_set_playback_switch_all(u->mixer_elem, !s->muted)) < 0) {
106- pa_log_error("Unable to set switch: %s", snd_strerror(err));
107+ pa_log_error("Unable to set switch: %s", pa_alsa_strerror(err));
108 return;
109 }
110 }
111@@ -1206,7 +1206,7 @@ static int process_rewind(struct userdata *u) {
112 pa_log_debug("Requested to rewind %lu bytes.", (unsigned long) rewind_nbytes);
113
114 if (PA_UNLIKELY((unused = pa_alsa_safe_avail(u->pcm_handle, u->hwbuf_size, &u->sink->sample_spec)) < 0)) {
115- pa_log("snd_pcm_avail() failed: %s", snd_strerror((int) unused));
116+ pa_log("snd_pcm_avail() failed: %s", pa_alsa_strerror((int) unused));
117 return -1;
118 }
119
120@@ -1228,7 +1228,7 @@ static int process_rewind(struct userdata *u) {
121 in_frames = (snd_pcm_sframes_t) (rewind_nbytes / u->frame_size);
122 pa_log_debug("before: %lu", (unsigned long) in_frames);
123 if ((out_frames = snd_pcm_rewind(u->pcm_handle, (snd_pcm_uframes_t) in_frames)) < 0) {
124- pa_log("snd_pcm_rewind() failed: %s", snd_strerror((int) out_frames));
125+ pa_log("snd_pcm_rewind() failed: %s", pa_alsa_strerror((int) out_frames));
126 return -1;
127 }
128 pa_log_debug("after: %lu", (unsigned long) out_frames);
129@@ -1359,7 +1359,7 @@ static void thread_func(void *userdata) {
130 pollfd = pa_rtpoll_item_get_pollfd(u->alsa_rtpoll_item, &n);
131
132 if ((err = snd_pcm_poll_descriptors_revents(u->pcm_handle, pollfd, n, &revents)) < 0) {
133- pa_log("snd_pcm_poll_descriptors_revents() failed: %s", snd_strerror(err));
134+ pa_log("snd_pcm_poll_descriptors_revents() failed: %s", pa_alsa_strerror(err));
135 goto fail;
136 }
137
138diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
139index c59fc75..843f70b 100644
140--- a/src/modules/alsa/alsa-source.c
141+++ b/src/modules/alsa/alsa-source.c
142@@ -278,7 +278,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
143 pa_assert(call);
144 pa_assert(err < 0);
145
146- pa_log_debug("%s: %s", call, snd_strerror(err));
147+ pa_log_debug("%s: %s", call, pa_alsa_strerror(err));
148
149 pa_assert(err != -EAGAIN);
150
151@@ -286,7 +286,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
152 pa_log_debug("%s: Buffer overrun!", call);
153
154 if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) < 0) {
155- pa_log("%s: %s", call, snd_strerror(err));
156+ pa_log("%s: %s", call, pa_alsa_strerror(err));
157 return -1;
158 }
159
160@@ -606,12 +606,12 @@ static void update_smoother(struct userdata *u) {
161 /* Let's update the time smoother */
162
163 if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->source->sample_spec)) < 0)) {
164- pa_log_warn("Failed to get delay: %s", snd_strerror(err));
165+ pa_log_warn("Failed to get delay: %s", pa_alsa_strerror(err));
166 return;
167 }
168
169 if (PA_UNLIKELY((err = snd_pcm_status(u->pcm_handle, status)) < 0))
170- pa_log_warn("Failed to get timestamp: %s", snd_strerror(err));
171+ pa_log_warn("Failed to get timestamp: %s", pa_alsa_strerror(err));
172 else {
173 snd_htimestamp_t htstamp = { 0, 0 };
174 snd_pcm_status_get_htstamp(status, &htstamp);
175@@ -721,7 +721,7 @@ static int update_sw_params(struct userdata *u) {
176 pa_log_debug("setting avail_min=%lu", (unsigned long) avail_min);
177
178 if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min)) < 0) {
179- pa_log("Failed to set software parameters: %s", snd_strerror(err));
180+ pa_log("Failed to set software parameters: %s", pa_alsa_strerror(err));
181 return err;
182 }
183
184@@ -747,7 +747,7 @@ static int unsuspend(struct userdata *u) {
185 SND_PCM_NO_AUTO_RESAMPLE|
186 SND_PCM_NO_AUTO_CHANNELS|
187 SND_PCM_NO_AUTO_FORMAT)) < 0) {
188- pa_log("Error opening PCM device %s: %s", u->device_name, snd_strerror(err));
189+ pa_log("Error opening PCM device %s: %s", u->device_name, pa_alsa_strerror(err));
190 goto fail;
191 }
192
193@@ -758,7 +758,7 @@ static int unsuspend(struct userdata *u) {
194 d = u->use_tsched;
195
196 if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &nfrags, &period_size, u->hwbuf_size / u->frame_size, &b, &d, TRUE)) < 0) {
197- pa_log("Failed to set hardware parameters: %s", snd_strerror(err));
198+ pa_log("Failed to set hardware parameters: %s", pa_alsa_strerror(err));
199 goto fail;
200 }
201
202@@ -988,7 +988,7 @@ static void source_get_volume_cb(pa_source *s) {
203 return;
204
205 fail:
206- pa_log_error("Unable to read volume: %s", snd_strerror(err));
207+ pa_log_error("Unable to read volume: %s", pa_alsa_strerror(err));
208 }
209
210 static void source_set_volume_cb(pa_source *s) {
211@@ -1100,7 +1100,7 @@ static void source_set_volume_cb(pa_source *s) {
212 return;
213
214 fail:
215- pa_log_error("Unable to set volume: %s", snd_strerror(err));
216+ pa_log_error("Unable to set volume: %s", pa_alsa_strerror(err));
217 }
218
219 static void source_get_mute_cb(pa_source *s) {
220@@ -1111,7 +1111,7 @@ static void source_get_mute_cb(pa_source *s) {
221 pa_assert(u->mixer_elem);
222
223 if ((err = snd_mixer_selem_get_capture_switch(u->mixer_elem, 0, &sw)) < 0) {
224- pa_log_error("Unable to get switch: %s", snd_strerror(err));
225+ pa_log_error("Unable to get switch: %s", pa_alsa_strerror(err));
226 return;
227 }
228
229@@ -1126,7 +1126,7 @@ static void source_set_mute_cb(pa_source *s) {
230 pa_assert(u->mixer_elem);
231
232 if ((err = snd_mixer_selem_set_capture_switch_all(u->mixer_elem, !s->muted)) < 0) {
233- pa_log_error("Unable to set switch: %s", snd_strerror(err));
234+ pa_log_error("Unable to set switch: %s", pa_alsa_strerror(err));
235 return;
236 }
237 }
238@@ -1218,7 +1218,7 @@ static void thread_func(void *userdata) {
239 pollfd = pa_rtpoll_item_get_pollfd(u->alsa_rtpoll_item, &n);
240
241 if ((err = snd_pcm_poll_descriptors_revents(u->pcm_handle, pollfd, n, &revents)) < 0) {
242- pa_log("snd_pcm_poll_descriptors_revents() failed: %s", snd_strerror(err));
243+ pa_log("snd_pcm_poll_descriptors_revents() failed: %s", pa_alsa_strerror(err));
244 goto fail;
245 }
246
247diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
248index d2dc6e8..ddc3c77 100644
249--- a/src/modules/alsa/alsa-util.c
250+++ b/src/modules/alsa/alsa-util.c
251@@ -33,6 +33,7 @@
252 #include <pulse/timeval.h>
253 #include <pulse/util.h>
254 #include <pulse/i18n.h>
255+#include <pulse/utf8.h>
256
257 #include <pulsecore/log.h>
258 #include <pulsecore/macro.h>
259@@ -40,6 +41,7 @@
260 #include <pulsecore/atomic.h>
261 #include <pulsecore/core-error.h>
262 #include <pulsecore/once.h>
263+#include <pulsecore/thread.h>
264
265 #include "alsa-util.h"
266
267@@ -106,7 +108,7 @@ static void io_cb(pa_mainloop_api*a, pa_io_event* e, int fd, pa_io_event_flags_t
268 pa_assert(i != fdl->num_fds);
269
270 if ((err = snd_mixer_poll_descriptors_revents(fdl->mixer, fdl->work_fds, fdl->num_fds, &revents)) < 0) {
271- pa_log_error("Unable to get poll revent: %s", snd_strerror(err));
272+ pa_log_error("Unable to get poll revent: %s", pa_alsa_strerror(err));
273 return;
274 }
275
276@@ -129,7 +131,7 @@ static void defer_cb(pa_mainloop_api*a, pa_defer_event* e, void *userdata) {
277 a->defer_enable(fdl->defer, 0);
278
279 if ((n = snd_mixer_poll_descriptors_count(fdl->mixer)) < 0) {
280- pa_log("snd_mixer_poll_descriptors_count() failed: %s", snd_strerror(n));
281+ pa_log("snd_mixer_poll_descriptors_count() failed: %s", pa_alsa_strerror(n));
282 return;
283 }
284 num_fds = (unsigned) n;
285@@ -146,7 +148,7 @@ static void defer_cb(pa_mainloop_api*a, pa_defer_event* e, void *userdata) {
286 memset(fdl->work_fds, 0, sizeof(struct pollfd) * num_fds);
287
288 if ((err = snd_mixer_poll_descriptors(fdl->mixer, fdl->work_fds, num_fds)) < 0) {
289- pa_log_error("Unable to get poll descriptors: %s", snd_strerror(err));
290+ pa_log_error("Unable to get poll descriptors: %s", pa_alsa_strerror(err));
291 return;
292 }
293
294@@ -482,42 +484,42 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min) {
295 snd_pcm_sw_params_alloca(&swparams);
296
297 if ((err = snd_pcm_sw_params_current(pcm, swparams) < 0)) {
298- pa_log_warn("Unable to determine current swparams: %s\n", snd_strerror(err));
299+ pa_log_warn("Unable to determine current swparams: %s\n", pa_alsa_strerror(err));
300 return err;
301 }
302
303 if ((err = snd_pcm_sw_params_set_period_event(pcm, swparams, 0)) < 0) {
304- pa_log_warn("Unable to disable period event: %s\n", snd_strerror(err));
305+ pa_log_warn("Unable to disable period event: %s\n", pa_alsa_strerror(err));
306 return err;
307 }
308
309 if ((err = snd_pcm_sw_params_set_tstamp_mode(pcm, swparams, SND_PCM_TSTAMP_ENABLE)) < 0) {
310- pa_log_warn("Unable to enable time stamping: %s\n", snd_strerror(err));
311+ pa_log_warn("Unable to enable time stamping: %s\n", pa_alsa_strerror(err));
312 return err;
313 }
314
315 if ((err = snd_pcm_sw_params_get_boundary(swparams, &boundary)) < 0) {
316- pa_log_warn("Unable to get boundary: %s\n", snd_strerror(err));
317+ pa_log_warn("Unable to get boundary: %s\n", pa_alsa_strerror(err));
318 return err;
319 }
320
321 if ((err = snd_pcm_sw_params_set_stop_threshold(pcm, swparams, boundary)) < 0) {
322- pa_log_warn("Unable to set stop threshold: %s\n", snd_strerror(err));
323+ pa_log_warn("Unable to set stop threshold: %s\n", pa_alsa_strerror(err));
324 return err;
325 }
326
327 if ((err = snd_pcm_sw_params_set_start_threshold(pcm, swparams, (snd_pcm_uframes_t) -1)) < 0) {
328- pa_log_warn("Unable to set start threshold: %s\n", snd_strerror(err));
329+ pa_log_warn("Unable to set start threshold: %s\n", pa_alsa_strerror(err));
330 return err;
331 }
332
333 if ((err = snd_pcm_sw_params_set_avail_min(pcm, swparams, avail_min)) < 0) {
334- pa_log_error("snd_pcm_sw_params_set_avail_min() failed: %s", snd_strerror(err));
335+ pa_log_error("snd_pcm_sw_params_set_avail_min() failed: %s", pa_alsa_strerror(err));
336 return err;
337 }
338
339 if ((err = snd_pcm_sw_params(pcm, swparams)) < 0) {
340- pa_log_warn("Unable to set sw params: %s\n", snd_strerror(err));
341+ pa_log_warn("Unable to set sw params: %s\n", pa_alsa_strerror(err));
342 return err;
343 }
344
345@@ -854,7 +856,7 @@ snd_pcm_t *pa_alsa_open_by_device_string(
346 SND_PCM_NO_AUTO_RESAMPLE|
347 SND_PCM_NO_AUTO_CHANNELS|
348 (reformat ? 0 : SND_PCM_NO_AUTO_FORMAT))) < 0) {
349- pa_log_info("Error opening PCM device %s: %s", d, snd_strerror(err));
350+ pa_log_info("Error opening PCM device %s: %s", d, pa_alsa_strerror(err));
351 goto fail;
352 }
353
354@@ -882,7 +884,7 @@ snd_pcm_t *pa_alsa_open_by_device_string(
355 continue;
356 }
357
358- pa_log_info("Failed to set hardware parameters on %s: %s", d, snd_strerror(err));
359+ pa_log_info("Failed to set hardware parameters on %s: %s", d, pa_alsa_strerror(err));
360 snd_pcm_close(pcm_handle);
361
362 goto fail;
363@@ -1000,17 +1002,17 @@ int pa_alsa_prepare_mixer(snd_mixer_t *mixer, const char *dev) {
364 pa_assert(dev);
365
366 if ((err = snd_mixer_attach(mixer, dev)) < 0) {
367- pa_log_info("Unable to attach to mixer %s: %s", dev, snd_strerror(err));
368+ pa_log_info("Unable to attach to mixer %s: %s", dev, pa_alsa_strerror(err));
369 return -1;
370 }
371
372 if ((err = snd_mixer_selem_register(mixer, NULL, NULL)) < 0) {
373- pa_log_warn("Unable to register mixer: %s", snd_strerror(err));
374+ pa_log_warn("Unable to register mixer: %s", pa_alsa_strerror(err));
375 return -1;
376 }
377
378 if ((err = snd_mixer_load(mixer)) < 0) {
379- pa_log_warn("Unable to load mixer: %s", snd_strerror(err));
380+ pa_log_warn("Unable to load mixer: %s", pa_alsa_strerror(err));
381 return -1;
382 }
383
384@@ -1136,7 +1138,7 @@ int pa_alsa_find_mixer_and_elem(
385 }
386
387 if ((err = snd_mixer_open(&m, 0)) < 0) {
388- pa_log("Error opening mixer: %s", snd_strerror(err));
389+ pa_log("Error opening mixer: %s", pa_alsa_strerror(err));
390 return -1;
391 }
392
393@@ -1338,7 +1340,7 @@ void pa_alsa_dump(pa_log_level_t level, snd_pcm_t *pcm) {
394 pa_assert_se(snd_output_buffer_open(&out) == 0);
395
396 if ((err = snd_pcm_dump(pcm, out)) < 0)
397- pa_logl(level, "snd_pcm_dump(): %s", snd_strerror(err));
398+ pa_logl(level, "snd_pcm_dump(): %s", pa_alsa_strerror(err));
399 else {
400 char *s = NULL;
401 snd_output_buffer_string(out, &s);
402@@ -1362,7 +1364,7 @@ void pa_alsa_dump_status(snd_pcm_t *pcm) {
403 pa_assert_se(snd_pcm_status(pcm, status) == 0);
404
405 if ((err = snd_pcm_status_dump(status, out)) < 0)
406- pa_log_debug("snd_pcm_dump(): %s", snd_strerror(err));
407+ pa_log_debug("snd_pcm_dump(): %s", pa_alsa_strerror(err));
408 else {
409 char *s = NULL;
410 snd_output_buffer_string(out, &s);
411@@ -1524,7 +1526,7 @@ void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm, snd_m
412 snd_pcm_info_alloca(&info);
413
414 if ((err = snd_pcm_hw_params_current(pcm, hwparams)) < 0)
415- pa_log_warn("Error fetching hardware parameter info: %s", snd_strerror(err));
416+ pa_log_warn("Error fetching hardware parameter info: %s", pa_alsa_strerror(err));
417 else {
418
419 if ((bits = snd_pcm_hw_params_get_sbits(hwparams)) >= 0)
420@@ -1535,7 +1537,7 @@ void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm, snd_m
421 pa_proplist_sets(p, "alsa.mixer_element", snd_mixer_selem_get_name(elem));
422
423 if ((err = snd_pcm_info(pcm, info)) < 0)
424- pa_log_warn("Error fetching PCM info: %s", snd_strerror(err));
425+ pa_log_warn("Error fetching PCM info: %s", pa_alsa_strerror(err));
426 else
427 pa_alsa_init_proplist_pcm_info(c, p, info);
428 }
429@@ -1568,14 +1570,14 @@ int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents) {
430
431 case SND_PCM_STATE_XRUN:
432 if ((err = snd_pcm_recover(pcm, -EPIPE, 1)) != 0) {
433- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and XRUN: %s", snd_strerror(err));
434+ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and XRUN: %s", pa_alsa_strerror(err));
435 return -1;
436 }
437 break;
438
439 case SND_PCM_STATE_SUSPENDED:
440 if ((err = snd_pcm_recover(pcm, -ESTRPIPE, 1)) != 0) {
441- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and SUSPENDED: %s", snd_strerror(err));
442+ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP and SUSPENDED: %s", pa_alsa_strerror(err));
443 return -1;
444 }
445 break;
446@@ -1585,7 +1587,7 @@ int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents) {
447 snd_pcm_drop(pcm);
448
449 if ((err = snd_pcm_prepare(pcm)) < 0) {
450- pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): %s", snd_strerror(err));
451+ pa_log_warn("Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): %s", pa_alsa_strerror(err));
452 return -1;
453 }
454 break;
455@@ -1602,7 +1604,7 @@ pa_rtpoll_item* pa_alsa_build_pollfd(snd_pcm_t *pcm, pa_rtpoll *rtpoll) {
456 pa_assert(pcm);
457
458 if ((n = snd_pcm_poll_descriptors_count(pcm)) < 0) {
459- pa_log("snd_pcm_poll_descriptors_count() failed: %s", snd_strerror(n));
460+ pa_log("snd_pcm_poll_descriptors_count() failed: %s", pa_alsa_strerror(n));
461 return NULL;
462 }
463
464@@ -1610,7 +1612,7 @@ pa_rtpoll_item* pa_alsa_build_pollfd(snd_pcm_t *pcm, pa_rtpoll *rtpoll) {
465 pollfd = pa_rtpoll_item_get_pollfd(item, NULL);
466
467 if ((err = snd_pcm_poll_descriptors(pcm, pollfd, (unsigned) n)) < 0) {
468- pa_log("snd_pcm_poll_descriptors() failed: %s", snd_strerror(err));
469+ pa_log("snd_pcm_poll_descriptors() failed: %s", pa_alsa_strerror(err));
470 pa_rtpoll_item_free(item);
471 return NULL;
472 }
473@@ -1819,3 +1821,30 @@ pa_bool_t pa_alsa_pcm_is_modem(snd_pcm_t *pcm) {
474
475 return snd_pcm_info_get_class(info) == SND_PCM_CLASS_MODEM;
476 }
477+
478+PA_STATIC_TLS_DECLARE(cstrerror, pa_xfree);
479+
480+const char* pa_alsa_strerror(int errnum) {
481+ const char *original = NULL;
482+ char *translated, *t;
483+ char errbuf[128];
484+
485+ if ((t = PA_STATIC_TLS_GET(cstrerror)))
486+ pa_xfree(t);
487+
488+ original = snd_strerror(errnum);
489+
490+ if (!original) {
491+ pa_snprintf(errbuf, sizeof(errbuf), "Unknown error %i", errnum);
492+ original = errbuf;
493+ }
494+
495+ if (!(translated = pa_locale_to_utf8(original))) {
496+ pa_log_warn("Unable to convert error string to locale, filtering.");
497+ translated = pa_utf8_filter(original);
498+ }
499+
500+ PA_STATIC_TLS_SET(cstrerror, translated);
501+
502+ return translated;
503+}
504diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
505index c8acc7c..77ac8a7 100644
506--- a/src/modules/alsa/alsa-util.h
507+++ b/src/modules/alsa/alsa-util.h
508@@ -146,4 +146,6 @@ pa_bool_t pa_alsa_pcm_is_hw(snd_pcm_t *pcm);
509
510 pa_bool_t pa_alsa_pcm_is_modem(snd_pcm_t *pcm);
511
512+const char* pa_alsa_strerror(int errnum);
513+
514 #endif
515diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
516index fdc952d..51d466e 100644
517--- a/src/modules/alsa/module-alsa-card.c
518+++ b/src/modules/alsa/module-alsa-card.c
519@@ -304,7 +304,7 @@ int pa__init(pa_module *m) {
520 u->modargs = ma;
521
522 if ((alsa_card_index = snd_card_get_index(u->device_id)) < 0) {
523- pa_log("Card '%s' doesn't exist: %s", u->device_id, snd_strerror(alsa_card_index));
524+ pa_log("Card '%s' doesn't exist: %s", u->device_id, pa_alsa_strerror(alsa_card_index));
525 goto fail;
526 }
527
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/autoconf_version.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/autoconf_version.patch
deleted file mode 100644
index 158c883317..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/autoconf_version.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: pulseaudio-0.9.15/configure.ac
4===================================================================
5--- pulseaudio-0.9.15.orig/configure.ac 2009-04-14 00:09:53.000000000 +0100
6+++ pulseaudio-0.9.15/configure.ac 2009-05-22 11:32:50.000000000 +0100
7@@ -20,7 +20,7 @@
8 # along with PulseAudio; if not, write to the Free Software Foundation,
9 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
10
11-AC_PREREQ(2.63)
12+AC_PREREQ(2.61)
13
14 m4_define(pa_major, [0])
15 m4_define(pa_minor, [9])
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/buildfix.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/buildfix.patch
deleted file mode 100644
index da46d4b58b..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/buildfix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Upstream-Status: Pending
2
3Index: pulseaudio-0.9.11/src/pulsecore/atomic.h
4===================================================================
5--- pulseaudio-0.9.11.orig/src/pulsecore/atomic.h
6+++ pulseaudio-0.9.11/src/pulsecore/atomic.h
7@@ -40,6 +40,8 @@
8 #error "Please include config.h before including this file!"
9 #endif
10
11+#include "macro.h"
12+
13 #ifdef HAVE_ATOMIC_BUILTINS
14
15 /* __sync based implementation */
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/fallback.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/fallback.patch
deleted file mode 100644
index 5808d4126d..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/fallback.patch
+++ /dev/null
@@ -1,340 +0,0 @@
1From: Lennart Poettering <lennart@poettering.net>
2Date: Tue, 28 Apr 2009 23:58:18 +0000 (+0200)
3Subject: alsa: allow configuration of fallback device strings in profiles
4X-Git-Url: http://git.0pointer.de/?p=pulseaudio.git;a=commitdiff_plain;h=d8710711fb0c74b4ad83ac99c2501218155b502b
5
6alsa: allow configuration of fallback device strings in profiles
7
8This has the benefit that we can properly support ALSA devices where
9only the raw 'hw' device exists but no 'front' although it's a proper
102ch stereo device.
11---
12
13Upstream-Status: Backport
14
15diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
16index 18d6880..a3a0450 100644
17--- a/src/modules/alsa/alsa-util.c
18+++ b/src/modules/alsa/alsa-util.c
19@@ -528,7 +528,7 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min) {
20
21 static const struct pa_alsa_profile_info device_table[] = {
22 {{ 1, { PA_CHANNEL_POSITION_MONO }},
23- "hw",
24+ "hw", NULL,
25 N_("Analog Mono"),
26 "analog-mono",
27 1,
28@@ -536,7 +536,7 @@ static const struct pa_alsa_profile_info device_table[] = {
29 "Capture", "Mic" },
30
31 {{ 2, { PA_CHANNEL_POSITION_LEFT, PA_CHANNEL_POSITION_RIGHT }},
32- "front",
33+ "front", "hw",
34 N_("Analog Stereo"),
35 "analog-stereo",
36 10,
37@@ -544,7 +544,7 @@ static const struct pa_alsa_profile_info device_table[] = {
38 "Capture", "Mic" },
39
40 {{ 2, { PA_CHANNEL_POSITION_LEFT, PA_CHANNEL_POSITION_RIGHT }},
41- "iec958",
42+ "iec958", NULL,
43 N_("Digital Stereo (IEC958)"),
44 "iec958-stereo",
45 5,
46@@ -552,7 +552,7 @@ static const struct pa_alsa_profile_info device_table[] = {
47 "IEC958 In", NULL },
48
49 {{ 2, { PA_CHANNEL_POSITION_LEFT, PA_CHANNEL_POSITION_RIGHT }},
50- "hdmi",
51+ "hdmi", NULL,
52 N_("Digital Stereo (HDMI)"),
53 "hdmi-stereo",
54 4,
55@@ -561,7 +561,7 @@ static const struct pa_alsa_profile_info device_table[] = {
56
57 {{ 4, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
58 PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT }},
59- "surround40",
60+ "surround40", NULL,
61 N_("Analog Surround 4.0"),
62 "analog-surround-40",
63 7,
64@@ -570,7 +570,7 @@ static const struct pa_alsa_profile_info device_table[] = {
65
66 {{ 4, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
67 PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT }},
68- "a52",
69+ "a52", NULL,
70 N_("Digital Surround 4.0 (IEC958/AC3)"),
71 "iec958-ac3-surround-40",
72 2,
73@@ -580,7 +580,7 @@ static const struct pa_alsa_profile_info device_table[] = {
74 {{ 5, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
75 PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
76 PA_CHANNEL_POSITION_LFE }},
77- "surround41",
78+ "surround41", NULL,
79 N_("Analog Surround 4.1"),
80 "analog-surround-41",
81 7,
82@@ -590,7 +590,7 @@ static const struct pa_alsa_profile_info device_table[] = {
83 {{ 5, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
84 PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
85 PA_CHANNEL_POSITION_CENTER }},
86- "surround50",
87+ "surround50", NULL,
88 N_("Analog Surround 5.0"),
89 "analog-surround-50",
90 7,
91@@ -600,7 +600,7 @@ static const struct pa_alsa_profile_info device_table[] = {
92 {{ 6, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
93 PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
94 PA_CHANNEL_POSITION_CENTER, PA_CHANNEL_POSITION_LFE }},
95- "surround51",
96+ "surround51", NULL,
97 N_("Analog Surround 5.1"),
98 "analog-surround-51",
99 8,
100@@ -610,7 +610,7 @@ static const struct pa_alsa_profile_info device_table[] = {
101 {{ 6, { PA_CHANNEL_POSITION_FRONT_LEFT, PA_CHANNEL_POSITION_FRONT_RIGHT,
102 PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
103 PA_CHANNEL_POSITION_FRONT_CENTER, PA_CHANNEL_POSITION_LFE}},
104- "a52",
105+ "a52", NULL,
106 N_("Digital Surround 5.1 (IEC958/AC3)"),
107 "iec958-ac3-surround-51",
108 3,
109@@ -621,16 +621,72 @@ static const struct pa_alsa_profile_info device_table[] = {
110 PA_CHANNEL_POSITION_REAR_LEFT, PA_CHANNEL_POSITION_REAR_RIGHT,
111 PA_CHANNEL_POSITION_CENTER, PA_CHANNEL_POSITION_LFE,
112 PA_CHANNEL_POSITION_SIDE_LEFT, PA_CHANNEL_POSITION_SIDE_RIGHT }},
113- "surround71",
114+ "surround71", NULL,
115 N_("Analog Surround 7.1"),
116 "analog-surround-71",
117 7,
118 "Master", "PCM",
119 "Capture", "Mic" },
120
121- {{ 0, { 0 }}, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL }
122+ {{ 0, { 0 }}, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL }
123 };
124
125+static snd_pcm_t *open_by_device_string_with_fallback(
126+ const char *prefix,
127+ const char *prefix_fallback,
128+ const char *dev_id,
129+ char **dev,
130+ pa_sample_spec *ss,
131+ pa_channel_map* map,
132+ int mode,
133+ uint32_t *nfrags,
134+ snd_pcm_uframes_t *period_size,
135+ snd_pcm_uframes_t tsched_size,
136+ pa_bool_t *use_mmap,
137+ pa_bool_t *use_tsched,
138+ pa_bool_t require_exact_channel_number) {
139+
140+ snd_pcm_t *pcm_handle;
141+ char *d;
142+
143+ d = pa_sprintf_malloc("%s:%s", prefix, dev_id);
144+
145+ pcm_handle = pa_alsa_open_by_device_string(
146+ d,
147+ dev,
148+ ss,
149+ map,
150+ mode,
151+ nfrags,
152+ period_size,
153+ tsched_size,
154+ use_mmap,
155+ use_tsched,
156+ require_exact_channel_number);
157+ pa_xfree(d);
158+
159+ if (!pcm_handle && prefix_fallback) {
160+
161+ d = pa_sprintf_malloc("%s:%s", prefix_fallback, dev_id);
162+
163+ pcm_handle = pa_alsa_open_by_device_string(
164+ d,
165+ dev,
166+ ss,
167+ map,
168+ mode,
169+ nfrags,
170+ period_size,
171+ tsched_size,
172+ use_mmap,
173+ use_tsched,
174+ require_exact_channel_number);
175+ pa_xfree(d);
176+ }
177+
178+ return pcm_handle;
179+}
180+
181 snd_pcm_t *pa_alsa_open_by_device_id_auto(
182 const char *dev_id,
183 char **dev,
184@@ -671,14 +727,14 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
185
186 pa_log_debug("Checking for %s (%s)", device_table[i].name, device_table[i].alsa_name);
187
188- d = pa_sprintf_malloc("%s:%s", device_table[i].alsa_name, dev_id);
189-
190 try_ss.channels = device_table[i].map.channels;
191 try_ss.rate = ss->rate;
192 try_ss.format = ss->format;
193
194- pcm_handle = pa_alsa_open_by_device_string(
195- d,
196+ pcm_handle = open_by_device_string_with_fallback(
197+ device_table[i].alsa_name,
198+ device_table[i].alsa_name_fallback,
199+ dev_id,
200 dev,
201 &try_ss,
202 map,
203@@ -690,8 +746,6 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
204 use_tsched,
205 TRUE);
206
207- pa_xfree(d);
208-
209 if (pcm_handle) {
210
211 *ss = try_ss;
212@@ -703,6 +757,7 @@ snd_pcm_t *pa_alsa_open_by_device_id_auto(
213
214 return pcm_handle;
215 }
216+
217 }
218
219 if (direction > 0) {
220@@ -775,7 +830,6 @@ snd_pcm_t *pa_alsa_open_by_device_id_profile(
221 pa_bool_t *use_tsched,
222 const pa_alsa_profile_info *profile) {
223
224- char *d;
225 snd_pcm_t *pcm_handle;
226 pa_sample_spec try_ss;
227
228@@ -787,14 +841,14 @@ snd_pcm_t *pa_alsa_open_by_device_id_profile(
229 pa_assert(period_size);
230 pa_assert(profile);
231
232- d = pa_sprintf_malloc("%s:%s", profile->alsa_name, dev_id);
233-
234 try_ss.channels = profile->map.channels;
235 try_ss.rate = ss->rate;
236 try_ss.format = ss->format;
237
238- pcm_handle = pa_alsa_open_by_device_string(
239- d,
240+ pcm_handle = open_by_device_string_with_fallback(
241+ profile->alsa_name,
242+ profile->alsa_name_fallback,
243+ dev_id,
244 dev,
245 &try_ss,
246 map,
247@@ -806,8 +860,6 @@ snd_pcm_t *pa_alsa_open_by_device_id_profile(
248 use_tsched,
249 TRUE);
250
251- pa_xfree(d);
252-
253 if (!pcm_handle)
254 return NULL;
255
256@@ -860,6 +912,8 @@ snd_pcm_t *pa_alsa_open_by_device_string(
257 goto fail;
258 }
259
260+ pa_log_debug("Managed to open %s", d);
261+
262 if ((err = pa_alsa_set_hw_params(pcm_handle, ss, nfrags, period_size, tsched_size, use_mmap, use_tsched, require_exact_channel_number)) < 0) {
263
264 if (!reformat) {
265@@ -928,26 +982,25 @@ int pa_alsa_probe_profiles(
266 snd_pcm_t *pcm_i = NULL;
267
268 if (i->alsa_name) {
269- char *id;
270 pa_sample_spec try_ss;
271 pa_channel_map try_map;
272
273 pa_log_debug("Checking for playback on %s (%s)", i->name, i->alsa_name);
274- id = pa_sprintf_malloc("%s:%s", i->alsa_name, dev_id);
275
276 try_ss = *ss;
277 try_ss.channels = i->map.channels;
278 try_map = i->map;
279
280- pcm_i = pa_alsa_open_by_device_string(
281- id, NULL,
282+ pcm_i = open_by_device_string_with_fallback(
283+ i->alsa_name,
284+ i->alsa_name_fallback,
285+ dev_id,
286+ NULL,
287 &try_ss, &try_map,
288 SND_PCM_STREAM_PLAYBACK,
289 NULL, NULL, 0, NULL, NULL,
290 TRUE);
291
292- pa_xfree(id);
293-
294 if (!pcm_i)
295 continue;
296 }
297@@ -956,26 +1009,25 @@ int pa_alsa_probe_profiles(
298 snd_pcm_t *pcm_j = NULL;
299
300 if (j->alsa_name) {
301- char *jd;
302 pa_sample_spec try_ss;
303 pa_channel_map try_map;
304
305 pa_log_debug("Checking for capture on %s (%s)", j->name, j->alsa_name);
306- jd = pa_sprintf_malloc("%s:%s", j->alsa_name, dev_id);
307
308 try_ss = *ss;
309 try_ss.channels = j->map.channels;
310 try_map = j->map;
311
312- pcm_j = pa_alsa_open_by_device_string(
313- jd, NULL,
314+ pcm_j = open_by_device_string_with_fallback(
315+ j->alsa_name,
316+ j->alsa_name_fallback,
317+ dev_id,
318+ NULL,
319 &try_ss, &try_map,
320 SND_PCM_STREAM_CAPTURE,
321 NULL, NULL, 0, NULL, NULL,
322 TRUE);
323
324- pa_xfree(jd);
325-
326 if (!pcm_j)
327 continue;
328 }
329diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
330index 77ac8a7..4c5d336 100644
331--- a/src/modules/alsa/alsa-util.h
332+++ b/src/modules/alsa/alsa-util.h
333@@ -56,6 +56,7 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min);
334 typedef struct pa_alsa_profile_info {
335 pa_channel_map map;
336 const char *alsa_name;
337+ const char *alsa_name_fallback;
338 const char *description; /* internationalized */
339 const char *name;
340 unsigned priority;
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/gcc4-compile-fix.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/gcc4-compile-fix.patch
deleted file mode 100644
index f2296876cb..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/gcc4-compile-fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1| fix for more strict syntax compliance in gcc4.x
2| pulsecore/core-util.c: In function 'pa_raise_priority':
3| pulsecore/core-util.c:547: error: label at end of compound statement
4| Signed off: mickey@openmoko.org
5|
6Upstream-Status: Pending
7
8Index: pulseaudio-0.9.6/src/pulsecore/core-util.c
9===================================================================
10--- pulseaudio-0.9.6.orig/src/pulsecore/core-util.c
11+++ pulseaudio-0.9.6/src/pulsecore/core-util.c
12@@ -535,7 +535,7 @@ void pa_raise_priority(void) {
13 pa_log_info("Successfully gained high priority class.");
14 #endif
15
16-fail:
17+fail:;
18
19 #if defined(HAVE_SYS_CAPABILITY_H)
20 if (caps) {
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/periodfix.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/periodfix.patch
deleted file mode 100644
index 4fc6c15f02..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/periodfix.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1X-Git-Url: http://git.0pointer.de/?p=pulseaudio.git;a=blobdiff_plain;f=src%2Fmodules%2Falsa%2Falsa-util.c;h=107bec357c7889f0197853f5e5f1951a5a2f5be0;hp=a3a045080dac0e1b30e8671443ce73a03337cf14;hb=4bffc7849f7898fa85dd6ac8e735db86b57814b3;hpb=d2b5ae5525e9036c4f91b1615879a5a07aac5bf2
2
3Upstream-Status: Backport
4
5diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
6index a3a0450..107bec3 100644
7--- a/src/modules/alsa/alsa-util.c
8+++ b/src/modules/alsa/alsa-util.c
9@@ -334,7 +334,6 @@ int pa_alsa_set_hw_params(
10 int ret = -1;
11 snd_pcm_uframes_t _period_size = period_size ? *period_size : 0;
12 unsigned int _periods = periods ? *periods : 0;
13- snd_pcm_uframes_t buffer_size;
14 unsigned int r = ss->rate;
15 unsigned int c = ss->channels;
16 pa_sample_format_t f = ss->format;
17@@ -390,39 +389,47 @@ int pa_alsa_set_hw_params(
18 goto finish;
19
20 if (_period_size && tsched_size && _periods) {
21+
22 /* Adjust the buffer sizes, if we didn't get the rate we were asking for */
23 _period_size = (snd_pcm_uframes_t) (((uint64_t) _period_size * r) / ss->rate);
24 tsched_size = (snd_pcm_uframes_t) (((uint64_t) tsched_size * r) / ss->rate);
25
26 if (_use_tsched) {
27- _period_size = tsched_size;
28- _periods = 1;
29+ snd_pcm_uframes_t buffer_size;
30
31 pa_assert_se(snd_pcm_hw_params_get_buffer_size_max(hwparams, &buffer_size) == 0);
32 pa_log_debug("Maximum hw buffer size is %u ms", (unsigned) buffer_size * 1000 / r);
33+
34+ _period_size = tsched_size;
35+ _periods = 1;
36 }
37
38+ if (_period_size > 0 && _periods > 0) {
39+ snd_pcm_uframes_t buffer_size;
40+
41 buffer_size = _periods * _period_size;
42
43+ if ((ret = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams, &buffer_size)) < 0)
44+ pa_log_info("snd_pcm_hw_params_set_buffer_size_near() failed: %s", pa_alsa_strerror(ret));
45+ }
46+
47 if (_periods > 0) {
48
49- /* First we pass 0 as direction to get exactly what we asked
50- * for. That this is necessary is presumably a bug in ALSA */
51+ /* First we pass 0 as direction to get exactly what we
52+ * asked for. That this is necessary is presumably a bug
53+ * in ALSA. All in all this is mostly a hint to ALSA, so
54+ * we don't care if this fails. */
55
56 dir = 0;
57- if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0) {
58+ if (snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir) < 0) {
59 dir = 1;
60- if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0) {
61+ if (snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir) < 0) {
62 dir = -1;
63 if ((ret = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &_periods, &dir)) < 0)
64- goto finish;
65+ pa_log_info("snd_pcm_hw_params_set_periods_near() failed: %s", pa_alsa_strerror(ret));
66 }
67 }
68 }
69-
70- if (_period_size > 0)
71- if ((ret = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams, &buffer_size)) < 0)
72- goto finish;
73 }
74
75 if ((ret = snd_pcm_hw_params(pcm_handle, hwparams)) < 0)
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/volatiles.04_pulse b/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/volatiles.04_pulse
deleted file mode 100644
index 5b1998032b..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.15/volatiles.04_pulse
+++ /dev/null
@@ -1,2 +0,0 @@
1# <type> <owner> <group> <mode> <path> <linksource>
2d pulse pulse 0755 /var/run/pulse none
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.15.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.15.bb
deleted file mode 100644
index a46782b6e4..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_0.9.15.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1require pulseaudio.inc
2
3DEPENDS += "dbus gdbm speex"
4PR = "r16"
5
6SRC_URI += "\
7 file://buildfix.patch;patch=1 \
8 file://alsaerror.patch;patch=1 \
9 file://periodfix.patch;patch=1 \
10 file://fallback.patch;patch=1 \
11 file://autoconf_version.patch;patch=1 \
12"
13
14SRC_URI[md5sum] = "4510364eeab219fd100bd1b373b1a002"
15SRC_URI[sha256sum] = "1e8ad5b7c5cf3485bd0738c296274ff2c99d26d12a25a225dc250eddea25b9f1"
16
17do_compile_prepend() {
18 cd ${S}
19 mkdir -p ${S}/libltdl
20 cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
21}