Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions are |
| 6 | * met: |
| 7 | * * Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * * Redistributions in binary form must reproduce the above |
| 10 | * copyright notice, this list of conditions and the following |
| 11 | * disclaimer in the documentation and/or other materials provided |
| 12 | * with the distribution. |
| 13 | * * Neither the name of Code Aurora Forum, Inc. nor the names of its |
| 14 | * contributors may be used to endorse or promote products derived |
| 15 | * from this software without specific prior written permission. |
| 16 | * |
| 17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | */ |
| 29 | #ifndef _MSM8960_USE_CASES_H_ |
| 30 | #define _MSM8960_USE_CASES_H_ |
| 31 | |
| 32 | #ifdef __cplusplus |
| 33 | extern "C" { |
| 34 | #endif |
| 35 | |
| 36 | #include "alsa_ucm.h" |
| 37 | #include "alsa_audio.h" |
| 38 | #include <pthread.h> |
| 39 | #define SND_UCM_END_OF_LIST "end" |
| 40 | |
| 41 | /* ACDB Device ID macros */ |
| 42 | #define CAP_RX 0x1 |
| 43 | #define CAP_TX 0x2 |
| 44 | #define CAP_VOICE 0x4 |
| 45 | #define DEVICE_HANDSET_RX_ACDB_ID 7 // HANDSET_SPKR |
| 46 | #define DEVICE_HANDSET_TX_ACDB_ID 4 // HANDSET_MIC |
ehgrace.kim | 91e9fad | 2012-07-02 18:27:28 -0700 | [diff] [blame] | 47 | #define DEVICE_SPEAKER_MONO_RX_ACDB_ID 14// SPKR_PHONE_SPKR_MONO |
| 48 | #define DEVICE_SPEAKER_STEREO_RX_ACDB_ID 15// SPKR_PHONE_SPKR_STEREO |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 49 | #define DEVICE_SPEAKER_TX_ACDB_ID 11// SPKR_PHONE_MIC |
| 50 | #define DEVICE_HEADSET_RX_ACDB_ID 10// HEADSET_SPKR_STEREO |
| 51 | #define DEVICE_HEADSET_TX_ACDB_ID 8 // HEADSET_MIC |
| 52 | #define DEVICE_DUALMIC_HANDSET_TX_BROADSIDE_ACDB_ID 5 // HANDSET_MIC_BROADSIDE |
| 53 | #define DEVICE_DUALMIC_HANDSET_TX_ENDFIRE_ACDB_ID 6 // HANDSET_MIC_ENDFIRE |
| 54 | #define DEVICE_DUALMIC_SPEAKER_TX_BROADSIDE_ACDB_ID 12// SPKR_PHONE_MIC_BROADSIDE |
| 55 | #define DEVICE_DUALMIC_SPEAKER_TX_ENDFIRE_ACDB_ID 13// SPKR_PHONE_MIC_ENDFIRE |
| 56 | #define DEVICE_TTY_HEADSET_MONO_RX_ACDB_ID 17// TTY_HEADSET_SPKR |
| 57 | #define DEVICE_TTY_HEADSET_MONO_TX_ACDB_ID 16// TTY_HEADSET_MIC |
| 58 | #define DEVICE_BT_SCO_RX_ACDB_ID 22// BT_SCO_SPKR |
| 59 | #define DEVICE_BT_SCO_TX_ACDB_ID 21// BT_SCO_SPKR |
| 60 | #define DEVICE_BT_SCO_RX_WB_ACDB_ID 39// BT_SCO_WB_SPKR |
| 61 | #define DEVICE_BT_SCO_TX_WB_ACDB_ID 38// BT_SCO_WB_MIC |
| 62 | #define DEVICE_SPEAKER_HEADSET_RX_ACDB_ID DEVICE_HEADSET_RX_ACDB_ID // Use headset calibration |
| 63 | #define DEVICE_HDMI_STEREO_RX_ACDB_ID 18// HDMI_SPKR |
ty.lee | 74060de | 2012-08-02 00:47:00 +0900 | [diff] [blame] | 64 | #define DEVICE_ANC_HEADSET_STEREO_RX_ACDB_ID 26// ANC RX, same as regular headset |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 65 | #define DEVICE_QUADMIC_ACDB_ID 19// QUADMIC_SKPR |
ty.lee | 74060de | 2012-08-02 00:47:00 +0900 | [diff] [blame] | 66 | #define DEVICE_PROXY_RX_ACDB_ID DEVICE_HDMI_STEREO_RX_ACDB_ID |
| 67 | #define DEVICE_TTY_VCO_HANDSET_TX_ACDB_ID 36// TTY_VCO_HANDSET_MIC |
| 68 | #define DEVICE_TTY_HCO_HANDSET_RX_ACDB_ID 37// TTY_HCO_HANDSET_SPRK |
ty.lee | e6be9bd | 2012-08-14 21:04:57 +0900 | [diff] [blame] | 69 | #define DEVICE_HANDSET_TX_FV5_ACDB_ID 50 |
| 70 | #define DEVICE_DUALMIC_HANDSET_TX_ENDFIRE_FV5_ACDB_ID 51 |
| 71 | #define DEVICE_SPEAKER_TX_FV5_ACDB_ID 52 |
| 72 | #define DEVICE_DUALMIC_SPEAKER_TX_ENDFIRE_FV5_ACDB_ID 53 |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 73 | #define DEVICE_INCALL_VOICE_RECORD_STEREO_ACDB_ID 45 |
| 74 | #define DEVICE_INCALL_MUSIC_DELIVERY_MONO_ACDB_ID 46 |
| 75 | #define DEVICE_INCALL_VOICE_RECORD_MONO_ACDB_ID 47 |
ty.lee | 74060de | 2012-08-02 00:47:00 +0900 | [diff] [blame] | 76 | #define DEVICE_CAMCORDER_TX_ACDB_ID 61// CAMCORDER_TX |
| 77 | #define DEVICE_VOICE_RECOGNITION_ACDB_ID 62// VOICE_RECOGNITION |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 78 | |
| 79 | /* mixer control type */ |
| 80 | #define TYPE_INT 0 |
| 81 | #define TYPE_STR 1 |
| 82 | #define TYPE_MULTI_VAL 2 |
| 83 | |
| 84 | /* Maximum string length of use case and device combination */ |
| 85 | #define MAX_UC_LEN 100 |
| 86 | /* Maximum string length of use case or device */ |
| 87 | #define MAX_STR_LEN 50 |
| 88 | |
| 89 | /* Returns maximum length of strings x and y */ |
| 90 | #define MAX_LEN(x,y) ((strlen(x)>strlen(y))?strlen(x):strlen(y)) |
| 91 | |
| 92 | /* Mixer control list type enum*/ |
| 93 | enum { |
| 94 | CTRL_LIST_VERB, |
| 95 | CTRL_LIST_DEVICE, |
| 96 | CTRL_LIST_MODIFIER, |
| 97 | }; |
| 98 | |
| 99 | /* mixer control structure */ |
| 100 | typedef struct mixer_control { |
| 101 | char *control_name; |
| 102 | unsigned type; |
| 103 | unsigned value; |
| 104 | char *string; |
| 105 | char **mulval; |
| 106 | }mixer_control_t; |
| 107 | |
| 108 | /* Use case mixer controls structure */ |
| 109 | typedef struct card_mctrl { |
| 110 | char *case_name; |
| 111 | int ena_mixer_count; |
| 112 | mixer_control_t *ena_mixer_list; |
| 113 | int dis_mixer_count; |
| 114 | mixer_control_t *dis_mixer_list; |
| 115 | char *playback_dev_name; |
| 116 | char *capture_dev_name; |
| 117 | int acdb_id; |
| 118 | int capability; |
| 119 | char *effects_mixer_ctl; |
| 120 | }card_mctrl_t; |
| 121 | |
| 122 | /* identifier node structure for identifier list*/ |
| 123 | struct snd_ucm_ident_node { |
| 124 | int active; |
SathishKumar Mani | 9858010 | 2012-09-20 14:46:37 -0700 | [diff] [blame^] | 125 | int capability; |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 126 | char ident[MAX_STR_LEN]; |
| 127 | struct snd_ucm_ident_node *next; |
| 128 | }; |
| 129 | |
| 130 | /* Structure to maintain the valid devices and |
| 131 | * modifiers list per each use case */ |
| 132 | typedef struct use_case_verb { |
| 133 | char *use_case_name; |
| 134 | char **device_list; |
| 135 | char **modifier_list; |
| 136 | int verb_count; |
| 137 | int device_count; |
| 138 | int mod_count; |
| 139 | card_mctrl_t *verb_ctrls; |
| 140 | card_mctrl_t *device_ctrls; |
| 141 | card_mctrl_t *mod_ctrls; |
| 142 | }use_case_verb_t; |
| 143 | |
| 144 | /* SND card context structure */ |
| 145 | typedef struct card_ctxt { |
| 146 | char *card_name; |
| 147 | int card_number; |
| 148 | char *control_device; |
| 149 | struct mixer *mixer_handle; |
| 150 | char current_verb[MAX_STR_LEN]; |
| 151 | struct snd_ucm_ident_node *dev_list_head; |
| 152 | struct snd_ucm_ident_node *mod_list_head; |
| 153 | pthread_mutex_t card_lock; |
| 154 | pthread_mutexattr_t card_lock_attr; |
| 155 | int current_verb_index; |
| 156 | use_case_verb_t *use_case_verb_list; |
| 157 | char **verb_list; |
| 158 | }card_ctxt_t; |
| 159 | |
| 160 | /** use case manager structure */ |
| 161 | struct snd_use_case_mgr { |
| 162 | int snd_card_index; |
| 163 | int device_list_count; |
| 164 | int modifier_list_count; |
| 165 | char **current_device_list; |
| 166 | char **current_modifier_list; |
| 167 | int current_tx_device; |
| 168 | int current_rx_device; |
| 169 | card_ctxt_t *card_ctxt_ptr; |
| 170 | pthread_t thr; |
SathishKumar Mani | 5ff7a02 | 2012-09-14 11:36:35 -0700 | [diff] [blame] | 171 | void *acdb_handle; |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 172 | }; |
| 173 | |
| 174 | #define MAX_NUM_CARDS (sizeof(card_list)/sizeof(char *)) |
| 175 | |
| 176 | /* Valid sound cards list */ |
| 177 | static const char *card_list[] = { |
| 178 | "snd_soc_msm", |
| 179 | "snd_soc_msm_2x", |
| 180 | "snd_soc_msm_2x_Fusion3", |
| 181 | "snd_soc_msm_Sitar", |
| 182 | }; |
| 183 | |
| 184 | typedef struct card_mapping { |
| 185 | char card_name[50]; |
| 186 | int card_number; |
| 187 | }card_mapping_t; |
| 188 | |
| 189 | /* sound card name and number mapping */ |
| 190 | static card_mapping_t card_mapping_list[] = { |
| 191 | {"snd_soc_msm", 0}, |
| 192 | {"snd_soc_msm_2x", 0}, |
| 193 | {"snd_soc_msm_2x_Fusion3", 0}, |
| 194 | {"snd_soc_msm_Sitar", 0}, |
| 195 | }; |
| 196 | |
| 197 | /* New use cases, devices and modifiers added |
| 198 | * which are not part of existing macros |
| 199 | */ |
| 200 | #define SND_USE_CASE_VERB_FM_REC "FM REC" |
| 201 | #define SND_USE_CASE_VERB_FM_A2DP_REC "FM A2DP REC" |
| 202 | #define SND_USE_CASE_VERB_HIFI_REC "HiFi Rec" |
SathishKumar Mani | d1c9700 | 2012-08-13 18:37:37 -0700 | [diff] [blame] | 203 | #define SND_USE_CASE_VERB_HIFI_LOWLATENCY_REC "HiFi Lowlatency Rec" |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 204 | #define SND_USE_CASE_VERB_DL_REC "DL REC" |
| 205 | #define SND_USE_CASE_VERB_UL_DL_REC "UL DL REC" |
| 206 | #define SND_USE_CASE_VERB_HIFI_TUNNEL "HiFi Tunnel" |
SathishKumar Mani | d1c9700 | 2012-08-13 18:37:37 -0700 | [diff] [blame] | 207 | #define SND_USE_CASE_VERB_HIFI_LOWLATENCY_MUSIC "HiFi Lowlatency" |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 208 | #define SND_USE_CASE_VERB_HIFI2 "HiFi2" |
| 209 | #define SND_USE_CASE_VERB_INCALL_REC "Incall REC" |
| 210 | #define SND_USE_CASE_VERB_MI2S "MI2S" |
| 211 | #define SND_USE_CASE_VERB_VOLTE "VoLTE" |
| 212 | #define SND_USE_CASE_VERB_ADSP_TESTFWK "ADSP testfwk" |
| 213 | |
| 214 | #define SND_USE_CASE_DEV_FM_TX "FM Tx" |
| 215 | #define SND_USE_CASE_DEV_ANC_HEADSET "ANC Headset" |
| 216 | #define SND_USE_CASE_DEV_BTSCO_NB_RX "BT SCO Rx" |
| 217 | #define SND_USE_CASE_DEV_BTSCO_NB_TX "BT SCO Tx" |
| 218 | #define SND_USE_CASE_DEV_BTSCO_WB_RX "BT SCO WB Rx" |
| 219 | #define SND_USE_CASE_DEV_BTSCO_WB_TX "BT SCO WB Tx" |
| 220 | #define SND_USE_CASE_DEV_SPEAKER_HEADSET "Speaker Headset" |
| 221 | #define SND_USE_CASE_DEV_SPEAKER_ANC_HEADSET "Speaker ANC Headset" |
| 222 | #define SND_USE_CASE_DEV_SPEAKER_FM_TX "Speaker FM Tx" |
| 223 | #define SND_USE_CASE_DEV_TTY_HEADSET_RX "TTY Headset Rx" |
| 224 | #define SND_USE_CASE_DEV_TTY_HEADSET_TX "TTY Headset Tx" |
| 225 | #define SND_USE_CASE_DEV_TTY_FULL_RX "TTY Full Rx" |
| 226 | #define SND_USE_CASE_DEV_TTY_FULL_TX "TTY Full Tx" |
| 227 | #define SND_USE_CASE_DEV_TTY_HANDSET_RX "TTY Handset Rx" |
| 228 | #define SND_USE_CASE_DEV_TTY_HANDSET_TX "TTY Handset Tx" |
| 229 | #define SND_USE_CASE_DEV_TTY_HANDSET_ANALOG_TX "TTY Handset Analog Tx" |
| 230 | #define SND_USE_CASE_DEV_DUAL_MIC_BROADSIDE "DMIC Broadside" |
| 231 | #define SND_USE_CASE_DEV_DUAL_MIC_ENDFIRE "DMIC Endfire" |
| 232 | #define SND_USE_CASE_DEV_SPEAKER_DUAL_MIC_BROADSIDE "Speaker DMIC Broadside" |
| 233 | #define SND_USE_CASE_DEV_SPEAKER_DUAL_MIC_ENDFIRE "Speaker DMIC Endfire" |
| 234 | #define SND_USE_CASE_DEV_HDMI_TX "HDMI Tx" |
| 235 | #define SND_USE_CASE_DEV_HDMI_SPDIF "HDMI SPDIF" |
| 236 | #define SND_USE_CASE_DEV_QUAD_MIC "QMIC" |
| 237 | #define SND_USE_CASE_DEV_SSR_QUAD_MIC "SSR QMIC" |
| 238 | #define SND_USE_CASE_DEV_PROXY_RX "PROXY Rx" |
| 239 | #define SND_USE_CASE_DEV_PROXY_TX "PROXY Tx" |
| 240 | #define SND_USE_CASE_DEV_SPDIF_SPEAKER "SPDIF Speaker" |
| 241 | #define SND_USE_CASE_DEV_SPDIF_HANDSET "SPDIF Earpiece" |
| 242 | #define SND_USE_CASE_DEV_SPDIF_HEADSET "SPDIF Headphones" |
| 243 | #define SND_USE_CASE_DEV_SPDIF_ANC_HEADSET "SPDIF ANC Headset" |
| 244 | #define SND_USE_CASE_DEV_SPDIF_SPEAKER_HEADSET "SPDIF Speaker Headset" |
| 245 | #define SND_USE_CASE_DEV_SPDIF_SPEAKER_ANC_HEADSET "SPDIF Speaker ANC Headset" |
| 246 | #define SND_USE_CASE_DEV_DUMMY_TX "Dummy Tx" |
Ajay Dudani | 9746c47 | 2012-06-18 16:01:16 -0700 | [diff] [blame] | 247 | #define SND_USE_CASE_DEV_PROXY_RX_SPEAKER "PROXY Rx Speaker" |
| 248 | #define SND_USE_CASE_DEV_PROXY_RX_HANDSET "PROXY Rx Earpiece" |
| 249 | #define SND_USE_CASE_DEV_PROXY_RX_HEADSET "PROXY Rx Headphones" |
| 250 | #define SND_USE_CASE_DEV_PROXY_RX_ANC_HEADSET "PROXY Rx ANC Headset" |
| 251 | #define SND_USE_CASE_DEV_PROXY_RX_SPEAKER_HEADSET "PROXY Rx Speaker Headset" |
| 252 | #define SND_USE_CASE_DEV_PROXY_RX_SPEAKER_ANC_HEADSET "PROXY Rx Speaker ANC Headset" |
ty.lee | 74060de | 2012-08-02 00:47:00 +0900 | [diff] [blame] | 253 | #define SND_USE_CASE_DEV_CAMCORDER_TX "Camcorder Tx" |
| 254 | #define SND_USE_CASE_DEV_VOICE_RECOGNITION "Voice Recognition" |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 255 | |
| 256 | #define SND_USE_CASE_MOD_PLAY_FM "Play FM" |
| 257 | #define SND_USE_CASE_MOD_CAPTURE_FM "Capture FM" |
SathishKumar Mani | d1c9700 | 2012-08-13 18:37:37 -0700 | [diff] [blame] | 258 | #define SND_USE_CASE_MOD_CAPTURE_LOWLATENCY_MUSIC "Capture Lowlatency Music" |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 259 | #define SND_USE_CASE_MOD_CAPTURE_A2DP_FM "Capture A2DP FM" |
| 260 | #define SND_USE_CASE_MOD_PLAY_LPA "Play LPA" |
| 261 | #define SND_USE_CASE_MOD_PLAY_VOIP "Play VOIP" |
| 262 | #define SND_USE_CASE_MOD_CAPTURE_VOIP "Capture VOIP" |
| 263 | #define SND_USE_CASE_MOD_CAPTURE_VOICE_DL "Capture Voice Downlink" |
| 264 | #define SND_USE_CASE_MOD_CAPTURE_VOICE_UL_DL "Capture Voice Uplink Downlink" |
| 265 | #define SND_USE_CASE_MOD_PLAY_TUNNEL "Play Tunnel" |
SathishKumar Mani | d1c9700 | 2012-08-13 18:37:37 -0700 | [diff] [blame] | 266 | #define SND_USE_CASE_MOD_PLAY_LOWLATENCY_MUSIC "Play Lowlatency Music" |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 267 | #define SND_USE_CASE_MOD_PLAY_MUSIC2 "Play Music2" |
| 268 | #define SND_USE_CASE_MOD_PLAY_MI2S "Play MI2S" |
| 269 | #define SND_USE_CASE_MOD_PLAY_VOLTE "Play VoLTE" |
| 270 | |
| 271 | /* List utility functions for maintaining enabled devices and modifiers */ |
| 272 | static int snd_ucm_add_ident_to_list(struct snd_ucm_ident_node **head, const char *value); |
| 273 | static char *snd_ucm_get_value_at_index(struct snd_ucm_ident_node *head, int index); |
| 274 | static int snd_ucm_get_size_of_list(struct snd_ucm_ident_node *head); |
| 275 | static int snd_ucm_del_ident_from_list(struct snd_ucm_ident_node **head, const char *value); |
| 276 | static int snd_ucm_free_list(struct snd_ucm_ident_node **head); |
| 277 | static void snd_ucm_print_list(struct snd_ucm_ident_node *head); |
SathishKumar Mani | 9858010 | 2012-09-20 14:46:37 -0700 | [diff] [blame^] | 278 | static void snd_ucm_set_status_at_index(struct snd_ucm_ident_node *head, const char *ident, int status, int capability); |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 279 | static int snd_ucm_get_status_at_index(struct snd_ucm_ident_node *head, const char *ident); |
SathishKumar Mani | 9858010 | 2012-09-20 14:46:37 -0700 | [diff] [blame^] | 280 | struct snd_ucm_ident_node *snd_ucm_get_device_node(struct snd_ucm_ident_node *head, int index); |
Iliyan Malchev | 4765c43 | 2012-06-11 14:36:16 -0700 | [diff] [blame] | 281 | static int snd_ucm_parse_verb(snd_use_case_mgr_t **uc_mgr, const char *file_name, int index); |
| 282 | static int get_verb_count(const char *nxt_str); |
| 283 | int snd_use_case_mgr_wait_for_parsing(snd_use_case_mgr_t *uc_mgr); |
| 284 | int snd_use_case_set_case(snd_use_case_mgr_t *uc_mgr, const char *identifier, |
| 285 | const char *value, const char *usecase); |
| 286 | static int get_usecase_type(snd_use_case_mgr_t *uc_mgr, const char *usecase); |
| 287 | static int parse_single_config_format(snd_use_case_mgr_t **uc_mgr, char *current_str, int num_verbs); |
| 288 | static int get_num_verbs_config_format(const char *nxt_str); |
| 289 | static int get_num_device_config_format(const char *nxt_str); |
| 290 | static int get_num_mod_config_format(const char *nxt_str); |
| 291 | static int is_single_config_format(const char *nxt_str); |
| 292 | /* Parse functions */ |
| 293 | static int snd_ucm_parse(snd_use_case_mgr_t **uc_mgr); |
| 294 | static int snd_ucm_parse_section(snd_use_case_mgr_t **uc_mgr, char **cur_str, char **nxt_str, int verb_index, int ctrl_list_type); |
| 295 | static int snd_ucm_extract_name(char *buf, char **case_name); |
| 296 | static int snd_ucm_extract_acdb(char *buf, int *id, int *cap); |
| 297 | static int snd_ucm_extract_effects_mixer_ctl(char *buf, char **mixer_name); |
| 298 | static int snd_ucm_extract_dev_name(char *buf, char **dev_name); |
| 299 | static int snd_ucm_extract_controls(char *buf, mixer_control_t **mixer_list, int count); |
| 300 | static int snd_ucm_print(snd_use_case_mgr_t *uc_mgr); |
| 301 | static void snd_ucm_free_mixer_list(snd_use_case_mgr_t **uc_mgr); |
| 302 | #ifdef __cplusplus |
| 303 | } |
| 304 | #endif |
| 305 | |
| 306 | #endif |