all: update pa_module_unload() call to PA 8.0 api
[staging/agl-audio-plugin.git] / discover.h
1 /*
2  * module-agl-audio -- PulseAudio module for providing audio routing support
3  * (forked from "module-murphy-ivi" - https://github.com/otcshare )
4  * Copyright (c) 2012, Intel Corporation.
5  * Copyright (c) 2016, IoT.bzh
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms and conditions of the GNU Lesser General Public License,
9  * version 2.1, as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston,
19  * MA 02110-1301 USA.
20  *
21  */
22 #ifndef paagldiscover
23 #define paagldiscover
24
25 #include "userdata.h"
26
27 struct agl_discover {
28     /* criteria for filtering sinks and sources */
29         unsigned chmin;    /**< minimum of max channels */
30         unsigned chmax;    /**< maximum of max channels */
31         bool selected;     /**< for alsa cards: whether to consider the
32                                      selected profile alone.
33                                      for bluetooth cards: no effect */
34         struct {
35                 pa_hashmap *byname;
36                 pa_hashmap *byptr;
37         } nodes;
38 };
39
40 struct agl_discover *agl_discover_init (struct userdata *);
41 void agl_discover_done (struct userdata *);
42
43 void agl_discover_add_card (struct userdata *, pa_card *);
44 void agl_discover_remove_card (struct userdata *, pa_card *);
45 void agl_discover_add_sink (struct userdata *, pa_sink *, bool);
46 void agl_discover_remove_sink (struct userdata *, pa_sink *);
47 void agl_discover_add_source (struct userdata *, pa_source *);
48 void agl_discover_remove_source (struct userdata *, pa_source *);
49 void agl_discover_add_sink_input (struct userdata *, pa_sink_input *);
50 void agl_discover_remove_sink_input (struct userdata *, pa_sink_input *);
51 bool agl_discover_preroute_sink_input (struct userdata *, pa_sink_input_new_data *);
52 void agl_discover_register_sink_input (struct userdata *, pa_sink_input *);
53 void agl_discover_register_source_output (struct userdata *, pa_source_output *);
54
55 agl_node *agl_discover_find_node_by_key (struct userdata *, const char *);
56 void agl_discover_add_node_to_ptr_hash (struct userdata *, void *, agl_node *);
57
58 #endif