summaryrefslogtreecommitdiffstats
path: root/parameter
Commit message (Collapse)AuthorAgeFilesLines
* [PFW] Take into account base offset when accessing value of parametersFrédéric Boisnard2014-02-128-34/+37
| | | | | | | | | | | | | | | | | | | BZ: 88357 This patch aims to offer the possibility of accessing the value of parameters from a Configuration blackboard instead of Main blackboard. The read/write operation is now relative to the base offset of the ancestor element associated to the Configuration. The base offset is stored in the ParameterAccessContext. Change-Id: I158df63d2ef3bd8cbacb84b7d2f51723ed1074f5 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/93671 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Dixon, CharlesX <charlesx.dixon@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* Exposes API to dump inclusive criteriaFrancois Gaffie2014-02-122-1/+2
| | | | | | | | | | | | | | | | | | | | BZ: 83285 To avoid implement in route manager an helper function to dump inclusive criteria, expose an already existing API through the CriterionTypeInterface. Signed-off-by: Francois Gaffie <francois.gaffie@intel.com> Change-Id: Ib500f23872fd4da47c5d17666f75708e1627f749 Reviewed-on: http://android.intel.com:8080/90783 Reviewed-by: Gaffie, Francois <francois.gaffie@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Correct truncated criterion logKevin Rocard2014-02-123-4/+16
| | | | | | | | | | | | | | | | | | | | | | BZ: 85746 Create a log fonction to log a string table. Use it to call the log function for each criterion. Context: When the PFW starts, it logs the criteria, their states and possible values. All criterion logs where concatenate in a string and logged. But if there is a lot of criteria, the 512 chars long log buffer might be overfload and the log is truncated. Change-Id: I72c89b25de9314b714763b3ac71a7d0cb9698910 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/90089 Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* Add a getter for belonging subsystem in subsystem objectsGuillaume Denneulin2014-02-122-0/+9
| | | | | | | | | | | | | | | BZ: 66692 Sometimes, subsystem object need to know their belonging subsystem. Change-Id: Ia1b8c8c3756179a87b542fc0fe52f6f0097299b6 Signed-off-by: Guillaume Denneulin <guillaume.denneulin@intel.com> Reviewed-on: http://android.intel.com:8080/87951 Reviewed-by: Soulard, Mathieu <mathieu.soulard@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Back synchronisation no longer failsKevin Rocard2014-02-126-14/+7
| | | | | | | | | | | | | | | | | | | | | | BZ: 80500 As forward synchronisation, back synchronisation no longer return false if a syncer fails to backsynchronise. On subsystem restart, it will be resynchronise, so the back synchronisation failure is a warning not an error. As a result this patch also prevents PFW initialisation failure in case of unavailable subsystem. Change-Id: I21fe05747153a63cb77ed784532f3cbbf184d820 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/87779 Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Revert "PFW: Add log on criterion creation"Kevin Rocard2014-02-121-6/+0
| | | | | | | | | | | | | | | | BZ: 77959 This reverts commit with change-Id: I76c5cb596df1d20af48f0df03015c4be90cd5d96. Logging the criterion should be done on PFW start. If not it requires the criterion type not to change until start. Change-Id: If3d6faeffe72938bc920e28f6dfccccb530a1dee Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/81830 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Log criterion state at PFW startKevin Rocard2014-02-128-33/+76
| | | | | | | | | | | | | | | BZ: 77959 The PFW will log criterion patch state at start before appling configuration. Change-Id: I4ac3676b9ba685c1e226a8495ffdbe98f0c08219 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/79965 Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Add resync mechanism if a subsystem needs resyncGuillaume Denneulin2014-02-1213-50/+136
| | | | | | | | | | | | | | | | | | | BZ: 76267 In the case of a hw subsystems reset, it's possible that its parameter managed by the PFW may not be aligned with the PFW blackboard. A re-synchronization mechanism is implemented to ensure that the subsystem is re-synchronized on the next configurations application. Change-Id: I032150955d25a7020cf494e69456897b4c157916 Signed-off-by: Guillaume Denneulin <guillaume.denneulin@intel.com> Reviewed-on: http://android.intel.com:8080/83015 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Do not stop on hard sync errorsKevin Rocard2014-02-1230-160/+205
| | | | | | | | | | | | | | | | BZ: 76263 When synchronization fails, the parameter-framework should log a warning and continue synchronization instead of stopping Change-Id: Ic12d8798ea25584db714ee26e644fac793c28881 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/81825 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Improve login in PFW core and amixer pluginKevin Rocard2014-02-124-44/+56
| | | | | | | | | | | | | | | | | | | | BZ: 71914 Autolog adds a nesting log level. It is not always needed. For example in a Debug context a lot of log can be expected, so this level is useful but not otherwise. Autolog nesting is now optional. Add log during PFW structure loading. Change-Id: I24e1f615e3032c70a3b8b85a1cc1804dc49b631c Origin-Change-Id: I1f2c6c843e17595d4a81c1d2dfbff30d4187cdf8 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/81269 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Add log on criterion creationKevin Rocard2014-02-121-0/+6
| | | | | | | | | | | | | | | | BZ: 71914 Initial criterion state and posible values are needed for criterion coverage. Change-Id: Id6058376fc64eb4e523fe0badffc09a7f4238f6c Origin-Change-Id: I76c5cb596df1d20af48f0df03015c4be90cd5d96 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/81268 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* PFW: Prevent crash if subsystem structure missingFrédéric Boisnard2014-02-121-0/+5
| | | | | | | | | | | | | | | | | | | BZ: 62524 If the XML file defining a subsystem is missing, the PFW crashes without any message. This patch fixes this issue. Change-Id: Ibc0e9d195a8207d41d25613f56d1c9740bf6c784 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/70698 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Reviewed-by: Baron, Georges-henriX <georges-henrix.baron@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Do not check data sign when access blackboardFrédéric Boisnard2014-02-121-24/+0
| | | | | | | | | | | | | | | | | BZ: 61532 In the toBlackboard() and fromBlackboard() methods of the class CIntegerParameterType, checks are performed to ensure that the requested kind of data is the same as the kind of data stored. A client should be allowed to retrieve a signed integer as an unsigned integer. Change-Id: Iabc018dd74dedc6e959d7e976afbea043b327ac8 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/69640 Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* Allow 64bits bitParameterBlocksGuillaume Denneulin2014-02-127-32/+42
| | | | | | | | | | | | | | | BZ: 59348 bitParameterBlocks are limited to 32 bits, extend it to 64 bits. This change includes: - PFW code change - XML schema update Change-Id: I9861cea0538a17fcba77fa7d573faae36d8731e0 Signed-off-by: Guillaume Denneulin <guillaume.denneulin@intel.com> Reviewed-on: http://android.intel.com:8080/68189 Reviewed-by: Gozalvez Herrero, Juan AntonioX <juan.antoniox.gozalvez.herrero@intel.com> Tested-by: Gozalvez Herrero, Juan AntonioX <juan.antoniox.gozalvez.herrero@intel.com>
* PFW: Show pending configurations in status commandFrédéric Boisnard2014-02-124-6/+44
| | | | | | | | | | | | | | | | | | | | | BZ: 56118 Update the "status" command of the PFW to display the current pending configurations for all domains, that is to say configurations that are waiting the next call to "applyConfiguration()" to be applied. This improvement will help developers to better understand the current state of the PFW, in particular when dealing with HAL modifications. Change-Id: I6300620ad8cedcb534fb2859b57b7ab2988fa618 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/64796 Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Display warning messages to help userFrédéric Boisnard2014-02-127-3/+62
| | | | | | | | | | | | | | | | | | | | BZ: 54512 Display a warning message when a configuration cannot be applied because the TuningMode is on, in order to help user to identify potential issues. Display a warning message when a criterion change doesn't lead to a configuration application (a check is performed each time a criterion is changed). Change-Id: Id872655c92770d1f6f1b01b20db2fde3db826ceb Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/63845 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Add two commands to print xml settings and structureGeorges-Henri Baron2014-02-1223-52/+276
| | | | | | | | | | | | | | | | | | | | | BZ: 44910 Creates two commands that can be called through the command line of the parameter-framework. First command getDomainXML returns a string containing the xml structure of the domains, configurations and settings. Second command getSystemClassXML returns a string containing the xml structure of all the instantiated parameter with their attributes. Change-Id: I9a35333802049a2177b8fc416754fdb67e6efff0 Signed-off-by: Georges-Henri Baron <georges-henrix.baron@intel.com> Reviewed-on: http://android.intel.com:8080/55155 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Check if value provided is exactly an integerFrédéric Boisnard2014-02-122-21/+42
| | | | | | | | | | | | | | | | | | | | BZ: 50802 Previously, if a fixed point value was provided for an integer parameter, there was no error. This was due to the results of strtol/strtoll which was not correctly checked (it would only fail if no digit was provided, but would succeed even if letters were appended after/before the digits). So for fixed point values, only the first part of the string was fetched, giving the impression of a truncation at the '.' character . Now the whole string shall be completly parsed for the conversion to succeed. Change-Id: Ia907e8cc05e5639e9a8bbd7204f46df5bdfa394a Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/60743 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Verification of Enum size compatibilityFrédéric Boisnard2014-02-122-9/+50
| | | | | | | | | | | | | | | | | BZ: 30283 No verification is made on the compatibility of the numerical Enum with the declared size. This patch aims to fix this issue. Change-Id: I03dea88d1b3e482eecb92a92169537d51c44c2a7 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/59242 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Mapping values are not truncated after ':'Kevin Rocard2014-02-121-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 49228 When an mapping value contains a ':', anything after is no longer ignored. Example : <Component Name="STATE" Type="SYSFS_FILE" Mapping="Directory:/sys/bus/pci/devices/00 00:00:06.6/"/> the PFW used to consider the mapping field as: "Directory:/sys/bus/pci/devices/0000" but now it is consided entirely: "Directory:/sys/bus/pci/devices/00 00:00:06.6/" Change-Id: I95711fb4e4ee7d10739e6393717a08627192bb00 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/59569 Reviewed-by: Becker, VincentX <vincentx.becker@intel.com> Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: KlocWork Severe issues fix on Parameter FrameworkJhinX Lee2014-02-1210-0/+25
| | | | | | | | | | | | | | | BZ: 46220 Added dummy copy constructors Change-Id: I2b79900a5d0d9173084aa89d77cc90fef1f94f14 Orig-Change-Id: I040e4d2fd8d77ac04bf2fb78a190a39aadd0b0f3 Signed-off-by: JhinX Lee <jhinx.lee@intel.com> Reviewed-on: http://android.intel.com:8080/60268 Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Remove names from PFW license headerKevin Rocard2014-02-12170-1190/+170
| | | | | | | | | | | | | | | BZ: 47701 As parameter framework code is proprietary, it should not be signed (patrick Benavoli name inside the header). Change-Id: I198f2851ee2a6cffed64a552fa399b072a0cbd3e orig-Change-Id: I335ecce2fa22ad11d6fa24f57c7cbbae3423bf1e Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/59560 Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Fixed bug on BitParameterTypesFrédéric Boisnard2014-02-1214-33/+178
| | | | | | | | | | | | | | | | | BZ: 44148 The save and restore operation would not work correctly when BitParameters of a BitParameterBlock were used in more than a single Domain. This patch aims to fixup this bug and introduces a new class: BitwiseAreaConfiguration. Change-Id: I0aaccd57cf1cce33400f94a8879565171d283425 Orig-Change-Id: I7107f7db9f01cfff3c38cbac606a8c1e9bca8b5e Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/58363 Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: overflow not detected for int parametersFrederic Boisnard2014-02-128-89/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 26285 The following errors were not detected by the PFW when setting parameters of type (U)INT8, (U)INT16, (U)INT32: - When setting a value out of the int32 range (ex: 999999999999999), the strtol/strtoul functions return the value -1 which was then assumed correct by the PFW. Now the errno value is checked to ensure that no range error was encountered by strtol/strtoul. - When the input string does not contain any digits, the strtol/strtoul functions return 0 which was assumed correct by the PFW. Now the endptr argument is checked to make sure that at least a part of the string was parsed. In any case an error message is displayed and the original value is not updated. Made the change compliant to 64-bit OSes. Applied the same corrections to Enum and FixedPoint types. Change-Id: I135538def791208a6eb6143444a3fc30337137e1 Orig-Change-Id: I1519dbf798228a9be579aaf612f456d5eb1b41b5 Signed-off-by: Frederic Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/55443 Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Add a command to delete all domainsKevin Rocard2014-02-124-0/+33
| | | | | | | | | | | | | | BZ: 42432 This command is useful to reset all PFW settings. Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Change-Id: I23b74c45205739aeca71278979699b6b88f3111e Reviewed-on: http://android.intel.com:8080/53332 Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Fix precision error on FixedPointParametersFrédéric Boisnard2014-02-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | BZ: 36789 When exporting the settings to an XML file and importing this file right after, an error occurs on some fixed point parameters. The values of these parameters are incorrectly saved into the output file. This bug is due to a precision error when converting the raw value from the blackboard. The setprecision() manipulator rounds the result instead of truncating it, sometimes leading to an overflow. The fix consists in performing a truncation after the last significant digit. Change-Id: I70c59bffabfd61f1ce95a8fb4cef33273a326eaf Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/50935 Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Fixed ParameterMgr destructorFrederic Boisnard2014-02-121-0/+1
| | | | | | | | | | | | | | | | BZ: 33745 The destructor of ParameterMgr did not destroy the instance of CCommandHandler. This issue is fixed by this patch. Change-Id: Ied23c7a094bb1cc528723a79e001cd6defa556d8 Signed-off-by: Frederic Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/46429 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* gcc4.6: Fix incompatible type casts for 4.6 toolchain.Pavel Chupin2014-02-121-3/+3
| | | | | | | | | | | | | | | BZ: 33304 Change-Id: I6a13f95b0c5636591f76e7f123c0813608d50c73 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com> Reviewed-on: http://android.intel.com:8080/45958 Reviewed-by: Lu, Hongjiu <hongjiu.lu@intel.com> Reviewed-by: Beare, Bruce J <bruce.j.beare@intel.com> Reviewed-by: Yin, Fengwei <fengwei.yin@intel.com> Reviewed-by: Li, XiaojingX <xiaojingx.li@intel.com> Tested-by: Li, XiaojingX <xiaojingx.li@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Fixed bug on fixed point parameter typesFrederic Boisnard2014-02-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 29464 When reading from the blackboard a value of type fixed point parameter (size < 32 bits), the sign extend was not taken into account: - Added a call to signExtend() before the conversion, - Updated the display as well (precision support), - Set up the notation type (fixed) to prevent the scientific notation display. Compilation on target would fail because of the use of an ambigous function : log10. Changed the notation of the number to double for the parameter of this function to force binding to: double log10(double). Change-Id: Ibb77259b84db33e00971ba662600547522cf9bb1 Signed-off-by: Frederic Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/41649 Reviewed-by: De Chivre, RenaudX <renaudx.de.chivre@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: Benavoli, PatrickX <patrickx.benavoli@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Allow multiple amend in mapping fieldPatrick Benavoli2014-02-121-2/+8
| | | | | | | | | | | | | | | BZ: 25744 The fonction that amends is now able to handle multiple amends. Change-Id: Ia4f62d6fee32f401e4ce90f5e75a150771d1921d Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/37733 Reviewed-by: De Chivre, RenaudX <renaudx.de.chivre@intel.com> Reviewed-by: M, Arulselvan <arulselvan.m@intel.com> Tested-by: M, Arulselvan <arulselvan.m@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Add getConfigurableElement() to CSubsystemObjectFrederic Boisnard2014-02-122-0/+8
| | | | | | | | | | | | | | | | | | | | | BZ: 25743 CSubsystemObject manages an instance of CInstanceConfigurableElement through a private member variable, preventing subclasses of CSubsystemObject from accessing it. These subclasses should have access to this knowledge, e.g. when a plugin needs to display specific debug information. This patch adds a new protected method CSubsystemObject::getConfigurableElement(). Change-Id: Ifba58e4ef41b53de828eb1a85b3a8e9a3e5bf40c Reviewed-on: http://android.intel.com:8080/37731 Reviewed-by: Boisnard, FredericX <fredericx.boisnard@intel.com> Reviewed-by: De Chivre, RenaudX <renaudx.de.chivre@intel.com> Reviewed-by: M, Arulselvan <arulselvan.m@intel.com> Tested-by: M, Arulselvan <arulselvan.m@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* HAL code to be used on tablet -> enforce null pointer protectionFrancois Gaffie2014-02-122-0/+9
| | | | | | | | | | | | | | | | | | | BZ:26933 Audio HAL code is supposed to be also used on tablet. If parameter FW cannot be started, must not bailing out. This patch add a new API to ensure PF is started before calling another API of the PF. Change-Id: I2f9059acf79370fc1cfbae27256060f872fe4ad7 Signed-off-by: Francois Gaffie <francoisx.gaffie@intel.com> Reviewed-on: http://android.intel.com:8080/38892 Reviewed-by: De Chivre, RenaudX <renaudx.de.chivre@intel.com> Reviewed-by: Continente, Christophe <christophe.continente@intel.com> Reviewed-by: Wood, Brian J <brian.j.wood@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* Handle amend of mapping values at PFW levelGuillaume Denneulin2014-02-122-0/+40
| | | | | | | | | | | | | | | | | | BZ: 24271 Amend mechanism can be used by various plugins, right now it is implemented in alsa one. Move this implementation in the PFW for all plugin to benefit from this mechanism. Change-Id: I3f193a732b00586c52303390f353fea00f4ce8ec Signed-off-by: Guillaume Denneulin <guillaumex.denneulin@intel.com> Reviewed-on: http://android.intel.com:8080/35905 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Enhance subsytem libraries load mechanismGuillaume Denneulin2014-02-109-70/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 24093 If a subsystem library depends on another one, the libraries have to be loaded in a predefined order. the previous recovery mechanism on PFW was: When a subsystem library does not load because of a missing dependency, it tries to load all the other subsystems before trying one more time to load the failing library. Unfortunately, Android linker does not allow several try when loading a library. In consequence, this patch implements a new mechanism to load its subsystem libraries. For this new mechanism, the PFW will load the subsystem libraries in the order they are disposed in the file ParameterFrameworkConfiguration.xml Change-Id: I39b97e33c77a6b4392c3813cd3d780e10e3b60f8 Signed-off-by: Guillaume Denneulin <guillaumex.denneulin@intel.com> Reviewed-on: http://android.intel.com:8080/35903 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Fixed bug when entering empty ruleFrederic Boisnard2014-02-101-2/+14
| | | | | | | | | | | | | | | | | BZ: 24081 When entering an empty rule (composed of spaces), the PFW used to crash. Now an error message is displayed : "Syntax error, no rule found". Change-Id: If3cb505f879d006309add46d5c7c4f47325af563 Reviewed-on: http://android.intel.com:8080/35613 Reviewed-by: Boisnard, FredericX <fredericx.boisnard@intel.com> Reviewed-by: Denneulin, GuillaumeX <guillaumex.denneulin@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Enum parameter mappingPatrick Benavoli2014-02-107-52/+188
| | | | | | | | | | | | | | | | | | | | | | | | | BZ: 22125 Enum parameter types are now fully parsed as any other types, which allow Mapping attributes to be correctly interpreted. Now inner structure of enum parameter types is based on automatically created objects: ValuePair Slight adaptation of to ICS environment in Android.mk files and XmlComposer (time.h). More explicit error statement issued in case of plugin load failure in SystemClass.cpp. Added a log for Alsa mixer elements accesses. Change-Id: Ia71fd854e639a288c5dae79260b1e2a0eb1a7ac2 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/33756 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Rule handling from CLIPatrick Benavoli2014-02-1016-129/+852
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 15689 These changes enable handling changing the rules for configuration application from the command line interface. It is possible to assign a new rule, to display the existing one or to clear it. Restriction: like in XML, root rule must be compound. Syntax is the following: - Criterion rule expression: <criterion> <verb> <object> - Compound rule expression (All|Any){<content>} where <content> is a comma separated list of any kind of rules. Example: All{Any{SelectedOutputDevice Includes Headphones, SelectedOutputDevice Includes Headset}, Any{Mode Is Normal, Mode Is RingTone}} means the pertaining configuration will be applied when Selected device includes either Headphones or Headset, while, ate the same time, Mode is either Normal or RingTone. Added dumpDomains remote command to show a summary of domains, configurations as well as their application conditions (tree view). Removed not anymore necessary guard against deletion of domains or configurations that contain rules, ad now they're controlled from the CLI. Change-Id: Iad2c183271b077b8bbc8ac2fc5f37c266004070f Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/26100 Reviewed-by: De Chivre, RenaudX <renaudx.de.chivre@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: No mapping attempt for virtual subsystemsPatrick Benavoli2014-02-102-0/+24
| | | | | | | | | | | | | | | | | BZ: 15710 Now virtual subsystems overload the mapping process so as to avoid any object creation attempt. Object creation only makes sense for concrete subsystems, i.e. those containing actual physical parameters to be mapped. Change-Id: Ib7a8d5978ebb79a5d5fecebe3b95cc3bd376cd8e Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/26099 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Max value on bit parametersPatrick Benavoli2014-02-103-12/+40
| | | | | | | | | | | | | | | | | | | BZ: 15708 Added Max attribute on bit parameter types. Max attribute, as the parameter itself is unsigned and can't exceed the maximum encodable value decided by the parameter's bit size. In addition, fixed a small mistake in CParameterMgr::createParameterHandle where now NULL is properly returned in case of failure instead of "false". Change-Id: Ifb0af6b4d43dc2c0ddb4e0e038b1ce226772d71f Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/26098 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Manage subsystem plugin dependencyPatrick Benavoli2014-02-103-58/+119
| | | | | | | | | | | | | | | | | | | | BZ: 15204 As subsystem plugins might depend on one another, they can't always be all loaded at once. Because a certain order must sometimes be respected, the loading process has now become iterative, not merely failing upon the first loading failure. - Fixed a missing carriage return in the configurable domains listing functionallity Change-Id: I7e0d6ecbb258fcb1acaad78359e65f0e132d09ab Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25408 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Parameter adaptation (platform interface)Patrick Benavoli2014-02-1013-2/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 15069 Adaptation nodes have been added to integer parameter types in the structural description. They all convert values between a platform value and the actual parameter value. When a conversion node affects the definition of an integer type parameter, its interface type becomes "double" (instead of integer). For now only linear adaptation type is supported. Linear adaptation: ================= Linear adaptation nodes consists of the following attributes: - slope numerator (double, default = 1) - slope denominator (double, defult = 1) - offset (signed integer, default = 0) Conversions from user (platform) values to blackboard are done the follwing way: blackboard_value = user_value * slope_numerator / slope_denominator + offset Change-Id: I00abe9ba5961d8e541b616225531bbc7c8b465b0 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25407 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Type safe dynamic parameter accessPatrick Benavoli2014-02-1041-325/+1694
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 15065 Replaced high level string based parameter access interface with typed ones. Now hosting platforms that want to control parameters must instantiate a CParameterHandle object out of the desired parameter path. CParameterHandle object may be used to access any kind of parameters, whatever its internal type, whether it's an array or not. Note that non rogue parameters offer a read access only. Any attempt to write them will fail. CParameterHandle objects offer the following kind of parameter accessing interfaces: - Boolean - Integer (signed or unsigned) - Double - String Note that those interfaces are available for scalar as well as for array parameters. Not all parameter types support all access kinds. Naturally, array parameters are only accessed via array interfaces while scalar parameters are managed through scalar interfaces. Here's a list of parameter types that may be controlled through each kind of access interface: - Boolean access: boolean, bit (bit size must be one); - Integer access: integer (sign must match), boolean (unsigned access only, value <= 1), enumerations; - Double access: for now only fixed points (soon integers will support them also through platform adaptation objects) - String access: all parameter types In addition, cleaned up parameter access related code so as to make it more generic and reusable. Changed version to 2.0.0 Change-Id: Ib80868cdb773e90962e48f1f38d2ff0029189815 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25406 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Virtual subsystemsPatrick Benavoli2014-02-1018-13/+217
| | | | | | | | | | | | | | | | | | | BZ: 14587 - Added the possibility to declare parameters which have no real hardware implementation. They are only intended to configure the hosting platform. - A new subsystem type "Virtual" has been introduced to support those hardwareless parameters. - Virtual subsystems need no Mapping declaration in the structure description Change-Id: I44115f0dd0a26af74a544c6f08473b200aad94d3 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25405 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: file organizationPatrick Benavoli2014-02-1017-197/+106
| | | | | | | | | | | | | | | | | | | | | | | | BZ: 12888, 12925, 13285, 13289 - Removed hard coded paths from source files - Separated test related resources and programs into a test subfolder - Schemas folder at root containing the schemas, a symbolic link to that folder might be a good way to enable schema aware editing - Now global configuration file path is passed from the hosting platform instead of the class name. - Global configuration path contains only the relevant class related descriptions (plugin paths, structure, settings) - .user environment file eclipsed through git-ignore (and removed from projects) - Removed system class configuration obsolete files Change-Id: I99b783ba22bca05238a760b2127939a91e976be8 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25404 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: parameter access code reusePatrick Benavoli2014-02-104-40/+41
| | | | | | | | | | | | | | | | BZ: 13283 Path navigator embeds a navigate and validate functionality that spares parameter manager from replicating code between get and set parameter contexts. Change-Id: Ic7c950660cd8c22b233ce02238fa1a66649a501b Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25403 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: selection criteria rule constraintsPatrick Benavoli2014-02-102-7/+7
| | | | | | | | | | | | | | | | | BZ: 13907 Selection criteria rules' constraints previously applied on the inclusive type of criteria while those should support all kinds of predicates. Now inclusive types support all predicates and exclusive ones support only identity predicates. Change-Id: If5d9d4bd338748950eb4927d833d9d3da7ad48ee Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25402 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Mapping optimizationPatrick Benavoli2014-02-104-16/+30
| | | | | | | | | | | | | | | | | BZ: 13906 As soon as a subsystem object is created, the mapping process ceases to go deeper and explores other branches of the parameter tree. Adaptation to ICS environment in mk files Change-Id: I5cdf3ea3829f59379804aa88be282b1128c598b0 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25401 Reviewed-by: De Chivre, RenaudX <renaudx.de.chivre@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Wrong file export in hexadecimal formatGuillaume Denneulin2014-02-102-4/+11
| | | | | | | | | | | | | | | | | | BZ: 18097 For fixed point parameters, if the output raw format is hexadecimal, the settings were exported on 32 bits instead of their actual size (8, 16 bits...). Aligns also the way to deal with format on integer type Change-Id: Ifb25f4d6769bcc7c55de5654443a4862ef5a9e0f OLD-Change-Id: I5a9d695de98a7828af185b19e9943d4abf8bb805 Signed-off-by: Guillaume Denneulin <guillaumex.denneulin@intel.com> Reviewed-on: http://android.intel.com:8080/29818 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Plugin inheritancePatrick Benavoli2014-02-101-4/+34
| | | | | | | | | | | | | | | | | | | | | BZ: 13276 Modified the subsystem plugin symbol lookup sttrategy so as to allow the plugins to be extensible in the form of richer plugins. Now the plugin symbol is of the form: get<TYPE>SusbystemBuilder where TYPE comes from the name of the plugin file itself: lib<type>-subsystem.so Change-Id: Ie698c5200227c51a0fecf06f7e91a55cd7ee1fde Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/22636 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com> Reviewed-on: http://android.intel.com:8080/26783 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>
* PFW: Enumeration typesPatrick Benavoli2014-02-104-1/+330
| | | | | | | | | | | | | | | | | | | | | BZ: 13274 Added enumeration type parameters. They are sizeable like integers but always treated as signed. Lexical - numerical value pairs are now specified from the Strutural description XML file (subsystem level). When set, literal or numerical values may be used interchangeably, however the output form will depend on the currently selected value space and output format. Change-Id: I498b53a2bbd8f414bb8a09063c28265a7502bfbf Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/22635 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com> Reviewed-on: http://android.intel.com:8080/26782 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>