• Home
  • History
  • Annotate
  • only in /hardware/interfaces/audio/core/all-versions/default/include/core/
History log of /hardware/interfaces/audio/core/all-versions/default/include/core/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8f3b492c83fb2a01e95e3edc8a4bda1471c7aa3d 05-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge changes I29bbf6bf,Ib0b03fb6 into pi-dev

* changes:
Audio HAL HIDL wrapper: Fix incorrect conversion of TTY Mode
Audio V4 VTS: test setter even if getter is NOT_SUPPORTED
912bd4bf2ff9397c40df18c29406af4579b07921 01-Feb-2018 Kevin Rocard <krocard@google.com> Audio HAL HIDL wrapper: Fix incorrect conversion of TTY Mode

The TTYMode enum numeric value was converted to a char* instead of its
literal value and vice versa.

Instead convert it to/from its literal value.
Eg: TTYMode::FULL -> "FULL" instead of "3"
"FULL" -> 0 as atoi conversion would fail

Test: atest VtsHalAudioV4_0TargetTest
Bug: 71486871
Change-Id: I29bbf6bf3b5532269afcc5d39ea10eff2871bdea
Signed-off-by: Kevin Rocard <krocard@google.com>
Signed-off-by: Jungyee Yoo <jungyee.yoo@lge.corp-partner.google.com>
ll-versions/default/ParametersUtil.h
ll-versions/default/ParametersUtil.impl.h
ll-versions/default/PrimaryDevice.impl.h
ca3803f10e8fc47f941b15e4878025b312c13182 30-Apr-2018 jiabin <jiabin@google.com> Add AUDIO_MICROPHONE_CHANNEL_MAPPING_CNT.

Bug: 75041465
Test: make
Change-Id: I2cb444637ddfa67949cb95af80c691fa6892b639
ll-versions/default/Conversions.impl.h
64c3932736558609f7cf657b2a63e90a937f663c 24-Apr-2018 Kevin Rocard <krocard@google.com> Audio V4: factorize analyzeStatus

This factorization had not been ported from the AOSP patch.
The code is functionally identical.

Test: compile
Bug: 69010523
Change-Id: Ied3a657d7c219b580eb32377789096f6b2f6dc19
Signed-off-by: Kevin Rocard <krocard@google.com>
ll-versions/default/Device.impl.h
6512b6050291fbfc1ddf7d084fbc6102916c03cc 21-Apr-2018 Kevin Rocard <krocard@google.com> Audio V4: some legacy getSupported can return NOT_SUPPORTED

Legacy implementation through getParameter can not return a status_t.
This is problematic for
- getSupportedChannelMasks(format)
- getSupportedSampleRate(format)
as they should be able to return NOT_SUPPORTED if they do not support
the provided format.

In that case, allow the legacy implementation to return an empty string
that will be converted to NOT_SUPPORTED.

Test: atest VtsHalAudioV4_0TargetTest
Bug: 77307068
Change-Id: I78c37caf059885e3d33e6a308876dbc0e3ef7145
Signed-off-by: Kevin Rocard <krocard@google.com>
ll-versions/default/Stream.impl.h
fba21730f8b4dd7c6919aa3267b3fbdffdeda8a4 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
- it is inconsistent with the rest of the status_t conversion methods
- shim methods implemented over getParameter can not distinguish
between different failures as 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.

This patch is the second 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: I41328afce56ce31d4a26159ca2d4b16d14cce05b
Signed-off-by: Kevin Rocard <krocard@google.com>
ll-versions/default/ParametersUtil.impl.h
ll-versions/default/Stream.impl.h
ll-versions/default/Util.h
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>
ll-versions/default/Device.impl.h
ll-versions/default/PrimaryDevice.impl.h
ll-versions/default/StreamIn.impl.h
ll-versions/default/StreamOut.impl.h
ll-versions/default/Util.h
3c50fab04876f7fc3c6a02f42b718be27944c0fc 19-Apr-2018 Kevin Rocard <krocard@google.com> Merge "Revert "Audio: setParam improve status_t to Result consistency"" into pi-dev
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
ll-versions/default/Device.impl.h
ll-versions/default/ParametersUtil.impl.h
ll-versions/default/PrimaryDevice.impl.h
ll-versions/default/Stream.impl.h
ll-versions/default/StreamIn.impl.h
ll-versions/default/StreamOut.impl.h
ll-versions/default/Util.h
f21217f173f07467584d117629958ccfc35f7b3c 19-Apr-2018 Kevin Rocard <krocard@google.com> Merge "Audio: setParam improve status_t to Result consistency" into pi-dev
93a2065eca53ad2919a9cc7aa263c0445e8e60b3 18-Apr-2018 Mikhail Naganov <mnaganov@google.com> audio: Add VTS tests for new interface methods in V4.0

