From 233ef98bf19ab311c1cb19867b1e8bcb4c36f66d Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 2 May 2011 10:08:27 +0530 Subject: filter-apply: Mark modules as being autoloaded (Based on Colin's review) We mark modules as being autoloaded so that they can handle this as a special case if needed (which is required by module-echo-cancel for now). This inverts how things were done and makes using these modules manually less error-prone. --- src/modules/echo-cancel/module-echo-cancel.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/modules/echo-cancel') diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c index 746028bb..37879629 100644 --- a/src/modules/echo-cancel/module-echo-cancel.c +++ b/src/modules/echo-cancel/module-echo-cancel.c @@ -78,7 +78,7 @@ PA_MODULE_USAGE( "aec_method= " "aec_args= " "save_aec= " - "manual_load= " + "autoloaded= " )); /* NOTE: Make sure the enum and ec_table are maintained in the correct order */ @@ -107,7 +107,7 @@ static const pa_echo_canceller ec_table[] = { #define DEFAULT_ADJUST_TIME_USEC (1*PA_USEC_PER_SEC) #define DEFAULT_SAVE_AEC 0 -#define DEFAULT_MANUAL_LOAD FALSE +#define DEFAULT_AUTOLOADED FALSE #define MEMBLOCKQ_MAXLENGTH (16*1024*1024) @@ -158,7 +158,7 @@ struct userdata { pa_core *core; pa_module *module; - pa_bool_t manual_load; + pa_bool_t autoloaded; uint32_t save_aec; pa_echo_canceller *ec; @@ -213,7 +213,7 @@ static const char* const valid_modargs[] = { "aec_method", "aec_args", "save_aec", - "manual_load", + "autoloaded", NULL }; @@ -1398,9 +1398,9 @@ int pa__init(pa_module*m) { goto fail; } - u->manual_load = DEFAULT_MANUAL_LOAD; - if (pa_modargs_get_value_boolean(ma, "manual_load", &u->manual_load) < 0) { - pa_log("Failed to parse manual_load value"); + u->autoloaded = DEFAULT_AUTOLOADED; + if (pa_modargs_get_value_boolean(ma, "autoloaded", &u->autoloaded) < 0) { + pa_log("Failed to parse autoloaded value"); goto fail; } @@ -1423,7 +1423,7 @@ int pa__init(pa_module*m) { pa_source_new_data_set_channel_map(&source_data, &source_map); pa_proplist_sets(source_data.proplist, PA_PROP_DEVICE_MASTER_DEVICE, source_master->name); pa_proplist_sets(source_data.proplist, PA_PROP_DEVICE_CLASS, "filter"); - if (u->manual_load) + if (!u->autoloaded) pa_proplist_sets(source_data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone"); pa_proplist_sets(source_data.proplist, "device.echo-cancel.name", source_data.name); @@ -1471,7 +1471,7 @@ int pa__init(pa_module*m) { pa_sink_new_data_set_channel_map(&sink_data, &sink_map); pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_MASTER_DEVICE, sink_master->name); pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_CLASS, "filter"); - if (u->manual_load) + if (!u->autoloaded) pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone"); pa_proplist_sets(sink_data.proplist, "device.echo-cancel.name", sink_data.name); -- cgit From 0ac2cfce6d1a3d7ab5af6aca659e46625c32d3c4 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 28 Feb 2011 13:23:23 +0530 Subject: core: Add extended stream API to support compressed formats This is the beginning of work to support compressed formats natively in PulseAudio. This adds a pa_stream_new_extended() that takes a format structure, sends it to the server (=> protocol extension) and has the server negotiate with the appropropriate sink to figure out what format it should use. This is work in progress, and works only with PCM streams. Actual compressed format support in some sink needs to be implemented, and extensive testing is required. More details on how this is supposed to work is available at: http://pulseaudio.org/wiki/PassthroughSupport --- src/modules/echo-cancel/module-echo-cancel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/echo-cancel') diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c index 37879629..a06e481d 100644 --- a/src/modules/echo-cancel/module-echo-cancel.c +++ b/src/modules/echo-cancel/module-echo-cancel.c @@ -1549,7 +1549,7 @@ int pa__init(pa_module*m) { pa_sink_input_new_data_init(&sink_input_data); sink_input_data.driver = __FILE__; sink_input_data.module = m; - sink_input_data.sink = sink_master; + pa_sink_input_new_data_set_sink(&sink_input_data, sink_master, FALSE); sink_input_data.origin_sink = u->sink; pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_NAME, "Echo-Cancel Sink Stream"); pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, "filter"); -- cgit