Lines Matching refs:card_ctxt_ptr
117 pthread_mutex_lock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
119 (uc_mgr->snd_card_index < 0) || (uc_mgr->card_ctxt_ptr == NULL)) { in snd_use_case_get_list()
121 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
126 while(strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], in snd_use_case_get_list()
129 uc_mgr->card_ctxt_ptr->verb_list[index]); in snd_use_case_get_list()
132 *list = (char ***)uc_mgr->card_ctxt_ptr->verb_list; in snd_use_case_get_list()
133 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
136 if (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_get_list()
139 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
142 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in snd_use_case_get_list()
143 while(strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_get_list()
157 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
160 if (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_get_list()
163 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
166 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in snd_use_case_get_list()
167 while(strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_get_list()
181 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
194 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_get_list()
201 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
206 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_get_list()
211 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
224 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->mod_list_head); in snd_use_case_get_list()
231 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
236 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_get_list()
241 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
245 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get_list()
272 pthread_mutex_lock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get()
274 (uc_mgr->snd_card_index < 0) || (uc_mgr->card_ctxt_ptr == NULL)) { in snd_use_case_get()
276 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get()
281 if (uc_mgr->card_ctxt_ptr->card_name != NULL) { in snd_use_case_get()
282 *value = strdup(uc_mgr->card_ctxt_ptr->card_name); in snd_use_case_get()
286 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get()
291 if (uc_mgr->card_ctxt_ptr->current_verb != NULL) { in snd_use_case_get()
292 *value = strdup(uc_mgr->card_ctxt_ptr->current_verb); in snd_use_case_get()
296 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get()
310 verb_index = uc_mgr->card_ctxt_ptr->current_verb_index; in snd_use_case_get()
311 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in snd_use_case_get()
318 (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_get()
321 uc_mgr->card_ctxt_ptr->current_verb, verb_index); in snd_use_case_get()
322 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get()
366 if(uc_mgr->card_ctxt_ptr->control_device != NULL) { in snd_use_case_get()
367 *value = strdup(uc_mgr->card_ctxt_ptr->control_device); in snd_use_case_get()
376 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in snd_use_case_get()
378 (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_get()
382 uc_mgr->card_ctxt_ptr->current_verb, verb_index); in snd_use_case_get()
383 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get()
412 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in snd_use_case_get()
414 (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_get()
418 uc_mgr->card_ctxt_ptr->current_verb, verb_index); in snd_use_case_get()
419 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get()
451 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_get()
470 pthread_mutex_lock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_geti()
472 (uc_mgr->snd_card_index < 0) || (uc_mgr->card_ctxt_ptr == NULL)) { in snd_use_case_geti()
474 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_geti()
488 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_geti()
491 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_geti()
511 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->mod_list_head); in snd_use_case_geti()
514 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_geti()
534 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_geti()
554 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in check_devices_for_voice_call()
557 snd_ucm_get_device_node(uc_mgr->card_ctxt_ptr->dev_list_head, in check_devices_for_voice_call()
586 if ((!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_apply_voice_acdb()
588 (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_apply_voice_acdb()
595 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->mod_list_head); in snd_use_case_apply_voice_acdb()
598 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_apply_voice_acdb()
615 verb_index = uc_mgr->card_ctxt_ptr->current_verb_index; in snd_use_case_apply_voice_acdb()
617 (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_apply_voice_acdb()
620 uc_mgr->card_ctxt_ptr->current_verb, verb_index); in snd_use_case_apply_voice_acdb()
625 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].device_ctrls; in snd_use_case_apply_voice_acdb()
627 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_apply_voice_acdb()
630 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_apply_voice_acdb()
709 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in get_use_case_index()
710 verb_index = uc_mgr->card_ctxt_ptr->current_verb_index; in get_use_case_index()
713 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].verb_ctrls; in get_use_case_index()
716 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].device_ctrls; in get_use_case_index()
719 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].mod_ctrls; in get_use_case_index()
724 (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, SND_UCM_END_OF_LIST, 3)) || in get_use_case_index()
727 uc_mgr->card_ctxt_ptr->current_verb, verb_index); in get_use_case_index()
763 verb_index = uc_mgr->card_ctxt_ptr->current_verb_index; in snd_use_case_apply_mixer_controls()
766 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].verb_ctrls; in snd_use_case_apply_mixer_controls()
769 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].device_ctrls; in snd_use_case_apply_mixer_controls()
772 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].mod_ctrls; in snd_use_case_apply_mixer_controls()
777 (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, SND_UCM_END_OF_LIST, 3)) || in snd_use_case_apply_mixer_controls()
780 uc_mgr->card_ctxt_ptr->current_verb, verb_index); in snd_use_case_apply_mixer_controls()
787 if (!uc_mgr->card_ctxt_ptr->mixer_handle) { in snd_use_case_apply_mixer_controls()
825 ctl = mixer_get_control(uc_mgr->card_ctxt_ptr->mixer_handle, in snd_use_case_apply_mixer_controls()
854 uc_mgr->card_ctxt_ptr->mixer_handle, in snd_use_case_apply_mixer_controls()
966 if ((verb_index = uc_mgr->card_ctxt_ptr->current_verb_index) < 0) in set_controls_of_usecase_for_all_devices()
969 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].device_ctrls; in set_controls_of_usecase_for_all_devices()
972 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].verb_ctrls; in set_controls_of_usecase_for_all_devices()
975 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].mod_ctrls; in set_controls_of_usecase_for_all_devices()
980 list_size = snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in set_controls_of_usecase_for_all_devices()
983 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, index); in set_controls_of_usecase_for_all_devices()
996 uc_mgr->card_ctxt_ptr->dev_list_head, current_device)) { in set_controls_of_usecase_for_all_devices()
1004 uc_mgr->card_ctxt_ptr->dev_list_head, in set_controls_of_usecase_for_all_devices()
1061 if ((verb_index = uc_mgr->card_ctxt_ptr->current_verb_index) < 0) in set_controls_of_usecase_for_device()
1064 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].device_ctrls; in set_controls_of_usecase_for_device()
1070 uc_mgr->card_ctxt_ptr->dev_list_head, device)) { in set_controls_of_usecase_for_device()
1075 uc_mgr->card_ctxt_ptr->dev_list_head, device, enable, in set_controls_of_usecase_for_device()
1120 if ((verb_index = uc_mgr->card_ctxt_ptr->current_verb_index) < 0) in set_controls_of_device_for_all_usecases()
1123 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].device_ctrls; in set_controls_of_device_for_all_usecases()
1127 if (strncmp(uc_mgr->card_ctxt_ptr->current_verb, SND_USE_CASE_VERB_INACTIVE, in set_controls_of_device_for_all_usecases()
1130 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].verb_ctrls; in set_controls_of_device_for_all_usecases()
1132 capability == getUseCaseType(uc_mgr->card_ctxt_ptr->current_verb) || in set_controls_of_device_for_all_usecases()
1133 getUseCaseType(uc_mgr->card_ctxt_ptr->current_verb) == CAP_VOICE) { in set_controls_of_device_for_all_usecases()
1134 strlcpy(use_case, uc_mgr->card_ctxt_ptr->current_verb, in set_controls_of_device_for_all_usecases()
1144 uc_mgr->card_ctxt_ptr->dev_list_head, device)) { in set_controls_of_device_for_all_usecases()
1149 uc_mgr->card_ctxt_ptr->dev_list_head, device, in set_controls_of_device_for_all_usecases()
1165 uc_mgr->card_ctxt_ptr->dev_list_head, device)) { in set_controls_of_device_for_all_usecases()
1170 uc_mgr->card_ctxt_ptr->dev_list_head, device, enable, in set_controls_of_device_for_all_usecases()
1176 strlcpy(use_case, uc_mgr->card_ctxt_ptr->current_verb, in set_controls_of_device_for_all_usecases()
1181 getUseCaseType(uc_mgr->card_ctxt_ptr->current_verb) || in set_controls_of_device_for_all_usecases()
1182 getUseCaseType(uc_mgr->card_ctxt_ptr->current_verb) == in set_controls_of_device_for_all_usecases()
1195 snd_ucm_print_list(uc_mgr->card_ctxt_ptr->mod_list_head); in set_controls_of_device_for_all_usecases()
1197 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].mod_ctrls; in set_controls_of_device_for_all_usecases()
1198 list_size = snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->mod_list_head); in set_controls_of_device_for_all_usecases()
1201 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->mod_list_head, in set_controls_of_device_for_all_usecases()
1215 uc_mgr->card_ctxt_ptr->dev_list_head, device)) { in set_controls_of_device_for_all_usecases()
1221 uc_mgr->card_ctxt_ptr->dev_list_head, in set_controls_of_device_for_all_usecases()
1237 uc_mgr->card_ctxt_ptr->dev_list_head, device)) { in set_controls_of_device_for_all_usecases()
1242 uc_mgr->card_ctxt_ptr->dev_list_head, device, in set_controls_of_device_for_all_usecases()
1271 snd_ucm_set_status_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in set_controls_of_device_for_all_usecases()
1286 while (strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], in get_usecase_type()
1288 if (!strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], usecase, in get_usecase_type()
1317 if ((verb_index = uc_mgr->card_ctxt_ptr->current_verb_index) < 0) in set_controls_of_device_for_usecase()
1320 uc_mgr->card_ctxt_ptr->use_case_verb_list[verb_index].device_ctrls; in set_controls_of_device_for_usecase()
1332 uc_mgr->card_ctxt_ptr->dev_list_head, device)) { in set_controls_of_device_for_usecase()
1337 (uc_mgr->card_ctxt_ptr->dev_list_head, device, enable, in set_controls_of_device_for_usecase()
1352 uc_mgr->card_ctxt_ptr->dev_list_head, device)) { in set_controls_of_device_for_usecase()
1357 uc_mgr->card_ctxt_ptr->dev_list_head, device, enable, in set_controls_of_device_for_usecase()
1366 snd_ucm_set_status_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in set_controls_of_device_for_usecase()
1388 pthread_mutex_lock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set()
1390 (uc_mgr->snd_card_index < 0) || (uc_mgr->card_ctxt_ptr == NULL) || in snd_use_case_set()
1393 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set()
1410 &uc_mgr->card_ctxt_ptr->dev_list_head, ident2); in snd_use_case_set()
1426 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set()
1434 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set()
1459 while (strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], in snd_use_case_set()
1461 if (!strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], value, in snd_use_case_set()
1473 uc_mgr->card_ctxt_ptr->verb_list[index]); in snd_use_case_set()
1476 if (strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_set()
1480 uc_mgr->card_ctxt_ptr->current_verb, 0, CTRL_LIST_VERB); in snd_use_case_set()
1483 uc_mgr->card_ctxt_ptr->current_verb); in snd_use_case_set()
1485 strlcpy(uc_mgr->card_ctxt_ptr->current_verb, value, MAX_STR_LEN); in snd_use_case_set()
1488 if (strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_set()
1491 uc_mgr->card_ctxt_ptr->current_verb_index = index; in snd_use_case_set()
1493 uc_mgr->card_ctxt_ptr->current_verb, 1, CTRL_LIST_VERB); in snd_use_case_set()
1499 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_set()
1502 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set()
1515 snd_ucm_add_ident_to_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set()
1518 snd_ucm_print_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_set()
1522 ret = snd_ucm_get_status_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set()
1529 snd_ucm_del_ident_from_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set()
1536 snd_ucm_del_ident_from_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set()
1550 verb_index = uc_mgr->card_ctxt_ptr->current_verb_index; in snd_use_case_set()
1555 uc_mgr->card_ctxt_ptr->verb_list[verb_index]); in snd_use_case_set()
1556 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in snd_use_case_set()
1569 snd_ucm_add_ident_to_list(&uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_set()
1578 ret = snd_ucm_del_ident_from_list(&uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_set()
1592 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set()
1613 pthread_mutex_lock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set_case()
1615 (uc_mgr->snd_card_index < 0) || (uc_mgr->card_ctxt_ptr == NULL) || in snd_use_case_set_case()
1618 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set_case()
1635 &uc_mgr->card_ctxt_ptr->dev_list_head, ident2); in snd_use_case_set_case()
1651 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set_case()
1659 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set_case()
1684 while (strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], in snd_use_case_set_case()
1686 if (!strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], in snd_use_case_set_case()
1698 uc_mgr->card_ctxt_ptr->verb_list[index]); in snd_use_case_set_case()
1701 if (strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_set_case()
1704 uc_mgr->card_ctxt_ptr->current_verb, usecase, in snd_use_case_set_case()
1708 uc_mgr->card_ctxt_ptr->current_verb); in snd_use_case_set_case()
1710 strlcpy(uc_mgr->card_ctxt_ptr->current_verb, value, MAX_STR_LEN); in snd_use_case_set_case()
1713 if (strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_set_case()
1715 uc_mgr->card_ctxt_ptr->current_verb_index = index; in snd_use_case_set_case()
1718 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_set_case()
1721 uc_mgr->card_ctxt_ptr->dev_list_head, index))) { in snd_use_case_set_case()
1733 snd_ucm_add_ident_to_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set_case()
1737 uc_mgr->card_ctxt_ptr->current_verb, usecase, in snd_use_case_set_case()
1744 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_set_case()
1747 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set_case()
1759 snd_ucm_add_ident_to_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set_case()
1762 snd_ucm_print_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_set_case()
1766 ret = snd_ucm_get_status_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set_case()
1773 snd_ucm_del_ident_from_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set_case()
1780 snd_ucm_del_ident_from_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set_case()
1792 if (!strncmp(uc_mgr->card_ctxt_ptr->current_verb, in snd_use_case_set_case()
1798 while(strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], in snd_use_case_set_case()
1799 uc_mgr->card_ctxt_ptr->current_verb, MAX_STR_LEN)) { in snd_use_case_set_case()
1800 if (!strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], in snd_use_case_set_case()
1812 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in snd_use_case_set_case()
1814 uc_mgr->card_ctxt_ptr->verb_list[verb_index]); in snd_use_case_set_case()
1829 snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_set_case()
1832 uc_mgr->card_ctxt_ptr->dev_list_head, index))) { in snd_use_case_set_case()
1844 snd_ucm_add_ident_to_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_set_case()
1847 snd_ucm_add_ident_to_list(&uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_set_case()
1856 ret = snd_ucm_del_ident_from_list(&uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_set_case()
1870 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_set_case()
1911 uc_mgr_ptr->card_ctxt_ptr = (card_ctxt_t *)calloc(1, in snd_use_case_mgr_open()
1913 if (uc_mgr_ptr->card_ctxt_ptr == NULL) { in snd_use_case_mgr_open()
1919 uc_mgr_ptr->card_ctxt_ptr->card_number = in snd_use_case_mgr_open()
1921 uc_mgr_ptr->card_ctxt_ptr->card_name = in snd_use_case_mgr_open()
1923 if (uc_mgr_ptr->card_ctxt_ptr->card_name == NULL) { in snd_use_case_mgr_open()
1925 free(uc_mgr_ptr->card_ctxt_ptr); in snd_use_case_mgr_open()
1930 strlcpy(uc_mgr_ptr->card_ctxt_ptr->card_name, card_name, in snd_use_case_mgr_open()
1932 uc_mgr_ptr->card_ctxt_ptr->control_device = in snd_use_case_mgr_open()
1934 if (uc_mgr_ptr->card_ctxt_ptr->control_device == NULL) { in snd_use_case_mgr_open()
1936 free(uc_mgr_ptr->card_ctxt_ptr->card_name); in snd_use_case_mgr_open()
1937 free(uc_mgr_ptr->card_ctxt_ptr); in snd_use_case_mgr_open()
1942 strlcpy(uc_mgr_ptr->card_ctxt_ptr->control_device, in snd_use_case_mgr_open()
1945 uc_mgr_ptr->card_ctxt_ptr->card_number); in snd_use_case_mgr_open()
1946 strlcat(uc_mgr_ptr->card_ctxt_ptr->control_device, tmp, in snd_use_case_mgr_open()
1954 pthread_mutexattr_init(&uc_mgr_ptr->card_ctxt_ptr->card_lock_attr); in snd_use_case_mgr_open()
1955 pthread_mutex_init(&uc_mgr_ptr->card_ctxt_ptr->card_lock, in snd_use_case_mgr_open()
1956 &uc_mgr_ptr->card_ctxt_ptr->card_lock_attr); in snd_use_case_mgr_open()
1957 strlcpy(uc_mgr_ptr->card_ctxt_ptr->current_verb, in snd_use_case_mgr_open()
1962 uc_mgr_ptr->card_ctxt_ptr->current_verb_index = -1; in snd_use_case_mgr_open()
1970 uc_mgr_ptr->card_ctxt_ptr->control_device); in snd_use_case_mgr_open()
1971 uc_mgr_ptr->card_ctxt_ptr->mixer_handle = in snd_use_case_mgr_open()
1972 mixer_open(uc_mgr_ptr->card_ctxt_ptr->control_device); in snd_use_case_mgr_open()
1973 ALOGV("Mixer handle %p", uc_mgr_ptr->card_ctxt_ptr->mixer_handle); in snd_use_case_mgr_open()
2001 (uc_mgr->snd_card_index < 0) || (uc_mgr->card_ctxt_ptr == NULL)) { in snd_use_case_mgr_close()
2011 pthread_mutexattr_destroy(&uc_mgr->card_ctxt_ptr->card_lock_attr); in snd_use_case_mgr_close()
2012 pthread_mutex_destroy(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_mgr_close()
2013 if (uc_mgr->card_ctxt_ptr->mixer_handle) { in snd_use_case_mgr_close()
2014 mixer_close(uc_mgr->card_ctxt_ptr->mixer_handle); in snd_use_case_mgr_close()
2015 uc_mgr->card_ctxt_ptr->mixer_handle = NULL; in snd_use_case_mgr_close()
2020 free(uc_mgr->card_ctxt_ptr->control_device); in snd_use_case_mgr_close()
2021 free(uc_mgr->card_ctxt_ptr->card_name); in snd_use_case_mgr_close()
2022 free(uc_mgr->card_ctxt_ptr); in snd_use_case_mgr_close()
2023 uc_mgr->card_ctxt_ptr = NULL; in snd_use_case_mgr_close()
2041 pthread_mutex_lock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_mgr_reset()
2043 (uc_mgr->snd_card_index < 0) || (uc_mgr->card_ctxt_ptr == NULL)) { in snd_use_case_mgr_reset()
2045 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_mgr_reset()
2050 list_size = snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->mod_list_head); in snd_use_case_mgr_reset()
2053 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_mgr_reset()
2055 snd_ucm_del_ident_from_list(&uc_mgr->card_ctxt_ptr->mod_list_head, in snd_use_case_mgr_reset()
2075 if(strncmp(uc_mgr->card_ctxt_ptr->current_verb, SND_USE_CASE_VERB_INACTIVE, in snd_use_case_mgr_reset()
2078 uc_mgr->card_ctxt_ptr->current_verb, 0, CTRL_LIST_VERB); in snd_use_case_mgr_reset()
2081 uc_mgr->card_ctxt_ptr->current_verb); in snd_use_case_mgr_reset()
2082 strlcpy(uc_mgr->card_ctxt_ptr->current_verb, SND_USE_CASE_VERB_INACTIVE, in snd_use_case_mgr_reset()
2086 list_size = snd_ucm_get_size_of_list(uc_mgr->card_ctxt_ptr->dev_list_head); in snd_use_case_mgr_reset()
2089 snd_ucm_get_value_at_index(uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_mgr_reset()
2091 snd_ucm_del_ident_from_list(&uc_mgr->card_ctxt_ptr->dev_list_head, in snd_use_case_mgr_reset()
2113 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_use_case_mgr_reset()
2129 strlcat(path, (*uc_mgr)->card_ctxt_ptr->card_name, sizeof(path)); in second_stage_parsing_thread()
2206 verb_list = (*uc_mgr)->card_ctxt_ptr->use_case_verb_list; in second_stage_parsing_thread()
2218 if((*uc_mgr)->card_ctxt_ptr->verb_list[index]) { in second_stage_parsing_thread()
2219 free((*uc_mgr)->card_ctxt_ptr->verb_list[index]); in second_stage_parsing_thread()
2220 (*uc_mgr)->card_ctxt_ptr->verb_list[index] = NULL; in second_stage_parsing_thread()
2222 (*uc_mgr)->card_ctxt_ptr->verb_list[index] = in second_stage_parsing_thread()
2224 strlcpy((*uc_mgr)->card_ctxt_ptr->verb_list[index], verb_name, in second_stage_parsing_thread()
2232 (*uc_mgr)->card_ctxt_ptr->verb_list[index] = in second_stage_parsing_thread()
2234 strlcpy((*uc_mgr)->card_ctxt_ptr->verb_list[index], in second_stage_parsing_thread()
2288 strlcat(path, (*uc_mgr)->card_ctxt_ptr->card_name, sizeof(path)); in snd_ucm_parse()
2309 (*uc_mgr)->card_ctxt_ptr->use_case_verb_list = in snd_ucm_parse()
2311 if ((*uc_mgr)->card_ctxt_ptr->use_case_verb_list == NULL) { in snd_ucm_parse()
2317 if (((*uc_mgr)->card_ctxt_ptr->verb_list = in snd_ucm_parse()
2345 verb_list = (*uc_mgr)->card_ctxt_ptr->use_case_verb_list; in snd_ucm_parse()
2365 if (((*uc_mgr)->card_ctxt_ptr->verb_list[index] = in snd_ucm_parse()
2367 strlcpy((*uc_mgr)->card_ctxt_ptr->verb_list[index], in snd_ucm_parse()
2418 if (((*uc_mgr)->card_ctxt_ptr->verb_list[index] = in snd_ucm_parse()
2420 strlcpy((*uc_mgr)->card_ctxt_ptr->verb_list[index], SND_UCM_END_OF_LIST, in snd_ucm_parse()
2457 verb_list = (*uc_mgr)->card_ctxt_ptr->use_case_verb_list; in parse_single_config_format()
2498 if (((*uc_mgr)->card_ctxt_ptr->verb_list[index] = in parse_single_config_format()
2500 strlcpy((*uc_mgr)->card_ctxt_ptr->verb_list[index], in parse_single_config_format()
2619 if (((*uc_mgr)->card_ctxt_ptr->verb_list[index] = in parse_single_config_format()
2621 strlcpy((*uc_mgr)->card_ctxt_ptr->verb_list[index], in parse_single_config_format()
2884 verb_list = (*uc_mgr)->card_ctxt_ptr->use_case_verb_list; in snd_ucm_parse_verb()
3138 pthread_mutex_lock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_ucm_print()
3139 verb_list = uc_mgr->card_ctxt_ptr->use_case_verb_list; in snd_ucm_print()
3140 while(strncmp(uc_mgr->card_ctxt_ptr->verb_list[verb_index], in snd_ucm_print()
3143 uc_mgr->card_ctxt_ptr->verb_list[verb_index]); in snd_ucm_print()
3173 pthread_mutex_unlock(&uc_mgr->card_ctxt_ptr->card_lock); in snd_ucm_print()
3222 verb_list = (*uc_mgr)->card_ctxt_ptr->use_case_verb_list; in snd_ucm_parse_section()
3651 pthread_mutex_lock(&(*uc_mgr)->card_ctxt_ptr->card_lock); in snd_ucm_free_mixer_list()
3652 verb_list = (*uc_mgr)->card_ctxt_ptr->use_case_verb_list; in snd_ucm_free_mixer_list()
3653 while(strncmp((*uc_mgr)->card_ctxt_ptr->verb_list[verb_index], in snd_ucm_free_mixer_list()
3659 if((*uc_mgr)->card_ctxt_ptr->verb_list[verb_index]) { in snd_ucm_free_mixer_list()
3660 free((*uc_mgr)->card_ctxt_ptr->verb_list[verb_index]); in snd_ucm_free_mixer_list()
3699 if((*uc_mgr)->card_ctxt_ptr->use_case_verb_list) in snd_ucm_free_mixer_list()
3700 free((*uc_mgr)->card_ctxt_ptr->use_case_verb_list); in snd_ucm_free_mixer_list()
3701 if((*uc_mgr)->card_ctxt_ptr->verb_list) in snd_ucm_free_mixer_list()
3702 free((*uc_mgr)->card_ctxt_ptr->verb_list); in snd_ucm_free_mixer_list()
3703 pthread_mutex_unlock(&(*uc_mgr)->card_ctxt_ptr->card_lock); in snd_ucm_free_mixer_list()