mm-video-v4l2: Disable CVP usage when layer encoding is enabled

When Layer encoding is enabled, disable camcorder CVP usage.

Change-Id: If71cde7f4ad1b08369fb382d93a37c3970052c42
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
index 2cbfa43..0e080ba 100644
--- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
+++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
@@ -4272,6 +4272,10 @@
 bool venc_dev::venc_cvp_enable(private_handle_t *handle)
 {
     cvpMetadata.size = 0;
+    if (temporal_layers_config.nMaxLayers > 1) {
+        DEBUG_PRINT_INFO("venc_cvp_enable: disabling CVP as max layers %u", temporal_layers_config.nMaxLayers);
+        return true;
+    }
     if (getMetaData(handle, GET_CVP_METADATA, &cvpMetadata) == 0) {
         if (cvpMetadata.size == CVP_METADATA_SIZE) {
             struct v4l2_control control;