Commit Graph

44799 Commits

Author SHA1 Message Date
Mikhail Naganov
fb1acdec67 audio: Add effect attachment to devices and streams
Add the following methods:
  - IModule.{add|remove}DeviceEffect;
  - IStream.{add|remove}Effect.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I4066e2d10a8e08d634010cfe9eb8f832157e725f
2022-12-19 17:23:30 +00:00
Mikhail Naganov
383cd4277a audio: Add methods for controlling hw volume
Add the following methods:
 - IStreamIn.get/setHwGain;
 - IStreamOut.get/setHwVolume.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I8fc48c15a9211b5f0bf8bb4b5b0e50d414b859c2
2022-12-16 22:19:32 +00:00
Mikhail Naganov
8230457989 audio: Fix streamCommon nullptr check in VTS
Fix test code in AudioStream#GetStreamCommon test.
Avoid crashing if the HAL module returns a null
IStreamCommon instance pointer.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I118ea1df49a127780a901479cf8cd5787be601f7
2022-12-16 22:19:32 +00:00
Treehugger Robot
bfc2e1524d Merge "[LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces" 2022-12-16 18:51:44 +00:00
Mikhail Naganov
e9f10fc9dc audio: Provide operations common to input and output streams
Introduce IStreamCommon which contains methods that apply
both to input and output streams. Move the 'close' method
to it. Add 'IStreamIn/Out.getStreamCommon' method to retrieve
the common interface.

Add methods for dealing with HW AV Sync and vendor parameters.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie1a7b32e28425f5398afc95192fcbc5403b5c332
2022-12-16 16:40:28 +00:00
Mikhail Naganov
df5feba141 audio: Retain IBinder for instances with MinSchedulerPolicy
The binder passed to AIBinder_setMinSchedulerPolicy must also be
returned to the client, otherwise setting the policy for it does
not make any sense. However, server side interface instance
classes only hold a weak binder reference. It's the caller of the
'asBinder' method who must retain a strong reference. This
reference must be retained past exiting from the method which
returns the instance to the client.

To solve this issue, add storing of binders along with server
object references. These binders get released after the client
calls a 'close'/'destroy'-type method to release instance
resources.

Bug: 205884982
Test: run `atest VtsHalAudioCoreTargetTest` and effect VTS,
      and grep logcat for
     'destroyed after setMinSchedulerPolicy before being parceled'
Change-Id: I8b905b85cb8263c85edae8839a126ffe4e4d1e69
2022-12-16 15:27:10 +00:00
Treehugger Robot
2100e6323c Merge changes Ib89e0924,Id2816580
* changes:
  Add default implementation and VTS for ISoundDose
  Add HAL interface definition for sound dose
2022-12-16 15:06:16 +00:00
Shunkai Yao
cb0fc410d7 Effect AIDL: Add VTS test cases cleanup in TearDown
Remove output FMQ reset in EffectImpl
Update vts cases with ASSERT_* for critical errors
And update vts case naming

Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Test: atest VtsHalEqualizerTargetTest
Test: atest VtsHalBassBoostTargetTest
Test: atest VtsHalLoudnessEnhancerTargetTest
Test: atest VtsHalAudioEffectFactoryTargetTest

Change-Id: If8d8aab0d4a68b13c488c053af1f36b58b7c99a1
2022-12-16 02:10:10 +00:00
Treehugger Robot
83ea817a8c Merge changes Iee37bb97,If7c549b8
* changes:
  Adjust IMapperMetadataTypes.h to match gralloc4 encoding
  Add some more tests & tweak spec around SMPTE2094-40
2022-12-15 21:02:54 +00:00
Vlad Popa
943b7e2b91 Add default implementation and VTS for ISoundDose
The ISoundDose HAL interface is used for reporting the sound dose
relevant information from/to the HAL. This is necessary for all devices
that certify with the IEC62368-1 3rd edition and EN50332-3 standard
for safe hearing.

Bug: 248567177
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ib89e09243a01cebc2f7996b6b572384a1471867a
Merged-In: Ib89e09243a01cebc2f7996b6b572384a1471867a
(cherry picked from commit 83a2146546)
2022-12-15 19:41:32 +00:00
Vlad Popa
83a6d82793 Add HAL interface definition for sound dose
The interface is used to configure the sound dose parameters and
retrieve new changes that can affect the dose. Used for the
certification with IEC62368-1 3rd edition.

Test: TODO
Bug: 257937004
Change-Id: Id2816580fdbfbf09c2278720b4d78d0b3604fbf4
Merged-In: Id2816580fdbfbf09c2278720b4d78d0b3604fbf4
(cherry picked from commit 10905ef92e)
2022-12-15 19:41:03 +00:00
John Reck
0e4732c1a5 Adjust IMapperMetadataTypes.h to match gralloc4 encoding
Specifically include the header encoding. Initially
omitted as it's a bit redundant, the value in having
bit-for-bit identical encoding between gralloc4 &
imapper5 seems worthwhile enough to keep it.

