summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #9 from 01org/dev-featuresDavid Wagner2014-06-2555-308/+2346
|\ | | | | Realign from internal tree
| * Create specific targets for headers exportMattijs Korpershoek2014-06-251-0/+16
| | | | | | | | | | | | | | | | | | | | | | BZ: 203091 Hard coded relative or absolute paths shall be avoided. To allow other components to import necessary headers we created two new targets. Change-Id: I95e8f13765537f431f5730a7cdde4f85f4b7d06a Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Fix bug when using setConfigurationParameter commandFrédéric Boisnard2014-06-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 189941 There is an issue when trying to set parameter value in a configuration using the setConfigurationParameter command. The error returned is "Unable to forward synchronize configurable element, Failed to write value in mixer control". The root cause is a recent update concerning the auto synchronization mode which is now turned on by default. The setConfigurationParameter command first updates the local Configuration blackboard, and then the Main blackboard if this Configuration is the one applicable for the domain. However, this local blackboard should not be synchronized, only the main blackboard should be. This patch deactivates synchronization for the local blackboard. Change-Id: I7ca71806309d19ae482399f474d32a0c1b70ae6c Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
| * Removed phony package to copy .xsd filesMattijs Korpershoek2014-06-252-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 192861 When hostDomainGenerator.sh is called by the build system, it needs to copy schema files to /tmp/tmp.XXXXXXX. This is because parameter-framework needs to have the schema files next to the .xml files in order to apply validation. In order to do that, hostDomainGenerator.sh needs to know where he can copy the .xsd files from. Currently, the .xsd files are copied from $HOST_OUT/etc/parameter-framework/Schemas via a dedicated makefile. This used a phony package to group all the files that have to be copied. The problem is that phony packages the phony package is not calling the prebuildt rules we need. So the files we want to export to /etc/parameter-framework/Schemas are not copied. This patch removes the phony package in order to produce the expected behaviour. Change-Id: I96da56f85a8c3d512fcfb97244181dc6c1cb9401 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Refactored schema export makefileMattijs Korpershoek2014-06-251-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 192861 The makefile contained a lot of redundancy regarding the source files. This patch reorders some variables and uses a less error prone way to declare the LOCAL_SRC_FILES variable by avoiding the repeat of the source files. Change-Id: Idfff93ef4a9d4aff91d2bc864abf38bf904df685 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Fixed point test scriptMattijs Korpershoek2014-06-251-0/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 197723 This python script performs several checks on fixed point parameters: - Bound check: Can we set a value? - Sanity check: If we get this previously set parameter, is the value approximately the same? There should be at maximum a quantum difference between the original value and the returned value. - Consistency check: Can we set the value we got from the sanity check? - Bijectivity check: If we get the parameter we set a second time, is the result the same as the value we got from the set we did in the Sanity check? Change-Id: I7b4d61ec740139b0ee70a44b6b38009507a569ee Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Fixed point test configurationMattijs Korpershoek2014-06-254-0/+726
| | | | | | | | | | | | | | | | | | | | BZ: 197723 This contains the configuration files which contains a lot of fixedpoint parameters which can be used for testing. Change-Id: I261120d16eb6f4d28b6b61a5b2845f1fdc18e91f Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * FixedPointParameter: Rename conversion functionsMattijs Korpershoek2014-06-252-18/+34
| | | | | | | | | | | | | | | | | | | | BZ: 197723 Give a few functions more meaningful names. Add some cast fixes and doxygen to the renamed functions. Change-Id: I002a3fa9b397294153c23b9883c3ad3b1c136e54 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Fix fixed-point parameter range checkMattijs Korpershoek2014-06-251-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 197723 When adding parameters which are far out of bounds, the range check does not refuse to set the value. This is unexpected behaviour. This patch adds a correct range check. Change-Id: I325920bcabc9485bd8f95aadcaff36a67182b97c Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * FixedPointParameter: Removed precision notionDavid Wagner2014-06-251-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 197723 Significant digits were computed in order to prevent odd behaviour when printing a converted fixed point parameter. After converting a number from fixed point towards a double, we had to round up/down in order to print the double to the user (or towards a file). The printing showed only the significant digits, in other words, the digits which can vary from 0 to 9. This caused unpredictable behaviour when rounding using the setPrecision() function. This patch removes the 'precision' notion related to fixed points in order to have a predictable behaviour by displaying all fractional digits. Change-Id: Id5a9b5b8a80d5a96bcbbb6af9213770a05a70083 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * remote-proccessor detect partial message receptionKevin Rocard2014-06-254-35/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 190038 Client disconnection during message reception is normal if no part of the message as been receive yet. Client disconnection in the middle of a packet reception is not normal but was not differentiated from the behaviour described above. Do not consider client disconnection on first read as an error. Consider it as an error on the followings. Change-Id: I34b50ba0af800f9e1fcdb51996b1b2f02a23cb3f Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * [remote-processor] Add context information on failureKevin Rocard2014-06-256-17/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 190038 Remote processor was not displaying information in case of network read/write error. Add some error messages to ease debug. Change-Id: I465062e8cf77f94b3d4d4d0c71338c4630aac276 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Remote-processor continue on EINTRKevin Rocard2014-06-251-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 190038 EINTR is a normal error and should not fail recv or send. Continue if those errors are received. Change-Id: I66416153eb432b8f7daf97119c7c59c87e88da08 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Remote-processor send returning 0 is not an errorKevin Rocard2014-06-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | BZ: 190038 Send can return a 0 size, it is normal. Does not consider send return value 0 as an error. Change-Id: Ic4801908b0771d5e0aba8c090fb9e9949d6e16fc Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
| * Fix Fixed Point convert issue.Francois Gaffie2014-06-252-55/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 185336 Convert is failing when trying to convert the string value to integer value within FixedPointParameterType class. This patch fixes the issue by requesting to convert the string into a signed type. Change-Id: I77987eb1564292bd6dcdd0da4db52c4b4f92818f Signed-off-by: Francois Gaffie <francois.gaffie@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Correct FixedPointParameter display precisionDavid Wagner2014-06-251-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 176178 Explain the precision computation (m * log10(2)): For a Qn.m number, the step between each storable number is 2^(-m). Hence, on a decimal representation, the Dth digit after the decimal point can take all possible values (1..9) - meaning that it is significant - only if 2^(-m) <= 10^(-D) -m <= log2(10^(-D)) -m <= log10(10^(-D)) / log10(2) -m <= -D / log10(2) m * log10(2) >= D Conversly, the Dth digit can be represented if D <= m * log10(2) We add 1 to the precision in order to display the digit right after the last significant digit. This will lead to oddities such as: $ setParameter /Test/test/f32_Q8.23 0.1234569 $ getParameter /Test/test/f32_Q8.23 > 0.1234570 but it will avoid modifying raw values when converting from string to Q-format and back to string. Also, use std::setprecision() on the stream instead of manually truncating the displayed number. Change-Id: Ief2a7daabf4505ae4312e79036b0374f53368cac Signed-off-by: David Wagner <david.wagner@intel.com>
| * FixedPointParameterType: fix potential compilation issueDavid Wagner2014-06-252-41/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 176178 The isEncodable() method has several prototypes and some compilers are not able to decide which version to use and produce a compilation error. Remove unnecessary casts and make the code simpler by using a template-based conversion library from string to various numeric types instead of using strtoll and strtod. Change-Id: I53d0b4ebd12f2cbb315bb52d98365a35876b5aef Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Updated hostDomainGenerator.sh schema validationMattijs Korpershoek2014-06-251-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 188323 In order to validate xml files, we need the corresponding schemas to be next to the xml files. Those are put by the script in /tmp. This patch add the copying of the schema files to /tmp. I also adds an optional command line argument to disable/enable validation. This is useful for platform specific enabling/disabling validation. It can be used by calling hostDomainGenerator.sh --validate. Change-Id: I7da65f230e5abf5b1d18c5cd6cf11b67dae5ed76 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Fix xmlserializer makefile for schema validationMattijs Korpershoek2014-06-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 188323 For schema validation features, we are using a special version of libxml2 called libxml2-schemas (which contains the SCHEMAS feature). This is just a different static library build with that feature only for the parameter-framework. The problem with that, is that the include/xmlversion.h does not define the #LIBXML_SCHEMAS_ENABLED flag. So when including it in our project, the flag is not defined. This results in unexpected behaviour since validation was active in the static library, but never called because the flag was not defined. As a fix, we are defining the LIBXML_SCHEMAS_ENABLED flag in the makefile. Change-Id: Id56ae5b668e587171b11e7607f2603ab5e3341a1 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Added copying of xsd files to host build outputMattijs Korpershoek2014-06-251-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 188323 In order to validate the .xml parameter framework files, we use XSDs. Those must be in the same directory as the .xml files when they are validated. This patch copies the .xsd files towards a directory that hostDomainGenerator knows, so that he can use the files and copy them towards /tmp. Change-Id: I938fc3791006777ff65c96d4259596111f93d7b8 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Add log in case of failureKevin Rocard2014-06-251-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 189977 The hostDomainGenerator.sh script generates xml files a build time. Sometimes it fails but the log information are no sufficient to found the root cause. Add some log information in order to be able to find it. Change-Id: I505577ee30503dccf25375b0ea262461ec4cce14 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Fix KW10 issuesEduardo Mendi2014-06-254-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 186081 Due to upgrade klocwork (KW version from 9.6 to 10.0) new issues have been raised. This patch fix the new issues raised in PFW. Change-Id: I54c14e4d6da1c9a5f8d82aec1769a9e7e948db50 Signed-off-by: Eduardo Mendi <eduardox.mendi@intel.com>
| * Test-platform enable/disable xml validationMattijs Korpershoek2014-06-2510-25/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 184054 test-platform has no way to tell to the parameter framework that it wants the parameter framework to validate xmls on loading. New command added to test-platform executable. setValidateSchemasOnStart true|false If set to true, the parameter framework will try to validate the .xmls with the .xsds located next to them. If set to false, it will never attempt to validate. SetValidateSchemas is false by default to allow backward compatibility. Note(a): This assumes that the script is able to find the .xsd files (which should be in /tmp/Schemas/). Change-Id: I7a5b0bc09d31e6647d8c631380d31503666e7e7b Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Added possibility to toggle xml validationMattijs Korpershoek2014-06-259-38/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 184054 It was not possible to enable/disable xml file validation. The parameter framework only relied on the LIBXML_SCHEMAS flag. This patchs implements a new constructor for XmlFiles which allows enabling/disabling xml/xsd check. Change-Id: I32d220a42bb27f4ce685f07cb194e78e76f44a5d Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Android.mk hack for compiling libxml with schemas enabledDavid Wagner2014-06-251-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "Schema" feature is enabled in the official libxml2. We use that feature to validate the xml files given to the parameter-framework. In the libxml2 aosp version, this feature is not enabled. This patch adds a new target, libxml2-schemas, which contains the "Schemas" feature. This should be removed when the "Schema" feature is integrated into the aosp's libxml2 version. Change-Id: Ida72de36e7fd196063a332ee70b30c0f0cb69024 Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Local .xsd files for config validationMattijs Korpershoek2014-06-243-2/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 184054 In order to verify that xml files are valid, the parameter framework check them with .xsd files. In those files, there are references towards base schemas on the internet. Which means that every validation downloads a copy of the base file via http. To avoid doing http requests, we can use the file locally. This patchs changes from remote file to local. Change-Id: Ide48dba0000db7c97e1d269ee5573ac8afe7e4d4 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Add explicit API to append parameter path to error logFrancois Gaffie2014-06-245-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 183857 Explicit API names makes the code easier to read, allowing even to remove some comments. This patch adds an API to append the parameter path to the error log. Change-Id: Id136497072e53c8dd0ea3d95354e1dfe6193f771 Signed-off-by: Francois Gaffie <francois.gaffie@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Restore autosync of string parameterFrancois Gaffie2014-06-247-43/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 183857 Sync for String parameter accessed from parameter handle API does not work. This patch allows synchronisation for string parameter accessed from parameter handle APIs. Change-Id: If738402f4c0fcb0bb51bd2515e46f3ac36a361dd Signed-off-by: Francois Gaffie <francois.gaffie@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Support context mapping at Subsystem levelDavid Wagner2014-06-246-24/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 176942 Add a class (ConfigurableMappingElement) handling the mapping; to be derived by all classes that can contain mapping. ConfigurableMappingElement derives from ConfigurableElement. Until now, the only child of ConfigurableElement that could have mapping was InstanceConfigurableElement (through TypeElement, that contains all information related to its type). Now, both InstanceConfigurableElement and Subsystem derive from ConfigurableMappingElement. That way, Subsystem XML elements can now have a "Mapping" attribute, propagated to all Elements in the tree. The Subsystem.xsd schema is updated in that regard. Only context mapping is relevant at the Subsystem-level (as opposed to instantiation mapping). If an instantiation mapping is set in the Subsystem, it is silently ignored. Change-Id: I3c09959bc5e3d18c5a4d354e498d69cc5489a247 Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
| * Fix "Argument list too long" bug during XML generationFrédéric Boisnard2014-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 177060 When the initial XML file for tuning is too big, the XML generation fails with the message: "Argument list too long". This is because the generation relies on the PFW command "setDomainsWithSettingsXML", which takes XML data as string argument. There is a limitation concerning the size of this string, leading to the current issue. This patch replaces the call to "setDomainsWithSettingsXML" by "importDomainsWithSettingsXML", which takes a file as argument instead of a string. There is no limitation on the file size. Change-Id: Ieb12e6ba1391545021cd3f1e867dee0d28425d19 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
| * Fix hostDomainGenerator.sh error about localhost socket creationFrédéric Boisnard2014-06-232-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 171573 If localhost is not bound to 127.0.0.1, socket creation fails in the portAllocator.py script. This error is not well catched in the main tool hostDomainGenerator.sh. This patch updates portAllocator.py so that the IP address 127.0.0.1 is used instead of localhost. In addition, the potential error messages raised by portAllocator.py are now correctly taken into account by hostDomainGenerator.sh. HostDomainGenerator.sh has also been updated to replace all instances of 'localhost' by '127.0.0.1'. Change-Id: I7ed6ede7a1148360efac4bf38f49054066a50a29 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
| * Revert "Android.mk: Remove the libparameter_includes hack"Mattijs Korpershoek2014-06-231-0/+33
|/ | | | | | | | | | | This reverts commit 34e90ae1c744e1de6547e014326ef54f516439c8. libparameter_includes and libparameter_includes_host are used to build the parameter-framework plugins. They were removed by error. We need to revert this patch since we still use those make targets. Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* Merge pull request #3 from 01org/skeleton_pluginDavid Wagner2014-03-067-0/+369
|\ | | | | Add an example skeleton plugin
| * Add a example skeleton pluginKevin Rocard2014-02-277-0/+369
|/ | | | | Change-Id: I16c4e9c90395648dc3d583687c97f4b72401be8b Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
* Merge pull request #1 from 01org/cmake_cleanupsGuillaume Denneulin2014-02-205-81/+34
|\ | | | | Cmake cleanups
| * CMake: detect the XInclude feature in libxml2David Wagner2014-02-201-1/+9
| | | | | | | | | | | | | | | | | | xmlserializer needs the XInclude feature (its usage in structure files is optional but xmlserializer needs the symbols for compiling). Verbosely fail if libxml2 has not been configured with XInclude support. Signed-off-by: David Wagner <david.wagner@intel.com>
| * CMake: Force POSIX threads to be availableDavid Wagner2014-02-201-2/+6
| | | | | | | | | | | | | | The FindThreads module in CMake can detect several thread libraries. We only want the phtread library, so enforce it. Signed-off-by: David Wagner <david.wagner@intel.com>
| * CMake: remove WIN32 commentsDavid Wagner2014-02-202-2/+2
| | | | | | | | | | | | | | | | | | At the time of writing the makefiles, it wasn't clear what this argument was for. According to the documentation, it is only useful for GUI applications on windows. test-platform and remote-process are command-line tools and this does not apply. Signed-off-by: David Wagner <david.wagner@intel.com>
| * CMake: export client and plugin headers in separate directoriesDavid Wagner2014-02-201-76/+9
| | | | | | | | | | | | | | | | | | client headers are exporter in parameter/client; plugin headers in parameter/plugin. Also, reduce the list of exported plugin headers to the bare minimum. Signed-off-by: David Wagner <david.wagner@intel.com>
| * xmlserializer/CMake: fail verbosely if libxml2 is not foundDavid Wagner2014-02-191-0/+8
|/ | | | | | Also, append the libxml2 cflags if any. Signed-off-by: David Wagner <david.wagner@intel.com>
* Add a READMEDavid Wagner2014-02-181-0/+15
| | | | Signed-off-by: David Wagner <david.wagner@intel.com>
* CMake: add rules for installing headersDavid Wagner2014-02-182-0/+106
| | | | | | | | | | | libparameter abd libxmlserializer headers. Concerning libparameter headers: only core headers (needed for the plugins) are currently exported. We'll need to export the client headers too, but we must make a distiction between the two classes of headers. Also, some currently exported core headers might not be needed (some cleanup is needed). Signed-off-by: David Wagner <david.wagner@intel.com>
* CMake: beautification, fix some commentsDavid Wagner2014-02-186-13/+16
| | | | Signed-off-by: David Wagner <david.wagner@intel.com>
* CMake: clarify why libparameter doesn't link with libremote-processorDavid Wagner2014-02-171-0/+1
| | | | | | It is accessed through dlopen(). Signed-off-by: David Wagner <david.wagner@intel.com>
* CMake: add installation instructionDavid Wagner2014-02-175-0/+10
| | | | | | | | | Run "cmake -DCMAKE_INSTALL_PREFIX=/path/to/install ." for choosing a custom prefix (optional: if it is not specified, a default directory will be chosen). Run "make install" for installing all generated files. Signed-off-by: David Wagner <david.wagner@intel.com>
* Add CMake MakefilesDavid Wagner2014-02-177-0/+252
| | | | | | | 1) Generate the Makefiles with "cmake"; 2) compile all targets with "make". Signed-off-by: David Wagner <david.wagner@intel.com>
* Import convert util templatesDavid Wagner2014-02-173-3/+179
| | | | | | Import an external dependency: a template-based conversion toolkit. Signed-off-by: David Wagner <david.wagner@intel.com>
* Android.mk: Remove the libparameter_includes hackDavid Wagner2014-02-141-33/+0
| | | | | | The plugins' Android.mk will directly access libparameter's include dir. Signed-off-by: David Wagner <david.wagner@intel.com>
* Rename libutility to libpfw_utilityDavid Wagner2014-02-133-6/+6
| | | | | | That name was too generic and may have conflicted in the future. Signed-off-by: David Wagner <david.wagner@intel.com>
* Remove some useless LOCAL_C_INCLUDES directivesDavid Wagner2014-02-132-2/+0
| | | | Signed-off-by: David Wagner <david.wagner@intel.com>