Lines Matching refs:adev
70 int voice_extn_is_call_state_active(struct audio_device *adev, bool *is_call_active);
124 static uint32_t get_session_id_with_state(struct audio_device *adev, in get_session_id_with_state() argument
132 session = &adev->voice.session[i]; in get_session_id_with_state()
142 static int update_calls(struct audio_device *adev) in update_calls() argument
155 session = &adev->voice.session[i]; in update_calls()
166 ret = voice_start_usecase(adev, usecase_id); in update_calls()
204 ret = voice_stop_usecase(adev, usecase_id); in update_calls()
275 static int update_call_states(struct audio_device *adev, in update_call_states() argument
283 if (vsid == adev->voice.session[i].vsid) { in update_call_states()
284 session = &adev->voice.session[i]; in update_call_states()
291 voice_extn_is_call_state_active(adev, &is_call_active); in update_call_states()
293 __func__, is_call_active, adev->voice.in_call, adev->mode); in update_call_states()
299 (adev->voice.in_call && adev->mode == AUDIO_MODE_IN_CALL)) { in update_call_states()
304 update_calls(adev); in update_call_states()
314 int voice_extn_get_active_session_id(struct audio_device *adev, in voice_extn_get_active_session_id() argument
317 *session_id = get_session_id_with_state(adev, CALL_ACTIVE); in voice_extn_get_active_session_id()
321 int voice_extn_is_call_state_active(struct audio_device *adev, bool *is_call_active) in voice_extn_is_call_state_active() argument
328 session = &adev->voice.session[i]; in voice_extn_is_call_state_active()
351 void voice_extn_init(struct audio_device *adev) in voice_extn_init() argument
353 adev->voice.session[VOICE_SESS_IDX].vsid = VOICE_VSID; in voice_extn_init()
354 adev->voice.session[VOICE2_SESS_IDX].vsid = VOICE2_VSID; in voice_extn_init()
355 adev->voice.session[VOLTE_SESS_IDX].vsid = VOLTE_VSID; in voice_extn_init()
356 adev->voice.session[QCHAT_SESS_IDX].vsid = QCHAT_VSID; in voice_extn_init()
357 adev->voice.session[VOWLAN_SESS_IDX].vsid = VOWLAN_VSID; in voice_extn_init()
360 int voice_extn_get_session_from_use_case(struct audio_device *adev, in voice_extn_get_session_from_use_case() argument
368 *session = &adev->voice.session[VOICE_SESS_IDX]; in voice_extn_get_session_from_use_case()
372 *session = &adev->voice.session[VOICE2_SESS_IDX]; in voice_extn_get_session_from_use_case()
376 *session = &adev->voice.session[VOLTE_SESS_IDX]; in voice_extn_get_session_from_use_case()
380 *session = &adev->voice.session[QCHAT_SESS_IDX]; in voice_extn_get_session_from_use_case()
384 *session = &adev->voice.session[VOWLAN_SESS_IDX]; in voice_extn_get_session_from_use_case()
396 int voice_extn_start_call(struct audio_device *adev) in voice_extn_start_call() argument
402 return update_calls(adev); in voice_extn_start_call()
405 int voice_extn_stop_call(struct audio_device *adev) in voice_extn_stop_call() argument
417 if (adev->mode == AUDIO_MODE_NORMAL) { in voice_extn_stop_call()
420 adev->voice.session[i].state.new = CALL_INACTIVE; in voice_extn_stop_call()
423 ret = update_calls(adev); in voice_extn_stop_call()
429 int voice_extn_set_parameters(struct audio_device *adev, in voice_extn_set_parameters() argument
456 ret = update_call_states(adev, vsid, call_state); in voice_extn_set_parameters()
485 ret = platform_set_device_mute(adev->platform, mute, str_value); in voice_extn_set_parameters()
499 static int get_all_call_states_str(const struct audio_device *adev, in get_all_call_states_str() argument
508 "%d:%d,",adev->voice.session[i].vsid, in get_all_call_states_str()
509 adev->voice.session[i].state.current); in get_all_call_states_str()
517 void voice_extn_get_parameters(const struct audio_device *adev, in voice_extn_get_parameters() argument
531 str_parms_add_int(reply, AUDIO_PARAMETER_KEY_AUDIO_MODE, adev->mode); in voice_extn_get_parameters()
537 ret = get_all_call_states_str(adev, value); in voice_extn_get_parameters()
551 int voice_extn_check_and_set_incall_music_usecase(struct audio_device *adev, in voice_extn_check_and_set_incall_music_usecase() argument
556 session_id = get_session_id_with_state(adev, CALL_LOCAL_HOLD); in voice_extn_check_and_set_incall_music_usecase()