Lines Matching refs:adev
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()
991 get_cvd_version(cvd_version, my_data->adev); in platform_acdb_init()
995 snd_card_name = mixer_get_name(my_data->adev->mixer); in platform_acdb_init()
1037 void *platform_init(struct audio_device *adev) in platform_init() argument
1080 adev->mixer = mixer_open(snd_card_num); in platform_init()
1082 if (!adev->mixer) { in platform_init()
1091 snd_card_name = mixer_get_name(adev->mixer); in platform_init()
1106 adev->audio_route = audio_route_init(snd_card_num, in platform_init()
1108 if (!adev->audio_route) { in platform_init()
1115 mixer_close(adev->mixer); in platform_init()
1116 adev->mixer = NULL; in platform_init()
1119 adev->snd_card = snd_card_num; in platform_init()
1124 mixer_close(adev->mixer); in platform_init()
1125 adev->mixer = NULL; in platform_init()
1132 my_data->adev = adev; in platform_init()
1247 audio_extn_a2dp_init(adev); in platform_init()
1250 audio_extn_spkr_prot_init(adev); in platform_init()
1264 audio_extn_spkr_prot_deinit(my_data->adev); in platform_deinit()
1295 mixer_close(my_data->adev->mixer); in platform_deinit()
1335 bool platform_check_and_set_playback_backend_cfg(struct audio_device* adev __unused, in platform_check_and_set_playback_backend_cfg()
1342 bool platform_check_and_set_capture_backend_cfg(struct audio_device* adev __unused, in platform_check_and_set_capture_backend_cfg()
1759 void platform_set_speaker_gain_in_combo(struct audio_device *adev __unused,
1769 struct audio_device *adev = my_data->adev; local
1783 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
1801 ctl = mixer_get_ctl_by_name(adev->mixer, mute_mixer_ctl_name);
1815 struct audio_device *adev = my_data->adev; local
1823 if (audio_extn_hfp_is_active(adev))
1827 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
1835 if (audio_extn_hfp_is_active(adev))
1845 struct audio_device *adev = my_data->adev; local
1866 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
1914 struct audio_device *adev = my_data->adev; local
1915 audio_mode_t mode = adev->mode;
1961 if (mode == AUDIO_MODE_IN_CALL || audio_extn_hfp_is_active(adev)) {
1965 if (adev->voice.tty_mode != TTY_MODE_OFF) {
1966 switch (adev->voice.tty_mode) {
1978 __func__, adev->voice.tty_mode);
1988 if (adev->bt_wb_speech_enabled)
1995 if (audio_extn_hfp_is_active(adev))
2029 if (adev->bt_wb_speech_enabled)
2056 struct audio_device *adev = my_data->adev; local
2071 adev->acdb_settings |= DMIC_FLAG;
2078 adev->acdb_settings |= DMIC_FLAG;
2086 platform_set_echo_reference(adev, true, out_device);
2097 struct audio_device *adev = my_data->adev; local
2113 adev->acdb_settings |= DMIC_FLAG;
2119 adev->acdb_settings |= DMIC_FLAG;
2125 platform_set_echo_reference(adev, true, out_device);
2138 adev->acdb_settings |= DMIC_FLAG;
2144 adev->acdb_settings |= DMIC_FLAG;
2150 platform_set_echo_reference(adev, true, out_device);
2163 adev->acdb_settings |= DMIC_FLAG;
2169 adev->acdb_settings |= DMIC_FLAG;
2175 platform_set_echo_reference(adev, false, out_device);
2177 platform_set_echo_reference(adev, false, out_device);
2188 struct audio_device *adev = my_data->adev; local
2189 audio_mode_t mode = adev->mode;
2193 in = adev_get_active_input(adev);
2206 audio_extn_hfp_is_active(adev))) {
2207 if (adev->voice.tty_mode != TTY_MODE_OFF) {
2211 switch (adev->voice.tty_mode) {
2223 __func__, adev->voice.tty_mode);
2234 if (audio_extn_hfp_is_active(adev))
2235 platform_set_echo_reference(adev, true, out_device);
2238 adev->acdb_settings |= DMIC_FLAG;
2242 if (audio_extn_hfp_is_active(adev))
2243 platform_set_echo_reference(adev, true, out_device);
2245 if (adev->bt_wb_speech_enabled) {
2246 if (adev->bluetooth_nrec)
2251 if (adev->bluetooth_nrec)
2261 adev->acdb_settings |= QMIC_FLAG;
2264 adev->acdb_settings |= DMIC_FLAG;
2272 if (audio_extn_hfp_is_active(adev)) {
2274 platform_set_echo_reference(adev, true, out_device);
2294 adev->acdb_settings |= DMIC_FLAG;
2300 adev->acdb_settings |= DMIC_FLAG;
2339 if (adev->bt_wb_speech_enabled) {
2340 if (adev->bluetooth_nrec)
2345 if (adev->bluetooth_nrec)
2376 if (adev->bt_wb_speech_enabled) {
2377 if (adev->bluetooth_nrec)
2382 if (adev->bluetooth_nrec)
2406 struct audio_device *adev = my_data->adev; local
2426 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
2440 struct audio_device *adev = my_data->adev; local
2450 ctl = mixer_get_ctl_by_name(adev->mixer, AUDIO_DATA_BLOCK_MIXER_CTL);
2498 struct audio_device *adev = my_data->adev; local
2504 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
2576 audio_extn_hfp_set_parameters(my_data->adev, parms);
2714 int ramp_speaker_gain(struct audio_device *adev, bool ramp_up, int target_ramp_up_gain) {
2721 struct mixer_ctl *ctl_left = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name_gain_left);
2722 struct mixer_ctl *ctl_right = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name_gain_right);
2774 int platform_set_swap_mixer(struct audio_device *adev, bool swap_channels)
2779 struct platform_data *my_data = (struct platform_data *)adev->platform;
2789 audio_route_apply_and_update_path(adev->audio_route, mixer_path);
2792 audio_route_apply_and_update_path(adev->audio_route, mixer_path);
2795 ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
2812 int platform_check_and_set_swap_lr_channels(struct audio_device *adev, bool swap_channels)
2817 struct platform_data *my_data = (struct platform_data *)adev->platform;
2821 return platform_set_swap_channels(adev, swap_channels);
2824 int platform_set_swap_channels(struct audio_device *adev, bool swap_channels)
2829 struct platform_data *my_data = (struct platform_data *)adev->platform;
2833 if ((adev->mode == AUDIO_MODE_IN_COMMUNICATION) || (adev->mode == AUDIO_MODE_IN_CALL)) {
2834 ALOGV("%s: will not swap due to audio mode %d", __func__, adev->mode);
2838 list_for_each(node, &adev->usecase_list) {
2849 const int initial_skpr_gain = ramp_speaker_gain(adev, false /*ramp_up*/, -1);
2850 select_devices(adev, usecase->id);
2852 ramp_speaker_gain(adev, true /*ramp_up*/, initial_skpr_gain);
2855 platform_set_swap_mixer(adev, swap_channels);
2906 int platform_set_sidetone(struct audio_device *adev,
2922 audio_route_apply_and_update_path(adev->audio_route, str);
2924 audio_route_reset_and_update_path(adev->audio_route, str);
2976 int platform_set_backend_cfg(const struct audio_device* adev __unused,