summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-01-28Improve stream creation/deletion functionsJonathan Aillet7-251/+388
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 Aillet6-144/+268
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 Aillet22-91/+195
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>
2019-01-23Use latest version of app-controller submodule.Thierry Bultel1-0/+0
Changes of app-controller: (f8531f9 - Thierry Bultel) ctl-action: fixed the calculation of the number of actions (f1c3b6b - Romain Forlot) Message deprecating the submodule usage (2e97ca3 - Frederic Marec) docs: add yaml book Change-Id: Iff9b67f8dc3ddc91090750af4fd5fdada7d167fe Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-12-20Adds support for bluetooth audio through bluez-alsaguppy_6.99.4guppy_6.99.3guppy/6.99.4guppy/6.99.36.99.46.99.3Thierry Bultel14-1199/+983
Implements a new bluealsa plugin to the HAL manager, reacting to the changes of the available transports. This plugin is linked with the new bluealsa.so shared library. New transports (SCO & A2DP) result in softmixer invocations of the "attach" verb, that creates the new capture (eg, A2DP capture from bluealsa ioplug PCM, SCO microphone capture), playbacks (SCO playback to a softmixer zone, and SCO output to bluealsa iogplug PCM). When a transport disappears, the hal manager calls the transaction deletion verb that will tell the softmixer to remove the created streams and associated objects. Change-Id: I36037a4f14ef7fee38070fc0df66c40b4ce46e8b Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-12-20Remove old comments not true anymoreJonathan Aillet3-3/+0
Remove old comments not true anymore about moving to application framewrok v3 functions but it has already be done some weeks ago. Change-Id: Ia5dfc7a47d9e9eb929fa6c79fa37686206131301 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Update version of app-controller submodule.Jonathan Aillet1-0/+0
Changes of app-controller: (48196b8 - Romain Forlot) Reformating lines to be 80 characters long maximum (574c0b3 - Romain Forlot) Detail configuration key and goal of a controller (0e395a6 - Romain Forlot) memleak fixes (f332501 - Romain Forlot) Retrieve by default an int64 instead of int (c3fa161 - Romain Forlot) New function to retrieve Api's name from LUA (8bef6c3 - Romain Forlot) Handle number and boolean to subcall an api's verb (3344fe2 - Romain Forlot) Fix: compiling a controller without LUA support (70e1d98 - Frederic Marec) Fix Parse plugin (309003b - Clément Bénier) AFB:servsync: add string for query argument Change-Id: Idb3793a8d3bd6ea34dc8c0d0209757c3aa231ba1 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Add halmap controls events generation for all halJonathan Aillet2-3/+59
Each hal will now allow other bindings to subscribe to halmap ALSA controls events to be notified when a modification happened on a control. Bug-AGL: SPEC-1313 Change-Id: Ia6a019b254c78e5e752b0d39a7cf35114c1fc460 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Add streams events generation for each halJonathan Aillet6-0/+176
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 Aillet5-48/+193
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-12-20Add 'halmap' controls in hal 'info' verb responseJonathan Aillet2-21/+77
Add 'halmap' controls verbs (specified in json configuration file) in the response of verb 'info'. Bug-AGL: SPEC-1313 Change-Id: I4e7ec5c3d23fd505da1eb233c1da63708024912d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Add setting values of a ALSA control using a +/-Jonathan Aillet3-4/+118
Add the possibility to change halmap ALSA controls values using a +/- percentage string. Bug-AGL: SPEC-1313 Change-Id: I3b2cf141fc01171fd403c2602fb3805e654e8d68 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Send back control previous and current valuesJonathan Aillet1-5/+36
Send back control previous and current values if the value(s) specified in request json has been applied correctly when calling halmap verbs. Bug-AGL: SPEC-1313 Change-Id: Ie190b4749a6739945a82532909281fb70c92df5d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Send back control current values if no request jsonJonathan Aillet1-4/+31
Return current ALSA control values if no request json is specified when calling halmap verbs. Bug-AGL: SPEC-1313 Change-Id: I74cc03cdcbe975979be4ad2d353ee44cf8cc13ed Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Add a function to get values of an alsa controlJonathan Aillet3-25/+86
Rework communication with 'alsacore' binding to be able to get current ALSA controls values. Bug-AGL: SPEC-1313 Change-Id: If1b4b9bdc49849772075e184768f572ac88fe6c3 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Improve ALSA controls volume values conversionJonathan Aillet4-66/+192
Rework halmap ALSA controls volume conversion to be able to add new types of volume conversions easily. Bug-AGL: SPEC-1313 Change-Id: I0949f25c24a349e7409233f51b3d5738ebc43a8a Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Update syntax of a request of an halmap verbJonathan Aillet1-1/+1
Update syntax of a request of an halmap verb : Use key 'value' instead of 'val'. Change-Id: Iadbb05f0bf70c689e1657f065a8f3b1ae31a8849 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Typo fix in halmap call responseJonathan Aillet1-2/+2
Change-Id: I6bc9ba16ec22a21e43221d335bd61bacae197a14 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20Correct halmap calls request json syntaxJonathan Aillet1-8/+3
Correct halmap calls request json syntax : The request json must be a json_object type. Change-Id: If443b5480678354193c2419a72ffb711fadd416f Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-18Move hal configuration files into 4a-hal-configs repositoryJan-Simon Möller14-2282/+2
The configuration files should not be shipped with the sources. Therefore we created a 4a-hal-configs repository as the central place for configs. Move the configs there but leave and example in 4a-hal-cfg-example. Bug-AGL: SPEC-2011 Change-Id: If3bed9a05955b9c6458656fabbe3ee12d1c5015b Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
2018-12-03Add master branch into .gitreview fileJonathan Aillet1-0/+1
Change-Id: I7f4cc024c40aa2b2cc3eba12dd576f7d36408ce0 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-30Merge "Add autobuild to top tree"guppy_6.99.2guppy/6.99.26.99.2Jan-Simon Moeller3-1/+150
2018-11-27Move hal controls actions at the end of hal initJonathan Aillet1-1/+1
Move hal controls actions at the end of hal initialization to avoid calling halmap controls before handling controller actions (onload, events). Change-Id: Id3896b9497985d7a82242d719551a507a0ca74c5 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-22Add autobuild to top treeFrederic Marec3-1/+150
Remove autobuild in gitignore Bug-AGL: SPEC-495 Change-Id: I79e4d41ff3bd188598906c96351b0f4c7d2eb72b Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-11-22Add tests for 4a-hal-genericguppy_6.99.1guppy/6.99.16.99.1Frederic Marec10-0/+627
Add test tree Add test part in README.md Bug-AGL: SPEC-1796 Change-Id: I3d42bfe3170bfaef819bb2028887869dd603bc97 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-11-21Change .gitmodules following submodule migrationFrederic Marec1-3/+0
Remove app-template in .gitmodules Change-Id: Ibd44e1c76a638c6a21272da2116fb638eb560dc9 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-11-02hal-bt : Each plugin has its own data structureJonathan Aillet1-68/+94
Each hal bluetooth plugin instance has its own data structure. It is made to have several hal working simultaneously with bluetooth. Change-Id: I2175bcbb327f590a6098b68c206d1cf518c8fb74 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-02Use new ctl functions to set/get ctl external dataJonathan Aillet5-10/+10
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-02Update version of app-controller submodule.Jonathan Aillet2-2/+2
Use new function of controller to add actions to sections (avoid compilation errors). Changes of app-controller: (33abde5 - Romain Forlot) Reworked pluginConfig function (8094951 - Romain Forlot) Retrieve plugin list from api rather than a global (871bd64 - Romain Forlot) Add setter/getter for user free defined pointer (f543f05 - Romain Forlot) Pass the plugin to action. (ce07538 - Romain Forlot) Abort if one required API is missing Change-Id: Ic19d72776f00cfe5f8b8fcecff3ab46d42376dda Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-02Force each hal to have its own ctl section dataJonathan Aillet1-2/+6
Force each hal api to have its own controller section data, it is very usefull if different hals don't have the same onload/events/... actions. Change-Id: Iaf3c2059a774ef8ec4f7262064d1cfa8d8159d91 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-02Use ctl defines to call afb functionsJonathan Aillet13-113/+121
Use controller 'afb-defintions.h' defines to call application framework functions. Change-Id: If9599b0397a593440ce2e08f039dc279c63f7428 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-02Add .gitreview to 4a-hal-genericJonathan Aillet1-0/+4
Add .gitreview to 4a-hal-generic. Change-Id: Id9b5bc90a2afe4dda0d531641962183ae43af161 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-31Migrate app-templates to CMake moduleRomain Forlot2-3/+6
Bug-AGL SPEC-1682 Change-Id: I7262c9c31ecdf2eb939349eb563311ef970006d2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-08Correct typo in Intel UpSquared halguppy_6.90.0guppy/6.90.0flounder_6.0.2flounder_6.0.1flounder/6.0.2flounder/6.0.16.90.06.0.26.0.1Jonathan Aillet1-6/+6
Correct typo in Intel UpSquared hal. Change-Id: I75cbb9d2d493a642ef153588ee84481aae32cc7c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update clone commands in README.mdJonathan Aillet1-2/+2
Update clone commands in README.md. Change-Id: I4dfdc110565642f7ad32abc727dce04ca213d6d9 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update 'halmap' section of Intel UpSquare halJonathan Aillet1-8/+1
Update 'halmap' section of Intel UpSquare hal. Change-Id: I9acad9635e7e806fcd4ead8c1c6ef9291a05be7a Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-084a hal for Intel UpSquare via HDMI socketDominig ar Foll Intel Open Source1-0/+192
Change-Id: Idadc513749bea65ff8311b9ea16a9e1eb5f9e214 Signed-off-by: Dominig ar Foll Intel Open Source <dominig.arfoll@fridu.net>
2018-10-08bluetooth: set audio rate to 44100Thierry Bultel1-2/+2
44100 seems to be the most common sample rate. Fis is a temporary fix, because the actual sample rate may differ and depend on the information available at the bluetooth transport level. Handing it dynamically means some significant changes in softmixer: - instanciate the rate converter on playback in all the cases - either been able to modify it after creation, or if not possible, close and restart the output PCM plugin stack. Change-Id: I6bd900fd539251b60b97bbaf15e1390bf49c13e0 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-10-08hl-bt: Check that hal is available in initJonathan Aillet1-9/+16
In hal-bluetooth plugin, check that hal is available in plugin initialization. Move every data initialization after that everything is checked. Change-Id: I8055dd17e75099a8009f21a1070d1de293682d4b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08hal-bt: Use plugin name definition in printsJonathan Aillet1-3/+3
Use hal-bluetooth plugin name definition in prints instead of plain text. Change-Id: Idafbead6bdc510115ac0f7ebc06cfad79ceeceed Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Move hal sections callbacks after plugin callbackJonathan Aillet1-2/+2
Into the controller section array, move hal sections callbacks after plugin callback so it will be executed before everything else. Change-Id: Id80063caae3b089e6ccef79a7b54a82b16600375 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update version of app-controller submodule.Jonathan Aillet1-0/+0
Changes of app-controller: (625ce77 - Jonathan Aillet) Correct an error when no plugins are defined (0f708ba - Jonathan Aillet) Decrease print level when no onload action Change-Id: I61110a3a0e8a76e22ec86b1ee816f80dbcb74993 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08hal-bt: Enrich 'halmixer' section in plugin initJonathan Aillet16-903/+215
Enrich 'halmixer' section with bluetooth specific 'source' and 'stream' during hal-bt plugin initialization. Some parameters must be passed to plugin using 'params' key in controller json plugin section. This allows to get rid of must of the additional configuration when using bluetooth in a hal. Change-Id: I5820e75307a3394eca80cf783e7bc4c31c2d7659 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove unnecessary sections in hal jsonJonathan Aillet2-14/+0
Remove unnecessary 'onload' and 'events' sections in hal json configuration files. The specified onload actions were generating errors in some cases. Change-Id: I5eb95fe7daecf3b3d15638833142d133ce77e1ff Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Update version of app-controller submodule.Jonathan Aillet1-0/+0
Changes of app-controller: (8d53984 - Jonathan Aillet) Add a 'params' fields for controller plugins Change-Id: I6be8e2d21232c664e30879f7ee063ed4de79ca0f Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08hal-bt: Use plugin name in onload/init printsJonathan Aillet1-5/+5
hal-bt: Use plugin name in onload/initialization prints to help identify startup hal-bt plugin prints. Change-Id: Ie065a127d0321d44e800828aab1994b35aeb5739 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08hal-bt: Check presence of a bluetooth receiverJonathan Aillet2-5/+27
Disable hal-bt plugin if no bluetooth receiver is connected at plugin initialization. To be bale to check if there is no connected bluetooth receiver, use call to 'power' verb of 'Bluetooth-Manager' api. Change-Id: Idd301d2106e8b2e79e25969cc2c1a2a4e4194711 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08hal-bt: Move bluetooth api require into initJonathan Aillet1-27/+15
In hal-bt plugin, move 'Bluetooth-Manager' require into plugin 'initialization' instead of plugin 'onload'. Change-Id: I52dab7631674b4139ad74d0de0825633ea5a5b91 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Move mixer attach into its controller sectionJonathan Aillet2-17/+16
As the mixer section is obtained during a call of a controller section callback (during api pre-initilization), 'attach' call to 'mixer' has been moved in the same callback (called a second time during api initialization). Change-Id: I17f54aab1b9616649bfcb183297ba8128621a7c2 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-10-08Remove unnecessary 'function' string in printsJonathan Aillet9-116/+92
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>