Commit graph

425 commits

Author SHA1 Message Date
Amy Zhang
4c49c15e55 Add DTMB Frontend Type and Related Capabilities enums
Test: atest VtsHalTvTunerV1_1TargetTest
Bug: 159064654
Change-Id: I4ed8ec1f47d74ba3d585725cb64ba925d7ddf910
2020-09-29 16:26:52 -07:00
Amy Zhang
bc15b5964e Rename Tuner HAL 1.1 frontendSettingsExt into frontendSettingsExt1_1
Test: make
Bug: 158818695
Change-Id: I1d9e89556fc7de0962dcfbf379c115ea4a0e8d32
2020-09-29 10:29:45 -07:00
Amy Zhang
f2659f5fb8 Merge "Add API to get the shared memory Audio/Video handle" 2020-09-22 17:17:56 +00:00
Amy Zhang
976c640464 Add API to get the shared memory Audio/Video handle
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.
To pass additional information to Codec2 for AV memory,
the index for Codec2 to setup additional information can be carried in the handle.

Test: atest VtsHalTvTunerV1_1TargetTest
Bug: 162013047
Bug: 157143515
Bug: 156664393
Change-Id: Ibd4471ff8e19b0a99b8bcbc982dc08dbcc92efcf
2020-09-21 17:42:29 -07:00
Amy Zhang
83529a402b Merge "IP and CID filtering configuration of IP filter" 2020-09-21 21:18:59 +00:00
Amy Zhang
cbd93156bd IP and CID filtering configuration of IP filter
Add the cid configuration API in IFilter and some related
enums

Test: atest VtsHalTvTunerV1_1TargetTest
Bug: 153595125
Change-Id: I6e43c0f71466192f9fa69c76f9c635ecefe99d5e
2020-09-17 17:17:54 -07:00
Amy Zhang
4699ec631e Extend DVBT Constellation to report the rotation status
Test: make
Bug:
Change-Id: I24356125ec889c313459beba5e3caef2d3413fa7
2020-09-16 17:59:21 -07:00
Amy Zhang
585bb5e581 Revert "Add a getAvSyncHwId_64bit in Tuner HAL 1.1 to support 64 bit hw sync id"
This reverts commit 80cb96048b.

Reason for revert: This change is not specifically requested by vendors
Might be unnecessary

Test: make -j44, atest VtsHalTvTunerV1_1TargetTest
Bug: 159058358
Change-Id: I305c17b4778608a59d04d93030f4ec19fa1b7137
2020-09-15 16:30:42 -07:00
Amy Zhang
17f8eac2a4 Add linkCicam API in Frontend 1.1
This API is mostly for restoring the by-pass mode
Frontend and Cicam connection

Test: make
Bug: 158818696
Change-Id: I62ba19a1c6c531769db6286d3bcd41ab1529bb99
2020-09-02 12:34:47 -07:00
Amy Zhang
2fb0424c08 Comment out unused parameter in Tuner Frontend implementation
Test: make
Bug: 163870103
Change-Id: Ie02454fca63558d519c34c2566a20d2c1a6958d1
2020-08-12 15:40:01 -07:00
Amy Zhang
3ea25a6445 Add FrontendSettingsExt struct in Tuner 1.1
The new FrontendSettingsExt includes more options to configure the
tune and scan action on the IFrontend interface.

This new struct will be used as a parameter in the tune_1_1 and
scan_1_1 APIs of the 1.1 IFrontend.

Test: atest VtsHalTvTunerV1_1TargetTest
Bug: 158818695
Change-Id: Ibe38a0be76969d23255574357d7494188182f467
2020-08-10 15:03:39 -07:00
Amy Zhang
cc9207ccc0 Move Tuner 1.1 new RecordFilterEvent fields into a separate struct
Previously we added the PTS and the mpuSequenceNumber separately into
the tsRecord and the mmtpRecord filter event data structure.

Now there is a better way that we merge all the new fields into one
new struct to pass as a callback parameter.

With this approach, we can minimize the change in both Tuner JNI and
Tuner HAL implementation side to reuse the 1.0 structure and
implementation.

Test: atest VtsHalTvTunerV1_1TargetTest
Bug: 158816517
Change-Id: Ic4f1dc78f76fb52ee0bc6b90d2d297026a788711
2020-08-05 18:22:32 -07:00
Amy Zhang
6afbf4888d Merge "Add PTS field in the DemuxFilterMmtpRecordEvent" 2020-08-03 19:00:56 +00:00
Amy Zhang
6a0131f952 Merge "Fix the media filter buffer issue in the Tuner default implementation" 2020-07-31 02:11:40 +00:00
Amy Zhang
990ee76d77 Fix the media filter buffer issue in the Tuner default implementation
The current implementation does not clear the previous memcopy before
copying the next round of data into the buffer. This CL fixes the issue.

