summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-02-11Update .gitreview fileicefish_9.0.1icefish_9.0.0icefish/9.0.1icefish/9.0.09.0.19.0.0icefishJan-Simon Möller1-0/+1
This updates the gitreview file in the project . Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> Change-Id: I4bc96b0553b242a5106beb50983b867310070596
2019-10-15Prevent errors when receiving 'attach' callicefish_8.99.5icefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.5icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.18.99.58.99.48.99.38.99.28.99.1Jonathan Aillet1-1/+12
Prevent errors when receiving the same 'attach' transaction multiple times. Necessary when using a hal with mulitple dependencies. BUG-AGL: SPEC-2895 Change-Id: I7e8650dcdd93a5518b29acb786cca07ba6d9b59f Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-10-15Rename 'remove' verb as 'detach' verbJonathan Aillet1-4/+6
BUG-AGL: SPEC-2894 Change-Id: Id6d82a02f055c4df73044fd575591938a7d46b14 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-09-26Remove references to '4a-hal'Jonathan Aillet1-2/+2
Remove references to '4a-hal'. BUG-AGL: SPEC-2831 Change-Id: I766bbff55b32c212034fae5f39370e2eee4c3a50 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-07-18Add information about attach verb json formathalibut_8.0.6halibut_8.0.5halibut_8.0.4halibut_8.0.3halibut_8.0.2halibut_8.0.1halibut_8.0.0halibut/8.0.6halibut/8.0.5halibut/8.0.4halibut/8.0.3halibut/8.0.2halibut/8.0.1halibut/8.0.08.0.68.0.58.0.48.0.38.0.28.0.18.0.0halibutJonathan Aillet1-0/+60
Add information about attach verb json format. BUG-AGL: SPEC-2653 Change-Id: I6e1e47f8572d135226cccb39ee8c14e5425f470f Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-06-06Prevent error when 'hal-dependencies' is receivedhalibut_7.99.3halibut_7.99.2halibut/7.99.3halibut/7.99.27.99.37.99.2Jonathan Aillet1-1/+2
Prevent error when 'hal-dependencies' data is received by softmixer when call to 'attach' verb is done. BUG-AGL: SPEC-2329 Change-Id: I434f95aa62cf2617e6edb1dde3c7c39778e1fb5d Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-06-06Fix lua cmake dependancy on FedoraFrederic Marec1-1/+1
Following review 21142 00-default-osconfig.cmake need lua dependency Bug-AGL: SPEC-2491 Change-Id: Id8a876e47207ddb6a6a70709e90dcb4ca1d28a03 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2019-06-05ADD missing Cmake definitionFrederic Marec1-0/+3
ADD HAVE_AVIRT cmake definition Bug-AGL: SPEC-2443 Change-Id: Ib3c0910e85656094eae4925d4b26d938e0ed453d Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2019-05-244a-softmixer: remove AVIRT dependencieshalibut_7.99.1halibut/7.99.17.99.1Frederic Marec4-5/+15
Remove AVIRT dependencies when you build on host Bug-AGL: SPEC-2443 Change-Id: I4bf8f39e843d552337fafcdbebe4c82a2290b24e Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2019-04-30Fix lua cmake dependancyFrederic Marec2-2/+1
Avoid missing library error during build due to miss match on ubuntu and debian Bug-AGL: SPEC-2366 Change-Id: Idd2b0e376a67617c495cfca5dd2b0c901c3975f2 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2019-04-09Merge "Updates for latest libavirt, adds avirt cleanup"José Bollo3-3/+30
2019-04-09Updates for latest libavirt, adds avirt cleanupMark Farrugia3-3/+30
Cleanup for avirt is introduced. There are still some issues with this when invoked whilst a PCM is active, This now allows 4A to be restarted without a reboot. Loops must be deleted last to avoid any cleanup issues, so to enforce this a new transaction API is added: AlsaMixerTransactionObjectAddTail. Change-Id: Ieac6a2f163f40af55ee3c33ab63cc534df88769a Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-04-08Increase tests for 4a-softmixer bindingFrederic Marec4-2/+15
Change-Id: I90f81a33cc66c80baa813991469deb91da7aee63 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2019-04-02pre-init: Add a config detectionPierre MARZIN3-2/+37
Scan the loaded modules during pre-init to know which config file to load. If Avirt core module is loaded then load the avirt config file. Otherwise, load the default config file. Change the config file name in order to use the prefix to select them. Change-Id: I8f9d5ed568fa20b06ac3bef443a2392de26c8235 Signed-off-by: Pierre MARZIN <pierre.marzin@iot.bzh>
2019-03-29Fix a SIGSEGV during initializationJosé Bollo1-10/+8
During the initialisation of 4a-softmixer, when the function 'ProcessOneAvirtSubdev' fails, the function 'AttachOneLoop' was crashing because it tried to call 'snd_ctl_close' with a NULL pointer. This change fixes it. A test is introduced because depending on the kind of loop, the order of initialization of control versus subdevs differs. At the same time, some gotos are improved to avoid a dummy test -this are also virtual fixes-. Also a tiny refactor of the 3 times declared variable 'subdev' is expected to improve the readability. Bug-AGL: SPEC-2287 Change-Id: Ie5231a1064090d772ea0ea7d86ad8c8d79b38d72 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-02-20loops/avirt: forget saved loops after creationThierry Bultel2-12/+17
avirt needs a backup of loops, before creating the streams. However, this breaks software dynamic streams such as those of of type bluez-alsa, because the logic was re-calling the loop creation at each call of the 'attach' verb. The fix simply consists in forgetting the saved loops once they are created Change-Id: I63f492b89233bed12de583de6e1077ac1c9c3ccf Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-19Revert "avirt: restore the avirt submodule"Thierry Bultel2-3/+0
This reverts commit 7e3e4db86a5fbf7c85b92f6a87605bacf2c1bd2e. Change-Id: Ic0d7c100dc226e4e8553ee20db8018b7d873b82c Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18avirt: restore the avirt submoduleThierry Bultel2-0/+3
Change-Id: Ic26981130f255c48fd6395bfbbbf2a945a903e52 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18plug route: added a calculation for the number of physical channelsThierry Bultel2-5/+17
Adds (mainly for debug purpose) a calculation on the actual number of physical channels that are used by the created ttable Change-Id: I5717046003851ebe297a494dcdd97c4d67e34d0b Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18streams: improved log outputThierry Bultel1-4/+4
Fixed some incomplete log messages Change-Id: Ib620905043b6ae3628d886cd8b4b3155005e6862 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18core-pcm: fixed channels setting issuesThierry Bultel2-13/+24
Recent tries on the minnow board have show that the setting of channels on a PCM must be done -after- the setting of the rate. When not doing that, there can be issues (really, complicated to find) around the boundaries values (open intervals) on the period bytes. Additionally, the number of channels can now be forced in the json file. Change-Id: I2c20853daadf9ccab06be6e04d1a185440f57780 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18core pcm: use the same model for writing and reading audioThierry Bultel2-67/+177
Reading sound frames relies on usage of poll before calling snd_pcm_writei Recent seeks for bugs and CPU load issues have shown that the same thing must be done on the write side. Thus this commit uses the same mechanism, including the dedicated event pipe for the thread termination. Change-Id: Ifd5407c9e27da7801623583a6f7d4a2e845b43ea Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18pcm plugs: rework the alsa config cleanupThierry Bultel8-30/+50
The alsa config (for softvol, routes, rate conversion ...) was cleaned up by the owner stream or zone, at their deletion time. This was a mistake, because when the stream or zone creation was not complete, the cleanup of the configuration was not done. Instead of doing that, the config is attached to the plug objects as private data (in the AlsaPcmCtlT structure). Since the AlsaPcmCtlT are always recorded in the creation transaction, it is easy to call the cleaning callback (when it exists) when the transaction is deleted. Change-Id: I952871518a20bfe0be6398887bc747338cf574fb Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18alsa-api-pcm: added an 'optional' parameterThierry Bultel3-5/+41
This adds a boolean 'optional' parameter for both playback and capture devices. When the device is not detected, the stream(s) that use is are not created, without leading to the exit of the softmixer. Change-Id: I3effbd61bfe1d1d4a7cde573354b9db791f759cc Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18alsa-transaction: simplify the cleanupThierry Bultel4-40/+38
This simplifies the invocation of cleanup, by only using AlsaMixerTransactionDelete that performs the 3 actions of cleanup, removal from list, and memory freeing. Fixes a bug at MixerExit, because the first transaction was not removed from the list and led to a double free error. Also added a boolean parameter to AlsaMixerTransactionObjectDelete (was AlsaMixerTransactionObjectForget before), that decides wether or not the found object must be destroyed with its destructor (for most of the cases) or simply freed in memory (which is needed for loop device). Change-Id: I2eacbf80a22e3d556dc432d393a1807fcd7c47fb Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18alsa-api-pcm: added support of quirksThierry Bultel5-5/+44
Adds an optional array of quirks in the parameters of playback and captures. For now, the only known quirk is a needed workarround for writing sound output on the minnow board. Change-Id: I6c65d110a1f9333ccb77cd8f4eeb9c088d0d2eca Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-18Merge "alsa-utils-dump: added missing ending null char"Jan-Simon Moeller1-0/+1
2019-02-13alsa-utils-dump: added missing ending null charThierry Bultel1-0/+1
For some reason, snd_pcm_hw_params_dump does not add a null char at the end of the dumped string. This made weird chars appear in the console Change-Id: I6f2895e730e9bbd0f78139505f9b9e68dd164f2e Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-02-12Add support for AVIRTMark Farrugia6-95/+323
Leverage the new AVIRT driver for a more secure, more dynamically configurable loopback sound driver. To use, replace the file smixer-4a-default.json with smixer-4a-avirt.json, at /usr/libexec/agl/smixer/etc. The snd-avirt drivers are installed in AGL by default as of 6.99.2. The existing snd-aloop configuration is not broken by this change. Change-Id: I827636656c109a7393ad77997e05069a2462ea46 Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
2019-01-24Git submodule migration to separated librariesRomain Forlot27-467/+453
- Replace controller binder functions definition with the binder ones. and remove the last used submodules to use the separated libraries. - Add liburcu as a project dependency in addition to the others ones. Bug-AGL: SPEC-2139 Change-Id: If46eed24018e28e58d1e62397f4355d2aa46a58e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-01-18Merge "bluetooth sco: fixed the softvol open error"halibut_7.90.0halibut/7.90.0guppy_6.99.4guppy/6.99.47.90.06.99.4Jan-Simon Moeller3-3/+5
2019-01-17Prevents setting of ALSA controls out-of-rangeJonathan Aillet1-0/+14
Prevents setting of ALSA control values out-of-range for INTEGER type controls. Change-Id: I7f1ef24b50022df844f6916489e0f45680de6126 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-16Correct sent back stream volumeJonathan Aillet1-15/+20
Send back the real applied value when a stream volume changed. Change-Id: If11e11271080c1f1710775b120f26e1cf34f0a67 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-16bluetooth sco: fixed the softvol open errorThierry Bultel3-3/+5
This fixes #SPEC-2125. The fix consists in specifying the number of channels in the softvol pcm configuration. When it is not set, the libasound detects a configuration mismatch (the default number of channels being 2), and attempts to remove the sotfvol control, which for unknown reason, (broken support on kernel side ?) randomly fails. Change-Id: I816b623715e413452e6793ee519e97fac6fdde43 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-01-03bluetooth: fixes the cleanup at SCO hangupThierry Bultel1-6/+0
A bug in bluez-alsa was preventing to perform the PCM close, it was leading to a crash. There is a fix for this already, in bluez-alsa (as a patch in meta-agl-devel: https://gerrit.automotivelinux.org/gerrit/#/c/19365), that allows to get rid of the current limitation (4a had to be restarted between 2 phone calls). Now that the fix is available, (even if it is still no mainlined), it is now safe to perform the PCM close, without having a a crash. Change-Id: I6654e8e5b308985c4b0842001bc11eef22724deb Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-12-22Implemented the bug cleanup at application exitStephane Desneux15-132/+312
Fixes most memory leaks in softmixer. The concept of 'transaction' for dynamic streams has been generalized to the objects created at startup. The cleanup is done via a handle set through a atexit() call. Also added a missing strdup in alsa-api-loop, that fixes a double free. Warning, the bluez-alsa PCM are not closed in this version. This is intentional due to a BUG in the bluealsa ioplug PCM, that crashes upon close (pthread_cancel is used to terminate the io_thread and things get very bad. I have a pending fix for that, relying on a cancellation pipe, but deeper testing must be done). As an effect, only one phone call can be made, else 4a needs to be restarted Change-Id: Idb84cafe15f17c0ef02fcc70296d541dc55a2dcf Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh> Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2018-12-19Add support for bluetooth telephonyguppy_6.99.3guppy/6.99.36.99.3Thierry Bultel24-1056/+2166
This adds support for bluetooth telephony. A big rework in the softmixer internals has been mandatory, in order to support dynamic streams creation and deletions. Bluetooth telephony relies on the recent evolutions of bluez-alsa, the most important one being the support of HFP over Ofono. The softmixer opens PCM ioplugs provided by bluez-alsa. Bluetooth SCO needs 2 streams, one for listening and the other for talking. These streams are created upon requests sent by the hal-manager. The hal manager subscribes for bluez-alsa events and request the list of availalble transports. For each "attach" transaction verb, the softmixer maintains a list of the all created objects (sources, sinks, zones, ramps, streams, and more) Additionnally, it creates a new verb when the attach succeeds, that verb is typically something like "sco_XX:XX:XX:XX:XX:XX", and the only supported action at the present time is {"action":"remove"}, that performs all the cleanup of the registered objects. Change-Id: I1b119e6c079e60daf771e63c083a1ef33a39f379 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-12-04Move autobuild to top treeFrederic Marec2-26/+42
Bug-AGL: SPEC-495 Change-Id: I1c051997697c3c04c4b8e7ca4669b7052c5713ad Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-12-04Add tests for 4a-softmixerFrederic Marec9-0/+281
Add test tree Add new config for test Add tests for softmixer Add script to load snd-aloop before test Bug-AGL: SPEC-1796 Change-Id: I6336dbb5689e7baf8f2e8754b23f6aa83b0797d7 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-11-30Update version of app-controller-submoduleFrederic Marec1-0/+0
Changes of app-controller-submodule: (70e1d98 - Frederic Marec) Fix Parse plugin (309003b - Clément Bénier) AFB:servsync: add string for query argument (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 (625ce77 - Jonathan Aillet) Correct an error when no plugins are defined (0f708ba - Jonathan Aillet) Decrease print level when no onload action (8d53984 - Jonathan Aillet) Add a 'params' fields for controller plugins (35398f2 - Jonathan Aillet) Call wasn't done correctly in 'CtlConfigExec' (bc13eef - Romain Forlot) Add ctlPlugins array to the ctlConfig structure (0176d18 - Romain Forlot) Add an Init step to the plugins load (d6eb01e - Romain Forlot) Change loading configuration object behavior Change-Id: I945689c50308fb671305c2ea0e10785868a47d8b Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-11-30Change .gitmodules following submodule migrationFrederic Marec1-3/+0
Remove app-template in .gitmodules Change-Id: I00477c074fdeed5e32af6e8b0122f9c5db53025f Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-11-29Add gitreview file to 4a-softmixer repoguppy_6.99.2guppy/6.99.26.99.2Jan-Simon Möller1-0/+4
Allow git review to work. Bug-AGL: SPEC-1731 Change-Id: I80f723b268419911ec6e2cf9dc4942e33ca9ee45 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
2018-11-13remove dead code and renamed unobvious variables6.9.0Thierry Bultel6-51/+41
Changed the ringbuffer "xxx_free" function to something more explicit, because it does not free anything. Changed "single letter" variables to nicer names Change-Id: I000c57aa5cc684d387105441889e011a45a6ccf3 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-11-08Fix the error string of attach actionsThierry Bultel6-17/+21
Fixes the "syntax-error" to something more explicit (SPEC-1906) Change-Id: I9d4c81ee1d62dcfb99799480c6dc910e2019a791 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-11-07Handle too small card PCM buffer when writingJonathan Aillet1-1/+15
In the writing thread, handle the case when 'writing threshold' was smaller than ALSA sound card's PCM buffer (defined in the driver). This avoids waiting indefinitely for a buffer to contain a wanted number of frames that it cannot contain. Change-Id: Ie1aa69ea1a93471ed46d571c669ec08a1b827476 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-07Tweaking debug printsJonathan Aillet3-13/+13
Replace some 'printf' by application framework debug functions. Improve 'ALSA_PCM_UID' macro. Correct minor errors in debug prints. Change-Id: I49899fd904d42b5b3bec46017eb319ed7d321dc5 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-11-07alsa-core-pcm: fixed the mute logicThierry Bultel1-4/+6
This fixes the mute/unmute logic. This was broken due to a forgotten push for a commit Change-Id: I6cbdedefc11ebd508d30ece71df364d9b69c74f0 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-11-07config.cmake: fixed a typoThierry Bultel1-1/+1
remoce extra parenthesis Change-Id: Ieeb5ca1a9064d97c9674dc855dc79aab36cadf3e Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-11-07Merge pull request #2 from iotbzh/app-templates-migrationtbultel3-10/+12
Migrate app-templates to CMake module
2018-10-31Migrate app-templates to CMake moduleapp-templates-migrationRomain Forlot3-10/+12
Bug-AGL SPEC-1682 Change-Id: Ia8d8bc6b614065d9cc9ab73a33d4643267686bcf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>