Commit graph

717 commits

Author SHA1 Message Date
Frankie Lizcano
3138d6b7ea Improve Tuner VTS: Generate Scan Combos
This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the Scan dataflow, and runs the
integration tests with all valid frontends.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest. Manual
tests with different input configuration files.

Change-Id: Ic6756e284090fbd1961a9ed12c1a4b541fb834b8
2022-07-19 20:32:52 +00:00
Frankie Lizcano
1e283b3864 Improve Tuner VTS: Generate LnbLive Combos
This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the Lnb Live dataflow, and generate
all combinations of units to run them on corresponding integration tests.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest. Manual
tests with different input configuration files.

Change-Id: Iba5262375b3053e0093f91fd3b05a9ebd42ca7d0
2022-07-19 20:31:50 +00:00
Frankie Lizcano
a53f554ca8 Improve Tuner VTS: Generate DVR Playback Combos
This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the playback dataflow, and generate
all combinations of units (dvr, audio filter, video filter, section
filters) to run them on corresponding integration tests.

Additionally, began storing section filter id's and eliminated the check
to see if they were stored already by utilizing the TearDown() function
between integration tests.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest. Manual
tests with different input configuration files.

Change-Id: I8e8be258dce9927e755f9c8bdb41441f367a196b
2022-07-19 20:31:22 +00:00
Frankie Lizcano
349ad5394a Merge "Improve Tuner VTS Configuration: Dynamically determine possible dataflows" 2022-07-18 21:25:21 +00:00
Frankie Lizcano
5b29f50944 Improve Tuner VTS Configuration: Dynamically determine possible
dataflows

This CL allows the VTS to read the contents of vendors'
configuration files and determine which dataflows can be tested
depending on the devices provided. This only implements the logic of
determining which data flows are possible. Currently, the data flow
section of the configuration file is still being read, and
configurations are not being cycled yet. Additionally, TearDown() was
overidden for each testing class.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: Ib3b3c4de62e6556ef44b42e855a369a5015d66ff
2022-07-18 14:57:21 +00:00
Lucas Gates
de9709a03e TunerHAL Handle PES Header in MediaFilterHandler
As according to the ISO/IEC 13818-1 specification, media
data in TransportStreams comes in PES packets which are
made up of TS packets. Currently, the MediaFilterHandler
strips out TS Headers, but leaves the PES headers in with
the Media data. This CL has the MediaFilterHandler process
and remove the PES Header from the Media data, while saving
the Presentation Time Stamp if it exists.

Bug: 238889790
Test: Manually using Cuttlefish and SampleTunerTIS to
receive events. Also tested on the VTS.

Change-Id: Idd4fe06f15f5420afd0c473128d8b30f5ca779c6
2022-07-13 17:47:12 +00:00
Lucas Gates
0c96e67ed5 Merge "TunerHAL Fix bug in TS Size Read" 2022-07-12 23:50:18 +00:00
Lucas Gates
9f8a9dd4b0 TunerHAL Fix bug in TS Size Read
Previously in CL 19152256 the size variables for Pes and
Section event reading were made unsigned in order to
prevent negative values. However, the conversion from
int8_t directly to uint32_t still produces incorrect values.
To solve this, the values which are read in are first
converted from int8_t to uint8_t before their final
conversion.

Bug: 238797416
Test: Run on Cuttlefish with TS input, and view logging.
Old version should not work with any TS that declares a
size containing any byte with value > 0x80.

Change-Id: I55bb552bc857fd8acf16729f8cfcb9e147e07e9c
2022-07-12 22:06:01 +00:00
Lucas Gates
9e4ced71f3 Tuner HAL Fix bug allowing only one MediaEvent
Currently, our startMediaFilterHandler returns on the first
time it successfully creates a MediaEvent. This does not
match the intended behavior, which is that all of its
current output is read and turned into events, and then
cleared.

Bug: 238797398
Test: Manually with Cuttlefish and SampleTunerTvInput.
Before change, any input type except ES will only create a
single MediaEvent. After change, full input will be handled
properly.

Change-Id: I856385cdf8ebb3a7d3fb0f864085123ec6c172b9
2022-07-12 21:38:22 +00:00
Lucas Gates
dcac96de6b Merge "SampleTunerTIS HAL Process TS for SectionEvents" 2022-07-07 20:40:21 +00:00
Lucas Gates
37e509716f SampleTunerTIS HAL Process TS for SectionEvents
Currently, the HAL simply sends raw TS data when
SectionEvents are created from a TS file. This CL
will have the HAL process the TS packets and construct
sections to be sent to the SectionFilter. A slight-modified
TS protocol is used that mirrors the current implementation
for PES filters.

