TIDL: Support DRC from HAL backend 70/322370/1
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 8 Apr 2025 06:12:14 +0000 (15:12 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 8 Apr 2025 06:12:14 +0000 (15:12 +0900)
[Version] 1.3.1
[Issue Type] Improvement

Change-Id: I443d4f07d0d32218a82916af5d0ccc34bd2e4bbc
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/hal-api-codec.spec
src/hal-api-codec-ipc.c
src/service_plugin/hal-backend-service-codec.c

index 6970b9a6926afa9d7cc2acd0871f658f82ce8987..3e44768ac01cf6c25a75b0d92a34084c6d2bdd8b 100644 (file)
@@ -6,7 +6,7 @@
 ### main package #########
 Name:       %{name}
 Summary:    %{name} interface
-Version:    1.3.0
+Version:    1.3.1
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0
index a46e384d4288a7bbb28bcddb3976bd5d7c3a8306..2caa17a25ab850c9ef7177acfe8482ed1a9d0181 100644 (file)
@@ -321,6 +321,7 @@ static void __hal_codec_ipc_message_cb(void *user_data, bundle *b_msg, rpc_port_
                break;
 
        case HAL_CODEC_MESSAGE_TYPE_RESOLUTION_CHANGED:
+               SLOGD("[RESOLUTION_CHANGED] %dx%d", hal_message->resolution.width, hal_message->resolution.height);
                break;
 
        default:
@@ -378,6 +379,8 @@ static void __hal_codec_ipc_async_return_cb(void *user_data,
        g_cond_broadcast(&ipc_async_return->cond[type]);
 
        g_mutex_unlock(&ipc_async_return->lock[type]);
+
+       SLOGD("type[%d]: ret[0x%x] - done", type, ret);
 }
 
 
@@ -685,11 +688,6 @@ int hal_codec_ipc_init(hal_codec_type_e type, void **codec_handle)
        return HAL_CODEC_ERROR_NONE;
 
 _INIT_FAILED:
-       if (new_handle->rpc_handle) {
-               __hal_codec_ipc_cb_handle_release(new_handle);
-               rpc_port_proxy_codec_destroy(new_handle->rpc_handle);
-       }
-
        __hal_codec_ipc_context_release(new_handle);
 
        g_free(new_handle);
index e4c61b0d686b7e29a69a46bef34df3fe7d4816fe..eaa422524fca0b72ece43a3651313f17dc011416 100644 (file)
@@ -152,6 +152,7 @@ static hal_codec_service_s *__hal_codec_service_get_handle(rpc_port_stub_codec_c
 
 static int __hal_codec_service_message_cb(hal_codec_message_s *message, void *user_data)
 {
+       int dummy_fd[HAL_CODEC_BUFFER_PLANE_MAX] = {0, };
        int ipc_ret = 0;
        hal_codec_buffer_s *buffer = NULL;
        bundle *b_msg = NULL;
@@ -220,6 +221,11 @@ static int __hal_codec_service_message_cb(hal_codec_message_s *message, void *us
                rpc_port_stub_array_file_desc_set(fd_handle, (int *)buffer->memory.fd, buffer->memory.num_fd);
                break;
 
+       case HAL_CODEC_MESSAGE_TYPE_RESOLUTION_CHANGED:
+               rpc_port_stub_array_file_desc_create(&fd_handle);
+               rpc_port_stub_array_file_desc_set(fd_handle, (int *)dummy_fd, 0);
+               break;
+
        default:
                break;
        }
@@ -227,7 +233,7 @@ static int __hal_codec_service_message_cb(hal_codec_message_s *message, void *us
        g_mutex_lock(&service_handle->cb_lock);
 
        if (message->type == HAL_CODEC_MESSAGE_TYPE_OUTPUT_BUFFER &&
-               service_handle->is_flushing) {
+               service_handle->is_flushing && !(buffer->meta.flags & HAL_CODEC_BUFFER_FLAG_EOS)) {
                g_mutex_unlock(&service_handle->cb_lock);
                HAL_CODEC_SERVICE_LOGW("[OUTPUT_BUFFER] flushing:release buffer[%d]", buffer->index);
                hal_codec_passthrough_release_output_buffer(service_handle->codec_handle, buffer->index);
@@ -673,7 +679,7 @@ static int _hal_codec_service_backend_flush(rpc_port_stub_codec_context_h contex
 
        g_mutex_lock(&service_handle->cb_lock);
 
-       HAL_CODEC_SERVICE_LOGE_CONTEXT("set flushing");
+       HAL_CODEC_SERVICE_LOGI_CONTEXT("set flushing");
        service_handle->is_flushing = true;
 
        g_mutex_unlock(&service_handle->cb_lock);