Implement silencing of audio capture for idle UIDs for
MMAP streams.
Use audio HAL setMicGain() API to silence the mmap buffer for
exclusive mode and when only one client is active in shared mode.
Add new MmapStreamCallback method onStreamSilenced() for AAudio
service to selectively silence streams from silenced UIDs in
shared mode.
Bug: 72134552
Test: manual
Change-Id: I7c92ba0002bc5ba003c1a3c887edddf9ae53b538
Only the volume of MMAP thread was previously sent and
the attributes of duplicated tracks were skipped.
Bug: 38184704
Bug: 69623109
Test: check that the HAL receives correct track metadata volume
Test: check that the HAL receives correct duplicated track metadata
Signed-off-by: Kevin Rocard <krocard@google.com>
Change-Id: I1e3b14edd8c9a5a65d2b9f4cf8660997c81c701c
We were using an incorrect sample spacing of 1/N instead of 1/(N-1). This affected rendering in 3rd party tools like Adobe Photoshop, effectively shrinking the lens shading map and replicating values from the bottom-most row and right-most column.
Bug: 77657628
Test: created test pattern lens shading maps, loaded DNG in Photoshop
Change-Id: Ia814ebefeceafc72b17058a9c4cf598140d3f752
Consider an active VOICE_CALL stream as an indication
that notification routing and volume should match voice call routing.
Also limit notification volume to match current VOICE_CALL volume index,
not just VOICE_CALL volume curve with notification volume index.
Bug: 74019016
Test: manual: receive notification while listening to voicemail and
check volume and routing.
Change-Id: Ia9309bdb10b42f6a4fa8745daf3129c90d44f0b8
The code forgot to skip 3-bit vps_max_sub_layers_minus1
and parsing result is wrong.
It also has a typo that sets the profile in hvcc to a
fixed constant 2. As a result, the generated mp4/heif
always has a profile 2.
bug: 77728869
Change-Id: I479bca3eb76ae0948341190cce8ee4aa7888b084
Output track currently do not support audio attributes,
nevertheless the placeholders values were erroneously
propagated to the HAL.
Bug: 38184704
Bug: 69623109
Test: check that the HAL does not receive metadata about duplicated
tracks.
Change-Id: I9a646faf4a43b1ebc09c03329827aee4a49674f9
Signed-off-by: Kevin Rocard <krocard@google.com>
In AudioPortConfig, we only initialize index for audio_gain_config, but
not other fields. That may cause uninit leak at listAudioPorts and
listAudioPatches.
Bug: 77238250
Bug: 77238762
Test: try repo steps at the bug description.
Change-Id: I57e3bd0598f9aa698a6fa3d3c0218b046de34e2f
When decoder returns wrong crop with zero width, height,
following crop rect calculation underflows. We need to
fail it properly.
Also, for HEVC, when profile is set to Main10/Main10HDR10,
verify if the decoder supports it before proceeding. Soft
HEVC doesn't handle 10-bit, it will skip the non-support
bitstream until the entire stream is consumed.
bug: 77583227
Change-Id: I9e46d5f54b10a3a46179e683f227acca9c7c5a30
TIYUV420PackSemiPlanor color conversion routine is updated to
offset src_y using the given crop parameters. Previously it was
assuming that the mBits were already offset but at least in the
latest code base it is not, so it needs to take into account
the src crop appropriately.
bug:70844660
Change-Id: I206925ba254cf547241ff30c6211b4dc94c9cac7
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
(cherry picked from commit 7576c34313)
These are to be retrieved via hidden keys in MediaMetadataRetreiver,
and used by ExifInterface for Exif extraction.
bug: 76149934
Change-Id: Ic6ac68cfd3c0f3e93e14db1da620dd069cb2c8c4
Allow editing entry names and removing entries to avoid having to
create copies and switch-banks to copy each value type.
Bug: 64121714
Test: unit test
Change-Id: I83aff86f6511cfbcf7c84fcca08f428ed32ede0b
When the device disconnect, all inputs will be closed before calling
releaseInput(). In that case, input route ref count will be wrong due to
route couldn't be removed in releaseInput() since the input is already
closed, that may cause the routing error. Clear input routes to prevent
the routing error when closing all inputs.
Bug: 77520691
Test: Reconnecting the usb device, check the input routing.
Change-Id: I754cf2774c9c38b751f918b32e881b6d464a7a01
Add logic in UidPolicy for handling audioserver restarts as well
as ActivityManager (system server) restarts.
Also, refactor the UidPolicy logic to simplify reasoning about
active state lookup. As a result, 4 layers are considered:
1. Service UIDs--always active.
2. Overrides--controlled via 'adb shell cmd'.
3. Cached UIDs from ActivityManager--also updated via IUidObserver.
4. ActivityManager ground truth.
Bug: 73405145
Bug: 77300296
Test: android.media.cts.AudioRecordTest#testRecordNoDataForIdleUids
manual tests with SoloTester
Change-Id: I426dd5d4d9c9c2570c0e03dde390e18f672c1b1d
Thumbnail tracks are identified by 'tref' box with a 'thmb'
type reference in it. We can't skip a track as soon as a 'tref'
box appears, need to actually parse it and look for 'thmb'.
bug: 77556099
Test: playback of audio files in bug, playback of image sequence
file (bird_burst.heic) with thumbnail reference.
Change-Id: I7d6ec8af218de2f0cba258f8eaaac9b62f9cb020
Hearing Aid uses volume value from -127 to 0dB. Make sure that volume
curve used is able to adjust volume in whole range.
Test: play music using Hearing Aid, try lowering volume to smallest
non-mute value.
Bug: 69623109
Fixes: 76434849
Change-Id: I8b8d64405016252f08ddda823fab74115352de4e
Ported the frequency domain implementation of the effect from the
development sandbox.
Bug: 64161702
Bug: 38266419
Test: manual with Triton app. Cts tests. Listening tests.
Change-Id: I9417beba2f98f2a677f0857c7976bf76a0e0d8e0