1/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef AUDIO_ROUTE_H
18#define AUDIO_ROUTE_H
19
20#if defined(__cplusplus)
21extern "C" {
22#endif
23
24/* Initialize and free the audio routes */
25struct audio_route *audio_route_init(unsigned int card, const char *xml_path);
26void audio_route_free(struct audio_route *ar);
27
28/* Apply an audio route path by name */
29int audio_route_apply_path(struct audio_route *ar, const char *name);
30
31/* Apply and update mixer with audio route path by name */
32int audio_route_apply_and_update_path(struct audio_route *ar, const char *name);
33
34/* Reset an audio route path by name */
35int audio_route_reset_path(struct audio_route *ar, const char *name);
36
37/* Reset and update mixer with audio route path by name */
38int audio_route_reset_and_update_path(struct audio_route *ar, const char *name);
39
40/* Reset the audio routes back to the initial state */
41void audio_route_reset(struct audio_route *ar);
42
43/* Update the mixer with any changed values */
44int audio_route_update_mixer(struct audio_route *ar);
45
46#if defined(__cplusplus)
47}  /* extern "C" */
48#endif
49
50#endif
51