/hardware/qcom/audio/hal/ |
D | voice.c | 42 static struct voice_session *voice_get_session_from_use_case(struct audio_device *adev, in voice_get_session_from_use_case() argument 48 ret = voice_extn_get_session_from_use_case(adev, usecase_id, &session); in voice_get_session_from_use_case() 50 session = &adev->voice.session[VOICE_SESS_IDX]; in voice_get_session_from_use_case() 86 void voice_set_sidetone(struct audio_device *adev, in voice_set_sidetone() argument 97 platform_set_sidetone(adev, out_snd_device, enable, mixer_path); in voice_set_sidetone() 102 int voice_stop_usecase(struct audio_device *adev, audio_usecase_t usecase_id) in voice_stop_usecase() argument 110 session = (struct voice_session *)voice_get_session_from_use_case(adev, usecase_id); in voice_stop_usecase() 112 uc_info = get_usecase_from_list(adev, usecase_id); in voice_stop_usecase() 122 if (!voice_is_call_state_active(adev)) in voice_stop_usecase() 123 voice_set_sidetone(adev, uc_info->out_snd_device, false); in voice_stop_usecase() [all …]
|
D | voice.h | 73 int voice_start_usecase(struct audio_device *adev, audio_usecase_t usecase_id); 74 int voice_stop_usecase(struct audio_device *adev, audio_usecase_t usecase_id); 76 int voice_start_call(struct audio_device *adev); 77 int voice_stop_call(struct audio_device *adev); 78 int voice_set_parameters(struct audio_device *adev, struct str_parms *parms); 79 void voice_get_parameters(struct audio_device *adev, struct str_parms *query, 81 void voice_init(struct audio_device *adev); 82 bool voice_is_in_call(struct audio_device *adev); 86 int voice_set_volume(struct audio_device *adev, float volume); 87 int voice_check_and_set_incall_rec_usecase(struct audio_device *adev, [all …]
|
D | platform_api.h | 61 void *platform_init(struct audio_device *adev); 98 void platform_set_speaker_gain_in_combo(struct audio_device *adev, 154 void platform_set_echo_reference(struct audio_device *adev, bool enable, audio_devices_t out_device… 155 int platform_check_and_set_swap_lr_channels(struct audio_device *adev, bool swap_channels); 156 int platform_set_swap_channels(struct audio_device *adev, bool swap_channels); 166 bool platform_check_and_set_playback_backend_cfg(struct audio_device* adev, 169 bool platform_check_and_set_capture_backend_cfg(struct audio_device* adev, 185 int platform_set_sidetone(struct audio_device *adev, 220 struct stream_in *adev_get_active_input(const struct audio_device *adev);
|
D | audio_hw.h | 436 int select_devices(struct audio_device *adev, 439 int disable_audio_route(struct audio_device *adev, 442 int disable_snd_device(struct audio_device *adev, 445 int enable_snd_device(struct audio_device *adev, 448 int enable_audio_route(struct audio_device *adev, 451 struct audio_usecase *get_usecase_from_list(struct audio_device *adev, 454 int check_a2dp_restore(struct audio_device *adev, struct stream_out *out, bool restore);
|
/hardware/qcom/audio/hal/voice_extn/ |
D | voice_extn.h | 21 int voice_extn_start_call(struct audio_device *adev); 22 int voice_extn_stop_call(struct audio_device *adev); 23 int voice_extn_get_session_from_use_case(struct audio_device *adev, 26 void voice_extn_init(struct audio_device *adev); 27 int voice_extn_set_parameters(struct audio_device *adev, 29 void voice_extn_get_parameters(const struct audio_device *adev, 33 int voice_extn_get_active_session_id(struct audio_device *adev, 35 int voice_extn_is_call_state_active(struct audio_device *adev, 38 static int voice_extn_start_call(struct audio_device *adev __unused) in voice_extn_start_call() 43 static int voice_extn_stop_call(struct audio_device *adev __unused) in voice_extn_stop_call() [all …]
|
/hardware/qcom/audio/hal/audio_extn/ |
D | audio_extn.h | 30 void *audio_extn_extspk_init(struct audio_device *adev); 39 #define audio_extn_spkr_prot_init(adev) (0) argument 41 #define audio_extn_spkr_prot_calib_cancel(adev) (0) argument 45 #define audio_extn_spkr_prot_deinit(adev) (0) argument 47 void audio_extn_spkr_prot_init(void *adev); 52 void audio_extn_spkr_prot_calib_cancel(void *adev); 53 void audio_extn_spkr_prot_deinit(void *adev); 58 #define audio_extn_hfp_is_active(adev) (0) argument 60 #define audio_extn_hfp_set_parameters(adev, params) (0) argument 61 #define audio_extn_hfp_set_mic_mute(adev, state) (0) argument [all …]
|
D | hfp.c | 43 static int32_t start_hfp(struct audio_device *adev, 46 static int32_t stop_hfp(struct audio_device *adev); 84 static int32_t hfp_set_volume(struct audio_device *adev, float value) in hfp_set_volume() argument 119 ctl = mixer_get_ctl_by_name(adev->mixer, hfpmod.hfp_vol_mixer_ctl); in hfp_set_volume() 139 static int hfp_set_mic_volume(struct audio_device *adev, float value) in hfp_set_mic_volume() argument 163 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name); in hfp_set_mic_volume() 180 static float hfp_get_mic_volume(struct audio_device *adev) in hfp_get_mic_volume() argument 196 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name); in hfp_get_mic_volume() 226 int audio_extn_hfp_set_mic_mute(struct audio_device *adev, bool state) in audio_extn_hfp_set_mic_mute() argument 234 hfpmod.mic_volume = hfp_get_mic_volume(adev); in audio_extn_hfp_set_mic_mute() [all …]
|
D | spkr_protection.c | 138 void audio_extn_spkr_prot_calib_cancel(void *adev) in audio_extn_spkr_prot_calib_cancel() argument 145 if (pthread_equal(handle.speaker_prot_threadid, threadid) || !adev) { in audio_extn_spkr_prot_calib_cancel() 149 uc_info = get_usecase_from_list(adev, USECASE_AUDIO_SPKR_CALIB_RX); in audio_extn_spkr_prot_calib_cancel() 273 static int vi_feed_get_channels(struct audio_device *adev) in vi_feed_get_channels() argument 280 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name); in vi_feed_get_channels() 298 struct audio_device *adev = handle.adev_handle; in spkr_calibrate() local 309 if (!adev) { in spkr_calibrate() 313 if (!list_empty(&adev->usecase_list)) { in spkr_calibrate() 340 uc_info_rx->stream.out = adev->primary_output; in spkr_calibrate() 343 list_add_tail(&adev->usecase_list, &uc_info_rx->list); in spkr_calibrate() [all …]
|
D | utils.c | 38 static int set_stream_app_type_mixer_ctrl(struct audio_device *adev, in set_stream_app_type_mixer_ctrl() argument 58 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name); in set_stream_app_type_mixer_ctrl() 119 static int audio_extn_utils_send_app_type_cfg_hfp(struct audio_device *adev, in audio_extn_utils_send_app_type_cfg_hfp() argument 154 rc = platform_get_default_app_type_v2(adev->platform, PCM_PLAYBACK, &app_type); in audio_extn_utils_send_app_type_cfg_hfp() 159 rc = set_stream_app_type_mixer_ctrl(adev, pcm_device_id, app_type, in audio_extn_utils_send_app_type_cfg_hfp() 166 rc = platform_get_default_app_type_v2(adev->platform, PCM_CAPTURE, &app_type); in audio_extn_utils_send_app_type_cfg_hfp() 169 rc = set_stream_app_type_mixer_ctrl(adev, pcm_device_id, app_type, in audio_extn_utils_send_app_type_cfg_hfp() 185 rc = platform_get_default_app_type_v2(adev->platform, PCM_CAPTURE, &app_type); in audio_extn_utils_send_app_type_cfg_hfp() 187 rc = set_stream_app_type_mixer_ctrl(adev, pcm_device_id, app_type, in audio_extn_utils_send_app_type_cfg_hfp() 195 rc = platform_get_default_app_type_v2(adev->platform, PCM_PLAYBACK, &app_type); in audio_extn_utils_send_app_type_cfg_hfp() [all …]
|
D | tfa_98xx.c | 64 struct audio_device *adev; member 133 static int adev_i2s_clock_operation(int enable, struct audio_device *adev, char *paths) in adev_i2s_clock_operation() argument 139 ret = audio_route_apply_and_update_path(adev->audio_route, paths); in adev_i2s_clock_operation() 145 ret = audio_route_reset_and_update_path(adev->audio_route, paths); in adev_i2s_clock_operation() 154 static int tfa_98xx_set_audio_mode(int enable, struct audio_device *adev, exTfa98xx_audio_mode_t au… in tfa_98xx_set_audio_mode() argument 173 adev_i2s_clock_operation(enable, adev, paths); in tfa_98xx_set_audio_mode() 183 audio_mode_t mode = data->adev->mode; in tfa_98xx_get_audio_mode() 191 list_for_each(node, &data->adev->usecase_list) { in tfa_98xx_get_audio_mode() 194 if(data->adev->snd_dev_ref_cnt[usecase->out_snd_device] != 0) { in tfa_98xx_get_audio_mode() 200 if ((mode == AUDIO_MODE_IN_CALL) || audio_extn_hfp_is_active(data->adev)) { in tfa_98xx_get_audio_mode() [all …]
|
D | cirrus_playback.c | 168 void audio_extn_spkr_prot_init(void *adev) { in audio_extn_spkr_prot_init() argument 172 if (!adev) { in audio_extn_spkr_prot_init() 177 handle.adev_handle = adev; in audio_extn_spkr_prot_init() 193 void audio_extn_spkr_prot_deinit(void *adev __unused) { in audio_extn_spkr_prot_deinit() 207 struct audio_device *adev = handle.adev_handle; in audio_extn_cirrus_run_calibration() local 346 ctl = mixer_get_ctl_by_name(adev->mixer, in audio_extn_cirrus_run_calibration() 388 struct audio_device *adev = handle.adev_handle; in audio_extn_cirrus_load_usecase_configs() local 397 ctl_uc = mixer_get_ctl_by_name(adev->mixer, CRUS_SP_USECASE_MIXER); in audio_extn_cirrus_load_usecase_configs() 398 ctl_config = mixer_get_ctl_by_name(adev->mixer, in audio_extn_cirrus_load_usecase_configs() 459 struct audio_device *adev = handle.adev_handle; in audio_extn_cirrus_calibration_thread() local [all …]
|
D | maxxaudio.h | 23 #define audio_extn_ma_set_state(adev, type, vol, active) (false) argument 25 #define audio_extn_ma_set_parameters(adev, param) (0) argument 30 bool audio_extn_ma_set_state(struct audio_device *adev, int stream_type, 33 void audio_extn_ma_set_parameters(struct audio_device *adev,
|
D | ext_speaker.c | 37 struct audio_device *adev; member 101 void *audio_extn_extspk_init(struct audio_device *adev) in audio_extn_extspk_init() argument 106 data->adev = adev; in audio_extn_extspk_init() 126 list_for_each(node, &data->adev->usecase_list) { in audio_extn_extspk_update() 129 if(data->adev->snd_dev_ref_cnt[usecase->out_snd_device] != 0) { in audio_extn_extspk_update() 134 if(data->adev->snd_dev_ref_cnt[usecase->out_snd_device] != 0) { in audio_extn_extspk_update()
|
D | dsm_feedback.c | 42 int start_dsm_feedback_processing(struct audio_device *adev, int enable) in start_dsm_feedback_processing() argument 61 dsm_pcm_handle = pcm_open(adev->snd_card, in start_dsm_feedback_processing() 89 void audio_extn_dsm_feedback_enable(struct audio_device *adev, in audio_extn_dsm_feedback_enable() argument 93 if ( NULL == adev ) in audio_extn_dsm_feedback_enable() 104 start_dsm_feedback_processing(adev, benable); in audio_extn_dsm_feedback_enable()
|
D | a2dp.c | 203 struct audio_device *adev; member 583 ctl_set_bt_feedback_channel = mixer_get_ctl_by_name(a2dp.adev->mixer, in stop_abr() 596 ctl_abr_tx_path = mixer_get_ctl_by_name(a2dp.adev->mixer, in stop_abr() 629 ctl_abr_tx_path = mixer_get_ctl_by_name(a2dp.adev->mixer, in start_abr() 642 ctl_set_bt_feedback_channel = mixer_get_ctl_by_name(a2dp.adev->mixer, in start_abr() 657 a2dp.abr_config.abr_tx_handle = pcm_open(a2dp.adev->snd_card, in start_abr() 782 ctrl_scrambler_mode = mixer_get_ctl_by_name(a2dp.adev->mixer, in a2dp_check_and_set_scrambler() 832 ctl_sample_rate = mixer_get_ctl_by_name(a2dp.adev->mixer, in a2dp_set_backend_cfg() 848 ctl_sample_rate = mixer_get_ctl_by_name(a2dp.adev->mixer, in a2dp_set_backend_cfg() 873 ctrl_in_channels = mixer_get_ctl_by_name(a2dp.adev->mixer, in a2dp_set_backend_cfg() [all …]
|
D | tfa_98xx.h | 27 int audio_extn_tfa_98xx_init(struct audio_device *adev); 37 #define audio_extn_tfa_98xx_init(adev) (0) argument
|
D | maxxaudio.c | 286 static bool check_and_send_all_audio_cal(struct audio_device *adev, ma_cmd_t cmd) in check_and_send_all_audio_cal() argument 297 list_for_each(node, &adev->usecase_list) { in check_and_send_all_audio_cal() 391 static void ma_set_swap_l(struct audio_device *adev, bool enable) in ma_set_swap_l() argument 394 check_and_send_all_audio_cal(adev, MA_CMD_SWAP_ENABLE); in ma_set_swap_l() 396 check_and_send_all_audio_cal(adev, MA_CMD_SWAP_DISABLE); in ma_set_swap_l() 399 static void ma_set_rotation_l(struct audio_device *adev, int orientation) in ma_set_rotation_l() argument 402 check_and_send_all_audio_cal(adev, MA_CMD_ROTATE_ENABLE); in ma_set_rotation_l() 404 check_and_send_all_audio_cal(adev, MA_CMD_ROTATE_DISABLE); in ma_set_rotation_l() 644 bool audio_extn_ma_set_state(struct audio_device *adev, int stream_type, in audio_extn_ma_set_state() argument 675 ret = check_and_send_all_audio_cal(adev, MA_CMD_VOL); in audio_extn_ma_set_state() [all …]
|
D | soundtrigger.c | 156 struct audio_device *adev; member 440 void audio_extn_sound_trigger_set_parameters(struct audio_device *adev __unused, in audio_extn_sound_trigger_set_parameters() 501 int audio_extn_sound_trigger_init(struct audio_device *adev) in audio_extn_sound_trigger_init() argument 552 st_dev->adev = adev; in audio_extn_sound_trigger_init() 566 void audio_extn_sound_trigger_deinit(struct audio_device *adev) in audio_extn_sound_trigger_deinit() argument 569 if (st_dev && (st_dev->adev == adev) && st_dev->lib_handle) { in audio_extn_sound_trigger_deinit()
|
D | audiozoom.c | 190 struct audio_device *adev = in->dev; in audio_extn_audiozoom_set_microphone_field_dimension_zoom() local 215 platform_set_parameters(adev->platform, parms); in audio_extn_audiozoom_set_microphone_field_dimension_zoom()
|
D | usb.c | 92 struct audio_device *adev; member 214 ctl = mixer_get_ctl_by_name(usbmod->adev->mixer, dev_mixer_ctl_name); in usb_set_dev_id_mixer_ctl() 1322 void audio_extn_usb_init(void *adev) in audio_extn_usb_init() argument 1335 usbmod->adev = (struct audio_device*)adev; in audio_extn_usb_init()
|
/hardware/libhardware/modules/usbaudio/ |
D | audio_hal.c | 85 struct audio_device *adev; /* hardware information - only using this for the lock */ member 118 struct audio_device *adev; /* hardware information - only using this for the lock */ member 170 static void device_lock(struct audio_device *adev) { in device_lock() argument 171 pthread_mutex_lock(&adev->lock); in device_lock() 174 static int device_try_lock(struct audio_device *adev) { in device_try_lock() argument 175 return pthread_mutex_trylock(&adev->lock); in device_try_lock() 178 static void device_unlock(struct audio_device *adev) { in device_unlock() argument 179 pthread_mutex_unlock(&adev->lock); in device_unlock() 186 struct audio_device* adev, struct listnode* list, struct listnode* stream_node) { in adev_add_stream_to_list() argument 187 device_lock(adev); in adev_add_stream_to_list() [all …]
|
/hardware/qcom/audio/hal/msm8960/ |
D | platform.c | 80 struct audio_device *adev; member 289 void *platform_init(struct audio_device *adev) in platform_init() argument 296 adev->mixer = mixer_open(MIXER_CARD); in platform_init() 298 if (!adev->mixer) { in platform_init() 303 adev->audio_route = audio_route_init(MIXER_CARD, MIXER_XML_PATH); in platform_init() 304 if (!adev->audio_route) { in platform_init() 311 my_data->adev = adev; in platform_init() 320 adev->acdb_settings |= DMIC_FLAG; in platform_init() 323 adev->acdb_settings |= DMIC_FLAG; in platform_init() 518 voice_is_in_call(my_data->adev)) { in platform_switch_voice_call_device_pre() [all …]
|
/hardware/qcom/audio/hal/msm8916/ |
D | platform.c | 145 struct audio_device *adev; member 712 void platform_set_echo_reference(struct audio_device *adev, bool enable, in platform_set_echo_reference() argument 715 struct platform_data *my_data = (struct platform_data *)adev->platform; in platform_set_echo_reference() 720 audio_route_reset_and_update_path(adev->audio_route, in platform_set_echo_reference() 726 snd_device = platform_get_output_snd_device(adev->platform, out_device); in platform_set_echo_reference() 727 platform_add_backend_name(adev->platform, my_data->ec_ref_mixer_path, snd_device); in platform_set_echo_reference() 734 audio_route_apply_and_update_path(adev->audio_route, in platform_set_echo_reference() 774 void get_cvd_version(char *cvd_version, struct audio_device *adev) in get_cvd_version() argument 780 ctl = mixer_get_ctl_by_name(adev->mixer, CVD_VERSION_MIXER_CTL); in get_cvd_version() 957 fd = hw_util_open(plat_data->adev->snd_card); in audio_hwdep_send_cal() [all …]
|
/hardware/qcom/audio/hal/msm8974/ |
D | platform.c | 148 struct audio_device *adev; member 765 static int init_be_dai_name_table(struct audio_device *adev); 1070 struct audio_device *adev = my_data->adev; in platform_send_gain_dep_cal() local 1084 if (!voice_is_in_call(adev)) { in platform_send_gain_dep_cal() 1089 list_for_each(node, &adev->usecase_list) { in platform_send_gain_dep_cal() 1129 void platform_set_echo_reference(struct audio_device *adev, bool enable, audio_devices_t out_device) in platform_set_echo_reference() argument 1131 struct platform_data *my_data = (struct platform_data *)adev->platform; in platform_set_echo_reference() 1136 audio_route_reset_and_update_path(adev->audio_route, my_data->ec_ref_mixer_path); in platform_set_echo_reference() 1142 snd_device = platform_get_output_snd_device(adev->platform, out_device); in platform_set_echo_reference() 1143 platform_add_backend_name(adev->platform, my_data->ec_ref_mixer_path, snd_device); in platform_set_echo_reference() [all …]
|
/hardware/libhardware/modules/audio/ |
D | audio_hw.c | 574 struct stub_audio_device *adev; in adev_open() local 579 adev = calloc(1, sizeof(struct stub_audio_device)); in adev_open() 580 if (!adev) in adev_open() 583 adev->device.common.tag = HARDWARE_DEVICE_TAG; in adev_open() 584 adev->device.common.version = AUDIO_DEVICE_API_VERSION_2_0; in adev_open() 585 adev->device.common.module = (struct hw_module_t *) module; in adev_open() 586 adev->device.common.close = adev_close; in adev_open() 588 adev->device.init_check = adev_init_check; in adev_open() 589 adev->device.set_voice_volume = adev_set_voice_volume; in adev_open() 590 adev->device.set_master_volume = adev_set_master_volume; in adev_open() [all …]
|