Test: impltests + VtsHalGraphicsMapperStableC
Change-Id: Iee37bb97acf40362c301a06f9118938b1a0c2cd9
2022-12-15 13:50:07 -05:00
John Reck
749f5af092 Add some more tests & tweak spec around SMPTE2094-40
Test: this
Change-Id: If7c549b8efcf490859f10c225a700188b76a54fa
2022-12-15 13:49:55 -05:00
Bob Badour
0468ee6201 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  media/bufferpool/aidl/Android.bp
  media/c2/aidl/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Icfbfae758bef55aa82873350a9e119833bacbafb
2022-12-15 07:20:02 -08:00
Lorena Torres-Huerta
0f4d68964c Test fix for finalization branch
Bug: 262594867
Merged-In: Idf2546030d6ea6cd43acab8f93e3b479aae6a9db
Change-Id: Idf2546030d6ea6cd43acab8f93e3b479aae6a9db
Test: m android.hardware.audio.service-aidl.example
2022-12-14 18:37:28 -08:00
Treehugger Robot
2f8a148a26 Merge "Add flag for bit-perfect playback." 2022-12-14 22:40:19 +00:00
Treehugger Robot
94a68d04b7 Merge changes from topic "c2aidl"
* changes:
  Add Codec2 AIDL interface
  Add bufferpool AIDL definitions
2022-12-14 20:24:14 +00:00
Jiabin Huang
867ea3a35e Add flag for bit-perfect playback.
Bug: 239435816
Change-Id: Iacec6ab373d82978a7d682c377edc40eb36641bd
Test: n/a
2022-12-13 16:13:59 -08:00
Seth Moore
9dc8e53e7c Merge changes I844f3e88,Ia4feb8ce,Ia87d3ea0
* changes:
  Add RKP-specific owners file
  Enable RKP+KeyMint integration test
  Move remotely provisioned component tests to rkp directory
2022-12-13 23:41:30 +00:00
Seth Moore
34d856e8f7 Add RKP-specific owners file
Test: N/A
Change-Id: I844f3e88b2b89337d843f63e63c9dcbcbb921b77
2022-12-13 13:26:41 -08:00
Seth Moore
7dc1fda7a4 Enable RKP+KeyMint integration test
This integration was technically a requirement on keymint v2, but we
weren't enforcing it with a test. So realistically we are only able
to start enforcing the test with keymint v3.

Test: atest VtsAidlKeyMintTargetTest
Change-Id: Ia4feb8ce4b7fd1e47a5c6c9b06ddb12276a9c5ee
2022-12-13 13:25:32 -08:00
Treehugger Robot
b55e63fb51 Merge "audio: Bring default HAL configuration closer to cuttlefish" 2022-12-13 19:30:00 +00:00
Seth Moore
8f810b1303 Move remotely provisioned component tests to rkp directory
Now that the RKP HAL AIDL has been moved to it's own directory, we
should keep the tests with the AIDL.

Test: atest VtsAidlKeyMintTargetTest
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Ia87d3ea0a1b9e6704f0dea8f98b0bbaa049472fe
2022-12-13 11:03:59 -08:00
Eran Messeri
7536e36ded Merge "Update the KeyMint feature version to 300" 2022-12-13 17:58:17 +00:00
Shunkai Yao
f0a217d07a Merge "Effect AIDL: queryEffect with Descriptor for all effects implementation" 2022-12-13 15:29:14 +00:00
Shunkai Yao
20e5c1733e Effect AIDL: update IFactory.queryEffects to return Descriptor
Add queryEffect for effect libraries.
Change Descriptor in each effect implementation to be static so
extern C function can access.

Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Change-Id: Id7badec592becf37b27be6022106f443e5976880
2022-12-13 02:46:54 +00:00
Shunkai Yao
c12e0821e6 Effect AIDL: queryEffect with Descriptor for all effects implementation
Add queryEffect for effect libraries.
Change Descriptor in each effect implementation to be static so
extern C function can access.
Update vts test cases.

Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I8e5d7240db31a0d09b17541c39d9e4c15e1eea73
2022-12-13 02:46:40 +00:00
Mikhail Naganov
c8e4312da8 audio: Bring default HAL configuration closer to cuttlefish
This is to simplify switching of cuttlefish to
the AIDL implementation. Split out 'r_submix' module.

Add all IModule instance names to the compatibility
matrix.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I424db14257281671eea87aa743deb778ca75f388
2022-12-13 01:17:55 +00:00
Darren Hsu
72a3964894 Merge "powerstats: add new EnergyConsumerType for camera" 2022-12-13 00:50:42 +00:00
Treehugger Robot
4c02ef2b4e Merge "identity: Add support for ECDSA auth and don't require session encryption." 2022-12-12 23:06:06 +00:00
Lorena Torres-Huerta
2ea44dd872 Merge changes from topic "engineConfigHalInterface"
* changes:
  Default implementation for IConfig engine configuration.
  Add engine configuration to the AIDL Audio HAL interface.
