calssification: more heuristics to guess bluetooth device classes
[profile/ivi/pulseaudio-module-murphy-ivi.git] / murphy / multiplex.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 foomultiplexfoo
21 #define foomultiplexfoo
22
23 #include <pulsecore/core.h>
24 #include <pulsecore/sink-input.h>
25
26 #include "list.h"
27
28 typedef struct pa_muxnode pa_muxnode;
29
30 typedef struct pa_multiplex {
31     PA_LLIST_HEAD(pa_muxnode, muxnodes);
32 } pa_multiplex;
33
34
35 struct pa_muxnode {
36     PA_LLIST_FIELDS(pa_muxnode);
37     uint32_t   module_index;
38     uint32_t   sink_index;
39     uint32_t   defstream_index;
40 };
41
42 pa_multiplex *pa_multiplex_init(void);
43
44 void pa_multiplex_done(pa_multiplex *, pa_core *);
45
46 pa_muxnode *pa_multiplex_create(pa_multiplex *, pa_core *, uint32_t,
47                                 pa_channel_map *, const char *, const char *,
48                                 int);
49 void pa_multiplex_destroy(pa_multiplex *, pa_core *, pa_muxnode *);
50
51 pa_muxnode *pa_multiplex_find(pa_multiplex *, uint32_t);
52
53 pa_bool_t pa_multiplex_add_default_route(pa_core *, pa_muxnode *,pa_sink *,int);
54 pa_bool_t pa_multiplex_remove_default_route(pa_core *,pa_muxnode *,pa_bool_t);
55 pa_bool_t pa_multiplex_change_default_route(pa_core *,pa_muxnode *,pa_sink *);
56
57 pa_bool_t pa_multiplex_add_explicit_route(pa_core*, pa_muxnode*, pa_sink*,int);
58 pa_bool_t pa_multiplex_remove_explicit_route(pa_core *, pa_muxnode *, pa_sink *);
59
60 pa_bool_t pa_multiplex_duplicate_route(pa_core *, pa_muxnode *,
61                                        pa_sink_input *, pa_sink *);
62
63 int pa_multiplex_no_of_routes(pa_core *, pa_muxnode *);
64
65 int pa_multiplex_print(pa_muxnode *, char *, int);
66
67
68 #endif /* foomultiplexfoo */
69
70 /*
71  * Local Variables:
72  * c-basic-offset: 4
73  * indent-tabs-mode: nil
74  * End:
75  *
76  */