Commit Graph

11043 Commits

Author SHA1 Message Date
Henry Fang
9dd35d01f8 Merge "Allow LNB to be opened before Frontend" into tm-dev 2022-05-28 18:43:29 +00:00
Lajos Molnar
894dabfbb2 Merge "media: clarify that MediaFormat.KEY_LEVEL is required when specifying a profile" into tm-dev 2022-05-27 18:54:26 +00:00
Henry Fang
e6983c1f66 Allow LNB to be opened before Frontend
Change-Id: If7e82db95dda80a90767d7808b140ebcb175ab97
bug: 233830709
Test: atest TunerTest.java
2022-05-27 17:47:31 +00:00
TreeHugger Robot
381a3b6691 Merge "media: clarify that flush() is not supported for encoders." into tm-dev 2022-05-26 09:56:47 +00:00
Lajos Molnar
062784a9f2 media: clarify that flush() is not supported for encoders.
Bug: 146022133
Change-Id: If1083bb6c6193b01bdd29e60dfc907df8e052663
2022-05-25 17:11:09 -07:00
Lajos Molnar
2e9d9128de media: clarify MediaFormat.KEY_FRAME_RATE for video encoders
Bug: 228530100
Change-Id: I4fb6d1228f9e84541e2048ac6dfe29d4f8939c02
2022-05-25 15:40:33 -07:00
Lajos Molnar
269a560b37 media: clarify that MediaFormat.KEY_LEVEL is required when specifying a profile
Also further clarify the meaning of level and profile.

Bug: 219899706
Change-Id: Ibf8e821a1c97173521163d7a3bb956d85194048d
2022-05-25 15:34:48 -07:00
TreeHugger Robot
d7d0d4b1ab Merge "MediaCodec: don't cache buffers until requested" into tm-dev 2022-05-23 17:13:42 +00:00
Eric Laurent
e2049a8968 Merge "SpatializerHelper: Deliver metrics to MediaMetrics" into tm-dev 2022-05-23 09:11:41 +00:00
Andy Hung
b71ee9b9c9 SpatializerHelper: Deliver metrics to MediaMetrics
Added minor optimization to prevent unnecessary
spatial device update.

Test: adb shell dumpsys media.metrics
Bug: 203434487
Change-Id: If35ab4362c95b3559567296acc756527eeb42680
2022-05-20 14:05:22 -07:00
Naomi Musgrave
55ecb4ec82 Merge "[Media Projection] Require valid token to set session" into tm-dev 2022-05-20 13:39:48 +00:00
Wonsik Kim
d59a075f79 MediaCodec: don't cache buffers until requested
Bug: 189889230
Test: manual & presubmit
Change-Id: I4caca59d6854416cedb6758fe66aefaacb69beb7
(cherry picked from commit 07358dfea5)
Merged-In: I4caca59d6854416cedb6758fe66aefaacb69beb7
2022-05-19 23:25:27 +00:00
Naomi Musgrave
e3f6b7e16a [Media Projection] Require valid token to set session
When MediaProjection sets the session details in
MediaProjectiondManagerService, clear and re-set the
calling identity (since we have entered the system server
across the aidl boundary).

Additionaly, verify that the call originated from a valid
MediaProjection session. In the current model for
MediaProjection, signature-level permission
MANAGE_MEDIA_PROJECTION is held by the component that shows the
acceptance dialog to the user. The user allowing some app to
capture with MediaProjection is represented by
the IMediaProjection token (see MediaProjectionManagerService#
isValidMediaProjection).