2022-12-12 22:41:36 +00:00
Lorena Torres-Huerta
00be453d3a Merge "VTS for IConfig getEngineConfig" 2022-12-12 22:41:36 +00:00
Lorena Torres-Huerta
aff8a1f8fd VTS for IConfig getEngineConfig
Bug: 242678729
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I051d0778bbad447e49dd4b99a2797333d0d67862
2022-12-12 19:34:39 +00:00
Shunkai Yao
6900a3c936 Merge changes from topic "aidl_effect_lock"
* changes:
  AIDL Effect: Update locking in EffectImpl
  AIDL Effect: Update vts test cases naming to remove timestamp.
  AIDL: Add BassBoost strength range in AIDL definition.
2022-12-10 00:33:01 +00:00
Treehugger Robot
2aa6c215dd Merge "AIDL effect: Add effect AIDL vts to presubmit" 2022-12-10 00:27:06 +00:00
Xin Li
995144c4d5 Merge "Merge Android 13 QPR1" 2022-12-09 21:50:58 +00:00
Shraddha Basantwani
f627d80d37 AIDL Effect: Update locking in EffectImpl
Avoid locking for all EffectContext calls.
Locking inside context seems not necessary for now as all binder calls
already serialized.
Add BassBoost AIDL placeholder implementation.

Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest

Change-Id: Iaa41f013d5756801553e20b995aab5ddc845cf32
2022-12-09 21:39:46 +00:00
Shunkai Yao
01a6730fa7 AIDL effect: Add effect AIDL vts to presubmit
Bug: 238913361
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I5c823eb097b7c8e111c203db8f6384b802a436c6
2022-12-09 19:50:39 +00:00
Shunkai Yao
f0803cd8d5 AIDL Effect: Update vts test cases naming to remove timestamp.
Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I80ac39b5c9a51e006b80682398a61c000ef8c293
2022-12-09 19:14:10 +00:00
Shunkai Yao
f56afb303b AIDL: Add BassBoost strength range in AIDL definition.
Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I38efed8c7cc88295c72403a3c598db5dedd8c137
2022-12-09 19:14:10 +00:00
Shunkai Yao
05d7ab4b45 Merge "Audio AIDL HAL priority update" 2022-12-09 19:12:32 +00:00
Xin Li
34eab1cf79 Merge Android 13 QPR1
Bug: 261731544
Merged-In: I4fe9ddd1c22ebfff03f5660ec9b01de2521f8533
Change-Id: Ic59ecf4fbb0438607c4069829426fbdfa7c7abd1
2022-12-09 10:29:52 -08:00
Steven Moreland
2e37f01273 Merge "graphics.common V3 -> V4" 2022-12-09 17:21:59 +00:00
David Zeuthen
f3e0600395 identity: Add support for ECDSA auth and don't require session encryption.
This adds a new method which allows applications to use mdoc ECDSA
authentication instead of mdoc MAC authentication. Additionally, also
relax requirements on SessionTranscript so the APIs can be used even
when mdoc session encryption isn't being used.

Also add new VTS test to check for this.

Since this is new API, bump API version to 5 and the Identity
Credential feature version to 202301.

Bug: 241912421
Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts
Change-Id: I4085a89be0382c10f5449e13c6a92a46c74c225d
2022-12-09 02:57:09 -05:00
Shunkai Yao
39bf2c3146 Audio AIDL HAL priority update
Enable RT priority inheritance.
Set minimum Audio AIDL HAL Binder access priority to ANDROID_PRIORITY_AUDIO.

Bug: 261496726
Test: atest VtsHalAudioEffectTargetTest
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I584d80f4fe344e4bfae5765cac2afb92313b6a39
2022-12-09 02:39:42 +00:00
Changyeon Jo
ed6ebed9f3 Fix how displays are used in test cases am: 017cb98ee9 am: 1186b99120
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2305821

Change-Id: Iad80f724c545d9d0e75a785a686e1ff5830a748d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-09 00:54:29 +00:00
Changyeon Jo
1186b99120 Fix how displays are used in test cases am: 017cb98ee9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2305821

Change-Id: I95e906a94413fe0d896573fb66d27c84a9befb66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-09 00:26:31 +00:00
Sungtak Lee
c303e7aefb Add OWNERS for media interface am: 3ee79d5a46
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2333742

Change-Id: I66670e646b6fb06e747ddb23d68b5bb39e62198e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 23:39:48 +00:00
Sungtak Lee
3ee79d5a46 Add OWNERS for media interface
Bug: 261752425
Change-Id: I4fe9ddd1c22ebfff03f5660ec9b01de2521f8533
2022-12-08 23:19:03 +00:00
Harry Cutts
8e02f6b498 Merge "input: add OWNERS file" am: 5edbb4eb7b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2335722

Change-Id: If4a75bb0664c912aa1c0854ab2ede0b0606a8473
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 20:46:49 +00:00