Lines Matching refs:adev
75 int voice_extn_is_call_state_active(struct audio_device *adev, bool *is_call_active);
139 static uint32_t get_session_id_with_state(struct audio_device *adev,
147 session = &adev->voice.session[i];
157 static int update_calls(struct audio_device *adev)
170 session = &adev->voice.session[i];
181 ret = voice_start_usecase(adev, usecase_id);
219 ret = voice_stop_usecase(adev, usecase_id);
290 static int update_call_states(struct audio_device *adev,
298 if (vsid == adev->voice.session[i].vsid) {
299 session = &adev->voice.session[i];
306 voice_extn_is_call_state_active(adev, &is_call_active);
308 __func__, is_call_active, adev->voice.in_call, adev->mode);
314 (adev->voice.in_call && adev->mode == AUDIO_MODE_IN_CALL)) {
319 update_calls(adev);
329 int voice_extn_get_active_session_id(struct audio_device *adev,
332 *session_id = get_session_id_with_state(adev, CALL_ACTIVE);
336 int voice_extn_is_call_state_active(struct audio_device *adev, bool *is_call_active)
343 session = &adev->voice.session[i];
366 void voice_extn_init(struct audio_device *adev)
368 adev->voice.session[VOICE_SESS_IDX].vsid = VOICE_VSID;
369 adev->voice.session[VOICE2_SESS_IDX].vsid = VOICE2_VSID;
370 adev->voice.session[VOLTE_SESS_IDX].vsid = VOLTE_VSID;
371 adev->voice.session[QCHAT_SESS_IDX].vsid = QCHAT_VSID;
372 adev->voice.session[VOWLAN_SESS_IDX].vsid = VOWLAN_VSID;
373 adev->voice.session[MMODE1_SESS_IDX].vsid = VOICEMMODE1_VSID;
374 adev->voice.session[MMODE2_SESS_IDX].vsid = VOICEMMODE2_VSID;
377 int voice_extn_get_session_from_use_case(struct audio_device *adev,
385 *session = &adev->voice.session[VOICE_SESS_IDX];
389 *session = &adev->voice.session[VOICE2_SESS_IDX];
393 *session = &adev->voice.session[VOLTE_SESS_IDX];
397 *session = &adev->voice.session[QCHAT_SESS_IDX];
401 *session = &adev->voice.session[VOWLAN_SESS_IDX];
405 *session = &adev->voice.session[MMODE1_SESS_IDX];
409 *session = &adev->voice.session[MMODE2_SESS_IDX];
421 int voice_extn_start_call(struct audio_device *adev)
427 return update_calls(adev);
430 int voice_extn_stop_call(struct audio_device *adev)
442 if (adev->mode == AUDIO_MODE_NORMAL) {
445 adev->voice.session[i].state.new = CALL_INACTIVE;
448 ret = update_calls(adev);
454 int voice_extn_set_parameters(struct audio_device *adev,
481 ret = update_call_states(adev, vsid, call_state);
510 ret = platform_set_device_mute(adev->platform, mute, str_value);
524 static int get_all_call_states_str(const struct audio_device *adev,
533 "%d:%d,",adev
534 adev->voice.session[i].state.current);
542 void voice_extn_get_parameters(const struct audio_device *adev,
556 str_parms_add_int(reply, AUDIO_PARAMETER_KEY_AUDIO_MODE, adev->mode);
562 ret = get_all_call_states_str(adev, value);
576 int voice_extn_check_and_set_incall_music_usecase(struct audio_device *adev,
581 session_id = get_session_id_with_state(adev, CALL_LOCAL_HOLD);