Bug: 230748205
Test: Manual
Change-Id: Iace8eb7eea6c7a99fba7ea726481461a11bd1c90
2022-05-17 22:11:33 +01:00
Yixiao Luo
a021fd7d31 Merge "TIAS:The oneway flag add in ITvInteractiveAppManagerCallback.aidl" into tm-dev 2022-05-13 17:32:44 +00:00
Jean-Michel Trivi
189ce28929 Merge "AudioService: logs for volume behavior and absolute volume on A2DP" into tm-dev 2022-05-12 15:55:48 +00:00
Jean-Michel Trivi
b6562db67a AudioService: logs for volume behavior and absolute volume on A2DP
Bug: 230623091
Test: adb logcat | grep AudioService
Change-Id: Ie8b020d3594399ec56d9f24ba88b325c383f3083
2022-05-11 23:23:37 +00:00
Yan Han
f7b504cece Merge changes I0579b3af,If7ecd588 into tm-dev
* changes:
  Enable volume UI for TVs using Absolute Volume Control.
  Clear listeners when adding a new one in AudioDeviceVolumeManager
2022-05-11 14:16:54 +00:00
Dorin Drimus
929575cf80 Add mention of start threashold in AudioTrack.play()
Expand documentation for AudioTrack.play() to include get and set start
threshold from Android S.

Bug: 192920591
Test: N/A, only changes documentation
Change-Id: Ibb4da2c3f5239b480c49e7bcbaae5b50ef5d01d3
2022-05-10 19:15:16 +02:00
Yixiao Luo
033d9eb954 TIAS:The oneway flag add in ITvInteractiveAppManagerCallback.aidl
Cherry Pick from
https://partner-android-review.googlesource.com/c/platform/frameworks/base/+/2211650/

Bug: 231539756
Test: CtsTvTestCases
Change-Id: I0ea1c5f207617de0e5ae1ea91f4b756240d92371
2022-05-10 10:13:52 -07:00
Yan Han
dcfe66fda1 Clear listeners when adding a new one in AudioDeviceVolumeManager
Currently, multiple absolute volume listeners from the same controller
can be notified of volume change events because old ones are not removed
from AudioDeviceVolumeManager.

This CL removes existing listeners for a device when a new one is added.
We also no longer forbid re-adding a listener currently in
AudioDeviceVolumeManager's list, as it might have been removed from
AudioService.

Bug: 231433390
Test: manual; atest android.hdmicec.cts.playback.HdmiCecAvcToTvTest
Change-Id: If7ecd58880001b955565e0f65ede9f0787e1be49
2022-05-09 13:42:39 +02:00
Kensuke Miyagi
b0584661aa Add set/getMaxNumberOfFrontends() support in TunerResourceManager
Bug: 211778848
Test: all cts TunerTest
Change-Id: Id8263d38291e60717a359efbe2a301dd86369373
2022-05-06 12:06:29 -07:00
Avichal Rakesh
2a3064a28f Merge "Ensure that two threads cannot simultaneously close SurfaceImage" into tm-dev 2022-05-06 01:18:43 +00:00
Avichal Rakesh
0f19cc3e90 Ensure that two threads cannot simultaneously close SurfaceImage
SurfaceImage's `close` method is not thread safe but can be called by
multiple threads. If two threads call `SurfaceImage#close`
simulatneously, it can cause ImageReader to throw
IllegalArgumentException.

This CL synchronizes the `close` method to prevent spurious exceptions
from being thrown when multiple threads attempt to close a SurfaceImage.

Bug: 223447712
Test: All existing CTS tests pass on Oriole
Change-Id: I49426b771736e378862e1550124e65c26f5d7c1b
2022-05-04 01:06:49 -07:00
Jean-Michel Trivi
a44a5f9177 AudioService: reset volume ranges when requested by APM
Implement callback from AudioPolicy to resend volume ranges
when requested, after an error in volume min/max indices was
detected by AudioPolicyManager

Bug: 206966260
Test: adb shell dumpsys audio | grep MSG_VOL_RANGE_INIT_REQ
Change-Id: Ic257f8007c2908e3c5e6c648cca7598993e8f93e
2022-04-29 19:22:00 +00:00
Treehugger Robot
0760c5a6af Merge "fix API description on how to round average qp" am: 1c0277d78d am: 8428f9e7cd am: e766c3d7d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2067619

