2035 Commits

Author SHA1 Message Date
Amy Zhang
a6c094bed2 Add Ip Cid Change Event for Filter
Merge the configuration of scrambling status change and ip cid change
into one API - configureMonitorEvent

Previously we only report scrambling status change on configured status,
now we change it to report any status change along with the initial
status

Test: atest TunerTets
Bug: 153595125
Change-Id: Ie6e26774dd3f3ab5753746795188a258e1a55393
2020-11-18 23:23:12 -08:00
Amy Zhang
83258e4e69 Add RestartEvent in Filter
Restart event would be sent when a filter is reconfigured and
restarted.

After stopping to reconfigure the filter, all the filter events
should be discarded until restart and receive the start event
from the newly configured filter.

Test: atest android.media.tv.tuner.cts
Bug: 172593389
Change-Id: I1c7c4391d8477ae191e318b1830dd8afed86ed87
2020-11-13 10:58:24 -08:00
Amy Zhang
4ae37befa9 Merge "Add API to configure Scambling Status event to monitor specific status type" 2020-11-12 02:22:35 +00:00
Amy Zhang
220e0256c9 Merge "Get the offset of recorded keyframe from MMTP Packet Table in MmtpRecordEvent" 2020-11-10 18:17:04 +00:00
Amy Zhang
5e9578fa73 Merge "Add new Frontend Status Types into Tuner Framework" 2020-11-10 18:15:58 +00:00
Amy Zhang
bc7a75b738 Merge "Deprecate int getFecCapability() and add long getCodeRateCapability() instead" 2020-11-10 18:15:31 +00:00
Amy Zhang
b132831936 Get the offset of recorded keyframe from MMTP Packet Table in
MmtpRecordEvent

Test: atest android.media.tv.tuner.cts
Bug: 158816517
Change-Id: Ic8bafaad2cfe868bfb6a6ede1fd77de49c3d04cb
2020-11-04 16:41:21 -08:00
Ytai Ben-tsvi
df2e907e08 Merge changes from topic "aidlize-audioflinger"
* changes:
  Remove manual parceling from Interpolator and VolumeShaper
  Add av-types-aidl to libandroid_runtime, libmedia_jni
  Add dependencies to libandroid_runtime, libmedia_jni
  Add dependency to libandroid_runtime
2020-11-04 21:03:37 +00:00
Amy Zhang
c7d356eee6 Merge "Add first macblock address in slice filed in Record Filter" 2020-11-04 18:28:54 +00:00
Amy Zhang
e33b28101a Merge "Add onDvbcAnnexReported ScanCallback" 2020-11-04 17:51:17 +00:00
Ytai Ben-Tsvi
203e4e6672 Add av-types-aidl to libandroid_runtime, libmedia_jni
This new module has been extracted from frameworks/av headers

Change-Id: I8b4b46ea7cb41fab3fc947087a0a195eb7470274
2020-11-03 16:21:14 -08:00
Ytai Ben-Tsvi
f12e518cc5 Add dependencies to libandroid_runtime, libmedia_jni
audioclient-types-aidlaudioflinger-aidl aidl_interface module has been
extracted from libaudioclient as part of an AIDL focused refactoring.
Clients need to depend on this module to compile.

Test: compiles
Change-Id: If1b773e7505f93c01027563dd3b1123577ebe495
2020-11-03 16:21:14 -08:00
Amy Zhang
196b8c3e9c Add new Frontend Status Types into Tuner Framework
Test: atest android.media.tv.tuner.cts
Bug: 169868608
Change-Id: I34c1ba30e66ea29aedd57631dbdf1573026f8e90
2020-11-02 14:54:59 -08:00
Amy Zhang
b17f849808 Add onDvbcAnnexReported ScanCallback
Test: atest android.media.tv.tuner.cts
Bug: 169868608
Change-Id: I7204d1f9aa9282ce05b3fe1ccda72b883e528fca
2020-11-02 14:25:28 -08:00
Amy Zhang
45000c44e0 Add Dvbc Frontend Bandwidth Settings
Test: atest android.media.tv.tuner.cts
Bug: 169868608
Change-Id: I690018c8590eaddb3c261c948a3da849b0823d3a
2020-11-02 14:19:07 -08:00
Amy Zhang
fa7d53ccff Deprecate int getFecCapability() and add long getCodeRateCapability()
instead

