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

Commit a5d9faa2 authored by Manish Dewangan's avatar Manish Dewangan
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 PCM offload path.

Change-Id: I799ee43f17975b33e37b94e222c4ce41f36bbc96
parent 27fb4059
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -460,6 +460,14 @@ bool AudioPolicyManagerCustom::isOffloadSupported(const audio_offload_info_t& of
            ALOGV("isOffloadSupported: has_video == true, returning false");
            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