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

Commit 7c52d437 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: msm8974: fix device selection for voice call" into audio-hal.lnx.6.0

parents 2ff172bc 552b0832
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8816,6 +8816,7 @@ static int adev_open(const hw_module_t *module, const char *name,
    adev->perf_lock_opts[1] = 0x20E;
    adev->perf_lock_opts_size = 2;
    adev->dsp_bit_width_enforce_mode = 0;
    adev->enable_hfp = false;

    /* Loads platform specific libraries dynamically */
    adev->platform = platform_init(adev);
+22 −24
Original line number Diff line number Diff line
@@ -4764,12 +4764,6 @@ snd_device_t platform_get_output_snd_device(void *platform, struct stream_out *o
            else
                snd_device = SND_DEVICE_OUT_BT_SCO;
        } else if (devices & (AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_SPEAKER_SAFE)) {
            if (!adev->enable_hfp) {
                snd_device = SND_DEVICE_OUT_VOICE_SPEAKER;
            } else {
                snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_HFP;
            }
        } else if (devices & AUDIO_DEVICE_OUT_SPEAKER) {
            if (my_data->is_vbat_speaker || my_data->is_bcl_speaker) {
                if (hw_info_is_stereo_spkr(my_data->hw_info)) {
                    if (my_data->mono_speaker == SPKR_1)
@@ -4782,13 +4776,17 @@ snd_device_t platform_get_output_snd_device(void *platform, struct stream_out *o
                if (hw_info_is_stereo_spkr(my_data->hw_info)) {
                    if (my_data->voice_speaker_stereo)
                        snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_STEREO;
                    else if (adev->enable_hfp)
                        snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_HFP;
                    else {
                        if (my_data->mono_speaker == SPKR_1)
                            snd_device = SND_DEVICE_OUT_VOICE_SPEAKER;
                        else
                            snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_2;
                    }
                    } else
                } else if (adev->enable_hfp)
                    snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_HFP;
                else
                    snd_device = SND_DEVICE_OUT_VOICE_SPEAKER;
            }
        } else if (devices & AUDIO_DEVICE_OUT_ALL_A2DP) {