Lines Matching refs:hfpmod

61 static struct hfp_module hfpmod = {  variable
92 hfpmod.hfp_volume = value; in hfp_set_volume()
104 if (!hfpmod.is_hfp_running) { in hfp_set_volume()
110 if (0 == hfpmod.hfp_vol_mixer_ctl[0]) { in hfp_set_volume()
112 strcpy(hfpmod.hfp_vol_mixer_ctl, "PRI AUXPCM LOOPBACK Volume"); in hfp_set_volume()
114 strcpy(hfpmod.hfp_vol_mixer_ctl, "Internal HFP RX Volume"); in hfp_set_volume()
117 __func__, hfpmod.hfp_vol_mixer_ctl); in hfp_set_volume()
119 ctl = mixer_get_ctl_by_name(adev->mixer, hfpmod.hfp_vol_mixer_ctl); in hfp_set_volume()
122 __func__, hfpmod.hfp_vol_mixer_ctl); in hfp_set_volume()
146 if (!hfpmod.is_hfp_running) { in hfp_set_mic_volume()
188 if (!hfpmod.is_hfp_running) { in hfp_get_mic_volume()
230 if (state == hfpmod.mic_mute) in audio_extn_hfp_set_mic_mute()
234 hfpmod.mic_volume = hfp_get_mic_volume(adev); in audio_extn_hfp_set_mic_mute()
236 rc = hfp_set_mic_volume(adev, (state == true) ? 0.0 : hfpmod.mic_volume); in audio_extn_hfp_set_mic_mute()
238 hfpmod.mic_mute = state; in audio_extn_hfp_set_mic_mute()
260 uc_info->id = hfpmod.ucid; in start_hfp()
271 select_devices(adev, hfpmod.ucid); in start_hfp()
290 hfpmod.hfp_sco_rx = pcm_open(adev->snd_card, in start_hfp()
293 if (hfpmod.hfp_sco_rx && !pcm_is_ready(hfpmod.hfp_sco_rx)) { in start_hfp()
294 ALOGE("%s: %s", __func__, pcm_get_error(hfpmod.hfp_sco_rx)); in start_hfp()
302 hfpmod.hfp_pcm_rx = pcm_open(adev->snd_card, in start_hfp()
305 if (hfpmod.hfp_pcm_rx && !pcm_is_ready(hfpmod.hfp_pcm_rx)) { in start_hfp()
306 ALOGE("%s: %s", __func__, pcm_get_error(hfpmod.hfp_pcm_rx)); in start_hfp()
311 hfpmod.hfp_sco_tx = pcm_open(adev->snd_card, in start_hfp()
314 if (hfpmod.hfp_sco_tx && !pcm_is_ready(hfpmod.hfp_sco_tx)) { in start_hfp()
315 ALOGE("%s: %s", __func__, pcm_get_error(hfpmod.hfp_sco_tx)); in start_hfp()
323 hfpmod.hfp_pcm_tx = pcm_open(adev->snd_card, in start_hfp()
326 if (hfpmod.hfp_pcm_tx && !pcm_is_ready(hfpmod.hfp_pcm_tx)) { in start_hfp()
327 ALOGE("%s: %s", __func__, pcm_get_error(hfpmod.hfp_pcm_tx)); in start_hfp()
332 pcm_start(hfpmod.hfp_sco_rx); in start_hfp()
333 pcm_start(hfpmod.hfp_sco_tx); in start_hfp()
335 pcm_start(hfpmod.hfp_pcm_rx); in start_hfp()
336 pcm_start(hfpmod.hfp_pcm_tx); in start_hfp()
341 hfpmod.is_hfp_running = true; in start_hfp()
342 hfp_set_volume(adev, hfpmod.hfp_volume); in start_hfp()
363 hfpmod.is_hfp_running = false; in stop_hfp()
366 if (hfpmod.hfp_sco_rx) { in stop_hfp()
367 pcm_close(hfpmod.hfp_sco_rx); in stop_hfp()
368 hfpmod.hfp_sco_rx = NULL; in stop_hfp()
370 if (hfpmod.hfp_sco_tx) { in stop_hfp()
371 pcm_close(hfpmod.hfp_sco_tx); in stop_hfp()
372 hfpmod.hfp_sco_tx = NULL; in stop_hfp()
374 if (hfpmod.hfp_pcm_rx) { in stop_hfp()
375 pcm_close(hfpmod.hfp_pcm_rx); in stop_hfp()
376 hfpmod.hfp_pcm_rx = NULL; in stop_hfp()
378 if (hfpmod.hfp_pcm_tx) { in stop_hfp()
379 pcm_close(hfpmod.hfp_pcm_tx); in stop_hfp()
380 hfpmod.hfp_pcm_tx = NULL; in stop_hfp()
383 uc_info = get_usecase_from_list(adev, hfpmod.ucid); in stop_hfp()
386 __func__, hfpmod.ucid); in stop_hfp()
417 hfp_usecase = get_usecase_from_list(adev, hfpmod.ucid); in audio_extn_hfp_is_active()
427 return hfpmod.ucid; in audio_extn_hfp_get_usecase()
442 if (!hfpmod.is_hfp_running) in audio_extn_hfp_set_parameters()
447 if (hfpmod.is_hfp_running) in audio_extn_hfp_set_parameters()
459 hfpmod.ucid = USECASE_AUDIO_HFP_SCO; in audio_extn_hfp_set_parameters()
462 hfpmod.ucid = USECASE_AUDIO_HFP_SCO_WB; in audio_extn_hfp_set_parameters()
468 if (hfpmod.is_hfp_running) { in audio_extn_hfp_set_parameters()
475 select_devices(adev, hfpmod.ucid); in audio_extn_hfp_set_parameters()
484 strcpy(hfpmod.hfp_vol_mixer_ctl, value); in audio_extn_hfp_set_parameters()