This CL is a replication of reverted CL 19121691.

Bug: 237323181
Test: Manually using cuttlefish and the SampleTunerTvInput.
SectionEvents should be received without the 4-byte
TsHeader or any trailing data.

Change-Id: I48de90c9674fb69ecf877359f89f6b4f7f3eaca7
2022-07-06 21:50:31 +00:00
William Escande
04d16e124a Merge "Revert "SampleTunerTIS HAL Process TS for SectionEvents"" 2022-07-06 20:51:24 +00:00
William Escande
969c14ddd6 Revert "SampleTunerTIS HAL Process TS for SectionEvents"
This reverts commit 4a95c710b3.

Reason for revert: b/238230620

Change-Id: I6021b2e33d0cfa91706e2c382d92bca4032f0cb4
2022-07-06 20:41:19 +00:00
Lucas Gates
0babc2e472 Merge "SampleTunerTIS HAL Process TS for SectionEvents" 2022-07-06 20:22:02 +00:00
Lucas Gates
8c86315f4a Merge "Tuner Default HAL Fix bug in TS size calculation" 2022-07-06 18:45:47 +00:00
Lucas Gates
279d2aa794 Tuner Default HAL Fix bug in TS size calculation
The variable mPesSizeLeft is sometimes being set to a negative value
when it reads from TS data because of conversions from our int8_t vector. This is incorrect, as these sizes are defined to always be positive. Our vectors cannot easily be changed due to our AIDL interfaces, but the SizeLeft variable can be made unsigned to fix the issue.

Bug: 237819905
Test: Manually with cuttlefish and TS input to the DVR with
large values for size bytes. Can also manually test the
result of similar C++ expression to show the behavior.

Change-Id: Iae925cc3c505891b732434fb7c3ffadf7af95411
2022-07-06 17:10:52 +00:00
Lucas Gates
4a95c710b3 SampleTunerTIS HAL Process TS for SectionEvents
Currently, the HAL simply sends raw TS data when
SectionEvents are created from a TS file. This CL
will have the HAL process the TS packets and construct
sections to be sent to the SectionFilter. A slight-modified
TS protocol is used that mirrors the current implementation
for PES filters.

Bug: 237323181
Test: Manually using cuttlefish and the SampleTunerTvInput.
SectionEvents should be received without the 4-byte
TsHeader or any trailing data.

Change-Id: Ief6b9beb8f48bda1b83a0bffb83698ca431b7b12
2022-07-06 17:07:06 +00:00
Frankie Lizcano
7fa68f5141 Merge changes Ie7733750,I4f733091,Iaa216876
* changes:
  Improve Tuner VTS Configuration
  Improve Tuner VTS Configuration: Enable Lnb, LnbRecord, and LnbLive configuration
  Improve Tuner VTS Configuration: Enable Descrambling
2022-07-02 00:06:38 +00:00
Frankie Lizcano
5046193cd3 Improve Tuner VTS Configuration
This CL allows vendors to configure the DVR Playback data flow in their
configuration files for the Tuner Hardware. Their connections were
checked to ensure their validity. Additionally, vendors can now give an
extra list of optional filters that can be utilized in the DVR Playback data flow.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: Ie77337508444672e327ac88a91e73c96bd80fb22
2022-07-01 21:35:16 +00:00
Frankie Lizcano
647d5aa84c Improve Tuner VTS Configuration: Enable Lnb, LnbRecord, and
LnbLive configuration

