Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
Add functions to handle new 'haldependencies' section.
This new section will be used to probe for multiple audio device
using only one hal. Each probed device could be 'mandatory',
'dynamic' (optional but periodically probed),
or 'static' (optional and probed only at startup).
The result of handling this section will be used by softmixer and
in 'halmap' section.
BUG-AGL: SPEC-2329
Change-Id: Ib763b86c0f306abba7a886f5a348d5414ab5e88d
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Add functions to process new 'haldependencies' section.
This new section will be used to probe for multiple audio device
using only one hal. Each probed device could be 'mandatory',
'dynamic' (optional but periodically probed),
or 'static' (optional and probed only at startup).
The result of handling this section will be used by softmixer and
in 'halmap' section.
BUG-AGL: SPEC-2329
Change-Id: Id4ea2a9c5d87158f0cfa9a88bc5c9296770a6a9b
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Add function to handle probed audio device list.
This list will be used to store incoming 'haldependencies'
section data. It will also be used to store audio card information
resulting from probing requested audio devices specified
in 'haldependencies' section.
BUG-AGL: SPEC-2329
Change-Id: Iaa9aaba7a01263ca2d17be01c32803702568d614
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
'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>
|
|
Add 'HalCtlsGetCardInfo' function to call 'infoget' verb
of 'alsacore' api.
Use this function for all call to 'infoget' to avoid duplicated code.
BUG-AGL: SPEC-2329
Change-Id: I66436af87126258773c332ed4cc2df013acd306d
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Rework mixer answer handling to make it simpler and
to avoid fanciful returns.
Add some error prints to help diagnostic in case of
mixer answer handling error.
BUG-AGL : SPEC-2329
Change-Id: I14fe86496585bdc66b8aa761f4ff2c56333c5515
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
Remove obsolete global variable set for 'afb_helpers'.
BUG-AGL: SPEC-2329
Change-Id: I41ec3d486a893a940cd96779d07ab61799a76e13
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Remove use of a global variable for hal-manager data.
BUG-AGL: SPEC-2329
Change-Id: Ifc5a85aedb75f89a364de1411c1e12f293095550
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Improve search for specific mixer data in linked list when the search
is using stream properties.
BUG-AGL: SPEC-2329
Change-Id: Idd5ea0540ace508b8b8351f38a3832f7d0f8a760
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
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>
|
|
Correct mistakes due to use of unsigned returns.
Also, simplify use of int by replacing 'int8_t'
and 'int64_t' types by plain 'int' type.
BUG-AGL: SPEC-2329
Change-Id: I24fe273c5a233762c072f7bc9e79eab32a1c824c
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Add freeing of halmap data table in case of error
when parsing 'halmap' section.
BUG-AGL: SPEC-2329
Change-Id: Ic2c819dfc3155122ade0f37bb06fa304f4859779
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Add forgotten freeing of hal data when removing hal from linked list.
BUG-AGL: SPEC-2329
Change-Id: Iddef1c1f23be587792907f4ab009a2567f4b7834
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
Correct mistakes and update some entries in 'config.cmake' file.
BUG-AGL: SPEC-2329
Change-Id: Iaf3c92ab8bf8a9246ab51c0a8d8943bdf55f02dc
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Reorganize repository directories to clarify code use.
BUG-AGL: SPEC-2329
Change-Id: Ia9be0c1818cb2e331e75b51a87fcb2820407c1d8
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
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>
|
|
Remove unused 4a-hal-manager events handler files.
BUG-AGL: SPEC-2329
Change-Id: Ic0d02e93641f3ae9ec6ba2e7134987770987b1ca
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Rename misnamed variable in function used to change ALSA values
using percentage.
BUG-AGL: SPEC-2329
Change-Id: I7ba630f591d0d1af0c7f021002493a80817b27a1
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Rename misnamed variable name in hal manager load function.
BUG-AGL: SPEC-2329
Change-Id: I47922c3df935ad0f59eb62ac9d521e076893b0fb
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Rename misnamed parameter in function used
to parse and handle 'halmap' section.
BUG-AGL: SPEC-2329
Change-Id: I5b0e17665ac4580c4efb2931cb1fc2d6da52e87e
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
Updates calls to 'infoget' of 'alsacore' due to recent changes
in alsacore.
Change-Id: If7259c50cceac26fea6e0966eaccb5a1ed5d132b
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Change-Id: I5ce4ec091b60a62414f0f8cdce829feba0d8c212
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
Change-Id: Ifad933c3c5f574aad437a59708c01c6d674dc914
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
The sampling rate, for both SCO and A2DP, had been harcoded
for convenience. But this is not a constant, because it
depends on the connected handset.
This commit retrieves the sampling rate for each new transport
and uses that information as a parameter for the stream creation
in the softmixer.
Change-Id: I4d30eccba9cc63d7f4e618c571719996a136b4f5
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
The binder does not accept that synchronous calls are performed
in the context of a systemd event, it makes is abort.
To solve that, synchronous calls for creating/deleting bluetooth
streams in the softmixer are simply here replaced by asynchronous
calls.
BUG-AGL: SPEC-2162
Change-Id: I4916d11cc904622449930365c5c09f67fe74425f
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
By monitoring the changes of names on dbus, and
by asking dbus for the list of available names at startup,
the bluealsa plugin can now be started at whatever time,
and is also robust to bluealsa restarts.
Moreover, since the bluealsa name has the HCI interface
has a suffix (org.bluez-alsa.hci0, for instance), there
is not need to hardcode the hci name.
Even better, the plugin supports several instances of bluealsa
(since the daemon needs one instace per hci device), and will
add a watch for added transports for every instance it detects.
Complete cleanup of the created streams in softmixer is done
when one watched instance disappears.
Finnaly, there is a new cmd line '-DWITHOUT_BLUEALSA' option to CMake,
for developpers that want to use 4A on host, without the bluealsa
library. Default build (SDK, bitbake) consider that the bluealsa
shared library is always available.
Notice that in the future, the bluealsa library might disappeared,
to be replaced by a full dbus interface to bluealsa.
BUG-AGL:SPEC-2126
Change-Id: I67fc6edf5147c71dc97f1fc1257d3dadbdde20fc
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
|
|
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>
|
|
Change-Id: I5a3de70994374e9a447fde67eef5925915335863
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Change-Id: I1d554d29e11f7bac327ed65b4187dac3572ae0a6
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
Create 'halmap' ALSA controls events earlier to avoid errors at
4a-hal-generic binder startup.
Change-Id: I5976f5d4c358b21108ec136f791841b4ea15c666
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
This event can be used to be notified when a stream has been
added/removed from hal.
Change-Id: I0511b948accf4d3dc25e5603cbaaf5f1da741b49
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|