[pulseaudio-commits] 3 commits - LICENSE src/modules src/pulsecore
Arun Raghavan
arun at kemper.freedesktop.org
Wed Aug 7 23:26:49 PDT 2013
LICENSE | 7 +++++++
src/modules/alsa/alsa-ucm.c | 4 ++--
src/pulsecore/sink-input.c | 12 ++++++++++--
src/pulsecore/sink-input.h | 2 +-
4 files changed, 20 insertions(+), 5 deletions(-)
New commits:
commit f8f0d4c26bd71214ef2be4027d39480f9eaaae9e
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Sat Aug 3 11:39:17 2013 +0530
sink-input: Don't assert when removing non-existent volume factor
This makes it easier for users of this API to add/updated a volume
factor by doing a _remove_volume_factor() followed by an
add_volume_factor(), rather than having to either remember whether this
is the first set operation or have an API to query whether a factor has
already been set.
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index c6d540e..a275715 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1330,7 +1330,9 @@ void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa
pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_SOFT_VOLUME, NULL, 0, NULL) == 0);
}
-void pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) {
+/* Returns 0 if an entry was removed and -1 if no entry for the given key was
+ * found. */
+int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) {
struct volume_factor_entry *v;
pa_sink_input_assert_ref(i);
@@ -1338,7 +1340,11 @@ void pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) {
pa_assert_ctl_context();
pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
- pa_assert_se(v = pa_hashmap_remove(i->volume_factor_items, key));
+ v = pa_hashmap_remove(i->volume_factor_items, key);
+
+ if (!v)
+ return -1;
+
volume_factor_entry_free(v);
switch (pa_hashmap_size(i->volume_factor_items)) {
@@ -1357,6 +1363,8 @@ void pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) {
/* Copy the new soft_volume to the thread_info struct */
pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_SOFT_VOLUME, NULL, 0, NULL) == 0);
+
+ return 0;
}
/* Called from main context */
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index 4cf8614..da33717 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -371,7 +371,7 @@ bool pa_sink_input_is_passthrough(pa_sink_input *i);
bool pa_sink_input_is_volume_readable(pa_sink_input *i);
void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool save, bool absolute);
void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor);
-void pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key);
+int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key);
pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute);
void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save);
commit bc7aaff377d062ef3ebc113313e8391190785fb4
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Wed Aug 7 18:30:44 2013 +0530
alsa: Trivial whitespace deletion
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
index 0fa2695..7f6b9f1 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
@@ -135,7 +135,7 @@ static int ucm_get_property(pa_alsa_ucm_verb *verb, snd_use_case_mgr_t *uc_mgr,
id = pa_sprintf_malloc("=%s//%s", item[i].id, verb_name);
err = snd_use_case_get(uc_mgr, id, &value);
pa_xfree(id);
- if (err < 0 )
+ if (err < 0)
continue;
pa_log_debug("Got %s for verb %s: %s", item[i].id, verb_name, value);
@@ -338,7 +338,7 @@ static int ucm_get_modifier_property(pa_alsa_ucm_modifier *modifier, snd_use_cas
id = pa_sprintf_malloc("=%s/%s", item[i].id, modifier_name);
err = snd_use_case_get(uc_mgr, id, &value);
pa_xfree(id);
- if (err < 0 )
+ if (err < 0)
continue;
pa_log_debug("Got %s for modifier %s: %s", item[i].id, modifier_name, value);
commit e870da40c3d6847eaccd2899ddaf7b20fc7dc199
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Tue Jun 25 09:20:03 2013 +0530
doc: Update LICENSE to reflect optional libpulse dep on libdbus
diff --git a/LICENSE b/LICENSE
index cd5e42f..30833e5 100644
--- a/LICENSE
+++ b/LICENSE
@@ -13,6 +13,13 @@ Since the PulseAudio daemon, tests, various utilities/helpers and the modules
link to libpulsecore and/or the afore mentioned optional GPL dependencies they
are of course also GPL licensed also in this scenario.
+In addition to this, if D-Bus support is enabled, the PulseAudio client library
+(libpulse) MAY need to be licensed under the GPL, depending on the license
+adopted for libdbus. libdbus is licensed under either of the Academic Free
+License 2.1 or GPL 2.0 or above. Which of these applies is your choice, and the
+result affects the licensing of libpulse and thus, potentially, all programs
+that link to libpulse.
+
Andre Adrian's echo cancellation implementation is licensed under a less
restrictive license - see src/modules/echo-cancel/adrian-license.txt for
details.
More information about the pulseaudio-commits
mailing list