diff options
author | Frederic Marec <frederic.marec@iot.bzh> | 2019-05-10 10:54:58 +0200 |
---|---|---|
committer | Frederic Marec <frederic.marec@iot.bzh> | 2019-05-14 09:51:57 +0200 |
commit | 88211e8b9cb19ecec8c28c1de19e0d42dadcb916 (patch) | |
tree | 2c06a6f5db06211dc2894efc01f249c8aa247dd0 /plugin/unicens-output/wrap_volume.c | |
parent | 9228c9da5b85f0fdd6b01f0309e57b846618be63 (diff) |
Git submodule migration to separated librariesicefish_8.99.5icefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.5icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.1halibut_8.0.6halibut_8.0.5halibut_8.0.4halibut_8.0.3halibut_8.0.2halibut_8.0.1halibut_8.0.0halibut_7.99.3halibut_7.99.2halibut_7.99.1halibut/8.0.6halibut/8.0.5halibut/8.0.4halibut/8.0.3halibut/8.0.2halibut/8.0.1halibut/8.0.0halibut/7.99.3halibut/7.99.2halibut/7.99.18.99.58.99.48.99.38.99.28.99.18.0.68.0.58.0.48.0.38.0.28.0.18.0.07.99.37.99.27.99.1halibut
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.c | 18 |
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; } |