2 * module-murphy-ivi -- PulseAudio module for providing audio routing support
3 * Copyright (c) 2012, Intel Corporation.
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.
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.
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,
23 #include <sys/types.h>
27 #include "multiplex.h"
31 #define AM_ID_INVALID 65535
35 mir_direction_unknown,
41 mir_implementation_unknown = 0,
47 mir_location_unknown = 0,
53 mir_node_type_unknown = 0,
55 /* application classes */
56 mir_application_class_begin,
57 mir_radio = mir_application_class_begin,
64 mir_application_class_end,
67 mir_device_class_begin = 128,
68 mir_null = mir_device_class_begin,
85 mir_user_defined_start = 256
89 mir_privacy_unknown = 0,
101 * @brief routing endpoint
103 * @details node is a routing endpoint in the GenIVI audio model.
104 * In pulseaudio terminology a routing endpoint is one of
106 * @li node is a pulseaudio sink or source. Such node is a
107 * combination of pulseudio card/profile + sink/port
108 * @li node is a pulseaudio stream. Such node in pulseaudio
109 * is either a sink_input or a source_output
112 uint32_t index; /**< index into nodeset->idxset */
113 char *key; /**< hash key for discover lookups */
114 mir_direction direction; /**< mir_input | mir_output */
115 mir_implement implement; /**< mir_device | mir_stream */
116 uint32_t channels; /**< number of channels (eg. 1=mono, 2=stereo) */
117 mir_location location; /**< mir_internal | mir_external */
118 mir_privacy privacy; /**< mir_public | mir_private */
119 mir_node_type type; /**< mir_speakers | mir_headset | ... */
120 pa_bool_t visible; /**< internal or can appear on UI */
121 pa_bool_t available; /**< eg. is the headset connected? */
122 pa_bool_t ignore; /**< do not consider it while routing */
123 char *amname; /**< audiomanager name */
124 char *amdescr; /**< UI description */
125 uint16_t amid; /**< handle to audiomanager, if any */
126 char *paname; /**< sink|source|sink_input|source_output name */
127 uint32_t paidx; /**< sink|source|sink_input|source_output index*/
128 pa_node_card pacard; /**< pulse card related data, if any */
129 char *paport; /**< sink or source port if applies */
130 pa_muxnode *mux; /**< for multiplexable input streams only */
131 pa_loopnode *loop; /**< for looped back sources only */
132 mir_dlist rtentries; /**< for devices: listhead of nodchain,
133 for streams: priority link (head is in
136 mir_dlist constrains;/**< listhead of constrains */
137 mir_vlim vlim; /**< volume limit */
142 pa_nodeset *pa_nodeset_init(struct userdata *);
143 void pa_nodeset_done(struct userdata *);
146 mir_node *mir_node_create(struct userdata *, mir_node *);
147 void mir_node_destroy(struct userdata *, mir_node *);
149 mir_node *mir_node_find_by_index(struct userdata *, uint32_t);
151 int mir_node_print(mir_node *, char *, int);
153 const char *mir_direction_str(mir_direction);
154 const char *mir_implement_str(mir_implement);
155 const char *mir_location_str(mir_location);
156 const char *mir_node_type_str(mir_node_type);
157 const char *mir_node_type_str(mir_node_type);
158 const char *mir_privacy_str(mir_privacy);
166 * indent-tabs-mode: nil