Add VTS tests for the following methods:
IStreamOut::selectPresentation
IPrimaryDevice::getBtHfpEnabled
IPrimaryDevice::setBtHfpEnabled
IPrimaryDevice::setBtHfpSampleRate
IPrimaryDevice::setBtHfpVolume
IPrimaryDevice::setBtScoHeadsetDebugName
IPrimaryDevice::updateRotation

Fix the default implementation of IPrimaryDevice::setBtHfpVolume

Bug: 74037175
Test: VtsHalAudioV4_0TargetTest
Change-Id: I39beb05184d0ecdb2799de037e1c5c3c383f5494
ll-versions/default/PrimaryDevice.impl.h
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>
ll-versions/default/Device.impl.h
ll-versions/default/ParametersUtil.impl.h
ll-versions/default/PrimaryDevice.impl.h
ll-versions/default/Stream.impl.h
ll-versions/default/StreamIn.impl.h
ll-versions/default/StreamOut.impl.h
ll-versions/default/Util.h
60c1ad7797cc64d428d043250a55cdc6189a19c8 28-Mar-2018 Kevin Rocard <krocard@google.com> Audio V4: Add metadata update to legacy API

The metadata API was not present in the legacy HAL which lots of
developer still use.

Test: Check the method is correctly called on each track change
Bug: 38184704
Bug: 69623109
Change-Id: If56b4ee3739194e49808cf24d728c791b0588f9f
Signed-off-by: Kevin Rocard <krocard@google.com>
ll-versions/default/StreamIn.impl.h
ll-versions/default/StreamOut.impl.h
1b09e2690922338773350723b60eaee656a7226c 20-Mar-2018 jiabin <jiabin@google.com> Support query microphones information.

Add conversions between hal and framework.

Bug: 64038649
Bug: 75041465
Test: Manual Testing and Cts test
Change-Id: I88a292f0509e09467750affbe84350ed82cdd500
ll-versions/default/Conversions.h
ll-versions/default/Conversions.impl.h
ll-versions/default/Device.impl.h
ll-versions/default/StreamIn.impl.h
5ec293316e7ea1f768161695a113e50b0ea41d45 02-Mar-2018 Kevin Rocard <krocard@google.com> Audio V4: Implement the shim core 4.0 -> legacy

All the new files added are a copy of the 2.0 ones, with just the
version 2 that was changed to 4.

Due to the rollback on the retrocompatiblity breakage,
the split of implementation is not strictly needed any more.
This makes the current split in .impl.h and double include
unnecessary complicated.
This will need to be factorized in a future patch.

Bug: 38184704
Test: compile
Change-Id: I0d699ade7558ed68125b300f8522e2767ae1ee37
Merged-In: I0d699ade7558ed68125b300f8522e2767ae1ee37
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
ll-versions/default/Device.h
ll-versions/default/Device.impl.h
ll-versions/default/DevicesFactory.h
ll-versions/default/DevicesFactory.impl.h
ll-versions/default/ParametersUtil.h
ll-versions/default/ParametersUtil.impl.h
ll-versions/default/PrimaryDevice.h
ll-versions/default/PrimaryDevice.impl.h
ll-versions/default/Stream.h
ll-versions/default/Stream.impl.h
ll-versions/default/StreamIn.h
ll-versions/default/StreamIn.impl.h
ll-versions/default/StreamOut.h
ll-versions/default/StreamOut.impl.h
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>
ll-versions/default/Conversions.h
ll-versions/default/Conversions.impl.h
ll-versions/default/Device.h
ll-versions/default/Device.impl.h
ll-versions/default/DevicesFactory.h
ll-versions/default/DevicesFactory.impl.h
ll-versions/default/ParametersUtil.h
ll-versions/default/ParametersUtil.impl.h
ll-versions/default/PrimaryDevice.h
ll-versions/default/PrimaryDevice.impl.h
ll-versions/default/Stream.h
ll-versions/default/Stream.impl.h
ll-versions/default/StreamIn.h
ll-versions/default/StreamIn.impl.h
ll-versions/default/StreamOut.h
ll-versions/default/StreamOut.impl.h
ll-versions/default/Util.h