diff --git a/0001-Fix-the-problem-that-the-description-field-of-pa_als.patch b/0001-Fix-the-problem-that-the-description-field-of-pa_als.patch deleted file mode 100644 index e5e93bcc4716ea905546740426b38263e4a5a7a3..0000000000000000000000000000000000000000 --- a/0001-Fix-the-problem-that-the-description-field-of-pa_als.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 306282bee2b993ebdf83ffb6c731655bb841441d Mon Sep 17 00:00:00 2001 -From: tangjie02 -Date: Tue, 26 Jul 2022 19:52:44 +0800 -Subject: [PATCH] Fix the problem that the description field of pa_alsa_path - struct isn't translated - -Signed-off-by: tangjie02 ---- - src/modules/alsa/alsa-mixer.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c -index 7b755ce..49c3968 100644 ---- a/src/modules/alsa/alsa-mixer.c -+++ b/src/modules/alsa/alsa-mixer.c -@@ -2838,7 +2838,7 @@ static int path_verify(pa_alsa_path *p) { - if (p->device_port_type == PA_DEVICE_PORT_TYPE_UNKNOWN) - p->device_port_type = map->type; - if (!p->description) -- p->description = pa_xstrdup(map->description); -+ p->description = pa_xstrdup(_(map->description)); - } - - if (!p->description) { --- -2.33.0 - diff --git a/0001-alsa-mixer-allow-to-re-attach-the-mixer-control-elem.patch b/0001-alsa-mixer-allow-to-re-attach-the-mixer-control-elem.patch deleted file mode 100644 index bacdc6bc3022c1aaab86564148b4e325aa5a1999..0000000000000000000000000000000000000000 --- a/0001-alsa-mixer-allow-to-re-attach-the-mixer-control-elem.patch +++ /dev/null @@ -1,49 +0,0 @@ -From def8eb074eb4a80836c39fa320c33fe89bce38d9 Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Mon, 27 Jun 2022 10:32:07 +0200 -Subject: [PATCH] alsa-mixer: allow to re-attach the mixer control element - -It may be possible that the ALSA control element appears -again. Allow this combination by checking, if the pulseaudio -mixer element already exists. Do not create the duplicate -mixer element in this case. - -Signed-off-by: Jaroslav Kysela -Part-of: ---- - src/modules/alsa/alsa-util.c | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c -index f4e838d37..81dc77cc3 100644 ---- a/src/modules/alsa/alsa-util.c -+++ b/src/modules/alsa/alsa-util.c -@@ -1663,12 +1663,20 @@ static int mixer_class_event(snd_mixer_class_t *class, unsigned int mask, - } else if (mask & SND_CTL_EVENT_MASK_ADD) { - snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem); - if (iface == SND_CTL_ELEM_IFACE_CARD || iface == SND_CTL_ELEM_IFACE_PCM) { -+ snd_mixer_t *mixer = snd_mixer_class_get_mixer(class); -+ snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem); -+ const char *name = snd_hctl_elem_get_name(helem); -+ const int index = snd_hctl_elem_get_index(helem); -+ const int device = snd_hctl_elem_get_device(helem); - snd_mixer_elem_t *new_melem; -- -- /* Put the hctl pointer as our private data - it will be useful for callbacks */ -- if ((err = snd_mixer_elem_new(&new_melem, SND_MIXER_ELEM_PULSEAUDIO, 0, helem, NULL)) < 0) { -- pa_log_warn("snd_mixer_elem_new failed: %s", pa_alsa_strerror(err)); -- return 0; -+ -+ new_melem = pa_alsa_mixer_find(mixer, iface, name, index, device); -+ if (!new_melem) { -+ /* Put the hctl pointer as our private data - it will be useful for callbacks */ -+ if ((err = snd_mixer_elem_new(&new_melem, SND_MIXER_ELEM_PULSEAUDIO, 0, helem, NULL)) < 0) { -+ pa_log_warn("snd_mixer_elem_new failed: %s", pa_alsa_strerror(err)); -+ return 0; -+ } - } - - if ((err = snd_mixer_elem_attach(new_melem, helem)) < 0) { --- -2.33.0 - diff --git a/0001-alsa-mixer-avoid-assertion-at-alsa-lib-mixer-API-whe.patch b/0001-alsa-mixer-avoid-assertion-at-alsa-lib-mixer-API-whe.patch deleted file mode 100644 index 29a8de2155f425192a6793068f162c4ea4d149f7..0000000000000000000000000000000000000000 --- a/0001-alsa-mixer-avoid-assertion-at-alsa-lib-mixer-API-whe.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 4bdf4c99662f3da0e58d6c04bafff95d84362922 Mon Sep 17 00:00:00 2001 -From: Takashi Sakamoto -Date: Mon, 27 Jun 2022 10:09:52 +0900 -Subject: [PATCH] alsa-mixer: avoid assertion at alsa-lib mixer API when - element removal - -PulseAudio v5.99 or later hits assertion at alsa-lib mixer API due to -wrong handling of removal event for mixer element. - -pulseaudio: mixer.c:149: hctl_elem_event_handler: Assertion `bag_empty(bag)' failed. - -The removal event is defined as '~0U', thus it's not distinguished from -the other type of event just by bitwise operator. - -At the removal event, class implementator for mixer API should detach -mixer element from hcontrol element in callback handler since alsa-lib -has assertion to check the list of mixer elements for a hcontrol element -is empty or not after calling all of handlers. In detail, please refer to -MR to alsa-lib: - - * https://github.com/alsa-project/alsa-lib/pull/244 - -This commit fixes the above two issues. The issue can be regenerated by -`samples/ctl` Python 3 script of alsa-gobject. - - * https://github.com/alsa-project/alsa-gobject/ - -It adds some user-defined elements into sound card 0. When terminated by -SIGINT signal, it removes the elements. Then PulseAudio dies due to the -assertion. - -Fixes: 1fd8848e64cf ("alsa-util: Add functions for accessing mixer elements through mixer class") -Part-of: ---- - src/modules/alsa/alsa-util.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c -index 7dc373fa0..f4e838d37 100644 ---- a/src/modules/alsa/alsa-util.c -+++ b/src/modules/alsa/alsa-util.c -@@ -1654,7 +1654,13 @@ static int mixer_class_event(snd_mixer_class_t *class, unsigned int mask, - { - int err; - const char *name = snd_hctl_elem_get_name(helem); -- if (mask & SND_CTL_EVENT_MASK_ADD) { -+ /* NOTE: The remove event is defined as '~0U`. */ -+ if (mask == SND_CTL_EVENT_MASK_REMOVE) { -+ /* NOTE: Unless we remove the pointer to melem from the linked-list at -+ * private_data of helem, an assertion will be hit in alsa-lib since -+ * the list is not empty. */ -+ snd_mixer_elem_detach(melem, helem); -+ } else if (mask & SND_CTL_EVENT_MASK_ADD) { - snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem); - if (iface == SND_CTL_ELEM_IFACE_CARD || iface == SND_CTL_ELEM_IFACE_PCM) { - snd_mixer_elem_t *new_melem; --- -2.33.0 - diff --git a/0001-alsa-ucm-Always-create-device-conflicting-supported-.patch b/0001-alsa-ucm-Always-create-device-conflicting-supported-.patch deleted file mode 100644 index 9eef227933529638d374403397ad65ce229b4725..0000000000000000000000000000000000000000 --- a/0001-alsa-ucm-Always-create-device-conflicting-supported-.patch +++ /dev/null @@ -1,138 +0,0 @@ -From d8c89de24dbe261cadb76f9715e25215af3a6faa Mon Sep 17 00:00:00 2001 -From: Alper Nebi Yasak -Date: Thu, 24 Jun 2021 08:32:19 +0300 -Subject: [PATCH] alsa-ucm: Always create device conflicting/supported device - idxsets - -This is intended to make the current and upcoming code a bit clearer, as -we won't need to constantly check for the existence of these idxsets -before using or operating on them. - -Signed-off-by: Alper Nebi Yasak -Part-of: -Signed-off-by: buque ---- - src/modules/alsa/alsa-ucm.c | 64 ++++++++++++++++--------------------- - 1 file changed, 27 insertions(+), 37 deletions(-) - -diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c -index 08e36b571..3e23bc416 100644 ---- a/src/modules/alsa/alsa-ucm.c -+++ b/src/modules/alsa/alsa-ucm.c -@@ -523,10 +523,10 @@ static int ucm_get_device_property( - n_confdev = snd_use_case_get_list(uc_mgr, id, &devices); - pa_xfree(id); - -+ device->conflicting_devices = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); - if (n_confdev <= 0) - pa_log_debug("No %s for device %s", "_conflictingdevs", device_name); - else { -- device->conflicting_devices = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); - ucm_add_devices_to_idxset(device->conflicting_devices, device, verb->devices, devices, n_confdev); - snd_use_case_free_list(devices, n_confdev); - } -@@ -535,10 +535,10 @@ static int ucm_get_device_property( - n_suppdev = snd_use_case_get_list(uc_mgr, id, &devices); - pa_xfree(id); - -+ device->supported_devices = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); - if (n_suppdev <= 0) - pa_log_debug("No %s for device %s", "_supporteddevs", device_name); - else { -- device->supported_devices = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); - ucm_add_devices_to_idxset(device->supported_devices, device, verb->devices, devices, n_suppdev); - snd_use_case_free_list(devices, n_suppdev); - } -@@ -730,29 +730,17 @@ static void append_lost_relationship(pa_alsa_ucm_device *dev) { - uint32_t idx; - pa_alsa_ucm_device *d; - -- if (dev->conflicting_devices) { -- PA_IDXSET_FOREACH(d, dev->conflicting_devices, idx) { -- if (!d->conflicting_devices) -- d->conflicting_devices = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); -+ PA_IDXSET_FOREACH(d, dev->conflicting_devices, idx) -+ if (pa_idxset_put(d->conflicting_devices, dev, NULL) == 0) -+ pa_log_warn("Add lost conflicting device %s to %s", -+ pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME), -+ pa_proplist_gets(d->proplist, PA_ALSA_PROP_UCM_NAME)); - -- if (pa_idxset_put(d->conflicting_devices, dev, NULL) == 0) -- pa_log_warn("Add lost conflicting device %s to %s", -- pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME), -- pa_proplist_gets(d->proplist, PA_ALSA_PROP_UCM_NAME)); -- } -- } -- -- if (dev->supported_devices) { -- PA_IDXSET_FOREACH(d, dev->supported_devices, idx) { -- if (!d->supported_devices) -- d->supported_devices = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); -- -- if (pa_idxset_put(d->supported_devices, dev, NULL) == 0) -- pa_log_warn("Add lost supported device %s to %s", -- pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME), -- pa_proplist_gets(d->proplist, PA_ALSA_PROP_UCM_NAME)); -- } -- } -+ PA_IDXSET_FOREACH(d, dev->supported_devices, idx) -+ if (pa_idxset_put(d->supported_devices, dev, NULL) == 0) -+ pa_log_warn("Add lost supported device %s to %s", -+ pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME), -+ pa_proplist_gets(d->proplist, PA_ALSA_PROP_UCM_NAME)); - } - - int pa_alsa_ucm_query_profiles(pa_alsa_ucm_config *ucm, int card_index) { -@@ -1199,23 +1187,27 @@ static int ucm_check_conformance( - return 1; - } - -- if (dev->conflicting_devices) { /* the device defines conflicting devices */ -- PA_IDXSET_FOREACH(d, dev->conflicting_devices, idx) { -- for (i = 0; i < dev_num; i++) { -- if (pdevices[i] == d) { -- pa_log_debug("Conflicting device found"); -- return 0; -- } -+ PA_IDXSET_FOREACH(d, dev->conflicting_devices, idx) { -+ /* No conflicting device must already be selected */ -+ for (i = 0; i < dev_num; i++) { -+ if (pdevices[i] == d) { -+ pa_log_debug("Conflicting device found"); -+ return 0; - } - } -- } else if (dev->supported_devices) { /* the device defines supported devices */ -+ } -+ -+ if (!pa_idxset_isempty(dev->supported_devices)) { -+ /* No already selected device must be unsupported */ - for (i = 0; i < dev_num; i++) { - if (!ucm_device_exists(dev->supported_devices, pdevices[i])) { - pa_log_debug("Supported device not found"); - return 0; - } - } -- } else { /* not support any other devices */ -+ } -+ -+ if (pa_idxset_isempty(dev->conflicting_devices) && pa_idxset_isempty(dev->supported_devices)) { - pa_log_debug("Not support any other devices"); - return 0; - } -@@ -2113,10 +2105,8 @@ static void free_verb(pa_alsa_ucm_verb *verb) { - - pa_proplist_free(di->proplist); - -- if (di->conflicting_devices) -- pa_idxset_free(di->conflicting_devices, NULL); -- if (di->supported_devices) -- pa_idxset_free(di->supported_devices, NULL); -+ pa_idxset_free(di->conflicting_devices, NULL); -+ pa_idxset_free(di->supported_devices, NULL); - - pa_xfree(di->eld_mixer_device_name); - --- -2.33.0 - diff --git a/0001-idxset-Add-set-contains-function.patch b/0001-idxset-Add-set-contains-function.patch deleted file mode 100644 index 5a8ab425a4d0b883054810285cfecd907955ca96..0000000000000000000000000000000000000000 --- a/0001-idxset-Add-set-contains-function.patch +++ /dev/null @@ -1,58 +0,0 @@ -From fb63e589310fab20e60c46bb40c7b7acab5eeac9 Mon Sep 17 00:00:00 2001 -From: Alper Nebi Yasak -Date: Sat, 26 Jun 2021 12:05:17 +0300 -Subject: [PATCH] idxset: Add set contains() function - -This is functionally equivalent to get_by_data(s, p, NULL) == p, but -with a more obvious name and form because some existing code is instead -manually iterating through idxsets to check for existence of an item. - -Signed-off-by: Alper Nebi Yasak -Part-of: ---- - src/pulsecore/idxset.c | 14 ++++++++++++++ - src/pulsecore/idxset.h | 3 +++ - 2 files changed, 17 insertions(+) - -diff --git a/src/pulsecore/idxset.c b/src/pulsecore/idxset.c -index 5175ca217..91ac6a015 100644 ---- a/src/pulsecore/idxset.c -+++ b/src/pulsecore/idxset.c -@@ -258,6 +258,20 @@ void* pa_idxset_get_by_data(pa_idxset*s, const void *p, uint32_t *idx) { - return e->data; - } - -+bool pa_idxset_contains(pa_idxset *s, const void *p) { -+ unsigned hash; -+ struct idxset_entry *e; -+ -+ pa_assert(s); -+ -+ hash = s->hash_func(p) % NBUCKETS; -+ -+ if (!(e = data_scan(s, hash, p))) -+ return false; -+ -+ return e->data == p; -+} -+ - void* pa_idxset_remove_by_index(pa_idxset*s, uint32_t idx) { - struct idxset_entry *e; - unsigned hash; -diff --git a/src/pulsecore/idxset.h b/src/pulsecore/idxset.h -index 7acb202ff..6797852b7 100644 ---- a/src/pulsecore/idxset.h -+++ b/src/pulsecore/idxset.h -@@ -66,6 +66,9 @@ void* pa_idxset_get_by_index(pa_idxset*s, uint32_t idx); - /* Get the entry by its data. The index is returned in *idx */ - void* pa_idxset_get_by_data(pa_idxset*s, const void *p, uint32_t *idx); - -+/* Return true if item is in idxset */ -+bool pa_idxset_contains(pa_idxset *s, const void *p); -+ - /* Similar to pa_idxset_get_by_index(), but removes the entry from the idxset. */ - void* pa_idxset_remove_by_index(pa_idxset*s, uint32_t idx); - --- -2.33.0 - diff --git a/0002-idxset-Add-set-comparison-operations.patch b/0002-idxset-Add-set-comparison-operations.patch deleted file mode 100644 index c82220c0d38bcb8c10253dd8792f06d2b4ab0039..0000000000000000000000000000000000000000 --- a/0002-idxset-Add-set-comparison-operations.patch +++ /dev/null @@ -1,86 +0,0 @@ -From ec668ac44bc6e666123f22f2696745dcdce98fed Mon Sep 17 00:00:00 2001 -From: Alper Nebi Yasak -Date: Wed, 23 Jun 2021 17:50:50 +0300 -Subject: [PATCH] idxset: Add set comparison operations - -Add isdisjoint(), issubset(), issuperset() and equals() functions that -element-wise compare two idxsets. - -Signed-off-by: Alper Nebi Yasak -Part-of: ---- - src/pulsecore/idxset.c | 34 ++++++++++++++++++++++++++++++++++ - src/pulsecore/idxset.h | 12 ++++++++++++ - 2 files changed, 46 insertions(+) - -diff --git a/src/pulsecore/idxset.c b/src/pulsecore/idxset.c -index 91ac6a015..b5dd9b3e1 100644 ---- a/src/pulsecore/idxset.c -+++ b/src/pulsecore/idxset.c -@@ -470,6 +470,40 @@ bool pa_idxset_isempty(pa_idxset *s) { - return s->n_entries == 0; - } - -+bool pa_idxset_isdisjoint(pa_idxset *s, pa_idxset *t) { -+ struct idxset_entry *i; -+ -+ pa_assert(s); -+ pa_assert(t); -+ -+ for (i = s->iterate_list_head; i; i = i->iterate_next) -+ if (pa_idxset_contains(t, i->data)) -+ return false; -+ -+ return true; -+} -+ -+bool pa_idxset_issubset(pa_idxset *s, pa_idxset *t) { -+ struct idxset_entry *i; -+ -+ pa_assert(s); -+ pa_assert(t); -+ -+ for (i = s->iterate_list_head; i; i = i->iterate_next) -+ if (!pa_idxset_contains(t, i->data)) -+ return false; -+ -+ return true; -+} -+ -+bool pa_idxset_issuperset(pa_idxset *s, pa_idxset *t) { -+ return pa_idxset_issubset(t, s); -+} -+ -+bool pa_idxset_equals(pa_idxset *s, pa_idxset *t) { -+ return pa_idxset_issubset(s, t) && pa_idxset_issuperset(s, t); -+} -+ - pa_idxset *pa_idxset_copy(pa_idxset *s, pa_copy_func_t copy_func) { - pa_idxset *copy; - struct idxset_entry *i; -diff --git a/src/pulsecore/idxset.h b/src/pulsecore/idxset.h -index 6797852b7..ee530bf2b 100644 ---- a/src/pulsecore/idxset.h -+++ b/src/pulsecore/idxset.h -@@ -107,6 +107,18 @@ unsigned pa_idxset_size(pa_idxset*s); - /* Return true of the idxset is empty */ - bool pa_idxset_isempty(pa_idxset *s); - -+/* Return true if s and t have no entries in common */ -+bool pa_idxset_isdisjoint(pa_idxset *s, pa_idxset *t); -+ -+/* Return true if all entries in s are also in t */ -+bool pa_idxset_issubset(pa_idxset *s, pa_idxset *t); -+ -+/* Return true if all entries in t are also in s */ -+bool pa_idxset_issuperset(pa_idxset *s, pa_idxset *t); -+ -+/* Return true if s and t have all entries in common */ -+bool pa_idxset_equals(pa_idxset *s, pa_idxset *t); -+ - /* Duplicate the idxset. This will not copy the actual indexes. If copy_func is - * set, each entry is copied using the provided function, otherwise a shallow - * copy will be made. */ --- -2.33.0 - diff --git a/0003-idxset-Add-reverse-iteration-functions.patch b/0003-idxset-Add-reverse-iteration-functions.patch deleted file mode 100644 index eafeeca49a0d50d3bb8ec7ae352a828594e20393..0000000000000000000000000000000000000000 --- a/0003-idxset-Add-reverse-iteration-functions.patch +++ /dev/null @@ -1,197 +0,0 @@ -From 97d9c28579c7c7400969fd93f911e7745fb483ef Mon Sep 17 00:00:00 2001 -From: Alper Nebi Yasak -Date: Wed, 23 Jun 2021 17:58:37 +0300 -Subject: [PATCH] idxset: Add reverse iteration functions - -Add complementary functions to the existing idxset iterate(), -steal_first(), first(), next() functions that work in the reverse -direction: reverse_iterate(), steal_last(), last() and previous(). - -Signed-off-by: Alper Nebi Yasak -Part-of: ---- - src/pulsecore/idxset.c | 110 +++++++++++++++++++++++++++++++++++++++++ - src/pulsecore/idxset.h | 19 ++++--- - 2 files changed, 123 insertions(+), 6 deletions(-) - -diff --git a/src/pulsecore/idxset.c b/src/pulsecore/idxset.c -index b5dd9b3e1..324894d01 100644 ---- a/src/pulsecore/idxset.c -+++ b/src/pulsecore/idxset.c -@@ -381,6 +381,39 @@ at_end: - return NULL; - } - -+void *pa_idxset_reverse_iterate(pa_idxset *s, void **state, uint32_t *idx) { -+ struct idxset_entry *e; -+ -+ pa_assert(s); -+ pa_assert(state); -+ -+ if (*state == (void*) -1) -+ goto at_end; -+ -+ if ((!*state && !s->iterate_list_tail)) -+ goto at_end; -+ -+ e = *state ? *state : s->iterate_list_tail; -+ -+ if (e->iterate_previous) -+ *state = e->iterate_previous; -+ else -+ *state = (void*) -1; -+ -+ if (idx) -+ *idx = e->idx; -+ -+ return e->data; -+ -+at_end: -+ *state = (void *) -1; -+ -+ if (idx) -+ *idx = PA_IDXSET_INVALID; -+ -+ return NULL; -+} -+ - void* pa_idxset_steal_first(pa_idxset *s, uint32_t *idx) { - void *data; - -@@ -399,6 +432,24 @@ void* pa_idxset_steal_first(pa_idxset *s, uint32_t *idx) { - return data; - } - -+void* pa_idxset_steal_last(pa_idxset *s, uint32_t *idx) { -+ void *data; -+ -+ pa_assert(s); -+ -+ if (!s->iterate_list_tail) -+ return NULL; -+ -+ data = s->iterate_list_tail->data; -+ -+ if (idx) -+ *idx = s->iterate_list_tail->idx; -+ -+ remove_entry(s, s->iterate_list_tail); -+ -+ return data; -+} -+ - void* pa_idxset_first(pa_idxset *s, uint32_t *idx) { - pa_assert(s); - -@@ -414,6 +465,21 @@ void* pa_idxset_first(pa_idxset *s, uint32_t *idx) { - return s->iterate_list_head->data; - } - -+void* pa_idxset_last(pa_idxset *s, uint32_t *idx) { -+ pa_assert(s); -+ -+ if (!s->iterate_list_tail) { -+ if (idx) -+ *idx = PA_IDXSET_INVALID; -+ return NULL; -+ } -+ -+ if (idx) -+ *idx = s->iterate_list_tail->idx; -+ -+ return s->iterate_list_tail->data; -+} -+ - void *pa_idxset_next(pa_idxset *s, uint32_t *idx) { - struct idxset_entry *e; - unsigned hash; -@@ -458,6 +524,50 @@ void *pa_idxset_next(pa_idxset *s, uint32_t *idx) { - } - } - -+void *pa_idxset_previous(pa_idxset *s, uint32_t *idx) { -+ struct idxset_entry *e; -+ unsigned hash; -+ -+ pa_assert(s); -+ pa_assert(idx); -+ -+ if (*idx == PA_IDXSET_INVALID) -+ return NULL; -+ -+ hash = *idx % NBUCKETS; -+ -+ if ((e = index_scan(s, hash, *idx))) { -+ -+ e = e->iterate_previous; -+ -+ if (e) { -+ *idx = e->idx; -+ return e->data; -+ } else { -+ *idx = PA_IDXSET_INVALID; -+ return NULL; -+ } -+ -+ } else { -+ -+ /* If the entry passed doesn't exist anymore we try to find -+ * the preceding one. */ -+ -+ for ((*idx)--; *idx < s->current_index; (*idx)--) { -+ -+ hash = *idx % NBUCKETS; -+ -+ if ((e = index_scan(s, hash, *idx))) { -+ *idx = e->idx; -+ return e->data; -+ } -+ } -+ -+ *idx = PA_IDXSET_INVALID; -+ return NULL; -+ } -+} -+ - unsigned pa_idxset_size(pa_idxset*s) { - pa_assert(s); - -diff --git a/src/pulsecore/idxset.h b/src/pulsecore/idxset.h -index ee530bf2b..dbc4187d9 100644 ---- a/src/pulsecore/idxset.h -+++ b/src/pulsecore/idxset.h -@@ -88,18 +88,25 @@ void* pa_idxset_rrobin(pa_idxset *s, uint32_t *idx); - - /* Iterate through the idxset. At first iteration state should be NULL */ - void *pa_idxset_iterate(pa_idxset *s, void **state, uint32_t *idx); -+void *pa_idxset_reverse_iterate(pa_idxset *s, void **state, uint32_t *idx); - --/* Return the oldest entry in the idxset and remove it. If idx is not NULL fill in its index in *idx */ -+/* Return the oldest or newest entry in the idxset and remove it. -+ * If idx is not NULL fill in its index in *idx */ - void* pa_idxset_steal_first(pa_idxset *s, uint32_t *idx); -+void* pa_idxset_steal_last(pa_idxset *s, uint32_t *idx); - --/* Return the oldest entry in the idxset. Fill in its index in *idx. */ -+/* Return the oldest or newest entry in the idxset. -+ * Fill in its index in *idx. */ - void* pa_idxset_first(pa_idxset *s, uint32_t *idx); -+void* pa_idxset_last(pa_idxset *s, uint32_t *idx); - --/* Return the entry following the entry indexed by *idx. After the -- * call *index contains the index of the returned -- * object. pa_idxset_first() and pa_idxset_next() may be used to -- * iterate through the set.*/ -+/* Return the entry following or preceding the entry indexed by *idx. -+ * After the call *index contains the index of the returned object. -+ * pa_idxset_first() and pa_idxset_next() may be used to iterate through -+ * the set. pa_idxset_last() and pa_idxset_previous() may be used to -+ * iterate through the set in reverse. */ - void *pa_idxset_next(pa_idxset *s, uint32_t *idx); -+void *pa_idxset_previous(pa_idxset *s, uint32_t *idx); - - /* Return the current number of entries in the idxset */ - unsigned pa_idxset_size(pa_idxset*s); --- -2.33.0 - diff --git a/pulseaudio-16.1.tar.xz b/pulseaudio-16.1.tar.xz deleted file mode 100644 index fa6246e0c62f3e66a717250e2a4182e80a2c0881..0000000000000000000000000000000000000000 Binary files a/pulseaudio-16.1.tar.xz and /dev/null differ diff --git a/pulseaudio-16.1.tar.xz.sha256sum b/pulseaudio-16.1.tar.xz.sha256sum deleted file mode 100644 index 2caba28a78c8481842f5728e5ee66a25abfd173c..0000000000000000000000000000000000000000 --- a/pulseaudio-16.1.tar.xz.sha256sum +++ /dev/null @@ -1 +0,0 @@ -8eef32ce91d47979f95fd9a935e738cd7eb7463430dabc72863251751e504ae4 *pulseaudio-16.1.tar.xz diff --git a/pulseaudio-16.99.1.tar.xz b/pulseaudio-16.99.1.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..8437105a8d8ae69c22d7f4a9389c1b644cb69cb5 Binary files /dev/null and b/pulseaudio-16.99.1.tar.xz differ diff --git a/pulseaudio-16.99.1.tar.xz.sha256sum b/pulseaudio-16.99.1.tar.xz.sha256sum new file mode 100644 index 0000000000000000000000000000000000000000..9a4374789ceef818516d5972614e45b9445e9cd5 --- /dev/null +++ b/pulseaudio-16.99.1.tar.xz.sha256sum @@ -0,0 +1 @@ +dbb89a4c4a5f30f03b2c8c95de864ad53f7a40d4fdee29063f966cf66cfa800a *pulseaudio-16.99.1.tar.xz diff --git a/pulseaudio-autostart.patch b/pulseaudio-autostart.patch deleted file mode 100644 index 903791ae86aff34a024b7a8a656908727622f466..0000000000000000000000000000000000000000 --- a/pulseaudio-autostart.patch +++ /dev/null @@ -1,23 +0,0 @@ - - ---- - src/daemon/start-pulseaudio-x11.in | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/daemon/start-pulseaudio-x11.in b/src/daemon/start-pulseaudio-x11.in -index 722a639..7cdf14e 100755 ---- a/src/daemon/start-pulseaudio-x11.in -+++ b/src/daemon/start-pulseaudio-x11.in -@@ -17,6 +17,9 @@ - - set -e - -+# probe to test if autospawn works, else resort to starting manually -+@PACTL_BINARY@ info > /dev/null 2>&1 || /usr/bin/pulseaudio --start "$@" -+ - if [ -n "$1" ] ; then - case $1 in - stop) --- -2.27.0 - diff --git a/pulseaudio.spec b/pulseaudio.spec index 87ff959051b479dec2d7780c3c67dee504881465..e5c6e9774965ae70216c69a29aea1f0953c662f5 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -1,3 +1,6 @@ +%global pa_major 16.99 +%global pa_minor 1 + %undefine _strict_symbol_defs_build %global multilib_archs x86_64 %{ix86} @@ -5,22 +8,14 @@ Name: pulseaudio Summary: Improved Linux Sound Server -Version: 16.1 -Release: 9 +Version: %{pa_major}%{?pa_minor:.%{pa_minor}} +Release: 1 License: LGPLv2+ URL: https://www.freedesktop.org/wiki/Software/PulseAudio Source0: https://freedesktop.org/software/pulseaudio/releases/pulseaudio-%{version}.tar.xz Source1: https://freedesktop.org/software/pulseaudio/releases/pulseaudio-%{version}.tar.xz.sha256sum Source5: default.pa-for-gdm -Patch201: pulseaudio-autostart.patch -Patch1001: 0001-Fix-the-problem-that-the-description-field-of-pa_als.patch -Patch1002: 0001-alsa-mixer-avoid-assertion-at-alsa-lib-mixer-API-whe.patch -Patch1003: 0001-alsa-mixer-allow-to-re-attach-the-mixer-control-elem.patch -Patch1004: 0001-idxset-Add-set-contains-function.patch -Patch1005: 0002-idxset-Add-set-comparison-operations.patch -Patch1006: 0003-idxset-Add-reverse-iteration-functions.patch -Patch1007: 0001-alsa-ucm-Always-create-device-conflicting-supported-.patch BuildRequires: meson BuildRequires: automake libtool gcc-c++ bash-completion @@ -173,7 +168,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/pulse/daemon.conf %config(noreplace) %{_sysconfdir}/pulse/*.pa %config(noreplace) %{_sysconfdir}/pulse/client.conf -%{_sysconfdir}/dbus-1/system.d/pulseaudio-system.conf +%{_datadir}/dbus-1/system.d/pulseaudio-system.conf %{_sysconfdir}/xdg/autostart/pulseaudio.desktop %{bash_completionsdir}/* %{_bindir}/pulseaudio @@ -193,7 +188,7 @@ exit 0 %exclude %{_libdir}/libpulse-simple.so.0* %exclude %{_libdir}/libpulse-mainloop-glib.so.0* %{_libdir}/pulseaudio/*.so -%exclude %{_libdir}/pulseaudio/libpulsecommon-%{version}.so +%exclude %{_libdir}/pulseaudio/libpulsecommon-%{pa_major}.so %{_libdir}/pulseaudio/modules/*.so %exclude %{_libdir}/pulseaudio/modules/module-equalizer-sink.so %exclude %{_libdir}/pulseaudio/modules/module-detect.so @@ -230,7 +225,7 @@ exit 0 %{_libdir}/libpulse.so.0* %{_libdir}/libpulse-simple.so.0* %dir %{_libdir}/pulseaudio/ -%{_libdir}/pulseaudio/libpulsecommon-%{version}.so +%{_libdir}/pulseaudio/libpulsecommon-%{pa_major}.so %files libs-glib2 %{_libdir}/libpulse-mainloop-glib.so.0* @@ -248,7 +243,10 @@ exit 0 %{_mandir}/man*/* %changelog -* Thu April 27 2023 wuxu - 16.1-9 +* Wed Nov 01 2023 liweigang - 16.99.1-1 +- update to version 16.99.1 + +* Thu Apr 27 2023 wuxu - 16.1-9 - alsa-ucm: Always create device conflicting/supported device idxsets * Tue Mar 14 2023 peijiankang - 16.1-8