summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-24Clarify internals hal functions and files namesJonathan Aillet1-372/+0
The purpose of this commit is to have of a more standard way to name files and functions used to generate/handle hal api (generated from hal json configuration file). It occurred to me that 'hal-controller' was not a good name because it is harder for people who don't know about the app-controller to understanded what is the purpose of these files/functions. It was renamed to 'internal-hal' because it's about hal that are all handle/load by hal-manager in opposition of external-hal that are independant binding/binder that can register themselves to hal-manager. BUG-AGL: SPEC-2329 Change-Id: I11b7efe64ec474b004a2a15ed8969b9db95d428f Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-05-22Clarify use of linked listJonathan Aillet1-8/+7
Clarify use of linked list by renaming some variables and functions. BUG-AGL: SPEC-2329 Change-Id: I21ada0b2914c99dfeecfcb6b55c8976dee1a0cd7 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-04-19Rename misnamed function used to search for halJonathan Aillet1-1/+1
Rename misnamed function used to search for ready hal using its audio card id. BUG-AGL: SPEC-2329 Change-Id: I62ad371f10bff2e23e059b4020fbe16ece6e87c9 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-28Migrate to newer application framework callsJonathan Aillet1-41/+51
Migrate from 'afb_api_call_sync_legacy' function to 'afb_api_call_sync' function, therefore, handle function return and response json differently from before. Change-Id: Ia7fb42188b8d41e22db2d824459a0d10ed6d6a8e Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-28Move from controller functions to afb functionsJonathan Aillet1-106/+108
Move from controller 'afb-definitions.h' functions to application framework 'afb/afb-binding.h' functions. Change-Id: I4cd62af881ef8ac949b082ede9dfcc4736d1e12c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-28Improve stream creation/deletion functionsJonathan Aillet1-43/+12
Add functions to add/remove stream verb while adding/deleting stream data. Use them to create streams when mixer response is received. Change-Id: I158b04cef7f6ce4f58a9c7481b6ebad00de989e3 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-28Use linked-list to handle hal stream listJonathan Aillet1-53/+82
Use linked-list instead of an array to handle hal stream list. Usefull to add/remove dynamic stream (e.g. bluetooth). Change-Id: I39bbf0f16941f1c4642c916fdc5143a683c6460c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-28Turn '4a-hal-utilities' into an internal libraryJonathan Aillet1-3/+5
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>
2018-12-20Add streams events generation for each halJonathan Aillet1-0/+8
Each hal will now have subscribe/unsubscribe verbs to allow other bindings to be notified when a modification (volume, mute, ...) happened on a stream. Bug-AGL: SPEC-1313 Change-Id: If68d3b4b4e39385c1fffdd04b9f3e2b7fa5ae108 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Rework calls to mixer streamsJonathan Aillet1-14/+29
When using 'playback'/'capture' verbs, call all associated controls. When at least one stream has been created by the mixer, a verb called 'all-streams' is added to transfer a request to all the streams. Bug-AGL: SPEC-1313 Change-Id: Ie574e2ef0dcae8abbd45523b49093ec2ed1413cf Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-02Use new ctl functions to set/get ctl external dataJonathan Aillet1-1/+1
Use new controller functions to set/get controller configuration structure external data field. Change-Id: I0e1ce259fccbbd8b4054efbed07cef5c5b9243b5 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-02Use ctl defines to call afb functionsJonathan Aillet1-22/+25
Use controller 'afb-defintions.h' defines to call application framework functions. Change-Id: If9599b0397a593440ce2e08f039dc279c63f7428 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove unnecessary 'function' string in printsJonathan Aillet1-31/+24
Function's names was printed using '__func__' when calling application framework prints functions. But, as the application framework prints functions already prints them, '__func__' has been removed from print calls to avoid duplicated information. Change-Id: I0dea49a9d84b7ccdbdaecec67ced6c98b5ed26d6 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Correct error print when attaching to mixerJonathan Aillet1-1/+1
Correct print when attach to mixer results in an call sync error. Change-Id: Id0c06d2c449d2b3dd56822674f496e0f52c31c27 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove boolean libraryJonathan Aillet1-1/+0
As it was almost never used in code, remove boolean library. Change-Id: I9264ffd5600a7d9526f4f4cfa8209a0cd0e5bb77 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Free json objects that should have been freedJonathan Aillet1-39/+43
Free json objects that should have been freed after use. Change-Id: Ifb3dab9672d0c039292ae05f23ade008fe82ade8 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Correct handling of incomming json messagesJonathan Aillet1-2/+4
Correct handling of incomming json messages. An error occured when a received json object was an array containing only one item. Change-Id: I2c6f27f0fd87e11c356b8d4e6bd02d472bc3d60b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Authorize empty response from mixerJonathan Aillet1-4/+4
Authorize empty response from mixer because a hal could configure no streams/captures/playbacks. Change-Id: I59b703aca72e8a70e10d41b28a95c3a022797a89 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change verb prefix separator accroding to mixerJonathan Aillet1-1/+1
Change verb prefix separator charactor accroding to mixer. Change-Id: Ifbeb715490371ffdf835599b47076d8c17447571 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Correct some compilation warningsJonathan Aillet1-1/+1
Correct some compilation warnings that appeared in some gcc versions. Change-Id: I846c573f3128f7d5d5da8b7d2eb1b63dc61af1ab Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Print some errors in info verbsJonathan Aillet1-6/+4
Print errors info when an error happen during call to mixer 'info' verb. Change-Id: Ic3b0b6312743af3ba41a7868d1347ce6b0fcc8cd Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Rename files handling call/response of mixerJonathan Aillet1-0/+339
Rename files handling call/response of mixer. Change-Id: I070f109e2f0249b74548ae7dc7b84793926cb261 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>