2 This file is part of PulseAudio.
4 Copyright (c) 2021 Samsung Electronics Co., Ltd. All rights reserved.
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.
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.
16 You should have received a copy of the GNU Lesser General Public License
17 along with PulseAudio; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 #include <pulsecore/log.h>
28 #include "tizenaudio-source2.h"
30 PA_MODULE_AUTHOR("Tizen");
31 PA_MODULE_DESCRIPTION("Tizen Audio Source2");
32 PA_MODULE_VERSION(PACKAGE_VERSION);
33 PA_MODULE_LOAD_ONCE(false);
35 "source_name=<name of source> "
36 "source_properties=<properties for the source> "
37 "device=<device to use, card comma device (e.g. 0,0)> "
38 "format=<sample format> "
40 "channels=<number of channels> "
41 "channel_map=<channel map>"
42 "fragments=<number of fragments> "
43 "fragment_size=<fragment size> ");
45 static const char* const valid_modargs[] = {
58 int pa__init(pa_module *m) {
59 pa_modargs *ma = NULL;
63 if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
64 pa_log("Failed to parse module arguments");
68 if (!(m->userdata = pa_tizenaudio_source2_new(m, ma, __FILE__)))
84 int pa__get_n_used(pa_module *m) {
88 pa_assert_se((s = m->userdata));
90 return pa_source_linked_by(s);
93 void pa__done(pa_module *m) {
98 if ((s = m->userdata))
99 pa_tizenaudio_source2_free(s);