Test: make
Bug: 155436396
Change-Id: I9726d865c4f1e47af63c4b106eace548a9a94ed0
2020-10-30 16:25:21 -07:00
Amy Zhang
12a72f4537 Add first macblock address in slice filed in Record Filter
Test: atest android.media.tv.tuner.cts
Bug: 158816517
Change-Id: I4b0cdea9c90c60f64633f738918af70320cd6e2d
2020-10-30 15:07:12 -07:00
Amy Zhang
658f1ea577 Add API to configure Scambling Status event to monitor specific status
type

Test: atest android.media.tv.tuner.cts
Bug: 158779948
Change-Id: Ia24b8ac25821a7702c46dc051a00ea671b78a19c
2020-10-30 15:06:54 -07:00
Hangyu Kuang
a4fc0b078c Merge "Avoid transcoding in MediaPlayers" 2020-10-21 00:23:13 +00:00
Zim
95c8a18133 Avoid transcoding in MediaPlayers
Test: Manual
Bug: 158466177
Change-Id: I71776e1e81002b1505f5094c92fdd10706d1268e
2020-10-20 22:26:22 +01:00
Amy Zhang
fccbf2738c Merge changes from topic "streamtype"
* changes:
  Configure avStreamType in Tuner JNI
  Add Audio/Video Stream Type setter in Tuner Framework
2020-10-20 18:18:49 +00:00
TreeHugger Robot
d44087303d Merge "Tuner JNI to use V1_1 ScanCallback" 2020-10-20 17:13:55 +00:00
Amy Zhang
c027d7ef21 Configure avStreamType in Tuner JNI
Test: atest android.media.tv.tuner.cts
Bug: 170339836
Change-Id: Ia64a1469b17f90bcf00db472dd7d1b4c7e37c0d4
2020-10-19 18:08:08 -07:00
Amy Zhang
f10e2fcac2 Tuner JNI to use V1_1 ScanCallback
Test: make
Bug: 158818695
Change-Id: Ifafaed8ad581582822da19d683002c2692737a4a
2020-10-19 16:54:30 -07:00
Amy Zhang
d7a9ce9874 Add DTMB Frontend Status Support in Tuner JNI
Test: make -j44 dist
Bug: 159064654
Change-Id: I93d71b3eca30d7cd12fa2f459c9a5fce18549782
2020-10-19 19:38:48 +00:00
Amy Zhang
07a2704af9 Tuner JNI to use the extended frontend status types and build up extended
status struct

Test: make -j44 dist
Bug: 158818695
Change-Id: Ic8e34ec4cf024c4d55ead3dca2d37dd84a19c7d5
2020-10-19 19:38:37 +00:00
Amy Zhang
d84c2d300d GetDtmb Settings and Capabilities in Tuner JNI
DTMB is a new frontend type added in Tuner 1.1
Tuner java Framework and Tuner JNI are changed to
handle the new DTMB Settings and Capabilites

Test: atest android.media.tv.tuner.cts
Bug: 159064654
Change-Id: I25209eb4da4f6790765299c95442f6363ef4cf31
2020-10-15 15:07:57 +00:00
Amy Zhang
25993ef6b5 Merge "Enable Tuner JNI to use Extended Frontend Settings" 2020-10-14 23:45:40 +00:00
Amy Zhang
a0267d540a Merge "Add context id setter in the IpFilterConfiguration" 2020-10-14 20:36:46 +00:00
Amy Zhang
c3719e9c56 Enable Tuner JNI to use Extended Frontend Settings
Tuner JNI would call tune_1_1 and scan_1_1 when:
1. IFrontend 1.1 implementation exists
and 2. Frontend Extended Settings are set from Tuner Java

Otherwise tune and scan in Tuner 1.0 would be called.

