Lines Matching refs:adev
37 static int32_t start_hfp(struct audio_device *adev,
40 static int32_t stop_hfp(struct audio_device *adev);
74 static int32_t hfp_set_volume(struct audio_device *adev, float value)
107 ctl = mixer_get_ctl_by_name(adev->mixer, hfpmod.hfp_vol_mixer_ctl);
122 static int32_t start_hfp(struct audio_device *adev,
130 adev->enable_hfp = true;
131 platform_set_mic_mute(adev->platform, false);
136 uc_info->stream.out = adev->primary_output;
137 uc_info->devices = adev->primary_output->devices;
141 list_add_tail(&adev->usecase_list, &uc_info->list);
143 select_devices(adev, hfpmod.ucid);
161 __func__, adev->snd_card, pcm_dev_rx_id);
162 hfpmod.hfp_sco_rx = pcm_open(adev->snd_card,
171 __func__, adev->snd_card, pcm_dev_tx_id);
172 hfpmod.hfp_pcm_rx = pcm_open(adev->snd_card,
180 hfpmod.hfp_sco_tx = pcm_open(adev->snd_card,
189 __func__, adev->snd_card, pcm_dev_tx_id);
190 hfpmod.hfp_pcm_tx = pcm_open(adev->snd_card,
204 hfp_set_volume(adev, hfpmod.hfp_volume);
210 stop_hfp(adev);
215 static int32_t stop_hfp(struct audio_device *adev)
241 uc_info = get_usecase_from_list(adev, hfpmod.ucid);
249 disable_audio_route(adev, uc_info);
252 disable_snd_device(adev, uc_info->out_snd_device);
253 disable_snd_device(adev, uc_info->in_snd_device);
256 platform_set_echo_reference(adev, false, AUDIO_DEVICE_NONE);
259 if (voice_get_mic_mute(adev)) {
260 platform_set_mic_mute(adev->platform, false);
263 adev->enable_hfp = false;
272 bool audio_extn_hfp_is_active(struct audio_device *adev)
275 hfp_usecase = get_usecase_from_list(adev, hfpmod.ucid);
288 void audio_extn_hfp_set_parameters(struct audio_device *adev, struct str_parms *parms)
300 ret = start_hfp(adev,parms);
302 stop_hfp(adev);
326 select_devices(adev, hfpmod.ucid);
349 hfp_set_volume(adev, vol);