Lines Matching refs:usecase
877 int getUseCaseType(const char *useCase)
879 ALOGV("getUseCaseType: use case is %s\n", useCase);
880 if (!strncmp(useCase, SND_USE_CASE_VERB_HIFI,
881 MAX_LEN(useCase,SND_USE_CASE_VERB_HIFI)) ||
882 !strncmp(useCase, SND_USE_CASE_VERB_HIFI_LOWLATENCY_MUSIC,
883 MAX_LEN(useCase,SND_USE_CASE_VERB_HIFI_LOWLATENCY_MUSIC)) ||
884 !strncmp(useCase, SND_USE_CASE_VERB_HIFI_LOW_POWER,
885 MAX_LEN(useCase,SND_USE_CASE_VERB_HIFI_LOW_POWER)) ||
886 !strncmp(useCase, SND_USE_CASE_VERB_HIFI_TUNNEL,
887 MAX_LEN(useCase,SND_USE_CASE_VERB_HIFI_TUNNEL)) ||
888 !strncmp(useCase, SND_USE_CASE_VERB_HIFI2,
889 MAX_LEN(useCase,SND_USE_CASE_VERB_HIFI2)) ||
890 !strncmp(useCase, SND_USE_CASE_VERB_DIGITAL_RADIO,
891 MAX_LEN(useCase,SND_USE_CASE_VERB_DIGITAL_RADIO)) ||
892 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_MUSIC,
893 MAX_LEN(useCase,SND_USE_CASE_MOD_PLAY_MUSIC)) ||
894 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_LOWLATENCY_MUSIC,
895 MAX_LEN(useCase,SND_USE_CASE_MOD_PLAY_LOWLATENCY_MUSIC)) ||
896 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_MUSIC2,
897 MAX_LEN(useCase,SND_USE_CASE_MOD_PLAY_MUSIC2)) ||
898 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_LPA,
899 MAX_LEN(useCase,SND_USE_CASE_MOD_PLAY_LPA)) ||
900 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_TUNNEL,
901 MAX_LEN(useCase,SND_USE_CASE_MOD_PLAY_TUNNEL)) ||
902 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_FM,
903 MAX_LEN(useCase,SND_USE_CASE_MOD_PLAY_FM))) {
905 } else if (!strncmp(useCase, SND_USE_CASE_VERB_HIFI_REC,
906 MAX_LEN(useCase,SND_USE_CASE_VERB_HIFI_REC)) ||
907 !strncmp(useCase, SND_USE_CASE_VERB_FM_REC,
908 MAX_LEN(useCase,SND_USE_CASE_VERB_FM_REC)) ||
909 !strncmp(useCase, SND_USE_CASE_VERB_FM_A2DP_REC,
910 MAX_LEN(useCase,SND_USE_CASE_VERB_FM_A2DP_REC)) ||
911 !strncmp(useCase, SND_USE_CASE_MOD_CAPTURE_MUSIC,
912 MAX_LEN(useCase,SND_USE_CASE_MOD_CAPTURE_MUSIC)) ||
913 !strncmp(useCase, SND_USE_CASE_VERB_HIFI_LOWLATENCY_REC,
914 MAX_LEN(useCase,SND_USE_CASE_VERB_HIFI_LOWLATENCY_REC)) ||
915 !strncmp(useCase, SND_USE_CASE_MOD_CAPTURE_LOWLATENCY_MUSIC,
916 MAX_LEN(useCase,SND_USE_CASE_MOD_CAPTURE_LOWLATENCY_MUSIC)) ||
917 !strncmp(useCase, SND_USE_CASE_MOD_CAPTURE_FM,
918 MAX_LEN(useCase,SND_USE_CASE_MOD_CAPTURE_FM)) ||
919 !strncmp(useCase, SND_USE_CASE_MOD_CAPTURE_A2DP_FM,
920 MAX_LEN(useCase,SND_USE_CASE_MOD_CAPTURE_A2DP_FM))) {
922 } else if (!strncmp(useCase, SND_USE_CASE_VERB_VOICECALL,
923 MAX_LEN(useCase,SND_USE_CASE_VERB_VOICECALL)) ||
924 !strncmp(useCase, SND_USE_CASE_VERB_IP_VOICECALL,
925 MAX_LEN(useCase,SND_USE_CASE_VERB_IP_VOICECALL)) ||
926 !strncmp(useCase, SND_USE_CASE_VERB_DL_REC,
927 MAX_LEN(useCase,SND_USE_CASE_VERB_DL_REC)) ||
928 !strncmp(useCase, SND_USE_CASE_VERB_UL_DL_REC,
929 MAX_LEN(useCase,SND_USE_CASE_VERB_UL_DL_REC)) ||
930 !strncmp(useCase, SND_USE_CASE_VERB_INCALL_REC,
931 MAX_LEN(useCase,SND_USE_CASE_VERB_INCALL_REC)) ||
932 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_VOICE,
933 MAX_LEN(useCase,SND_USE_CASE_MOD_PLAY_VOICE)) ||
934 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_VOIP,
935 MAX_LEN(useCase,SND_USE_CASE_MOD_PLAY_VOIP)) ||
936 !strncmp(useCase, SND_USE_CASE_MOD_CAPTURE_VOICE_DL,
937 MAX_LEN(useCase,SND_USE_CASE_MOD_CAPTURE_VOICE_DL)) ||
938 !strncmp(useCase, SND_USE_CASE_MOD_CAPTURE_VOICE_UL_DL,
939 MAX_LEN(useCase,SND_USE_CASE_MOD_CAPTURE_VOICE_UL_DL)) ||
940 !strncmp(useCase, SND_USE_CASE_VERB_VOLTE,
941 MAX_LEN(useCase,SND_USE_CASE_VERB_VOLTE)) ||
942 !strncmp(useCase, SND_USE_CASE_MOD_PLAY_VOLTE,
943 MAX_LEN(useCase, SND_USE_CASE_MOD_PLAY_VOLTE))) {
946 ALOGE("unknown use case %s, returning voice capablity", useCase);
1158 ALOGE("No valid controls exists for usecase %s and device \
1188 ALOGE("No valid controls exists for usecase %s and \
1230 ALOGE("No valid controls exists for usecase %s and \
1258 ALOGE("No valid controls exists for usecase %s and \
1277 /* Returns usecase type i.e. either verb or modifier
1279 * usecase - usecase name either verb or modifier
1282 static int get_usecase_type(snd_use_case_mgr_t *uc_mgr, const char *usecase)
1288 if (!strncmp(uc_mgr->card_ctxt_ptr->verb_list[index], usecase,
1289 (strlen(usecase)+1))) {
1304 * usecase - use case for which device needs to be enabled
1309 const char *device, const char *usecase, int enable)
1316 ALOGV("set_device_for_ident(): %s %s", device, usecase);
1323 if (usecase != NULL) {
1324 strlcpy(use_case, usecase, sizeof(use_case));
1327 get_usecase_type(uc_mgr, usecase))) < 0) {
1343 get_usecase_type(uc_mgr, usecase), uc_index);
1345 ALOGE("No valid controls exists for usecase %s and device %s, \
1602 * usecase - usecase/device for which this command needs to be executed
1607 const char *value, const char *usecase)
1644 usecase, 0);
1652 ret = snd_use_case_set_case(uc_mgr, "_enadev", value, usecase);
1664 ret = snd_use_case_set_case(uc_mgr, "_dismod", ident2, usecase);
1670 ret = snd_use_case_set_case(uc_mgr, "_enamod", value, usecase);
1704 uc_mgr->card_ctxt_ptr->current_verb, usecase,
1722 if (!strncmp(ident1, usecase, MAX_STR_LEN)) {
1724 usecase);
1732 ALOGV("enadev: device value to be enabled: %s", usecase);
1734 usecase);
1737 uc_mgr->card_ctxt_ptr->current_verb, usecase,
1763 /* Apply Mixer controls of usecase for this device*/
1764 ret = set_controls_of_device_for_usecase(uc_mgr, value, usecase, 1);
1786 /* Apply Mixer controls of usecase for this device*/
1788 usecase, 0);
1833 if (!strncmp(ident1, usecase, MAX_STR_LEN)) {
1835 usecase);
1843 ALOGV("enadev: device value to be enabled: %s", usecase);
1845 usecase);
1852 usecase, 1, CTRL_LIST_MODIFIER);
1864 ret = set_controls_of_usecase_for_device(uc_mgr, value, usecase,