discovery: add loopback support for sinks
[profile/ivi/pulseaudio-module-murphy-ivi.git] / murphy / loopback.h
1 /*
2  * module-murphy-ivi -- PulseAudio module for providing audio routing support
3  * Copyright (c) 2012, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU Lesser General Public License,
7  * version 2.1, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston,
17  * MA 02110-1301 USA.
18  *
19  */
20 #ifndef fooloopbackfoo
21 #define fooloopbackfoo
22
23 #include <pulsecore/core.h>
24 #include <pulsecore/sink-input.h>
25
26 #include "list.h"
27
28 typedef struct pa_loopnode pa_loopnode;
29
30 typedef struct pa_loopback {
31     PA_LLIST_HEAD(pa_loopnode, loopnodes);
32 } pa_loopback;
33
34
35 struct pa_loopnode {
36     PA_LLIST_FIELDS(pa_loopnode);
37     uint32_t   module_index;
38     uint32_t   node_index;
39     uint32_t   sink_input_index;
40     uint32_t   source_output_index;
41 };
42
43 pa_loopback *pa_loopback_init(void);
44
45 void pa_loopback_done(pa_loopback *, pa_core *);
46
47 pa_loopnode *pa_loopback_create(pa_loopback *, pa_core *, uint32_t, uint32_t,
48                                 uint32_t, const char *);
49 void pa_loopback_destroy(pa_loopback *, pa_core *, pa_loopnode *);
50
51 uint32_t pa_loopback_get_sink_index(pa_core *, pa_loopnode *);
52
53 int pa_loopback_print(pa_loopnode *, char *, int);
54
55
56 #endif /* fooloopbackfoo */
57
58 /*
59  * Local Variables:
60  * c-basic-offset: 4
61  * indent-tabs-mode: nil
62  * End:
63  *
64  */