Test: atest android.media.tv.tuner.cts
Bug: 158818695
Change-Id: I477642c5623d8565fd05cbcb8789a2e09b074890
2020-10-14 10:53:00 -07:00
Clément Julliard
697cd3c447 Merge "Add preconditions for YUV formats." 2020-10-14 17:19:42 +00:00
Amy Zhang
880743e346 Merge "Support shared av memory handle in Tuner JNI" 2020-10-14 17:15:15 +00:00
Clément Julliard
2b64421fef Add preconditions for YUV formats.
Width and height need to be even and > 0 for the calculated dataSize to
be valid.

Test: test app crashes with a meaningful error message instead of an
allocation failure.

Bug: 163175419

Change-Id: Ibcce3e62f89b7d19d64e8a5efe792b35af6ab401
2020-10-14 08:13:39 +00:00
Amy Zhang
ca365f2fc9 Support shared av memory handle in Tuner JNI
In the MediaEvent of AV filters, the AV memory handle is mapped/unmapped on each event.
If the vendor allocates a persistent memory block, and use MediaEvent.offset to access the data,
the mapping change is unnecessary.

To improve this, a new API to get shared AV Memory is introduced in
Tuner HAL 1.1.

Tuner JNI queries the sharedAvMemory Handle when the media filter is
opened. It builds up linear block through either shared or independent
memory block by checking the memory handle fd number.

Test: make
Bug: 162013047
Bug: 157143515
Bug: 156664393
Change-Id: I5bfe3a8f4c26b5789212f56709b70c512ed15a0c
2020-10-13 18:54:12 -07:00
Amy Zhang
646c1129ad Add link/unlinkFrontendToCiCam APIs in Tuner java
These APIs are only supported in Tuner 1.1 or higher

Test: atest android.media.tv.tuner.cts
Bug: 158818696
Change-Id: I1df5b8b908455d47dbe183070456b15116b75cb7
2020-10-13 18:54:04 -07:00
Amy Zhang
de5715ea6f Add context id setter in the IpFilterConfiguration
Test: make dist
Bug: 153595125
Change-Id: Ie949ea0c108cb020f028cf0ce24020235762d0cb
2020-10-13 18:53:56 -07:00
Amy Zhang
4a11c4408f Merge changes from topic "filterid"
* changes:
  Add TunerVersionChecker  to expose the Tuner HAL implementation version
  Make Tuner java framework and Tuner JNI adopt Tuner HAL 1.1
2020-10-14 00:32:06 +00:00
Amy Zhang
7b3b578d50 Add TunerVersionChecker to expose the Tuner HAL implementation version
This can help Tuner java/cts get the information of the Tuner HAL
implementation version and notify the client on the availability of
the APIs in different versions or test with different expected result.

Users can all access getTunerVersion to get the information.

Test: atest android.media.tv.tuner.cts
Bug: 158816517
Bug: 164449999
Change-Id: I0b6e4c226e696ca7f94dff7d2c9a59f57af7e13a
2020-10-13 14:30:35 -07:00
Amy Zhang
b13e3042f3 Make Tuner java framework and Tuner JNI adopt Tuner HAL 1.1
Please see the Tuner HAL 1.1 design doc here:
go/android_tuner_hal_1.1

In this CL, the Tuner framework and JNI start to use the
@1.1::IFilter.getId64Bit() API and @1.1::IFilterCallback.

Currently the 1.1 IFilterCallback passes two new 1.1 record filter
events: DemuxFilterTsRecordEvent and DemuxFilterMmtpRecordEvent.

Tuner Framework exposes a new API: getId64Bit() which calls
the native getId64Bit. Also Filter java will be using long id
instead of the previous int id.

The FilterCallback interface remains unchanged but the TsRecordEvent
and the MmtpRecordEvent carry more variables to pass the extra info
in version 1.1.
When the HAL implementation is on version 1.0 and calls
onFilterEvent, it still uses the extended TsRecordEvent and
MmtpRecordEvent but the 1.1 field will be set to invalid.

