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

Commit 26612294 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "AHAL: Reset SR to 48khz if the backend doesn't support the multiple of 44.1khz"

parents 1218bb59 9c1100c3
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -9378,8 +9378,11 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
            ALOGD("%s:becf: afe: napb not active - set non fractional rate",
                       __func__);
        }
        /*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 &&
        /*
         * reset sample rate to 48khz if sample rate less than 44.1khz, or device backend does not
         * support 44.1 khz and the multiple of 44.1khz
         */
        if ((sample_rate % OUTPUT_SAMPLING_RATE_44100 == 0 &&
             backend_idx != HEADPHONE_44_1_BACKEND &&
             backend_idx != HEADPHONE_BACKEND &&
             backend_idx != USB_AUDIO_RX_BACKEND) ||