Lines Matching refs:mgr

117   struct cras_use_case_mgr *mgr;  in TEST()  local
121 mgr = ucm_create("foo"); in TEST()
122 EXPECT_NE(static_cast<snd_use_case_mgr_t*>(NULL), mgr->mgr); in TEST()
127 ucm_destroy(mgr); in TEST()
132 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
138 EXPECT_EQ(0, ucm_set_enabled(mgr, "Dev1", 0)); in TEST()
141 EXPECT_EQ(0, ucm_set_enabled(mgr, "Dev1", 1)); in TEST()
148 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
156 EXPECT_EQ(0, ucm_set_enabled(mgr, "Dev1", 1)); in TEST()
159 EXPECT_EQ(0, ucm_set_enabled(mgr, "Dev1", 0)); in TEST()
166 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
175 file_name = ucm_get_edid_file_for_dev(mgr, "Dev1"); in TEST()
185 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
194 cap_control = ucm_get_cap_control(mgr, "Dev1"); in TEST()
204 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
213 override_type_name = ucm_get_override_type_name(mgr, "Dev1"); in TEST()
223 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
244 section_names = ucm_get_sections_for_var(mgr, "Var", "Value2", "Identifier", in TEST()
264 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
280 dev_name = ucm_get_dev_for_jack(mgr, value_2.c_str(), CRAS_STREAM_OUTPUT); in TEST()
291 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
309 dev_name = ucm_get_dev_for_jack(mgr, value.c_str(), CRAS_STREAM_OUTPUT); in TEST()
317 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
335 dev_name = ucm_get_dev_for_jack(mgr, value.c_str(), CRAS_STREAM_INPUT); in TEST()
343 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
360 mgr, value_1.c_str(), CRAS_STREAM_OUTPUT); in TEST()
361 dev_name_in = ucm_get_dev_for_mixer(mgr, value_2.c_str(), CRAS_STREAM_INPUT); in TEST()
373 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
389 input_dev_name = ucm_get_device_name_for_dev(mgr, "Dev1", CRAS_STREAM_INPUT); in TEST()
390 output_dev_name = ucm_get_device_name_for_dev(mgr, "Dev2", CRAS_STREAM_OUTPUT); in TEST()
404 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
420 input_dev_rate = ucm_get_sample_rate_for_dev(mgr, "Dev1", CRAS_STREAM_INPUT); in TEST()
421 output_dev_rate = ucm_get_sample_rate_for_dev(mgr, "Dev2", in TEST()
432 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
442 rc = ucm_get_capture_chmap_for_dev(mgr, "Dev1", channel_layout); in TEST()
462 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
471 echo_ref_dev = ucm_get_echo_reference_dev_name_for_dev(mgr, "Dev1"); in TEST()
480 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
497 models = ucm_get_hotword_models(mgr); in TEST()
504 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
517 EXPECT_EQ(-EINVAL, ucm_set_hotword_model(mgr, "zh")); in TEST()
522 ucm_set_hotword_model(mgr, "jp"); in TEST()
532 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
547 rc = ucm_swap_mode_exists(mgr); in TEST()
552 rc = ucm_swap_mode_exists(mgr); in TEST()
557 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
575 rc = ucm_enable_swap_mode(mgr, "Headphone", 1); in TEST()
579 rc = ucm_enable_swap_mode(mgr, "Speaker", 1); in TEST()
583 rc = ucm_enable_swap_mode(mgr, "Microphone", 1); in TEST()
589 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
607 rc = ucm_enable_swap_mode(mgr, "Headphone", 0); in TEST()
611 rc = ucm_enable_swap_mode(mgr, "Microphone", 0); in TEST()
615 rc = ucm_enable_swap_mode(mgr, "Speaker", 0); in TEST()
622 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
631 flag_value = ucm_get_flag(mgr, "FlagName"); in TEST()
641 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
650 enabled = modifier_enabled(mgr, "Mod1"); in TEST()
652 enabled = modifier_enabled(mgr, "Mod2"); in TEST()
654 enabled = modifier_enabled(mgr, "Mod3"); in TEST()
659 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
663 ucm_set_modifier_enabled(mgr, "Mod1", 1); in TEST()
667 ucm_set_modifier_enabled(mgr, "Mod1", 0); in TEST()
680 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
688 EXPECT_EQ(1, ucm_section_exists_with_name(mgr, "Sec1", "Identifier")); in TEST()
689 EXPECT_EQ(1, ucm_section_exists_with_name(mgr, "Sec2", "Identifier")); in TEST()
690 EXPECT_EQ(0, ucm_section_exists_with_name(mgr, "Sec3", "Identifier")); in TEST()
694 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
702 EXPECT_EQ(1, ucm_section_exists_with_suffix(mgr, "Suffix1", "Identifier")); in TEST()
703 EXPECT_EQ(1, ucm_section_exists_with_suffix(mgr, "Suffix2", "Identifier")); in TEST()
704 EXPECT_EQ(0, ucm_section_exists_with_suffix(mgr, "Suffix3", "Identifier")); in TEST()
708 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
717 disable_software_volume = ucm_get_disable_software_volume(mgr); in TEST()
725 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
740 mixer_names_1 = ucm_get_coupled_mixer_names(mgr, "Dev1"); in TEST()
741 mixer_names_2 = ucm_get_coupled_mixer_names(mgr, "Dev2"); in TEST()
759 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
770 mixer_names_1 = ucm_get_coupled_mixer_names(mgr, "Dev1"); in TEST()
784 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
795 ret = ucm_get_max_software_gain(mgr, "Internal Mic", &max_software_gain); in TEST()
803 ret = ucm_get_max_software_gain(mgr, "Internal Mic", &max_software_gain); in TEST()
809 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
820 ret = ucm_get_min_software_gain(mgr, "Internal Mic", &min_software_gain); in TEST()
828 ret = ucm_get_min_software_gain(mgr, "Internal Mic", &min_software_gain); in TEST()
834 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
845 ret = ucm_get_default_node_gain(mgr, "Internal Mic", &default_node_gain); in TEST()
853 ret = ucm_get_default_node_gain(mgr, "Internal Mic", &default_node_gain); in TEST()
859 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
866 fully_specified_flag = ucm_has_fully_specified_ucm_flag(mgr); in TEST()
871 fully_specified_flag = ucm_has_fully_specified_ucm_flag(mgr); in TEST()
876 fully_specified_flag = ucm_has_fully_specified_ucm_flag(mgr); in TEST()
881 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
888 enable_htimestamp_flag = ucm_get_enable_htimestamp_flag(mgr); in TEST()
893 enable_htimestamp_flag = ucm_get_enable_htimestamp_flag(mgr); in TEST()
898 enable_htimestamp_flag = ucm_get_enable_htimestamp_flag(mgr); in TEST()
903 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
919 mixer_name_1 = ucm_get_mixer_name_for_dev(mgr, "Dev1"); in TEST()
920 mixer_name_2 = ucm_get_mixer_name_for_dev(mgr, "Dev2"); in TEST()
929 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
938 mixer_names_1 = ucm_get_main_volume_names(mgr); in TEST()
943 mixer_names_2 = ucm_get_main_volume_names(mgr); in TEST()
961 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
969 mgr, CRAS_STREAM_OUTPUT, "test_card:0", list_devices_callback, in TEST()
986 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
994 mgr, CRAS_STREAM_INPUT, "test_card:0", list_devices_callback, in TEST()
1011 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1024 jack_name_1 = ucm_get_jack_name_for_dev(mgr, "Dev1"); in TEST()
1025 jack_name_2 = ucm_get_jack_name_for_dev(mgr, "Dev2"); in TEST()
1035 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1057 jack_type_1 = ucm_get_jack_type_for_dev(mgr, "Dev1"); in TEST()
1058 jack_type_2 = ucm_get_jack_type_for_dev(mgr, "Dev2"); in TEST()
1059 jack_type_3 = ucm_get_jack_type_for_dev(mgr, "Dev3"); in TEST()
1060 jack_type_4 = ucm_get_jack_type_for_dev(mgr, "Dev4"); in TEST()
1075 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1093 dma_period_1 = ucm_get_dma_period_for_dev(mgr, "Dev1"); in TEST()
1094 dma_period_2 = ucm_get_dma_period_for_dev(mgr, "Dev2"); in TEST()
1095 dma_period_3 = ucm_get_dma_period_for_dev(mgr, "Dev3"); in TEST()
1174 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1244 sections = ucm_get_sections(mgr); in TEST()
1326 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1350 sections = ucm_get_sections(mgr); in TEST()
1355 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1381 sections = ucm_get_sections(mgr); in TEST()
1386 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1389 mgr->use_case = CRAS_STREAM_TYPE_DEFAULT; in TEST()
1390 EXPECT_EQ(0, strcmp("HiFi", uc_verb(mgr))); in TEST()
1391 mgr->use_case = CRAS_STREAM_TYPE_MULTIMEDIA; in TEST()
1392 EXPECT_EQ(0, strcmp("Multimedia", uc_verb(mgr))); in TEST()
1393 mgr->use_case = CRAS_STREAM_TYPE_VOICE_COMMUNICATION; in TEST()
1394 EXPECT_EQ(0, strcmp("Voice Call", uc_verb(mgr))); in TEST()
1395 mgr->use_case = CRAS_STREAM_TYPE_SPEECH_RECOGNITION; in TEST()
1396 EXPECT_EQ(0, strcmp("Speech", uc_verb(mgr))); in TEST()
1397 mgr->use_case = CRAS_STREAM_TYPE_PRO_AUDIO; in TEST()
1398 EXPECT_EQ(0, strcmp("Pro Audio", uc_verb(mgr))); in TEST()
1402 struct cras_use_case_mgr *mgr; in TEST() local
1412 mgr = ucm_create("foo"); in TEST()
1413 EXPECT_EQ(0x0D, mgr->avail_use_cases); in TEST()
1414 ucm_destroy(mgr); in TEST()
1418 struct cras_use_case_mgr *mgr; in TEST() local
1429 mgr = ucm_create("foo"); in TEST()
1433 rc = ucm_set_use_case(mgr, CRAS_STREAM_TYPE_VOICE_COMMUNICATION); in TEST()
1435 EXPECT_EQ(mgr->use_case, CRAS_STREAM_TYPE_VOICE_COMMUNICATION); in TEST()
1440 rc = ucm_set_use_case(mgr, CRAS_STREAM_TYPE_PRO_AUDIO); in TEST()
1443 EXPECT_EQ(mgr->use_case, CRAS_STREAM_TYPE_VOICE_COMMUNICATION); in TEST()
1447 ucm_destroy(mgr); in TEST()