diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2019-01-07 11:30:12 +0100 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2019-01-28 15:38:28 +0100 |
commit | 4f44ee8f17789ac27cd1e29a451ac450c7dbeb06 (patch) | |
tree | e27e4c05a417ef2d8a9ca12451af0f8e298cc1cb /4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c | |
parent | a93c3566d181e82a39b32acffdb13a411ca4f5f5 (diff) |
Turn '4a-hal-utilities' into an internal library
That way, includes will be cleaner and '4a-hal-utilities'
functions will be usable in plugin.
Change-Id: I8a2146bd4e5dd5ef449b9ba7f2b1eed4d59045d3
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c')
-rw-r--r-- | 4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c index 4ae5a13..f1f99a6 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c @@ -24,10 +24,13 @@ #include <alsa/asoundlib.h> +#include <afb-definitions.h> + #include <ctl-config.h> -#include "../4a-hal-utilities/4a-hal-utilities-data.h" -#include "../4a-hal-utilities/4a-hal-utilities-appfw-responses-handler.h" +#include "4a-hal-utilities-alsa-data.h" +#include "4a-hal-utilities-data.h" +#include "4a-hal-utilities-appfw-responses-handler.h" #include "4a-hal-controllers-alsacore-link.h" #include "4a-hal-controllers-value-handler.h" @@ -64,33 +67,6 @@ snd_ctl_elem_type_t HalCtlsMapsAlsaTypeToEnum(const char *label) } /******************************************************************************* - * Free contents of 'CtlHalAlsaMapT' data structure * - ******************************************************************************/ - -uint8_t HalCtlsFreeAlsaCtlsMap(struct CtlHalAlsaMapT *alsaCtlsMap) -{ - int idx; - - if(! alsaCtlsMap) - return -1; - - if(alsaCtlsMap->ctlsCount > 0 && ! alsaCtlsMap->ctls) - return -2; - - for(idx = 0; idx < alsaCtlsMap->ctlsCount; idx++) { - free(alsaCtlsMap->ctls[idx].action); - free(alsaCtlsMap->ctls[idx].ctl.alsaCtlProperties.enums); - free(alsaCtlsMap->ctls[idx].ctl.alsaCtlProperties.dbscale); - } - - free(alsaCtlsMap->ctls); - - free(alsaCtlsMap); - - return 0; -} - -/******************************************************************************* * HAL controllers alsacore calls funtions * ******************************************************************************/ |