Lines Matching refs:adev

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()
551 my_data->adev->acdb_settings); in platform_switch_voice_call_device_post()
605 void platform_set_speaker_gain_in_combo(struct audio_device *adev __unused, in platform_set_speaker_gain_in_combo()
636 if (my_data->adev->mode == AUDIO_MODE_IN_CALL) { in platform_set_mic_mute()
663 struct audio_device *adev = my_data->adev; in platform_get_output_snd_device() local
664 audio_mode_t mode = adev->mode; in platform_get_output_snd_device()
674 if (voice_is_in_call(adev)) { in platform_get_output_snd_device()
677 if (adev->voice.tty_mode == TTY_MODE_FULL) in platform_get_output_snd_device()
679 else if (adev->voice.tty_mode == TTY_MODE_VCO) in platform_get_output_snd_device()
681 else if (adev->voice.tty_mode == TTY_MODE_HCO) in platform_get_output_snd_device()
688 if (adev->bt_wb_speech_enabled) { in platform_get_output_snd_device()
745 if (adev->bt_wb_speech_enabled) { in platform_get_output_snd_device()
767 struct audio_device *adev = my_data->adev; in platform_get_input_snd_device() local
768 audio_mode_t mode = adev->mode; in platform_get_input_snd_device()
772 in = adev_get_active_input(adev); in platform_get_input_snd_device()
782 if ((out_device != AUDIO_DEVICE_NONE) && voice_is_in_call(adev)) { in platform_get_input_snd_device()
783 if (adev->voice.tty_mode != TTY_MODE_OFF) { in platform_get_input_snd_device()
786 switch (adev->voice.tty_mode) { in platform_get_input_snd_device()
797 ALOGE("%s: Invalid TTY mode (%#x)", __func__, adev->voice.tty_mode); in platform_get_input_snd_device()
820 if (adev->bt_wb_speech_enabled) { in platform_get_input_snd_device()
872 set_echo_reference(adev->mixer, "SLIM_RX"); in platform_get_input_snd_device()
874 set_echo_reference(adev->mixer, "NONE"); in platform_get_input_snd_device()
895 if (adev->bt_wb_speech_enabled) { in platform_get_input_snd_device()
917 if (adev->bt_wb_speech_enabled) { in platform_get_input_snd_device()
938 struct audio_device *adev = my_data->adev; in platform_set_hdmi_channels() local
958 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name); in platform_set_hdmi_channels()
1170 void platform_set_echo_reference(struct audio_device *adev __unused, in platform_set_echo_reference()
1178 int ramp_speaker_gain(struct audio_device *adev, bool ramp_up, int target_ramp_up_gain) { in ramp_speaker_gain() argument
1185 struct mixer_ctl *ctl_left = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name_gain_left); in ramp_speaker_gain()
1186 struct mixer_ctl *ctl_right = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name_gain_right); in ramp_speaker_gain()
1238 int platform_set_swap_mixer(struct audio_device *adev, bool swap_channels) in platform_set_swap_mixer() argument
1243 struct platform_data *my_data = (struct platform_data *)adev->platform; in platform_set_swap_mixer()
1253 audio_route_apply_and_update_path(adev->audio_route, mixer_path); in platform_set_swap_mixer()
1256 audio_route_apply_and_update_path(adev->audio_route, mixer_path); in platform_set_swap_mixer()
1259 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name); in platform_set_swap_mixer()
1276 int platform_check_and_set_swap_lr_channels(struct audio_device *adev, bool swap_channels) in platform_check_and_set_swap_lr_channels() argument
1281 struct platform_data *my_data = (struct platform_data *)adev->platform; in platform_check_and_set_swap_lr_channels()
1285 return platform_set_swap_channels(adev, swap_channels); in platform_check_and_set_swap_lr_channels()
1288 int platform_set_swap_channels(struct audio_device *adev, bool swap_channels) in platform_set_swap_channels() argument
1293 struct platform_data *my_data = (struct platform_data *)adev->platform; in platform_set_swap_channels()
1297 if ((adev->mode == AUDIO_MODE_IN_COMMUNICATION) || (adev->mode == AUDIO_MODE_IN_CALL)) { in platform_set_swap_channels()
1298 ALOGV("%s: will not swap due to audio mode %d", __func__, adev->mode); in platform_set_swap_channels()
1302 list_for_each(node, &adev->usecase_list) { in platform_set_swap_channels()
1313 const int initial_skpr_gain = ramp_speaker_gain(adev, false /*ramp_up*/, -1); in platform_set_swap_channels()
1314 select_devices(adev, usecase->id); in platform_set_swap_channels()
1316 ramp_speaker_gain(adev, true /*ramp_up*/, initial_skpr_gain); in platform_set_swap_channels()
1319 platform_set_swap_mixer(adev, swap_channels); in platform_set_swap_channels()
1356 bool platform_check_and_set_playback_backend_cfg(struct audio_device* adev __unused, in platform_check_and_set_playback_backend_cfg()
1363 bool platform_check_and_set_capture_backend_cfg(struct audio_device* adev __unused, in platform_check_and_set_capture_backend_cfg()
1418 int platform_set_sidetone(struct audio_device *adev, in platform_set_sidetone() argument
1433 audio_route_apply_and_update_path(adev->audio_route, str); in platform_set_sidetone()
1435 audio_route_reset_and_update_path(adev->audio_route, str); in platform_set_sidetone()
1482 int platform_set_backend_cfg(const struct audio_device* adev __unused, in platform_set_backend_cfg()