This CL allows vendors to configure Lnb's in their configuration
files. Also, support for the LnbRecord and LnbLive data flows was
implemented. Their connections were checked to ensure their validity.
Additionally, the option to configure extra filters for each was added.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: I4f733091beb70e7f5658fb5572064f4628bbbfc3
2022-07-01 21:29:33 +00:00
Frankie Lizcano
f535212b77 Improve Tuner VTS Configuration: Enable Descrambling
This CL allows vendors to configure the Descrambling data flow in their
configuration files for the Tuner Hardware. Their connections were
checked to ensure their validity. Additionally, vendors can now give an
extra list of optional filters that can be utilized in the data flow.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: Iaa216876307571afa3ae6baf4624d0da14657439
2022-07-01 21:26:12 +00:00
Frankie Lizcano
7fc81c5c2c Merge "vts: Added support for ISDBT Frontend types" 2022-07-01 20:36:17 +00:00
Frankie Lizcano
c2d5b00d71 Merge "Improve Tuner VTS Configuration: Enable TimeFilter Configuration" 2022-07-01 16:01:58 +00:00
Frankie Lizcano
1fd5297019 Improve Tuner VTS Configuration: Enable TimeFilter Configuration
This CL allows vendors to configure the Time Filter data flow and
hardware unit in their configuration files for the Tuner Hardware. Their connections were
checked to ensure their validity.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: I5a458e3db626aa647c1a5e30b12d02df07631d66
2022-06-30 21:08:07 +00:00
Frankie Lizcano
01dca3d64c Fixing code style for changes added to expand Tuner HAL VTS Dyanmic Configuration
Bug: b/237319139

Test: Ran locally and confirmed changes

Change-Id: I37fee9a84a7885501912e151b7feeb4fe273a14f
2022-06-29 18:24:57 +00:00
Frankie Lizcano
aee8c9e2f9 vts: Added support for ISDBT Frontend types
The latest version of the dynamic VTS for Tuner HALs did not support the
configuration of ISDBT Frontend types. Logic was added to allow this
feature. Editing the tuner_testing_dynamic_configuration file directly
changes the api outlined in api/current.txt to support reading the newly
added features from the vendor's configuration file.

Bug: b/237112300

Test: manual - Ran local tests that ensured the ATSC frontend was being
configured correctly. Also ran the VTS module to ensure no failures were
occuring.

Change-Id: Ic18a116f15c79b30c7ecf827f5f7a1e453c20236
2022-06-29 15:23:24 +00:00
Frankie Lizcano
452b026fb5 vts: Added support for ISDBS Frontend types
The latest version of the dynamic VTS for Tuner HALs did not support the
configuration of ISDBS Frontend types. Logic was added to allow this
feature.

Bug: b/237319139

Test: manual - Ran local tests that ensured the ATSC frontend was being
configured correctly. Also ran the VTS module to ensure no failures were
occuring.

Change-Id: I7d7fe5ce153a582a65fa9d1347e18f7689e0bcfb
2022-06-28 01:25:58 +00:00
Frankie Lizcano
fa1610ff21 Merge "vts: Added support for ATSC Frontend types" 2022-06-28 01:15:44 +00:00
Frankie Lizcano
3ad735d324 vts: Added support for ATSC Frontend types
The latest version of the dynamic VTS for Tuner HALs did not support the
configuration of ATSC Frontend types. Logic was added to allow this
feature. Editing the tuner_testing_dynamic_configuration file directly
changes the api outlined in api/current.txt to support reading the newly
added features from the vendor's configuration file.

Bug: b/237100858

Test: manual - Ran local tests that ensured the ATSC frontend was being
configured correctly. Also ran the VTS module to ensure no failures were
occuring.

Change-Id: I6a3221bd69eab000a9ea3de9e7c084bbee0e1451
2022-06-27 21:51:57 +00:00
Lucas Gates
1707ec4725 Tuner Default HAL change dvr buffer size for CF
The default HAL currently uses a single shared memory
buffer to store the data within MediaEvents. This buffer
would cause sudden crashes when running on
cf_x86_tv-userdebug due to being de-allocated by the
memory management system. This CL decreases the size of
the buffer so our SampleTunerTIS can once again run
successfully on Cuttlefish.

Bug: 236847284
Test: Running sampletunertvinput manually on cuttlefish
Change-Id: I8e6042da422a9ed93cd9dbd18fe954c71098534d
2022-06-23 23:14:33 +00:00
Gregory Montoir
3f07efc75d Merge "Fix VTS PlaybackDataFlowWithTsVideoFilterTest sometimes failed." 2022-06-20 00:28:32 +00:00
Silver Chen
8ab7fd8b21 Fix VTS PlaybackDataFlowWithTsVideoFilterTest sometimes failed.
[Description]
If filter is started after playback thread, sometimes
filter cannot get data correctly because of timing issue.

Start playback thread after filter is started
so that filter will always get data correctly.

Bug: 235185563
Test:
1. Testcase pass

Change-Id: I97c38dab1ff81c31b4bb48c8015b626b3a6325ed
2022-06-08 01:14:47 +00:00
Frankie Lizcano
f09587c7aa verifyFrontendStatus Test
Implemented some of the TODO's on the FrontendTests.cpp file.

