* Add echo-cancellation flags to source-output structure.
* Add resampler2, memblock, processor to source-output structure.
* Add post_process function to source_output domain
[Version] 15.0-5
[Issue Type] New feature
Change-Id: I310d9ddf26ddc340d447df571ac497c5a61cf116
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
cdata.set('TIZEN_TV_PROD_LWIPC', 1)
endif
+if get_option('aec')
+ cdata.set('TIZEN_AEC', 1)
+endif
+
enable_security = false
cynara_client_dep = dependency('cynara-client', required : get_option('security'))
cynara_creds_socket_dep = dependency('cynara-creds-socket', required : get_option('security'))
option('hal-sysconfdir',
type : 'string',
description : 'Directory for HAL sysconf files')
+option('aec',
+ type : 'boolean', value : true,
+ description : 'aec')
+
option('daemon',
type : 'boolean', value : true,
description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
Name: pulseaudio
Summary: Improved Linux sound server
Version: 15.0
-Release: 4
+Release: 5
Group: Multimedia/Audio
License: LGPL-2.1
URL: http://pulseaudio.org
-Dgsettings=disabled \
-Dhal-compat=false \
-Dipv6=false \
- %if "%{tizen_profile_name}" == "tv"
+%if "%{tizen_profile_name}" == "tv"
-Dprelink=true \
-Dlwipc=true \
-Dbluez5=false \
bool volume_is_norm;
size_t length;
size_t limit, mbs = 0;
+#ifdef TIZEN_AEC
+ pa_memchunk ochunk = { .memblock = NULL };
+#endif
pa_source_output_assert_ref(o);
pa_source_output_assert_io_context(o);
pa_volume_memchunk(&qchunk, &o->source->sample_spec, &o->volume_factor_source);
}
- if (!o->thread_info.resampler)
+ if (!o->thread_info.resampler) {
+#ifdef TIZEN_AEC
+ if (o->post_process && !o->post_process(o, &qchunk, &ochunk))
+ o->push(o, &ochunk);
+ else
+ o->push(o, &qchunk);
+#else
o->push(o, &qchunk);
- else {
+#endif
+ } else {
pa_memchunk rchunk;
if (mbs == 0)
pa_resampler_run(o->thread_info.resampler, &qchunk, &rchunk);
- if (rchunk.length > 0)
+ if (rchunk.length > 0) {
+#ifdef TIZEN_AEC
+ if (o->post_process && !o->post_process(o, &rchunk, &ochunk))
+ o->push(o, &ochunk);
+ else
+ o->push(o, &rchunk);
+#else
o->push(o, &rchunk);
+#endif
+ }
if (rchunk.memblock)
pa_memblock_unref(rchunk.memblock);
pa_memblock_unref(qchunk.memblock);
pa_memblockq_drop(o->thread_info.delay_memblockq, qchunk.length);
}
+#ifdef TIZEN_AEC
+ if (ochunk.memblock)
+ pa_memblock_unref(ochunk.memblock);
+#endif
+
#ifdef TIZEN_PCM_DUMP
pa_source_output_write_pcm_dump(o, (pa_memchunk *)chunk);
#endif
PA_SOURCE_OUTPUT_DONT_INHIBIT_AUTO_SUSPEND = 256,
PA_SOURCE_OUTPUT_NO_CREATE_ON_SUSPEND = 512,
PA_SOURCE_OUTPUT_KILL_ON_SUSPEND = 1024,
- PA_SOURCE_OUTPUT_PASSTHROUGH = 2048
+ PA_SOURCE_OUTPUT_PASSTHROUGH = 2048,
+#ifdef __TIZEN__
+ PA_SOURCE_OUTPUT_NOISE_SUPPRESSION = 4096,
+ PA_SOURCE_OUTPUT_ECHO_CANCEL = 8192
+#endif
} pa_source_output_flags_t;
struct pa_source_output {
* mute status changes. Called from main context */
void (*mute_changed)(pa_source_output *o); /* may be NULL */
+#ifdef __TIZEN__
+ int (*post_process)(pa_source_output *o, pa_memchunk *chunk, pa_memchunk *ochunk);
+#endif
+
struct {
pa_source_output_state_t state;
pa_usec_t requested_source_latency;
pa_sink_input *direct_on_input; /* may be NULL */
+
+#ifdef __TIZEN__
+ pa_memblockq *echo;
+ pa_resampler *resampler2;
+ void *processor;
+#endif
} thread_info;
#ifdef __TIZEN__
pa_usec_t time_of_start_to_run;