"aec_method=<implementation to use> "
"aec_args=<parameters for the AEC engine> "
"save_aec=<save AEC data in /tmp> "
+ "manual_load=<set if this module is being loaded manually> "
));
/* NOTE: Make sure the enum and ec_table are maintained in the correct order */
#define DEFAULT_ADJUST_TIME_USEC (1*PA_USEC_PER_SEC)
#define DEFAULT_SAVE_AEC 0
+#define DEFAULT_MANUAL_LOAD FALSE
#define MEMBLOCKQ_MAXLENGTH (16*1024*1024)
pa_core *core;
pa_module *module;
+ pa_bool_t manual_load;
uint32_t save_aec;
pa_echo_canceller *ec;
"aec_method",
"aec_args",
"save_aec",
+ "manual_load",
NULL
};
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");
+ goto fail;
+ }
+
u->asyncmsgq = pa_asyncmsgq_new(0);
u->need_realign = TRUE;
if (u->ec->init) {
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");
- pa_proplist_sets(source_data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
+ if (u->manual_load)
+ 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);
if (pa_modargs_get_proplist(ma, "source_properties", source_data.proplist, PA_UPDATE_REPLACE) < 0) {
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");
- pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
+ if (u->manual_load)
+ 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);
if (pa_modargs_get_proplist(ma, "sink_properties", sink_data.proplist, PA_UPDATE_REPLACE) < 0) {