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

Commit 1b736ac6 authored by pavanc's avatar pavanc Committed by Gerrit - the friendly Code Review server
Browse files

hal: Avoid resampling when hifi audio is enabled

On internal codec, headset and speaker are on the same
backend. platform_check_codec_backend_cfg is wrongly
setting backend sample rate to 48 KHz when hifi audio
is enabled on headset.

Avoid resampling to default sample rate for headset
when hifi audio is enabled.

CRs-Fixed: 2210964
Change-Id: I170729fa286461f8de161fd4485a588a0303dac4
parent f0c46ebf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -6204,7 +6204,9 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
     * Check if the device is speaker or handset,assumption handset shares
     * backend with speaker, and these devices are restricited to 48kHz.
     */
    if (platform_check_backends_match(SND_DEVICE_OUT_SPEAKER, snd_device)) {
    if (platform_check_backends_match(SND_DEVICE_OUT_SPEAKER, snd_device) &&
        !(codec_device_supports_native_playback(usecase->devices) &&
          my_data->hifi_audio && !check_hdset_combo_device(snd_device))) {
        sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE;

        if (bit_width >= 24) {