summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-10-08Fix a typo in a debug messageJonathan Aillet1-5/+5
Fix a typo in a debug message. Change-Id: Iee894287f43d74fd72e41faad42f0617c50c0cf8 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Move cmake install prefixJonathan Aillet4-2/+5
Move cmake install prefix from config.cmake to distrib osconfig.cmake. Change-Id: I7b5e0b83a5afbfb64ccfba681efa757d2800fda7 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Fix typo in README.mdJonathan Aillet1-1/+1
Change-Id: I90f1da788d53c47049e983faf79689060ecc9a5e Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Fixed README.mdSebastien Douheret1-83/+76
Change-Id: I835119e68aaf2eb7d5576d93f15bd4a7bfd55a29 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-10-08Updates json controller configuration filesJonathan Aillet2-4/+4
Updates 'metadata' section to indicates that alsacore is required for these hal. Corrects mistakes in info field. Change-Id: Ic09993f1e4b0bae8ad58c4569eed3cf5203e88ba Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Handle hal status using card presence and mixer initJonathan Aillet7-37/+116
Test audio card presence at hal startup using alsacore call. Handling a new state of hal. Move alsacore link files into 4a-hal-controllers. Check state of hal before mixer initialization call. Actualize hal state if mixer initlialization ends well. Add a sndCardId filed to 'SpecificHalData' structure which will contain audio card if (from alsa). Change-Id: I2e82a14ee6ba6e63f06fe2b498587783941b7b98 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Generate an error when mixer initialization failsJonathan Aillet1-6/+6
Generate an error when mixer initialization is correctly transfered to mixer api but an error was raised by it. Change-Id: I617686b0167f9fb536ec56e430d10560e7f7ca31 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Use error codes when handling mixer init responseJonathan Aillet2-6/+16
Use error codes when handling mixer initialization response. Change-Id: Ie62b022f1a653be18766a09f1803995a77ae8582 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove reference to alsa in 4a-hal-managerJonathan Aillet1-3/+0
Remove reference to alsa in 4a-hal-manager because 4a-hal-manager won't communicate with alsa/alsa-core. Change-Id: Ie6d70e1a962ecbf73b1ee5f31fee78d1e29ac23d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Replace controller macro use by app fw macro useJonathan Aillet2-8/+9
Replace controller macro use by application framework macro use. Change-Id: Icee0855a311857ab21a4a5031c4e06ac58b8f295 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Add some missing castJonathan Aillet1-3/+3
Add some missing cast when getting controller hal data structure. Change-Id: I8fdfd7486345e89c4004c071b63890b751305ce2 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Handle app fw call errors in a dedicated functionJonathan Aillet6-71/+194
Two functions has been added in a new file in 4a-hal-utilities : - A function that handle application framework call errors by returning a specific error. - A function that handle application framework call errors from a request. Change-Id: I657773586111adc609cbbaead7db589a82e133b0 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Rename a filed of 'CtlHalStreamData' structureJonathan Aillet4-4/+4
Rename 'cardId' filed to 'streamCardId' in 'CtlHalStreamData' structure. Change-Id: I7615eece39aea6bf6b6aadd3361f58792e6531f6 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Correct date in .c and .h filesJonathan Aillet16-16/+16
Set file creation date to 2018 instead of 2016. Change-Id: I0349bbc1dde097f899d9b38dd28b3891f88020ad Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Minor corrections in config.cmakeJonathan Aillet1-2/+1
Minor corrections in config.cmake to remove DEBUG mode at compilation and to correct example binding launch command. Change-Id: Ie8887c9ba2e9732c2a4093b9ffb3cad4d2cc45a3 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Write the README.md of this repository.Jonathan Aillet1-2/+216
Write the README.md of this repository which describe how to compile and how to use this binding. Change-Id: Iec16b9f97b1e515f9cc2ead18f7856fda3dfe900 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Correction of list verb when there's no streamsJonathan Aillet1-1/+1
Don't raise an error when list verb is called on a controller hal and there's no streams registered yet. Change-Id: Ie4126673f134ced3e93e1111f988923e4bf13e64 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Fix typo in request reponses of a app fw verbJonathan Aillet1-2/+2
Fix typo in request answers info message send back to application framework after an api verb call. Change-Id: Icbd06fc13d9abff8325145c355b6c8c3c6434e1c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Fix a typo in '4a-hal-utilities-verbs-loader.c' fileJonathan Aillet1-1/+1
Fix a typo in '4a-hal-utilities-verbs-loader.c' file. Change-Id: I4e569227414bd8f6bdbe45333982aa9a932099cc Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Add a table to see which hal is using which alsa hwJonathan Aillet1-0/+4
Add a table to see which controller hal is using which alsa hw. This table is stored in the hal manager data structure. It will be used at initialization to check if the device is free before sending the mixer attach call. Change-Id: I94bcb3224f2bf1756d4b53786e324ac13e55c573 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Handle mixer responses correctlyJonathan Aillet3-14/+75
Use a function to handle mixer responses on stream action calls correctly. Before, there was no differencations between responses from api calls that didn't end well. Now, we print a different message if the api/verb is not found and if the request was transfered but an error occured during it. Change-Id: Ib4f9c3cf14b6612cd14762b74466ce484fdfb09d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Handle mixer response after its initJonathan Aillet6-57/+150
Handle mixer response to get created streams and them corresponding card ids after mixer initialization. Store these informations into the controller hal data strucure. Creation of a verb for each stream is now handle at response handling. Remove unnecessary function because we don't need to search for a stream by his name. Change-Id: Id9e598668b071ca18d152b57e71109314025f698 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Don't seal hal controller api at its initJonathan Aillet1-2/+0
To be able to declare new verbs for controller hal dynamic api, don't seal this api after its initialization. Change-Id: I0fd028034ef2f409eceae05b642c74163b26e332 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Updates json controller configuration fileJonathan Aillet1-11/+21
Change json configration file to work with the specified device. Change-Id: I1cd8376f3968e08c7b46d7824fe986355a072f73 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Store uid of the hal mixer configuration and use itJonathan Aillet3-11/+18
Stores uid of the hal mixer configuration in the specific controller hal structure. Use this uid as prefix when calling softmixer api. Change-Id: Iab00518e02e0f9ff6dbd78c126eda45225c55256 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Updates json controller configuration filesJonathan Aillet2-22/+20
Change json configration files names to correpond to a real card. Updates 'halmixer' section to make it work with softmixer. Change-Id: I22c6b7dc661110be243544ea88abc1a7d34c6b53 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update version of afb-helpers submodule.Jonathan Aillet1-0/+0
Changes of afb-helpers: (9685413 - Sebastien Douheret) Fixed build warnings with gcc >= 7.3 (f250572 - Thierry Bultel) Added afb-helpers-utils.h (f9f7e1e - Thierry Bultel) Fixed compilation warnings with gcc-7.2.0 (c0c40af - Sebastien Douheret) Fixed spelling Change-Id: I8f164eb6ae43b3b5ff46fa6399739cee7849f63e Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Implementation of 'list' verb for controller halJonathan Aillet1-3/+58
Implementation of function allowing to list streams and controls of a controller hal. Change-Id: Ic347dd89dbbf36056b0fc3c5fe25bd111a85f627 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Parse config to get streams 'halmap' controlsJonathan Aillet3-3/+9
Parse controller config to get 'halmap' controls, these controls are inside 'halmap' section of controller configuration file. Change-Id: I71fb8494927cf05d9751a69fede4b7622921c6c2 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Handle stream calls to transfer to mixer apiJonathan Aillet2-3/+70
Implementation of the function that transfer hal streams calls to mixer api. Change-Id: Icded7e160a1cfbe794c5fa2695bf0f9f54c80a06 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Add 'init-mixer' verb to hal controllerJonathan Aillet3-1/+64
Add creation of 4a-softmixer mixer as hal controller verb called 'init-mixer'. This verb sends json mixer configration to mixer api. Add a forgotten cast. Change-Id: Id4ca6b68caf21c74fb6b17b953d8db2f2db0c04b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Parse controller config to get halmixer json objectJonathan Aillet4-1/+107
Parse controller configuration to get halmixer json object, this object is inside 'halmixer' section of controller configuration file. Use streams defined in this 'halmixer' section to get available streams of this hal, store them, and declare them as hal api verbs. Change-Id: I47adb2756f89f2a84c8d651ba38ecea5b84079c3 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Implementation of functions for external halJonathan Aillet1-6/+116
Implementation of functions that allows to handle register/unregister external hal. Change-Id: Idf7ad2ab7dd811195a9c86d3fc194086746e99ef Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Handle if some hal info are not availableJonathan Aillet1-5/+6
Handle the case if some hal info are not available when the data of all registered hal are requested. Change-Id: Ia55fcc9ff6e964fe23965cf92bb06533c3d11695 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Use a structure to store ctl hal specific dataJonathan Aillet3-8/+61
To avoid multiple variables at NULL in specific hal data, use a structure to store all controller hal specific data. These data won't be use if the hal is external (registered). Example of controller hal specific data : - Mixer api name - Mixer initialization json - Mixer streams names and card id ... Change-Id: Ifc4823d5ea21ed408b4ecc25b870cad74d3b2173 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Use json_object* instead of struct json_object*Jonathan Aillet2-3/+3
In code, use json_object* instead of struct json_object*. Change-Id: I9b37f30807331b6f85dc7f36242d5c1206093565 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change the way that hal data are initialized and freedJonathan Aillet1-7/+10
Initialized the whole hal data structure instead of member by member. Free all strings if the hal is external (in this case, strings are allocated by hal manager). Change-Id: Ic860bcbf1999a870f34d12640e9c68b2cbc50876 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Rename function used to load verbs into a dynamic apiJonathan Aillet4-4/+4
Rename function used to load verbs into a dynamic api from 'HalUtlLoadStaticVerbs' to 'HalUtlLoadVerbs' because it is used to load not only static verbs. Change-Id: Idc033ccf0a8e7556e0809e8fa3554d09d0e81d39 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update json controller configs to match example HWJonathan Aillet2-30/+308
Update json controller configs to match example HW (hal-mixer section). Clean unnecessary controls. Add stream controls section. Change-Id: I68d789d8f7fdc0160f52828e27ee6bfc7556c84b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Regroup declaration of variables in functionsJonathan Aillet1-7/+5
Regroup declaration of variables in 'HalMgrLoaded' function. Add error info when responding that the request have failed. Change-Id: Ib25159f37928bd8cc442e9db08b280e93b6b568b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove some unnecessary freeJonathan Aillet1-20/+2
Remove some unnecessary free that used to free strings that are handled by controller. Remove test if NULL before free (free doesn't do anything if pointer is NULL). Change-Id: I9f9bdb3f194900567da6bd2dada6dae4ea87b1fa Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove the 'ping' of each hal controller apiJonathan Aillet3-4/+2
Remove the 'ping' verb of each hal controller api which won't be useful anymore. Rename action in configuration file to be able ping an api nevertheless. Change-Id: I5b1ce8f8cd83dc3e689c3bd676244477921ba20d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Add a 'List' verb to each hal controller apiJonathan Aillet4-0/+69
Add a 'List' verb to each hal controller api which will list verbs available for this api. The callback of the verb is not implemented yet. Change-Id: Ibc44ef8673267b0b952b32fb256214452aa3c000 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change the name of controller configuration filesJonathan Aillet4-3/+3
Change the name of controller configuration files to be sure that they will be found during 'CtlConfigScan'. Add the name that the binder should take into config.cmake to be sure that the controller configuration files will be found during 'CtlConfigScan'. Change-Id: I94c55c186c52f6f89b06400133cfbce36221d245 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change how to request all loaded api infoJonathan Aillet1-18/+6
Instead of receiving all info about api by passing request arg : { "option" : "metadata" } api info will be obtained by passing this request arg : { "verbose" : 1 } Change-Id: I26a14d61ffefbb7f4630f4a3199ee5238008263a Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove sections id in sections callbacks structureJonathan Aillet1-6/+5
Remove sections id in sections callbacks structure because it's not mandatory anymore (it's even harder to add a section with these ids). Change-Id: I04caa1c83137e4165c023207d2b58376c176c248 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Change names of some structures fieldsJonathan Aillet4-30/+26
Change names of some structures fields to match the fileds name in controller structure. Change-Id: I579ec53835daa010154982539d09d5a2dcbd28b2 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Get Hal controller api structure fields properlyJonathan Aillet3-32/+7
Because of a recent change in the app-controller, change the way that metadata was get. Avoid to parse json again and use only CtlConfigT strcuture fields to fill Hal controller api structure. Add a fields info in Hal controller api structure. Change-Id: I17ff00bfd6d0991bed47831a92bf81ddcf3fb4c9 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Corrects json controller configurationsJonathan Aillet2-99/+51
Corrects json controller configurations to look more like a definitive hal configuration. Change-Id: I2281df854d408dcf8064a77d1941f4fca8c8b28e Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update json controller configurationsJonathan Aillet2-13/+5
Update json controller configurations for new version of app-controller submodule that handles more metadata fields. Change-Id: Ie8c85973ea58e0bdf791a785a00e3cca901099f9 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>