Add default-monitor-time-sec
[platform/upstream/pulseaudio.git] / src / modules / module-role-cork.c
1 /***
2   This file is part of PulseAudio.
3
4   Copyright 2009 Lennart Poettering
5
6   PulseAudio is free software; you can redistribute it and/or modify
7   it under the terms of the GNU Lesser General Public License as published
8   by the Free Software Foundation; either version 2.1 of the License,
9   or (at your option) any later version.
10
11   PulseAudio is distributed in the hope that it will be useful, but
12   WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14   General Public License for more details.
15
16   You should have received a copy of the GNU Lesser General Public License
17   along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
18 ***/
19
20 #ifdef HAVE_CONFIG_H
21 #include <config.h>
22 #endif
23
24 #include <pulsecore/macro.h>
25 #include <pulsecore/core.h>
26 #include "stream-interaction.h"
27
28 PA_MODULE_AUTHOR("Lennart Poettering");
29 PA_MODULE_DESCRIPTION("Mute & cork streams with certain roles while others exist");
30 PA_MODULE_VERSION(PACKAGE_VERSION);
31 PA_MODULE_LOAD_ONCE(true);
32 PA_MODULE_USAGE(
33         "trigger_roles=<Comma separated list of roles which will trigger a cork> "
34         "cork_roles=<Comma separated list of roles which will be corked> "
35         "global=<Should we operate globally or only inside the same device?>"
36         "use_source_trigger=<Do we trigger a cork by a role of source-output as well as sink-input's? Default: false>"
37 #ifdef __TIZEN__
38         "skip_sinks=<Comma separated list of sink names which will skip corking>"
39 #endif
40         );
41
42 static const char* const valid_modargs[] = {
43     "trigger_roles",
44     "cork_roles",
45     "global",
46     "use_source_trigger",
47 #ifdef __TIZEN__
48     "skip_sinks",
49 #endif
50     NULL
51 };
52
53 int pa__init(pa_module *m) {
54
55     pa_assert(m);
56
57     return pa_stream_interaction_init(m, valid_modargs);
58 }
59
60 void pa__done(pa_module *m) {
61
62     pa_assert(m);
63
64     pa_stream_interaction_done(m);
65 }