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
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.
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.
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,
46 pa_hashmap *nodes; /**< nodes ie. sinks and sources */
47 pa_hashmap *conns; /**< connections */
48 routes_t defrts; /**< default routes */
51 struct pa_audiomgr *pa_audiomgr_init (struct userdata *u)
57 am = pa_xnew0 (pa_audiomgr, 1);
58 am->domain.id = AM_ID_INVALID;
59 am->domain.state = DS_DOWN;
60 am->nodes = pa_hashmap_new (pa_idxset_trivial_hash_func,
61 pa_idxset_trivial_compare_func);
62 am->conns = pa_hashmap_new (pa_idxset_trivial_hash_func,
63 pa_idxset_trivial_compare_func);
67 void pa_audiomgr_done (struct userdata *u)
71 if (u && (am = u->audiomgr)) {
72 //if (u->routerif && am->domain.id != AM_ID_INVALID)
73 // pa_routerif_unregister_domain (u, am->domain.id);
75 pa_hashmap_free (am->nodes);
76 pa_hashmap_free (am->conns);
77 pa_xfree ((void *)am->domain.name);