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

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

Merge "hal: USB headset support for native playback."

parents 1deba5a0 62968cef
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3261,7 +3261,8 @@ int codec_device_supports_native_playback(audio_devices_t out_device)

    if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
        out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET ||
        out_device & AUDIO_DEVICE_OUT_LINE)
        out_device & AUDIO_DEVICE_OUT_LINE ||
        out_device & AUDIO_DEVICE_OUT_USB_HEADSET)
        ret = true;

    return ret;
@@ -6277,7 +6278,8 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
        /*reset sample rate to 48khz if sample rate less than 44.1khz, or device backend dose not support 44.1 khz*/
        if ((sample_rate == OUTPUT_SAMPLING_RATE_44100 &&
             backend_idx != HEADPHONE_44_1_BACKEND &&
             backend_idx != HEADPHONE_BACKEND) ||
             backend_idx != HEADPHONE_BACKEND &&
             backend_idx != USB_AUDIO_RX_BACKEND) ||
            sample_rate < OUTPUT_SAMPLING_RATE_44100) {
            sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE;
            ALOGD("%s:becf: afe: set sample rate to default Sample Rate(48k)",__func__);