Fix coverity issues (EVALUATION_ORDER)
[platform/adaptation/emulator/audio-hal-emul.git] / hal-backend-audio.c
index aa44540..5048b7b 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * audio-hal
+ *
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -15,14 +34,21 @@ static int audio_emul_init(void **data)
 
     funcs->init = audio_init;
     funcs->deinit = audio_deinit;
+
     funcs->get_volume_level_max = audio_get_volume_level_max;
+    funcs->get_volume_level = audio_get_volume_level;
     funcs->set_volume_level = audio_set_volume_level;
     funcs->get_volume_value = audio_get_volume_value;
     funcs->get_volume_mute = audio_get_volume_mute;
     funcs->set_volume_mute = audio_set_volume_mute;
+    funcs->set_volume_ratio = audio_set_volume_ratio;
+    funcs->notify_ducking_activation_changed = audio_notify_ducking_activation_changed;
+
     funcs->update_route = audio_update_route;
     funcs->update_route_option = audio_update_route_option;
+
     funcs->notify_stream_connection_changed = audio_notify_stream_connection_changed;
+
     funcs->pcm_open = audio_pcm_open;
     funcs->pcm_start = audio_pcm_start;
     funcs->pcm_stop = audio_pcm_stop;
@@ -35,6 +61,9 @@ static int audio_emul_init(void **data)
     funcs->pcm_get_params = audio_pcm_get_params;
     funcs->pcm_set_params = audio_pcm_set_params;
 
+    funcs->add_message_cb = audio_add_message_cb;
+    funcs->remove_message_cb = audio_remove_message_cb;
+
     *data = (void *)funcs;
 
     return 0;