Change-Id: I85a79479d8fa4998fa2e0995d5f28cca76486465
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 18:26:36 +00:00
Treehugger Robot
1c0277d78d Merge "fix API description on how to round average qp" 2022-04-21 17:32:29 +00:00
Wonsik Kim
9cd745cee6 Merge "MediaCodecInfo: when explicitly specified reset default bitrate mode" am: 61c2096dbc am: 996fc3da05 am: 6e2b382afc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2065608

Change-Id: I46f407b866252596881ead630ea06704806f1fcc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 04:33:22 +00:00
Yushin Cho
71032c8d67 fix API description on how to round average qp
Average QP is rounded to the nearest integer value.

Test: cts
Bug: 229778486
Change-Id: I16fca81dcab26462b9493784368d29c6b7748fd5
2022-04-19 23:22:21 +00:00
Wonsik Kim
3ad8bdbd5a MediaCodecInfo: when explicitly specified reset default bitrate mode
Bug: 229146532
Test: presubmit
Change-Id: I8bf0c36f471991ab546acd9cf47a3defc13d13ff
2022-04-15 00:30:48 -07:00
TreeHugger Robot
e8d0d4fd90 Merge "Fix Filter callback race condition" into tm-dev 2022-04-14 23:58:16 +00:00
Hongguang
d8a124b758 Fix Filter callback race condition
Bug: 225107597
Test: stress test
Test: atest android.media.tv.tuner.cts
Change-Id: I064095338009cdda8fc03780001b0b0534da4508
2022-04-14 11:19:40 -07:00
Atneya Nair
ed242da52f Update AudioRecord JNI callback and cleanup
Encapsulate AudioRecord native handle into ref-counted object.
Use sp<> to prevent destruction race.
Fulfill new callback interface.

Test: atest AudioRecordTest, atest AudioTrackTest
Bug: 218351957
Bug: 199156212
Change-Id: Ia090556a90e012e6a08f39104f6a0a9f0cdf74f0
2022-04-13 16:35:19 +00:00
Nathalie Le Clair
7b72c39349 Allow for internal types in @hide API
Bug: 227425913
Test: manual
Change-Id: I5fe2e262a4be6412f7f67b55ccdba0a867951f14
2022-04-04 11:30:52 +00:00
Shubang Lu
dabf01fb83 Merge "TIAF API review: add onError" into tm-dev 2022-03-28 23:24:13 +00:00
Andy Hung
6a1b6bc9da Merge "SoundPool: Clean up JNI weak reference handling" into tm-dev 2022-03-28 19:43:21 +00:00
shubang
832d0eb782 TIAF API review: add onError
Bug: 225388549
Test: CTS
Change-Id: I853503c2e4b388168a2eaf59883cbeaa66c5e2a9
2022-03-28 08:54:59 +00:00
Oscar Azucena
cb7a1fe954 Merge "Added logic to reset assistant UIDs on audio crash" into tm-dev 2022-03-24 19:22:21 +00:00
Andy Hung
337cfcbe0a SoundPool: Clean up JNI weak reference handling
Remove unnecessary JNI params and overhead.
Use weak reference entirely on the native side.

Test: atest SoundPoolAacTest
Test: atest SoundPoolHapticTest
Test: atest SoundPoolMidiTest
Test: atest SoundPoolOggTest
Test: atest AudioManagerTest#testSoundEffects
Bug: 223815163
Change-Id: I31964b27ab3e8a96f49794e78537b165e9e84ed3
2022-03-24 10:36:52 -07:00
Yan Han
f4cdc8b1a8 Merge "AudioService: Add general support for Absolute Volume behavior" into tm-dev 2022-03-24 09:45:06 +00:00
Oscar Azucena
3ae3376064 Added logic to reset assistant UIDs on audio crash
On native audioserver recovery the assistant UIDs will reset to an empty
list, followed by adding the current role or setting holder for
assistant. Also added a settings lock around the update assistant
method. Added remove assistant UID for reset hotword detection
connection.

