aboutsummaryrefslogtreecommitdiffstats
path: root/src/4a-internals-hal/4a-internals-hal-api-loader.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-17Add a function to delete all hal apiJonathan Aillet1-0/+39
BUG-AGL: SPEC-2893 Change-Id: I577565ac2134f87151491644c74c057e3634ed52 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-10-17Unmanage all halmap before deleting hal apiJonathan Aillet1-2/+13
Unmanage all halmap before deleting hal api. This assures removing all added custom ALSA control before deleting hal api. BUG-AGL: SPEC-2893 Change-Id: Id7af6c198d3d215709e81679e4e310d24b501458 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-10-17Add verbose level to json hal info verbJonathan Aillet1-1/+1
Add verbose level to specify the requested information level when calling a json hal 'info' verb. Also, move into a function the code that allows to get information about json hal. BUG-AGL: SPEC-2889 Change-Id: I9d5cbc6cfa550f4f7c8033dad0f3ec66d1268ea5 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-10-17Move hal api delete code into a functionJonathan Aillet1-0/+38
BUG-AGL: SPEC-2885 Change-Id: I23c605440782f8caeef30c1fe41f4cac5b704dbb Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-10-17Prevent binder exit when hal initialization failsJonathan Aillet1-1/+1
No longer returns an error in hal api initialization function when an non-blocking error happens (e.g. card-sound not found). This will prevent application framework binder exit. BUG-AGL: SPEC-2906 Change-Id: I0ef5e5f624fc0021771f40f37ce5663510a7e03e Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-08-12Move ping function in 4a-hal-utilitiesJonathan Aillet1-1/+3
Move ping function in 4a-utilities and register it as verb into 4a-hal-manager and into each created 4a-hal-*. Updates 4a-hal json configuration files to match these modifications. BUG-AGL: SPEC-2733 Change-Id: If93a31296206923860262b225a8c7e0e8a6fd521 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-08-12Create 'all_streams' verb at binding startupJonathan Aillet1-0/+2
Create 'all_streams' verb at binding startup, that way, it will always be created. Generate a request fail when a call is done when no streams are created. BUG-AGL: SPEC-2733 Change-Id: I1b7ec3b8ed0fcd617e4a016e455beb447d233c82 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-07-18Add hal api handler utilities filesJonathan Aillet1-27/+6
Add utilities files to create/delete hal apis while adding hal data to hal data list. Use it to create new hal apis. BUG-AGL: SPEC-2652 Change-Id: I62e99cda31bb2c6f597da27960102c036a25b733 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-06-26Remove global card number of halhalibut_7.99.3halibut_7.99.2halibut/7.99.3halibut/7.99.27.99.37.99.2Jonathan Aillet1-8/+0
As we are now using haldependencies to get hal card number(s), it does not make sense to store a global card number for a hal. BUG-AGL: SPEC-2329 Change-Id: If5beb84b71b5e5e67aeabd947b5c3edbf154fa3c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-06-25Use of linked list for 'halmap' dataJonathan Aillet1-0/+1
Use of linked list for 'halmap' data instead of a fixed array. It uses the same mechanism already implemented for other linked list. BUG-AGL: SPEC-2329 Change-Id: I2ff9c9a797a5547cd74f0240c5b7573a02c90781 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-06-18Refactoring 'hal data' linked listJonathan Aillet1-1/+1
Refactoring 'hal data' linked list code using liburcu. BUG-AGL: SPEC-2329 Change-Id: Ia51d362f96838f4b5bb77e8d1b85fa8d1ab4bed1 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-06-18Refactoring 'streams data' linked listJonathan Aillet1-0/+1
Refactoring 'streams data' linked list code using liburcu. BUG-AGL: SPEC-2329 Change-Id: Idf9367c015d73574d96d83c82a9e8f5b7588a45d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-06-18Refactoring 'probed devices' linked listJonathan Aillet1-0/+2
Refactoring 'probed devices' linked list code using liburcu. BUG-AGL: SPEC-2329 Change-Id: I4d0255bc020733b1abbea1f3e6195c73cf8da8f6 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-31Add prints when a controller error is detectedJonathan Aillet1-3/+17
Add prints when a controller error is detected at json loading/exection. BUG-AGL: SPEC-2329 Change-Id: I8b3319115ce98694e7f382fd39c39e5422a38021 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Add 'haldependencies' section support.halibut_7.99.1halibut/7.99.17.99.1Jonathan Aillet1-0/+1
Add 'haldependencies' section into handled section table. Also, add a function to redirect to 'processing' and to 'handling' functions depending hal initialization stage. BUG-AGL: SPEC-2329 Change-Id: I4fa09493fecf48844bff171e2e8ca764f9fe8f18 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Store 'uid' metadata in hal data structureJonathan Aillet1-0/+1
'uid' field is currently used to store the audio device to search for the hal. But with haldependencies' feature, 'uid' field won't be used to search for the audio device anymore. So, 'uid' field is stored elsewhere into the hal data structure (returned when asking for hal informations). BUG-AGL: SPEC-2329 Change-Id: Ib3b2b3bacaecfa80a51f94f9d6874789baba0224 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Remove obsolete links to softmixer controlsJonathan Aillet1-3/+3
Remove obsolete links to playbacks/captures softmixer controls. These links are not used anymore (only 'halmap' controls are used). It also means that references to controls in 'halmixer' section of json configuration files must be removed (as it's done for example json configuration file in this commit). BUG-AGL : SPEC-2329 Change-Id: Ic5a7f055d09b44021d817c04d56023fed3c0e478 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Remove obsolete variable set for 'afb_helpers'Jonathan Aillet1-9/+0
Remove obsolete global variable set for 'afb_helpers'. BUG-AGL: SPEC-2329 Change-Id: I41ec3d486a893a940cd96779d07ab61799a76e13 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Improve static verbs loadingJonathan Aillet1-3/+2
Improve static verbs loading by using 'afb_api_set_verbs_v3' application_framework function. BUG-AGL: SPEC-2329 Change-Id: I3fe5397316d4a582635da637ab6a207b606c496e Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Add forgotten verifications of allocation resultsJonathan Aillet1-0/+9
Concern several types of allocation such as : - malloc/calloc - json_object_new_* - wrap_json_pack - strdup BUG-AGL: SPEC-2329 Change-Id: Iffe2a6a44ef4df2ed0ec4d159682159db5e78cfb Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Normalize coding style among repositoryJonathan Aillet1-13/+21
Normalize coding style among project : - When possible, set the variable outside test in 'if' statement. - Remove fanciful returns. - Split too long lines. - Remove unnecessary '\n' into prints. - Normalize use of tabulation. - Use 'afb_req_fail' instead of 'afb_req_fail_f' when possible. - Add some error prints. BUG-AGL: SPEC-2329 Change-Id: I14867e05e02b4c4c0389108c335fec2d2aa27495 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-24Reorganize repository directoriesJonathan Aillet1-0/+243
Reorganize repository directories to clarify code use. BUG-AGL: SPEC-2329 Change-Id: Ia9be0c1818cb2e331e75b51a87fcb2820407c1d8 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>