summaryrefslogtreecommitdiffstats
path: root/plugin/unicens-output/wrap_volume.c
diff options
context:
space:
mode:
authorFrederic Marec <frederic.marec@iot.bzh>2019-05-10 10:54:58 +0200
committerFrederic Marec <frederic.marec@iot.bzh>2019-05-14 09:51:57 +0200
commit88211e8b9cb19ecec8c28c1de19e0d42dadcb916 (patch)
tree2c06a6f5db06211dc2894efc01f249c8aa247dd0 /plugin/unicens-output/wrap_volume.c
parent9228c9da5b85f0fdd6b01f0309e57b846618be63 (diff)
Bug-AGL: SPEC-2139 Change-Id: I6f1227f7b293b6a3dc8d527e18cd482955783021 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
Diffstat (limited to 'plugin/unicens-output/wrap_volume.c')
-rw-r--r--plugin/unicens-output/wrap_volume.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugin/unicens-output/wrap_volume.c b/plugin/unicens-output/wrap_volume.c
index 9c3d7a1..3029a5a 100644
--- a/plugin/unicens-output/wrap_volume.c
+++ b/plugin/unicens-output/wrap_volume.c
@@ -47,7 +47,7 @@ static int wrap_volume_service_timeout_cb(sd_event_source* source,
sd_event_source_unref(source);
if((ret = lib_most_volume_service()))
- AFB_ApiError(unicensHalApiHandle, "lib_most_volume_service returns %d", ret);
+ AFB_API_ERROR(unicensHalApiHandle, "lib_most_volume_service returns %d", ret);
return 0;
}
@@ -56,9 +56,9 @@ static void wrap_volume_service_cb(uint16_t timeout)
{
uint64_t usec;
- sd_event_now(AFB_GetEventLoop(unicensHalApiHandle), CLOCK_BOOTTIME, &usec);
+ sd_event_now(afb_api_get_event_loop(unicensHalApiHandle), CLOCK_BOOTTIME, &usec);
- sd_event_add_time(AFB_GetEventLoop(unicensHalApiHandle),
+ sd_event_add_time(afb_api_get_event_loop(unicensHalApiHandle),
NULL,
CLOCK_MONOTONIC,
usec + (timeout*1000),
@@ -95,19 +95,19 @@ extern int wrap_volume_init(void)
return -ret;
}
-extern int wrap_volume_master(AFB_ApiT apiHandle, int volume)
+extern int wrap_volume_master(afb_api_t apiHandle, int volume)
{
int ret;
if((ret = lib_most_volume_set(LIB_MOST_VOLUME_MASTER,
(uint8_t) wrap_volume_calculate(volume, 100, 255)))) {
- AFB_ApiError(apiHandle, "%s: volume library not ready.", __func__);
+ AFB_API_ERROR(apiHandle, "%s: volume library not ready.", __func__);
}
return -ret;
}
-extern int wrap_volume_pcm(AFB_ApiT apiHandle, int *volume_ptr, int volume_sz)
+extern int wrap_volume_pcm(afb_api_t apiHandle, int *volume_ptr, int volume_sz)
{
int cnt, new_value, ret = 0;
@@ -118,7 +118,7 @@ extern int wrap_volume_pcm(AFB_ApiT apiHandle, int *volume_ptr, int volume_sz)
new_value = wrap_volume_calculate(volume_ptr[cnt], 100, 255);
if((ret = lib_most_volume_set((enum lib_most_volume_channel_t) cnt, (uint8_t) new_value))) {
- AFB_ApiError(apiHandle, "%s: volume library not ready.", __func__);
+ AFB_API_ERROR(apiHandle, "%s: volume library not ready.", __func__);
break;
}
}
@@ -126,12 +126,12 @@ extern int wrap_volume_pcm(AFB_ApiT apiHandle, int *volume_ptr, int volume_sz)
return -ret;
}
-extern int wrap_volume_node_avail(AFB_ApiT apiHandle, int node, int available)
+extern int wrap_volume_node_avail(afb_api_t apiHandle, int node, int available)
{
int ret;
if((ret = lib_most_volume_node_available((uint16_t) node, (uint8_t) available)))
- AFB_ApiError(apiHandle, "%s: volume library not ready.", __func__);
+ AFB_API_ERROR(apiHandle, "%s: volume library not ready.", __func__);
return -ret;
}