Test: atest VtsHalTvTunerV1_0TargetTest
Bug: 159027928
Change-Id: I3399c69ead046630d9c22e8fbe1e816f6ea529f9
2020-07-30 17:24:37 -07:00
Amy Zhang
32af757cb6 Merge "Add Tuner HAL VTS tests into the exception list of the uninstantiated parameterized tests" into rvc-dev-plus-aosp am: f274a6211a am: fdf8ca84aa am: d8ade017b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12268212

Change-Id: I06cad978ad5b4b63a0aaef873054cb5d7aa3db51
2020-07-30 22:25:44 +00:00
Amy Zhang
38ae830152 Add Tuner HAL VTS tests into the exception list of the uninstantiated
parameterized tests

The previous fix in the ag/12249074 added the allowlist funtion
under the .cpp file. But they should be under the .h file where all
the test suite classes are defined.

Test: atest VtsHalTvTunerV1_0TargetTest
Bug: 161805444
Change-Id: I4ad7270c75ec6b30db82b0b120f21e3759ed7b93
2020-07-30 03:22:05 +00:00
Amy Zhang
410732f04f Add PTS field in the DemuxFilterMmtpRecordEvent
Add a 64-bit Constant enum for INVALID 64-bit
filter id and hw av sync id

Test: make -j44 dist
Bug: 158816517
Change-Id: I27911841a719c69e668c89a4bca3ac0ce8eb701f
2020-07-29 15:36:16 -07:00
Amy Zhang
6115595afb Revert "Revert "Add Tuner HAL and TvInput HAL VTS tests into the exception list of the uninstantiated"" am: bcd3acde22 am: 479b5bda48 am: 7892dcf9d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12249074

Change-Id: If14c8f8bf7f8231758f01dec98ff9e5b5fd9c414
2020-07-28 20:06:28 +00:00
Amy Zhang
bcd3acde22 Revert "Revert "Add Tuner HAL and TvInput HAL VTS tests into the exception list of the uninstantiated""
This reverts commit f0dfc4d624.

Reason for revert: To fix the test breakage in the rvc-dev-plus-aosp branch

Change-Id: Ibeb73be943c74891f8ff5acec1ea120c1b820027
2020-07-28 17:49:49 +00:00
Amy Zhang
ce3ffbdecf Merge "Add the PTS field for recording-time indexing in the DemuxFilterEvent" 2020-07-27 20:33:14 +00:00
David Su
7fd5a1a1e0 Revert "Add Tuner HAL and TvInput HAL VTS tests into the exception list of the uninstantiated" am: f0dfc4d624 am: b8adfe739d am: bcc3c36b9e am: b1661f5c19 am: bfaa835403
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12227496

Change-Id: I548427edf2fd820949c6c67bb8a2b2c35e3629f6
2020-07-24 20:02:02 +00:00
David Su
bcc3c36b9e Revert "Add Tuner HAL and TvInput HAL VTS tests into the exception list of the uninstantiated" am: f0dfc4d624 am: b8adfe739d
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12227496

Change-Id: I30a67872becf4607dbe5a27319fee1017ffd830a
2020-07-24 19:30:54 +00:00
Amy Zhang
ed1d3096d3 Merge "Add a getAvSyncHwId_64bit in Tuner HAL 1.1 to support 64 bit hw sync id" 2020-07-24 19:00:06 +00:00
Amy Zhang
4bf42941ba Merge changes from topic "Tuner_1.1"
* changes:
  Add VTS of Tuner HAL 1.1
  Add default implementation of Tuner HAL 1.1
  Enable Tuner HAL 1.1 interface
2020-07-24 18:59:52 +00:00
David Su
f0dfc4d624 Revert "Add Tuner HAL and TvInput HAL VTS tests into the exception list of the uninstantiated"
This reverts commit 0857d7caa0.

Reason for revert: breaks build: b/162086397

Change-Id: If91c59aa5485cd78e42b743a7bf786c68283aecb
2020-07-24 18:46:33 +00:00
Amy Zhang
68afca6d7c Add the PTS field for recording-time indexing in the DemuxFilterEvent
Test: atest VtsHalTvTunerV1_1TargetTest
Bug: 158816517
Change-Id: Ib29fd0f55aaae2fb44b77f754cceb5152fc7158d
2020-07-24 10:42:43 -07:00
Xin Li
2cda765afc Merge stage-aosp-rvc-ts-dev into rvc-dev am: f73fe6b6bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12203367

