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()
402 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
418 input_dev_rate = ucm_get_sample_rate_for_dev(mgr, "Dev1", CRAS_STREAM_INPUT); in TEST()
419 output_dev_rate = ucm_get_sample_rate_for_dev(mgr, "Dev2", in TEST()
430 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
440 rc = ucm_get_capture_chmap_for_dev(mgr, "Dev1", channel_layout); in TEST()
460 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
477 models = ucm_get_hotword_models(mgr); in TEST()
483 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
496 EXPECT_EQ(-EINVAL, ucm_set_hotword_model(mgr, "zh")); in TEST()
501 ucm_set_hotword_model(mgr, "jp"); in TEST()
511 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
526 rc = ucm_swap_mode_exists(mgr); in TEST()
531 rc = ucm_swap_mode_exists(mgr); in TEST()
536 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
554 rc = ucm_enable_swap_mode(mgr, "Headphone", 1); in TEST()
558 rc = ucm_enable_swap_mode(mgr, "Speaker", 1); in TEST()
562 rc = ucm_enable_swap_mode(mgr, "Microphone", 1); in TEST()
568 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
586 rc = ucm_enable_swap_mode(mgr, "Headphone", 0); in TEST()
590 rc = ucm_enable_swap_mode(mgr, "Microphone", 0); in TEST()
594 rc = ucm_enable_swap_mode(mgr, "Speaker", 0); in TEST()
601 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
610 flag_value = ucm_get_flag(mgr, "FlagName"); in TEST()
620 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
629 enabled = modifier_enabled(mgr, "Mod1"); in TEST()
631 enabled = modifier_enabled(mgr, "Mod2"); in TEST()
633 enabled = modifier_enabled(mgr, "Mod3"); in TEST()
638 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
642 ucm_set_modifier_enabled(mgr, "Mod1", 1); in TEST()
646 ucm_set_modifier_enabled(mgr, "Mod1", 0); in TEST()
659 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
667 EXPECT_EQ(1, ucm_section_exists_with_name(mgr, "Sec1", "Identifier")); in TEST()
668 EXPECT_EQ(1, ucm_section_exists_with_name(mgr, "Sec2", "Identifier")); in TEST()
669 EXPECT_EQ(0, ucm_section_exists_with_name(mgr, "Sec3", "Identifier")); in TEST()
673 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
681 EXPECT_EQ(1, ucm_section_exists_with_suffix(mgr, "Suffix1", "Identifier")); in TEST()
682 EXPECT_EQ(1, ucm_section_exists_with_suffix(mgr, "Suffix2", "Identifier")); in TEST()
683 EXPECT_EQ(0, ucm_section_exists_with_suffix(mgr, "Suffix3", "Identifier")); in TEST()
687 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
696 disable_software_volume = ucm_get_disable_software_volume(mgr); in TEST()
704 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
719 mixer_names_1 = ucm_get_coupled_mixer_names(mgr, "Dev1"); in TEST()
720 mixer_names_2 = ucm_get_coupled_mixer_names(mgr, "Dev2"); in TEST()
738 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
749 mixer_names_1 = ucm_get_coupled_mixer_names(mgr, "Dev1"); in TEST()
763 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
774 ret = ucm_get_max_software_gain(mgr, "Internal Mic", &max_software_gain); in TEST()
782 ret = ucm_get_max_software_gain(mgr, "Internal Mic", &max_software_gain); in TEST()
788 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
799 ret = ucm_get_default_node_gain(mgr, "Internal Mic", &default_node_gain); in TEST()
807 ret = ucm_get_default_node_gain(mgr, "Internal Mic", &default_node_gain); in TEST()
813 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
820 fully_specified_flag = ucm_has_fully_specified_ucm_flag(mgr); in TEST()
825 fully_specified_flag = ucm_has_fully_specified_ucm_flag(mgr); in TEST()
830 fully_specified_flag = ucm_has_fully_specified_ucm_flag(mgr); in TEST()
835 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
842 enable_htimestamp_flag = ucm_get_enable_htimestamp_flag(mgr); in TEST()
847 enable_htimestamp_flag = ucm_get_enable_htimestamp_flag(mgr); in TEST()
852 enable_htimestamp_flag = ucm_get_enable_htimestamp_flag(mgr); in TEST()
857 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
873 mixer_name_1 = ucm_get_mixer_name_for_dev(mgr, "Dev1"); in TEST()
874 mixer_name_2 = ucm_get_mixer_name_for_dev(mgr, "Dev2"); in TEST()
881 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
890 mixer_names_1 = ucm_get_main_volume_names(mgr); in TEST()
895 mixer_names_2 = ucm_get_main_volume_names(mgr); in TEST()
913 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
921 mgr, CRAS_STREAM_OUTPUT, "test_card:0", list_devices_callback, in TEST()
938 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
946 mgr, CRAS_STREAM_INPUT, "test_card:0", list_devices_callback, in TEST()
963 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
976 jack_name_1 = ucm_get_jack_name_for_dev(mgr, "Dev1"); in TEST()
977 jack_name_2 = ucm_get_jack_name_for_dev(mgr, "Dev2"); in TEST()
984 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1006 jack_type_1 = ucm_get_jack_type_for_dev(mgr, "Dev1"); in TEST()
1007 jack_type_2 = ucm_get_jack_type_for_dev(mgr, "Dev2"); in TEST()
1008 jack_type_3 = ucm_get_jack_type_for_dev(mgr, "Dev3"); in TEST()
1009 jack_type_4 = ucm_get_jack_type_for_dev(mgr, "Dev4"); in TEST()
1019 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1037 dma_period_1 = ucm_get_dma_period_for_dev(mgr, "Dev1"); in TEST()
1038 dma_period_2 = ucm_get_dma_period_for_dev(mgr, "Dev2"); in TEST()
1039 dma_period_3 = ucm_get_dma_period_for_dev(mgr, "Dev3"); in TEST()
1118 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1188 sections = ucm_get_sections(mgr); in TEST()
1270 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1294 sections = ucm_get_sections(mgr); in TEST()
1299 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1325 sections = ucm_get_sections(mgr); in TEST()
1330 struct cras_use_case_mgr *mgr = &cras_ucm_mgr; in TEST() local
1333 mgr->use_case = CRAS_STREAM_TYPE_DEFAULT; in TEST()
1334 EXPECT_EQ(0, strcmp("HiFi", uc_verb(mgr))); in TEST()
1335 mgr->use_case = CRAS_STREAM_TYPE_MULTIMEDIA; in TEST()
1336 EXPECT_EQ(0, strcmp("Multimedia", uc_verb(mgr))); in TEST()
1337 mgr->use_case = CRAS_STREAM_TYPE_VOICE_COMMUNICATION; in TEST()
1338 EXPECT_EQ(0, strcmp("Voice Call", uc_verb(mgr))); in TEST()
1339 mgr->use_case = CRAS_STREAM_TYPE_SPEECH_RECOGNITION; in TEST()
1340 EXPECT_EQ(0, strcmp("Speech", uc_verb(mgr))); in TEST()
1341 mgr->use_case = CRAS_STREAM_TYPE_PRO_AUDIO; in TEST()
1342 EXPECT_EQ(0, strcmp("Pro Audio", uc_verb(mgr))); in TEST()
1346 struct cras_use_case_mgr *mgr; in TEST() local
1356 mgr = ucm_create("foo"); in TEST()
1357 EXPECT_EQ(0x0D, mgr->avail_use_cases); in TEST()
1358 ucm_destroy(mgr); in TEST()
1362 struct cras_use_case_mgr *mgr; in TEST() local
1373 mgr = ucm_create("foo"); in TEST()
1377 rc = ucm_set_use_case(mgr, CRAS_STREAM_TYPE_VOICE_COMMUNICATION); in TEST()
1379 EXPECT_EQ(mgr->use_case, CRAS_STREAM_TYPE_VOICE_COMMUNICATION); in TEST()
1384 rc = ucm_set_use_case(mgr, CRAS_STREAM_TYPE_PRO_AUDIO); in TEST()
1387 EXPECT_EQ(mgr->use_case, CRAS_STREAM_TYPE_VOICE_COMMUNICATION); in TEST()
1391 ucm_destroy(mgr); in TEST()