From d573512d075154f1aa30553f0cac99d3d98c180e Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 6 Nov 2012 13:10:04 +0100 Subject: [PATCH] pulseaudio: update to pulseaudio-2.1 Signed-off-by: Stephan Raue --- packages/audio/pulseaudio/meta | 3 +- ...-fixed-latency-range-in-alsa-modules.patch | 218 ------------------ ...tency-range-handling-for-udev-detect.patch | 78 ------- ...cy_range-modarg-for-module-alsa-card.patch | 32 --- .../patches/pulseaudio-2.0-new-udev.patch | 75 ------ 5 files changed, 1 insertion(+), 405 deletions(-) delete mode 100644 packages/audio/pulseaudio/patches/pulseaudio-1.1-0001-alsa-support-fixed-latency-range-in-alsa-modules.patch delete mode 100644 packages/audio/pulseaudio/patches/pulseaudio-1.1-0002-alsa-fixed-latency-range-handling-for-udev-detect.patch delete mode 100644 packages/audio/pulseaudio/patches/pulseaudio-1.1-0003-alsa-fixed_latency_range-modarg-for-module-alsa-card.patch delete mode 100644 packages/audio/pulseaudio/patches/pulseaudio-2.0-new-udev.patch diff --git a/packages/audio/pulseaudio/meta b/packages/audio/pulseaudio/meta index 8f3db6e8ae..2d6efe578a 100644 --- a/packages/audio/pulseaudio/meta +++ b/packages/audio/pulseaudio/meta @@ -19,8 +19,7 @@ ################################################################################ PKG_NAME="pulseaudio" -#PKG_VERSION="1.1" -PKG_VERSION="2.0" +PKG_VERSION="2.1" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0001-alsa-support-fixed-latency-range-in-alsa-modules.patch b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0001-alsa-support-fixed-latency-range-in-alsa-modules.patch deleted file mode 100644 index 2c71ab052e..0000000000 --- a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0001-alsa-support-fixed-latency-range-in-alsa-modules.patch +++ /dev/null @@ -1,218 +0,0 @@ -From 7a387fed36ed5bc0b925269fb76b5e8e3a738a5f Mon Sep 17 00:00:00 2001 -From: "Lars R. Damerow" -Date: Thu, 3 Nov 2011 21:14:45 +0100 -Subject: [PATCH 1/3] alsa: support fixed latency range in alsa modules - -This adds a boolean module parameter to disable automatic dynamic -latency readjustments on underruns, but leaves automatic dynamic -watermark readjustments untouched. ---- - src/modules/alsa/alsa-sink.c | 23 +++++++++++++++++++---- - src/modules/alsa/alsa-source.c | 22 ++++++++++++++++++---- - src/modules/alsa/module-alsa-sink.c | 4 +++- - src/modules/alsa/module-alsa-source.c | 4 +++- - src/pulsecore/protocol-native.c | 4 ++++ - 5 files changed, 47 insertions(+), 10 deletions(-) - -diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c -index 7b31b1b..1386196 100644 ---- a/src/modules/alsa/alsa-sink.c -+++ b/src/modules/alsa/alsa-sink.c -@@ -134,7 +134,7 @@ struct userdata { - char *device_name; /* name of the PCM device */ - char *control_device; /* name of the control device */ - -- pa_bool_t use_mmap:1, use_tsched:1, deferred_volume:1; -+ pa_bool_t use_mmap:1, use_tsched:1, deferred_volume:1, fixed_latency_range:1; - - pa_bool_t first, after_rewind; - -@@ -331,7 +331,12 @@ static void increase_watermark(struct userdata *u) { - return; - } - -- /* Hmm, we cannot increase the watermark any further, hence let's raise the latency */ -+ /* Hmm, we cannot increase the watermark any further, hence let's -+ raise the latency, unless doing so was disabled in -+ configuration */ -+ if (u->fixed_latency_range) -+ return; -+ - old_min_latency = u->sink->thread_info.min_latency; - new_min_latency = PA_MIN(old_min_latency * 2, old_min_latency + TSCHED_WATERMARK_INC_STEP_USEC); - new_min_latency = PA_MIN(new_min_latency, u->sink->thread_info.max_latency); -@@ -1969,7 +1974,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca - uint32_t nfrags, frag_size, buffer_size, tsched_size, tsched_watermark, rewind_safeguard; - snd_pcm_uframes_t period_frames, buffer_frames, tsched_frames; - size_t frame_size; -- pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE, namereg_fail = FALSE, deferred_volume = FALSE, set_formats = FALSE; -+ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE, namereg_fail = FALSE, deferred_volume = FALSE, set_formats = FALSE, fixed_latency_range = FALSE; - pa_sink_new_data data; - pa_alsa_profile_set *profile_set = NULL; - -@@ -2039,6 +2044,11 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca - goto fail; - } - -+ if (pa_modargs_get_value_boolean(ma, "fixed_latency_range", &fixed_latency_range) < 0) { -+ pa_log("Failed to parse fixed_latency_range argument."); -+ goto fail; -+ } -+ - use_tsched = pa_alsa_may_tsched(use_tsched); - - u = pa_xnew0(struct userdata, 1); -@@ -2047,6 +2057,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca - u->use_mmap = use_mmap; - u->use_tsched = use_tsched; - u->deferred_volume = deferred_volume; -+ u->fixed_latency_range = fixed_latency_range; - u->first = TRUE; - u->rewind_safeguard = rewind_safeguard; - u->rtpoll = pa_rtpoll_new(); -@@ -2143,9 +2154,13 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca - if (u->use_mmap) - pa_log_info("Successfully enabled mmap() mode."); - -- if (u->use_tsched) -+ if (u->use_tsched) { - pa_log_info("Successfully enabled timer-based scheduling mode."); - -+ if (u->fixed_latency_range) -+ pa_log_info("Disabling latency range changes on underrun"); -+ } -+ - if (is_iec958(u) || is_hdmi(u)) - set_formats = TRUE; - -diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c -index 7a51572..255a61d 100644 ---- a/src/modules/alsa/alsa-source.c -+++ b/src/modules/alsa/alsa-source.c -@@ -121,7 +121,7 @@ struct userdata { - char *device_name; /* name of the PCM device */ - char *control_device; /* name of the control device */ - -- pa_bool_t use_mmap:1, use_tsched:1, deferred_volume:1; -+ pa_bool_t use_mmap:1, use_tsched:1, deferred_volume:1, fixed_latency_range:1; - - pa_bool_t first; - -@@ -306,7 +306,12 @@ static void increase_watermark(struct userdata *u) { - return; - } - -- /* Hmm, we cannot increase the watermark any further, hence let's raise the latency */ -+ /* Hmm, we cannot increase the watermark any further, hence let's -+ raise the latency unless doing so was disabled in -+ configuration */ -+ if (u->fixed_latency_range) -+ return; -+ - old_min_latency = u->source->thread_info.min_latency; - new_min_latency = PA_MIN(old_min_latency * 2, old_min_latency + TSCHED_WATERMARK_INC_STEP_USEC); - new_min_latency = PA_MIN(new_min_latency, u->source->thread_info.max_latency); -@@ -1710,7 +1715,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p - uint32_t nfrags, frag_size, buffer_size, tsched_size, tsched_watermark; - snd_pcm_uframes_t period_frames, buffer_frames, tsched_frames; - size_t frame_size; -- pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE, namereg_fail = FALSE, deferred_volume = FALSE; -+ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE, namereg_fail = FALSE, deferred_volume = FALSE, fixed_latency_range = FALSE; - pa_source_new_data data; - pa_alsa_profile_set *profile_set = NULL; - -@@ -1774,6 +1779,11 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p - goto fail; - } - -+ if (pa_modargs_get_value_boolean(ma, "fixed_latency_range", &fixed_latency_range) < 0) { -+ pa_log("Failed to parse fixed_latency_range argument."); -+ goto fail; -+ } -+ - use_tsched = pa_alsa_may_tsched(use_tsched); - - u = pa_xnew0(struct userdata, 1); -@@ -1782,6 +1792,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p - u->use_mmap = use_mmap; - u->use_tsched = use_tsched; - u->deferred_volume = deferred_volume; -+ u->fixed_latency_range = fixed_latency_range; - u->first = TRUE; - u->rtpoll = pa_rtpoll_new(); - pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll); -@@ -1877,8 +1888,11 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p - if (u->use_mmap) - pa_log_info("Successfully enabled mmap() mode."); - -- if (u->use_tsched) -+ if (u->use_tsched) { - pa_log_info("Successfully enabled timer-based scheduling mode."); -+ if (u->fixed_latency_range) -+ pa_log_info("Disabling latency range changes on overrun"); -+ } - - /* ALSA might tweak the sample spec, so recalculate the frame size */ - frame_size = pa_frame_size(&ss); -diff --git a/src/modules/alsa/module-alsa-sink.c b/src/modules/alsa/module-alsa-sink.c -index 019ccf0..927f075 100644 ---- a/src/modules/alsa/module-alsa-sink.c -+++ b/src/modules/alsa/module-alsa-sink.c -@@ -59,7 +59,8 @@ PA_MODULE_USAGE( - "rewind_safeguard= " - "deferred_volume= " - "deferred_volume_safety_margin= " -- "deferred_volume_extra_delay="); -+ "deferred_volume_extra_delay= " -+ "fixed_latency_range="); - - static const char* const valid_modargs[] = { - "name", -@@ -85,6 +86,7 @@ static const char* const valid_modargs[] = { - "deferred_volume", - "deferred_volume_safety_margin", - "deferred_volume_extra_delay", -+ "fixed_latency_range", - NULL - }; - -diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c -index 2d2c8b6..efb2d0c 100644 ---- a/src/modules/alsa/module-alsa-source.c -+++ b/src/modules/alsa/module-alsa-source.c -@@ -67,7 +67,8 @@ PA_MODULE_USAGE( - "control=" - "deferred_volume= " - "deferred_volume_safety_margin= " -- "deferred_volume_extra_delay="); -+ "deferred_volume_extra_delay= " -+ "fixed_latency_range="); - - static const char* const valid_modargs[] = { - "name", -@@ -92,6 +93,7 @@ static const char* const valid_modargs[] = { - "deferred_volume", - "deferred_volume_safety_margin", - "deferred_volume_extra_delay", -+ "fixed_latency_range", - NULL - }; - -diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c -index 0ee4ead..d6bff11 100644 ---- a/src/pulsecore/protocol-native.c -+++ b/src/pulsecore/protocol-native.c -@@ -1008,6 +1008,10 @@ static void fix_playback_buffer_attr(playback_stream *s) { - tlength_usec -= s->configured_sink_latency; - } - -+ pa_log_debug("Requested latency=%0.2f ms, Received latency=%0.2f ms", -+ (double) sink_usec / PA_USEC_PER_MSEC, -+ (double) s->configured_sink_latency / PA_USEC_PER_MSEC); -+ - /* FIXME: This is actually larger than necessary, since not all of - * the sink latency is actually rewritable. */ - if (tlength_usec < s->configured_sink_latency + 2*minreq_usec) --- -1.7.6.4 - diff --git a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0002-alsa-fixed-latency-range-handling-for-udev-detect.patch b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0002-alsa-fixed-latency-range-handling-for-udev-detect.patch deleted file mode 100644 index e75cecf650..0000000000 --- a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0002-alsa-fixed-latency-range-handling-for-udev-detect.patch +++ /dev/null @@ -1,78 +0,0 @@ -From c07c4b353dffe17607fee89e294181bb4e2da40d Mon Sep 17 00:00:00 2001 -From: "Lars R. Damerow" -Date: Thu, 3 Nov 2011 21:29:03 +0100 -Subject: [PATCH 2/3] alsa: fixed latency range handling for udev-detect - ---- - src/modules/module-udev-detect.c | 13 ++++++++++++- - 1 files changed, 12 insertions(+), 1 deletions(-) - -diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c -index c5312a8..1192194 100644 ---- a/src/modules/module-udev-detect.c -+++ b/src/modules/module-udev-detect.c -@@ -45,6 +45,7 @@ PA_MODULE_VERSION(PACKAGE_VERSION); - PA_MODULE_LOAD_ONCE(TRUE); - PA_MODULE_USAGE( - "tsched= " -+ "fixed_latency_range= " - "ignore_dB= " - "deferred_volume="); - -@@ -62,6 +63,7 @@ struct userdata { - pa_hashmap *devices; - - pa_bool_t use_tsched:1; -+ pa_bool_t fixed_latency_range:1; - pa_bool_t ignore_dB:1; - pa_bool_t deferred_volume:1; - -@@ -75,6 +77,7 @@ struct userdata { - - static const char* const valid_modargs[] = { - "tsched", -+ "fixed_latency_range", - "ignore_dB", - "deferred_volume", - NULL -@@ -388,6 +391,7 @@ static void card_changed(struct userdata *u, struct udev_device *dev) { - "card_name=\"%s\" " - "namereg_fail=false " - "tsched=%s " -+ "fixed_latency_range=%s " - "ignore_dB=%s " - "deferred_volume=%s " - "card_properties=\"module-udev-detect.discovered=1\"", -@@ -395,6 +399,7 @@ static void card_changed(struct userdata *u, struct udev_device *dev) { - n, - d->card_name, - pa_yes_no(u->use_tsched), -+ pa_yes_no(u->fixed_latency_range), - pa_yes_no(u->ignore_dB), - pa_yes_no(u->deferred_volume)); - pa_xfree(n); -@@ -665,7 +670,7 @@ int pa__init(pa_module *m) { - struct udev_enumerate *enumerate = NULL; - struct udev_list_entry *item = NULL, *first = NULL; - int fd; -- pa_bool_t use_tsched = TRUE, ignore_dB = FALSE, deferred_volume = m->core->deferred_volume; -+ pa_bool_t use_tsched = TRUE, fixed_latency_range = FALSE, ignore_dB = FALSE, deferred_volume = m->core->deferred_volume; - - - pa_assert(m); -@@ -686,6 +691,12 @@ int pa__init(pa_module *m) { - } - u->use_tsched = use_tsched; - -+ if (pa_modargs_get_value_boolean(ma, "fixed_latency_range", &fixed_latency_range) < 0) { -+ pa_log("Failed to parse fixed_latency_range= argument."); -+ goto fail; -+ } -+ u->fixed_latency_range = fixed_latency_range; -+ - if (pa_modargs_get_value_boolean(ma, "ignore_dB", &ignore_dB) < 0) { - pa_log("Failed to parse ignore_dB= argument."); - goto fail; --- -1.7.6.4 - diff --git a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0003-alsa-fixed_latency_range-modarg-for-module-alsa-card.patch b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0003-alsa-fixed_latency_range-modarg-for-module-alsa-card.patch deleted file mode 100644 index d9665c2af6..0000000000 --- a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0003-alsa-fixed_latency_range-modarg-for-module-alsa-card.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1e6eda8eda615ec1275a1f208e5f3c9b41238f10 Mon Sep 17 00:00:00 2001 -From: "Lars R. Damerow" -Date: Thu, 3 Nov 2011 21:31:48 +0100 -Subject: [PATCH 3/3] alsa: fixed_latency_range modarg for module-alsa-card - ---- - src/modules/alsa/module-alsa-card.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c -index 5bf6480..344563f 100644 ---- a/src/modules/alsa/module-alsa-card.c -+++ b/src/modules/alsa/module-alsa-card.c -@@ -64,6 +64,7 @@ PA_MODULE_USAGE( - "tsched_buffer_size= " - "tsched_buffer_watermark= " - "profile= " -+ "fixed_latency_range= " - "ignore_dB= " - "deferred_volume= " - "profile_set= "); -@@ -88,6 +89,7 @@ static const char* const valid_modargs[] = { - "tsched", - "tsched_buffer_size", - "tsched_buffer_watermark", -+ "fixed_latency_range", - "profile", - "ignore_dB", - "deferred_volume", --- -1.7.6.4 - diff --git a/packages/audio/pulseaudio/patches/pulseaudio-2.0-new-udev.patch b/packages/audio/pulseaudio/patches/pulseaudio-2.0-new-udev.patch deleted file mode 100644 index f263fa807f..0000000000 --- a/packages/audio/pulseaudio/patches/pulseaudio-2.0-new-udev.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 54718450dfd1e7fc9b5946f62765f7451a854385 Mon Sep 17 00:00:00 2001 -From: Marc-Antoine Perennou -Date: Thu, 17 May 2012 20:50:22 +0000 -Subject: udev: Don't use deprecated udev_get_*_path() functions - -[These symbols were removed in libudev.so.1.0.0. Replace them with -hardcoded strings. -- heftig] - -Signed-off-by: Marc-Antoine Perennou ---- -diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c -index 1192194..31416bd 100644 ---- a/src/modules/module-udev-detect.c -+++ b/src/modules/module-udev-detect.c -@@ -123,7 +123,7 @@ static char *card_get_sysattr(const char *card_idx, const char *name) { - goto finish; - } - -- t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx); -+ t = pa_sprintf_malloc("/sys/class/sound/card%s", card_idx); - card = udev_device_new_from_syspath(udev, t); - pa_xfree(t); - -@@ -282,7 +282,7 @@ static void verify_access(struct userdata *u, struct device *d) { - pa_assert(u); - pa_assert(d); - -- cd = pa_sprintf_malloc("%s/snd/controlC%s", udev_get_dev_path(u->udev), path_get_card_id(d->path)); -+ cd = pa_sprintf_malloc("/dev/snd/controlC%s", path_get_card_id(d->path)); - accessible = access(cd, R_OK|W_OK) >= 0; - pa_log_debug("%s is accessible: %s", cd, pa_yes_no(accessible)); - -@@ -621,7 +621,6 @@ fail: - } - - static int setup_inotify(struct userdata *u) { -- char *dev_snd; - int r; - - if (u->inotify_fd >= 0) -@@ -632,9 +631,7 @@ static int setup_inotify(struct userdata *u) { - return -1; - } - -- dev_snd = pa_sprintf_malloc("%s/snd", udev_get_dev_path(u->udev)); -- r = inotify_add_watch(u->inotify_fd, dev_snd, IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF); -- pa_xfree(dev_snd); -+ r = inotify_add_watch(u->inotify_fd, "/dev/snd", IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF); - - if (r < 0) { - int saved_errno = errno; -diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c -index 2f18bc4..b0bb17d 100644 ---- a/src/modules/udev-util.c -+++ b/src/modules/udev-util.c -@@ -180,7 +180,7 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) { - goto finish; - } - -- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx); -+ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx); - card = udev_device_new_from_syspath(udev, t); - pa_xfree(t); - -@@ -277,7 +277,7 @@ char* pa_udev_get_property(int card_idx, const char *name) { - goto finish; - } - -- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx); -+ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx); - card = udev_device_new_from_syspath(udev, t); - pa_xfree(t); - --- -cgit v0.9.0.2-2-gbebe