History log of /hardware/interfaces/audio/core/2.0/default/ParametersUtil.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
147a454bb2a952d34ee6a66a80245ab54f53e510 17-Apr-2018 Kevin Rocard <krocard@google.com> Audio: make core/4.0/default/Util.h version dependant

This patch does not have any functional change.
It refactors Util.h to make it version dependant.
This is needed in the next patch to add a helper
that uses HIDL types.

This patch is the fixed first half of
I41204c0807d2bd4675e941771cbc9a43d7d14855
that was reverted due to a merge conflict.

Bug: 72873273
Bug: 69811500
Bug: 69010523
Test: playback and record for media and voice call
Original-Change-Id: I41204c0807d2bd4675e941771cbc9a43d7d14855
Change-Id: Ie543519fa0dca62486b75f42bb0c8a93d6cad3c3
Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/core/2.0/default/ParametersUtil.cpp
f26235fde01ec013846db8ebefa301d8523cb2c8 19-Apr-2018 Kevin Rocard <krocard@google.com> Revert "Audio: setParam improve status_t to Result consistency"

This commit broke sailfish build in V4 due to
https://cs.corp.google.com/android/hardware/interfaces/audio/core/all-versions/default/include/core/all-versions/default/PrimaryDevice.impl.h?q=hardware/interfaces/audio/core/all-versions/default/include/core/all-versions/default/PrimaryDevice.impl.h:251

not being updated.

This is really strange as
1) sailfish should not build the V4 code in the first place
2) walleye is not broken although it should be the broken code
3) neither treehugger nor my local builds found this issue

Revert to give the time to investigate.

This reverts commit 2c6755a00cbeb3ddb1e60b7ea42ae5eca7cbae8e.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Ibf5270c15d52212a41b3b4eb4c0fcfe82a08fd6b
/hardware/interfaces/audio/core/2.0/default/ParametersUtil.cpp
2c6755a00cbeb3ddb1e60b7ea42ae5eca7cbae8e 17-Apr-2018 Kevin Rocard <krocard@google.com> Audio: setParam improve status_t to Result consistency

The rest of the API (*::analyseStatus) returns NOT_SUPPORTED
when the legacy API returns -ENOSYS.

setParameter legacy -> treble shim did not follow this
conversion due to the legacy API stating that for get_paramers,
-ENOSYS should be returned if
"the implementation does not accept a parameter change while the
output is active but the parameter is acceptable otherwise",
aka INVALID_STATE.

Thus setParameter shim used to return
- OK for OK
- INVALID_STATE for -ENOSYS
- INVALID_ARGUMENTS for everything else

This leads to several problems:
- an implementation of the legacy API can not report NOT_SUPPORTED
- is inconsistent with the rest of the status_t conversion methods
- shim methods implemented over getParameter can not distinguish
failures error required by the .hal documentation

Most importantly, on the system side, the Result is transformed to a
status_t again but without any special logic for methods wrapping
getParameter in the shim.
This can not be changed as the system can not know which methods
are implemented with a legacy wrapper under the Treble API boundary.

Thus setParam now converts status_t to Result in the same way
as all the other shim methods.

Bug: 72873273
Bug: 69811500
Bug: 69010523
Test: playback and record for media and voice call
Change-Id: I41204c0807d2bd4675e941771cbc9a43d7d14855
Merged-In: I41204c0807d2bd4675e941771cbc9a43d7d14855
Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/core/2.0/default/ParametersUtil.cpp
3887e2443668da431b84cdc7431d658a3ae05db3 21-Dec-2017 Kevin Rocard <krocard@google.com> Audio V4: Rename audio/device to audio/core

The name device has already too many meaning, thus rename the main audio
api to core.

Bug: 38184704
Test: compile
Change-Id: I178dfef05af8f8579196affbe2cbc5f6c3f9af55
Signed-off-by: Kevin Rocard <krocard@google.com>
/hardware/interfaces/audio/core/2.0/default/ParametersUtil.cpp