Change-Id: I74978fe2cd4eabf829d72ac7e9feee51fb3cd799
2020-07-24 08:26:19 +00:00
Amy Zhang
45c1263a66 Fix Tuner 1.0 default implementation Demux and Frontend mapping
The previous impl keeps the demux and frontend mapping in the
Tuner implementation even the instance has been closed.

Clean up the mapping and the local vectors in the Tuner impl
when Demux or Frontend is closed.

Test: atest VtsHalTvTunerV1_0TargetTest
Bug: 150952766
Change-Id: I2038e902ba7ab323c6dacc886ac6984ee7c475aa
2020-07-22 17:41:02 -07:00
Amy Zhang
80cb96048b Add a getAvSyncHwId_64bit in Tuner HAL 1.1 to support 64 bit hw sync id
Test: atest VtsHalTvTunerV1_1TargetTest
Bug: b/159058358
Change-Id: I3e58beaf4f61b27acce71a530e42293c4a87b181
2020-07-21 22:43:58 -07:00
Amy Zhang
45cc57ac67 Add VTS of Tuner HAL 1.1
For the APIs that have both 1.0 and 1.1 versions, the VTS 1.1
only tests the 1.1 version of them.

For example for getId in IFilter 1.0 and getId_64bit in IFilter 1.1,
the 1.1 VTS only tests the getId_64bit.

Test: atest VtsHalTvTunerV1_1TargetTest
Bug: b/159058358
Change-Id: Ibef0ef40c3d1fbb9ff034bfcabeb44663a444d23
2020-07-21 22:43:48 -07:00
Amy Zhang
bb94eeb456 Add default implementation of Tuner HAL 1.1
This CL enables the android.hardware.tv.tuner@1.1-service
with the default implementation of Tuner HAL 1.1

The 1.0 Tuner HAL interface implementation are identical to the 1.0
default implementation.
The 1.1 new API implementation are added with *_1_1 suffix.

Note that we cast all the uint32_t id in the 1.0 Hal implementation
into uint64_t even calling the old 1.0 APIs. This makes sure
the 1.1 default implementation internally only record 64-bit ids.

Test: atest VtsHalTvTunerV1_1TargetTest
Bug: b/159058358
Change-Id: Ic506376e520f03235010bc503e337c02d5735ec3
2020-07-21 22:43:06 -07:00
Amy Zhang
3ab6e1fbbf Enable Tuner HAL 1.1 interface
The first feature to support in this new Tuner HAL is the 64-bit id.
In the current CL, we support Demux and Filter ids in 64-bit format.
More component ids will be suppored in 64-bit in the following CLs.

Test: atest VtsHalTvTunerV1_1TargetTest
Bug: b/159058358
Change-Id: If05eb9f0cd76935064b2e51ff3ff1a3a477e3bd1
2020-07-21 22:42:50 -07:00
Amy Zhang
05eaa97502 Add Tuner HAL and TvInput HAL VTS tests into the exception list of the uninstantiated am: f122309667 am: 917757a92e am: 9d989309c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12203374

Change-Id: I73d0ef4c0c1d6cdf1f7e24c1082146b0a733b6da
2020-07-22 00:20:40 +00:00
Amy Zhang
0857d7caa0 Add Tuner HAL and TvInput HAL VTS tests into the exception list of the uninstantiated
parameterized tests.

This test can be disabled on the phone target once there is
a cuttlefish tv target enabled to run the test continuously.

The test will be removed from the exception list afterwards.

Test: make VtsHalTvTunerV1_0TargetTest
Bug: 161805444
Change-Id: I7a2ad0e8a43c6262628354be316c530ab00ac520
Merged-In: I7a2ad0e8a43c6262628354be316c530ab00ac520
2020-07-21 23:35:29 +00:00
Amy Zhang
f122309667 Add Tuner HAL and TvInput HAL VTS tests into the exception list of the uninstantiated
parameterized tests.

This test can be disabled on the phone target once there is
a cuttlefish tv target enabled to run the test continuously.

The test will be removed from the exception list afterwards.

