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

Commit 70200108 authored by Manish Dewangan's avatar Manish Dewangan Committed by Pavan Chikkala
Browse files

policy_hal: Reject offload path for AV streaming usecase

-Currently offload path is being used for AV streaming usecase.
-This sometime results in framedrop/glitch as video rendering
 is getting delayed due to delay in filling audio compress buffer.
-Disable compress offload for AV streaming usecase. With AV streaming
 usecase will be via deep buffer path.

Change-Id: I799ee43f17975b33e37b94e222c4ce41f36bbc96
parent eac9cc7d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -477,6 +477,13 @@ bool AudioPolicyManagerCustom::isOffloadSupported(const audio_offload_info_t& of
        return false;
    }

    const bool allowOffloadStreamingWithVideo = property_get_bool("av.streaming.offload.enable",
                                                               false /*default value*/);
    if(offloadInfo.has_video && offloadInfo.is_streaming && !allowOffloadStreamingWithVideo) {
       ALOGW("offload disabled by av.streaming.offload.enable = %s ", propValue );
       return false;
    }

    //If duration is less than minimum value defined in property, return false
    if (property_get("audio.offload.min.duration.secs", propValue, NULL)) {
        if (offloadInfo.duration_us < (atoi(propValue) * 1000000 )) {