[pulseaudio-commits] 2 commits - src/daemon src/modules
Arun Raghavan
arun at kemper.freedesktop.org
Mon Aug 15 04:18:12 PDT 2011
src/daemon/default.pa.in | 7 +++++++
src/modules/module-filter-heuristics.c | 11 +++--------
2 files changed, 10 insertions(+), 8 deletions(-)
New commits:
commit cc41b1e7767922c02ba4caf505009bf2fe640f5b
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Mon Aug 15 16:37:55 2011 +0530
conf: Load module-filter-* by default
This loads module-filter-heuristics and module-filter-apply by default
so that applications can request filters via properties. Not adding this
to system.pa -- the assumption is that people running system mode would
want more fine-grained control over such options.
diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
index e5dd28c..95af191 100755
--- a/src/daemon/default.pa.in
+++ b/src/daemon/default.pa.in
@@ -151,6 +151,13 @@ load-module module-position-event-sounds
### Cork music streams when a phone stream is active
load-module module-cork-music-on-phone
+
+### Modules to allow autoloading of filters (such as echo cancellation)
+### on demand. module-filter-heuristics tries to determine what filters
+### make sense, and module-filter-apply does the heavy-lifting of
+### loading modules and rerouting streams.
+load-module module-filter-heuristics
+load-module module-filter-apply
])dnl
ifelse(@HAVE_X11@, 1, [dnl
commit 2c852061ee966fa270d3d2c3f002beb0b5f51c8d
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Mon Aug 15 16:08:40 2011 +0530
filter-heuristics: Don't force AEC on all phone streams
Removing the bit that automatically loads module-echo-cancel for phone
streams. Clients need to specifically opt in for this now with
filter.want, until we are reasonably certain this won't break other apps
(Skype for one, possibly others).
diff --git a/src/modules/module-filter-heuristics.c b/src/modules/module-filter-heuristics.c
index 222787f..5bb0945 100644
--- a/src/modules/module-filter-heuristics.c
+++ b/src/modules/module-filter-heuristics.c
@@ -77,7 +77,7 @@ static pa_bool_t role_match(pa_proplist *proplist, const char *role) {
}
static pa_hook_result_t process(struct userdata *u, pa_object *o, pa_bool_t is_sink_input) {
- const char *want, *stream_role;
+ const char *want;
pa_proplist *pl, *parent_pl;
if (is_sink_input) {
@@ -92,13 +92,6 @@ static pa_hook_result_t process(struct userdata *u, pa_object *o, pa_bool_t is_s
if (!pa_proplist_gets(pl, PA_PROP_FILTER_HEURISTICS) && pa_proplist_gets(pl, PA_PROP_FILTER_APPLY))
return PA_HOOK_OK;
- want = pa_proplist_gets(pl, PA_PROP_FILTER_WANT);
- if (!want) {
- /* This is a phone stream, maybe we want echo cancellation */
- if ((stream_role = pa_proplist_gets(pl, PA_PROP_MEDIA_ROLE)) && pa_streq(stream_role, "phone"))
- want = "echo-cancel";
- }
-
/* On phone sinks, make sure we're not applying echo cancellation */
if (role_match(parent_pl, "phone")) {
const char *apply = pa_proplist_gets(pl, PA_PROP_FILTER_APPLY);
@@ -111,6 +104,8 @@ static pa_hook_result_t process(struct userdata *u, pa_object *o, pa_bool_t is_s
return PA_HOOK_OK;
}
+ want = pa_proplist_gets(pl, PA_PROP_FILTER_WANT);
+
if (want) {
/* There's a filter that we want, ask module-filter-apply to apply it, and remember that we're managing filter.apply */
pa_proplist_sets(pl, PA_PROP_FILTER_APPLY, want);
More information about the pulseaudio-commits
mailing list