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) 21 extern "C" { 22 #endif 23 24 /* Initialize and free the audio routes */ 25 struct audio_route *audio_route_init(unsigned int card, const char *xml_path); 26 void audio_route_free(struct audio_route *ar); 27 28 /* Apply an audio route path by name */ 29 int audio_route_apply_path(struct audio_route *ar, const char *name); 30 31 /* Apply and update mixer with audio route path by name */ 32 int audio_route_apply_and_update_path(struct audio_route *ar, const char *name); 33 34 /* Reset an audio route path by name */ 35 int audio_route_reset_path(struct audio_route *ar, const char *name); 36 37 /* Reset and update mixer with audio route path by name */ 38 int audio_route_reset_and_update_path(struct audio_route *ar, const char *name); 39 40 /* Reset and update mixer with audio route path by name forcely */ 41 int audio_route_force_reset_and_update_path(struct audio_route *ar, const char *name); 42 43 /* Reset the audio routes back to the initial state */ 44 void audio_route_reset(struct audio_route *ar); 45 46 /* Update the mixer with any changed values */ 47 int audio_route_update_mixer(struct audio_route *ar); 48 49 #if defined(__cplusplus) 50 } /* extern "C" */ 51 #endif 52 53 #endif 54