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,
24 const char *agl_config_file_get_path (const char *dir, const char *file, char *buf, size_t len)
30 snprintf (buf, len, "%s/%s", dir, file);
35 bool agl_config_parse_file (struct userdata *u, const char *path)
44 pa_log_info ("parsing configuration file '%s'", path);
45 success = agl_config_dofile (u, path);
49 pa_log_info ("applying builtin default configuration");
50 //success = use_default_configuration (u);
56 bool agl_config_dofile (struct userdata *u, const char *path)
63 /* DEFAULT CONFIGURATION PART */
65 static zone_def zones[] = {
75 static rtgroup_def rtgroups[] = {
78 agl_router_phone_accept,
79 agl_router_phone_compare
82 { 0, NULL, NULL, NULL }
85 static classmap_def classmap[] = {
86 { agl_phone, 0, agl_output, "phone" },
87 { agl_player, 0, agl_output, "default" },
88 { agl_radio, 0, agl_output, "default" },
89 { agl_navigator,0, agl_output, "default" },
90 { agl_event, 0, agl_output, "default" },
91 { agl_node_type_unknown, 0, agl_direction_unknown, NULL }
94 static typemap_def typemap[] = {
95 { "phone", agl_phone },
96 { "music", agl_player },
97 { "radio", agl_radio },
98 { "navi", agl_navigator },
99 { "event", agl_event },
100 { NULL, agl_node_type_unknown }
103 static prior_def priormap[] = {
106 { agl_navigator, 2 },
109 { agl_node_type_unknown, 0}
112 bool use_default_configuration (struct userdata *u)