Fixed the code formatting issue of having a long line. Some comments
were deleted.

Reverted the TODO back to its original wording.

Change-Id: I932e218498c5f61da4196b21312dfef41778fcfd
2022-06-01 21:44:59 +00:00
Jiyong Park
8065d19402 Freeze AIDL APIs for TM am: 70f5837e1f am: 9f7c8a1e57
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17753326

Change-Id: Ic29d57a4d099e472e2c88ba9cac77d7657aa958a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 16:47:16 +00:00
Jiyong Park
70f5837e1f Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: I61eb51c0334eb99489c6f1570110d7e18c350c99
2022-04-16 07:03:24 +09:00
Gareth Fenn
3d4ec45992 Fix support for platforms without Frontends am: 9a8084505e am: 742bb019a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17573373

Change-Id: I83d4d9846c399533918816369ec609edcd248e30
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 00:19:57 +00:00
Gareth Fenn
9a8084505e Fix support for platforms without Frontends
Fix: 227741234
Test: atest VtsHalTvTunerTargetTest
Change-Id: Ic3d74be776bbdb377541ea24fb890152ad632508
2022-04-04 13:57:09 -07:00
Jiyong Park
cf2bf1a1c1 Freeze AIDL APIs for TM am: 703e97920e am: 6965d70cec
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17314883

Change-Id: Ic25535c3e72cd1f9c75cd4bc2d1eed1b617603fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-02 01:07:38 +00:00
Jiyong Park
703e97920e Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-31 12:01:39 +09:00
Suren Baghdasaryan
10afb4ad5a Replace writepid with task_profiles command for cgroup migration
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.

Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I23dab5cbd92dd51b600b7c7879f94ad1f5707208
2022-03-25 20:22:02 +00:00
Suren Baghdasaryan
dd1221d2d4 Replace writepid with task_profiles command for cgroup migration
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.

Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Icbf3e66e61e7ebb570ac3aba5f1cf9e10ef6720d
Merged-In: Icbf3e66e61e7ebb570ac3aba5f1cf9e10ef6720d
2022-03-25 00:22:33 +00:00
Suren Baghdasaryan
ba658c0e98 Replace writepid with task_profiles command for cgroup migration
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.

Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Icbf3e66e61e7ebb570ac3aba5f1cf9e10ef6720d
2022-03-23 16:59:59 +00:00
Treehugger Robot
2d5a397487 Merge "Declare license metadata for copied files." am: 243be18aa1 am: bfede49097 am: 553bedcd1e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1984822

Change-Id: Ie6eeedaf0e84c44ddcdc0b2c0f83819013712251
2022-02-15 09:29:38 +00:00
Bob Badour
c00f8ad8f0 Declare license metadata for copied files.
Bug: 151177513

Test: m all dist reportmissinglicenses
Change-Id: I9efbffb3f38dc700f4a569d74baada37e491bc25
2022-02-13 15:46:33 -08:00
Hongguang
e8f2f7ccf9 Clarify getHardwareInfo() beavhior
Bug: 184017033
Bug: 218911006
Fix: 218911006
Test: make
Change-Id: Ica02177f4804fcb9b71062912f6c44836a7044f5
2022-02-11 02:18:54 +00:00
Steven Moreland
78d4b31c48 Merge "-= src_available (internal)" 2022-01-31 21:30:48 +00:00
Steven Moreland
22c5b64894 -= src_available (internal)
Default now. To Remove.

Bug: 215754978
Test: N/A
Change-Id: Ie83df828ea2ec892c6586ffa32e9f6c42d83a2fe
2022-01-31 19:52:35 +00:00
Hongguang
c8438c0702 Send a unlocked message for test coverage
Bug: 215435869
Test: atest VtsHalTvTunerTargetTest
Test: atest android.media.tv.tuner.cts
Change-Id: I8e63eac1e96ab9a638f3aa04dc0bfd39cbdd52fa
2022-01-29 05:15:26 +00:00
Hongguang
881190f810 Support frontend status readiness query.
The caller could use it to check whether frontend status is ready to
read or not.

Bug: 171540820
Test: atest VtsHalTvTunerTargetTest
Change-Id: I65521aacd8afe824342ad0b24f7d89006ceb5851
2022-01-21 11:13:32 -08:00
TreeHugger Robot
36f893bfc5 Merge "Add API to filter out unnecessary PIDs from frontend output." 2022-01-21 18:24:35 +00:00