Related HAL interface can be referred here:
hardware/interfaces/tv/tuner/1.1

Test: make -j44 dist, atest android.media.tv.tuner.cts
Bug: b/159058358
Bug: 158816517

Change-Id: I8d52c0b2031eed9c54909e5bf233137c56eeb78f
2020-10-13 14:28:31 -07:00
TreeHugger Robot
d4879cf9c5 Merge "Convert mask types from uint32_t to enum type" 2020-10-13 05:05:42 +00:00
Santiago Seifert
09ae5f60a9 Add MediaCodec.CryptoInfo.getPattern
Allows MediaParser and MediaExtractor clients to know the
encrpytion pattern of the parsed/extracted media. Without
the getter, only MediaCodec can know the pattern, which
impossibilitates the use of app-bundled decoders.

Bug: 158743263
Test: atest CtsMediaTestCases:MediaCodecTest.testCryptoInfoPattern
Change-Id: Iaf77c8ecafad093cfa434a9ac31314895a44e78f
2020-10-12 16:53:44 +01:00
Xin Li
986e6eeddf Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: Iecef31f7bf10ad97b7e0075cf302ae94e248474a
Change-Id: I9e9c873bc2e05a0cfe3af0bf74725500f3f108db
2020-10-10 20:38:57 -07:00
Mikhail Naganov
93ce89aa73 Convert mask types from uint32_t to enum type
This applies to the following types:

- audio_gain_mode_t;
- audio_flags_mask_t;
- audio_channel_representation_t;
- audio_channel_mask_t;
- audio_devices_t.

Enum types are distinct thus proper overloading on the type
is possible in C++. Also, assignments to enum types are
less prone to errors.

Bug: 169889714
Test: basic audio functionality
Change-Id: I7f32a7c7741dea88fa2fd8a2e7fe50d0c31eb2e7
2020-10-08 17:24:50 +00:00
Yi Kong
4eb361503d Merge "Workaround global ThinLTO build break" am: 06c47e70a4 am: 78edf52928 am: 2405f41b57 am: 198e7d360f am: 840761f7a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1442736

Change-Id: I63cdb711861cee72aae845cf31978ba962c31ce2
2020-10-01 09:08:16 +00:00
Yi Kong
840761f7a4 Merge "Workaround global ThinLTO build break" am: 06c47e70a4 am: 78edf52928 am: 2405f41b57 am: 198e7d360f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1442736

Change-Id: Ie009e43aa7ae340bf2fca180de637af0f2316521
2020-10-01 08:56:04 +00:00
Yi Kong
2405f41b57 Merge "Workaround global ThinLTO build break" am: 06c47e70a4 am: 78edf52928
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1442736

Change-Id: Ie0570c14afdc1e0b5440deb521a4491a2bc78c65
2020-10-01 07:48:26 +00:00
Yi Kong
cd1e70b874 Workaround global ThinLTO build break
These projects triggers Clang crash for global ThinLTO build. Disable
ThinLTO for these projects for now.

This CL has no affect for normal builds.

Test: GLOBAL_THINLTO=true m
Bug: 169004486
Change-Id: Id0c7d243250b6dc7f1ec3099c77cebc179d2c3b3
2020-10-01 04:29:05 +08:00
Henry Fang
0a94a23c2a free weakref to linearblock when it is destroy
bug: 168331789
Test: Manual
Change-Id: Iee1b2618bd5c970b728dbc0301b84ff43debde58
2020-09-16 15:38:31 -07:00
jiabin
6e9cabd95e Add package name when creating AudioTrack.
The package name will be used when starting external vibration. The
package name will be sent to vibrator service to check if the
application has the permission to start vibration,

Bug: 165910728
Bug: 162343845
Test: atest AudioTrackTest MediaPlayerTest
Test: start audio-coupled-haptic playback
Change-Id: I04b4711d11ab5f0f0716ea4c5e1c0f754fe834bb
Merged-In: I04b4711d11ab5f0f0716ea4c5e1c0f754fe834bb
2020-09-15 18:03:17 +00:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00