Test: make VtsHalTvTunerV1_0TargetTest
Bug: 161805444
Change-Id: I7a2ad0e8a43c6262628354be316c530ab00ac520
2020-07-21 21:51:40 +00:00
TreeHugger Robot
b1ca9e45c6 Merge "Tuner HAL: fix a memcpy issue" 2020-07-21 03:28:39 +00:00
shubang
3e2de6cc22 Tuner HAL: fix a memcpy issue
Bug: 161481210
Test: cuttlefisih + TIS
Change-Id: I79274970ddd8ed8b7b97f56ca4200499fdee1b38
2020-07-20 19:26:36 -07:00
Amy Zhang
de1d2b6cbe Fix bugs in the Tuner HAL 1.0 VTS
The previous implementation did not check some of the
Descrambler API test results to stop the test.
And the test itself was also implemented in a wrong way.

Test: atest VtsHalTvTunerV1_0TargetTest
Bug: 150987138
Change-Id: Ie26db0ec1b231062d0314631eebec319382da1bc
(cherry picked from commit 6d774c89a1)
2020-07-20 18:12:54 +00:00
Amy Zhang
6d774c89a1 Fix bugs in the Tuner HAL 1.0 VTS
The previous implementation did not check some of the
Descrambler API test results to stop the test.
And the test itself was also implemented in a wrong way.

Test: atest VtsHalTvTunerV1_0TargetTest
Bug: 150987138
Change-Id: Ie26db0ec1b231062d0314631eebec319382da1bc
2020-07-16 12:41:32 -07:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Jooyung Han
b0907a6bb8 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
2020-07-02 09:18:17 +09:00
Amy Zhang
85a9ab32d7 Implement ES data process in Tuner default impl to support Sample TIS
This CL also provides a new VTS case to test ES input stream.
Please see the test.es https://drive.google.com/file/d/13ZDT9uhEO1LXDT2GcOhB91iIK6m_KEER/view?usp=sharing

ES Format(all the numbers are in decimal):
1. First line is a general meta data to describe the whole file

m:meta data size in bytes, l:ES frame line count X, V:video raw data size
int bytes, A:audio raw data size in bytes, pv:video pid, pa:audio pid

2. The following X lines(equals to the ES frame line count) are the size/pts information
of the video or audio ES frames. Starting with v means video, a means
audio. They are printed in the same order as how they presented in the
original ts.

v, Len:current ES frame size in bytes, PTS: current ES frame PTS

3. After the X lines of ES frame descriptions, there are the video ES raw
data connected with the audio ES raw data.

Test: atest VtsHalTvTunerV1_0TargetTest
Bug: 159027928
Change-Id: I56bd799fd6eda867df54d593235510a5e4758257
2020-06-23 17:53:51 +00:00
Amy Zhang
583116abf7 Merge "Enable frontend input loop when FrontendTune happens before Demux is configured." into rvc-dev am: 1fb7d06712 am: ecc7c04fd6 am: fb101c397e am: a526e121e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11853109

Change-Id: Iac3e1f745ecffe90ec9eb789f2ea5edd442390c6
2020-06-13 00:13:32 +00:00
Amy Zhang
fb101c397e Merge "Enable frontend input loop when FrontendTune happens before Demux is configured." into rvc-dev am: 1fb7d06712 am: ecc7c04fd6
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11853109

Change-Id: Ifd00c02bcd3c1ecab9da218d26f0445f0e0c4620
2020-06-12 23:49:53 +00:00
Amy Zhang
67a3b8a140 Merge "Enable frontend input loop when FrontendTune happens before Demux is configured." into rvc-dev am: 1fb7d06712
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11853109

Change-Id: I288f95258f5e5f6722bcd3e576648cc4d4fafbf2
2020-06-12 23:37:34 +00:00
Amy Zhang
1fb7d06712 Merge "Enable frontend input loop when FrontendTune happens before Demux is configured." into rvc-dev 2020-06-12 23:16:38 +00:00
TreeHugger Robot
37c1f8fdb7 Merge "Move testing ts on Cuttlefish under /data/ directory" into rvc-dev am: abd049609d am: 64fad8da97 am: 4285929399 am: 2edaf75b48
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11607814

Change-Id: If96c0a481b9b129c382c8347c77cefd41553d573
2020-06-12 20:48:31 +00:00
TreeHugger Robot
4285929399 Merge "Move testing ts on Cuttlefish under /data/ directory" into rvc-dev am: abd049609d am: 64fad8da97
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11607814

Change-Id: Ife1ab6421149d818c22ab957736246a7c68a784b
2020-06-12 20:20:17 +00:00
Amy Zhang
e0422236e2 Enable frontend input loop when FrontendTune happens before Demux is
configured.

Test: atest VtsHalTvTunerV1_0TargetTest
Bug: 153366959
Change-Id: I6fa98e367a7530e308ea2a74e7efeb6ed4d3a56b
2020-06-12 13:05:24 -07:00