Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5198f07 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix the double PCM open during HFP call"

parents d743e3b6 a3c98d8c
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -438,10 +438,17 @@ void audio_extn_hfp_set_parameters(struct audio_device *adev, struct str_parms *
    ret = str_parms_get_str(parms, AUDIO_PARAMETER_HFP_ENABLE, value,
                            sizeof(value));
    if (ret >= 0) {
           if (!strncmp(value,"true",sizeof(value)))
               ret = start_hfp(adev,parms);
           if (!strncmp(value,"true",sizeof(value))) {
               if (!hfpmod.is_hfp_running)
                   start_hfp(adev,parms);
               else
                   ALOGW("%s: HFP is already active.", __func__);
           } else {
               if (hfpmod.is_hfp_running)
                   stop_hfp(adev);
               else
                   ALOGW("%s: ignore STOP, HFC not active", __func__);
           }
    }
    memset(value, 0, sizeof(value));
    ret = str_parms_get_str(parms,AUDIO_PARAMETER_HFP_SET_SAMPLING_RATE, value,