Bug: 222584963
Bug: 222777782
Test: atest VoiceInteractionTest
Test: atest AudioManagerTest
Test: atest HotwordDetectionServiceBasicTest
Test: kill audio server and verify assistant UIDs is not increasing
	unbounded.
Test: adb shell cmd voiceinteraction restart-detection, verify assistant
	UIDs list is not increasing unbounded.
Change-Id: I475bfee1f0bcd56a750e4fef8aa8a2b93fe090fc
2022-03-24 04:37:55 +00:00
Ray Essick
48d5cfa846 Merge "Integrate feedback from MediaMetrics API reviews" into tm-dev 2022-03-23 22:38:59 +00:00
Yan Han
f928348826 Merge "AudioDeviceVolumeManager: Add APIs for listeners for device volume behavior changes" into tm-dev 2022-03-23 14:44:24 +00:00
Ray Essick
2ee37d3d6a Integrate feedback from MediaMetrics API reviews
observations about missing action in close().
javadoc on some KEY_* fields.
Implement PlaybackStateEvent within BundleSession as example.

Bug: 220129161
Test: atest CtsMediaHostTestCases  (with corresponding CLs for cts)
Change-Id: I09a8be6d3f2780ca97b6b08cd33ccf35b02c245f
2022-03-22 20:56:03 -07:00
Yixiao Luo
06959ab51c Merge "[SERAPHIC][TIAF] StreamEventResponse with null data parameter will cause a null-pointer crash." into tm-dev 2022-03-22 19:18:19 +00:00
Yan Han
7d4198268d AudioService: Add general support for Absolute Volume behavior
- Adds a map to store information about audio devices using absolute
  volume behavior. The map is updated when devices change behavior.
- setStreamVolume and adjustStreamVolume now notify absolute volume
  listeners after changing the stream state.
- Added option for absolute volume dispatcher to dispatch abstract
  volume adjustments (e.g. raise, lower, mute) as a result of calls to
  adjustStreamVolume. When registering the listener, the controller
  specifies whether it handles adjustments; if it does, future calls to
  adjustStreamVolume are forwarded to the controller without affecting
  stream state.
- Refactoring to support the changes above:
  - rescaleIndex is generalized to allow converting between stream and
    absolute volume ranges.
  - Volume adjustment mode constants are moved into
    AudioDeviceVolumeManager because they are needed when dispatching
    volume adjustments to absolute volume controllers.

Bug: 205817863
Test: atest AbsoluteVolumeBehaviorTest
Change-Id: Ie5fb2179adea2096bd2d226fe73b4f09b28b0cf1
2022-03-22 15:09:26 +01:00
Yan Han
19a4593771 AudioDeviceVolumeManager: Add APIs for listeners for device volume behavior changes
Add APIs for registering and unregistering a listener
for changes to any device's volume behavior.

Bug: 201781907
Test: atest DeviceVolumeBehaviorTest
Change-Id: I75b6463a73109e624ffd14b14bae3f829974f3ea
2022-03-22 11:38:22 +01:00
Yixiao Luo
a92a92fc62 [SERAPHIC][TIAF] StreamEventResponse with null data parameter will cause a null-pointer crash.
Test: atest android.media.tv.interactive.cts.TvInteractiveAppServiceTest
Bug: 224877495
Change-Id: Iab7547f27bb2e2340e42ead981877d3a52055ad4
2022-03-21 19:13:56 -07:00
Yixiao Luo
bbf7f2884a TIAF: handling null objects in DsmccResponse class
Bug: 225256308
Test: atest android.media.tv.interactive.cts.TvInteractiveAppServiceTest
Change-Id: I20c9a5c16ff824f39e5223623672a02edc518e77
2022-03-21 17:20:52 -07:00
Yixiao Luo
a4691b235e Merge "TIAF: Change on API Review: DTV to VOD 2" into tm-dev 2022-03-18 21:40:07 +00:00
Shubang Lu
6d26abc33d Merge "TIAF: add JavaDoc for TvInteractiveAppServiceInfo constructor" into tm-dev 2022-03-18 20:49:33 +00:00