Commit graph

850 commits

Author SHA1 Message Date
Sadiq Sada
1376fc3c3e Merge "Add IPTV Support" 2023-01-22 16:11:56 +00:00
Yixiao Luo
90c9cac2f7 Add test config files for VtsHalTvInputTargetTest
Bug: 227673740
Test: VtsHalTvInputTargetTest
Change-Id: Id1b98c5075e66a2341652140871f6c11c337c588
2023-01-19 12:54:13 -08:00
sadiqsada
aff01d7e65 Add FrontendStatus for IPTV
Test: atest VtsHalTvTunerTargetTest
Bug: 263504906
Change-Id: I33c6480933fa830a9c17cf04eb3336c7ce11a587
2023-01-18 15:38:55 -08:00
sadiqsada
8441c0de8c Add IPTV Support
Test: atest android.media.tv.tuner.cts
Bug: 263504906
Change-Id: Ib4391dcda7d5840495ab5a573be68431bb6099d8
2023-01-18 12:59:13 -08:00
TreeHugger Robot
9ba1b4668c Merge "Enable support for main type cap aware demux management" 2023-01-17 19:20:26 +00:00
TreeHugger Robot
ca6af99b2a Merge "Add HDMI eARC, Connection and CEC to presubmit" 2023-01-13 09:38:15 +00:00
Nathalie Le Clair
25e8f5fa42 Add HDMI eARC, Connection and CEC to presubmit
Additionally, delete a file from when the HDMI Connection HAL was still
called the HDMI HAL. This file has been replaced by a corresponding file
in hdmi/connection/aidl/...

Test: lunch cf_x86_tv-userdebug; make;
atest VtsHalTvHdmiCecAidlTargetTest;
atest VtsHalTvHdmiConnectionAidlTargetTest;
atest VtsHalTvHdmiEArcAidlTargetTest;
Bug: 261729059
Change-Id: I472c054fd553f49c8834049a21eb4aa91f17285e
2023-01-12 17:15:52 +00:00
Treehugger Robot
b5efdb0a7f Merge "EARC: Make reportCapabilities param a reference" am: cf268bfc95 am: abc77bfdcb am: 7913cfbfe5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2385792

Change-Id: I42f90b25f848fc05c1be0a12ce27610b3b28f74c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-12 16:59:56 +00:00
Sham Rathod
8a68cbc4d0 EARC: Make reportCapabilities param a reference
Test: atest VtsHalTvEArcAidlTargetTest

Bug: 240388105
Change-Id: Id367550589ff22b6fbda796406f712a7d195d70c
2023-01-12 09:35:57 +05:30
Nathalie Le Clair
771928d151 Remove unused test mapping file
These files were created when the HDMI Connection HAL was still called
the HDMI HAL. They are no longer required today and should be removed.

Test: none
Bug: 265065502
Change-Id: I066896077cdc009cc573bb7df44c7b4fdc4c8baf
2023-01-11 13:23:45 +00:00
Nathalie Le Clair
16fed02090 Merge "Refactor HDMI related AIDL packages" am: e6c4ebb0de am: 8047dfe2ed am: dc0a6dcb9c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2347525

Change-Id: I5954f3b0106b9a01ae174fe787f0fe751f9295f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-10 17:50:40 +00:00
Venkatarama Avadhani
601d29917a Refactor HDMI related AIDL packages
Move CEC, EArc and the old "HDMI" package in to one common hdmi package
as cec, earc and connection.

Test: Build
Bug: 261729059

Change-Id: Ic657713e3a4078125e211bb0d337519a9192aaa1
2023-01-09 16:53:02 +05:30
Michal Olech
3cc2a00799 Add CEC AIDL tests to test mapping (presubmit)
Bug: 250526670
Bug: 250526969
Test: acloud create --local-instance --local-image && cd
hardware/interfaces/tv && atest

Change-Id: I8ecdabc0fcfd1d259153e0fd1fa579aca64d9be4
Merged-In: I8ecdabc0fcfd1d259153e0fd1fa579aca64d9be4
2023-01-09 07:04:42 +00:00
Treehugger Robot
6f211b7844 Merge "EARC: Add eARC AIDL files" am: 7fb9baae1c am: 87243fbbd7 am: f3686eba77
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2308889

Change-Id: Ib4f858b958a6eecdb07bf9d0a7eb4bee4758f8c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 05:02:45 +00:00
Treehugger Robot
89f54544f2 Merge "HDMI: Add Hotplug Detection Signal support" am: be1d5356f7 am: ea18f96966 am: aa78792d1c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2297079

Change-Id: I36f4276680d3c60f7ebc4ff6ff27c21893fddbf2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 00:26:24 +00:00
Kensuke Miyagi
73b18ac9ab Enable support for main type cap aware demux management
Adding 3 ITuner.aidl APIs:
 - int[] getDemuxIds();
 - IDemux openDemuxById(in int demuxId);
 - DemuxInfo getDemuxInfo(in int demuxId);

And adding DemuxInfo.aidl.

Bug: 239211919
Bug: 239227510
Test: atest VtsHalTvTunerTargetTest

Change-Id: Icd34cc974a6f6fa167d90b69b3ff0a119bf50ae8
2022-12-30 18:40:07 -08:00
Ray Chin
8a9f53e811 Fix null pointer dereference error for CtsTvTestCases against cf_x86_tv
Bug: 263933383
Test: `atest CtsTvTestCases` against cf_x86_tv-userdebug
Change-Id: Icf4f9909b574f3e6f474fd2bfd3e72f7f290a0fe
2022-12-29 18:15:22 +08:00
Venkatarama Avadhani
90373fe4d6 EARC: Add eARC AIDL files
AIDL files for eARC HAL.

Test: m android.hardware.tv.earc-update-api
      atest VtsHalTvEArcAidlTargetTest
Bug: 240388105
Change-Id: Id2a337b928e64e022d97b4339bf7788cc80ea653
2022-12-27 17:57:32 +05:30
Venkatarama Avadhani
04ee1a4f68 HDMI: Add Hotplug Detection Signal support
The HPD (Hotplug Detection) signal indicates the type of signal that the
HAL should use.

Bug: 258394639
Test: atest VtsHalTvHdmiAidlTargetTest
Change-Id: Ic391064d10636aca3c8e5c256c41d40144fbfe9c
2022-12-27 17:57:31 +05:30
Ray Chin
191f76bb38 Add new DemuxFilterStatus NO_DATA
Bug: 260651195
Test: test on cf_x86_tv-userdebug
Change-Id: I56619579ebf09b49d288254f2d77320cd5575d69
2022-12-20 10:48:44 +08:00
Hongguang Chen
72ec257f8d Merge "Add VVC H266 support in hal layer" 2022-12-02 02:02:17 +00:00
Hongguang Chen
50565f5c97 Merge "Add isLnaSupported in HAL layer" 2022-11-29 16:57:36 +00:00
Treehugger Robot
a160bfa522 Merge "HDMI: Add new field eArcSupported" am: 45661bec3f am: 0c8f94b4ae am: 6b25278ea0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2280731

Change-Id: Ibc78e01bffa090822a087de476c897436ae40f96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 10:47:09 +00:00
Ray Chin
8fe32b2513 Add isLnaSupported in HAL layer
Bug: 239240674
Test: atest android.media.tv.tuner.cts with cf_x86_tv-userdebug
Change-Id: I87aaff87a9ff0d92f4d3895bfe41f5f6fffa1938
2022-11-29 16:42:19 +08:00
Ray Chin
0bfa40f9af Add VVC H266 support in hal layer
Bug: 219981033
Test: atest VtsHalTvTunerTargetTest
Change-Id: I526920099a786d9f12057b76c89562f6ecd483b6
2022-11-22 12:06:48 +08:00
Venkatarama Avadhani
3d35efca19 HDMI: Add new field eArcSupported
Add a new field called eArcSupported to the port info structure to
determine if the port supports eARC.

Bug: 255901009
Test: make
Change-Id: Iff97479010a097018efcd5070c232a69aa1e1c77
2022-11-02 10:16:28 +05:30
Yixiao Luo
4cd52a9768 Fix NativeHandle creation in TV Input HAL 2.0 default implementation
Bug: 227673740
Test: atest VtsHalTvInputTargetTest
Change-Id: Ic2958ab08c14848d46054c8422ce4298903bf206
2022-10-31 16:41:10 -07:00
Henry Fang
d8a70b00c6 Merge "Fix tunerhal vts feId uninitialized on getFrontendIdByType" into android11-tests-dev am: 40087f64c5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2235855

Change-Id: I5984bcb9f4ba77cdd3deba87beaea43aaedd3a72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 17:05:55 +00:00
Henry Fang
40087f64c5 Merge "Fix tunerhal vts feId uninitialized on getFrontendIdByType" into android11-tests-dev 2022-10-25 16:47:05 +00:00
Michal Olech
14cacf2402 Add CEC AIDL tests to test mapping (presubmit)
Bug: 250526670
Bug: 250526969
Test: acloud create --local-instance --local-image && cd
hardware/interfaces/tv && atest

Change-Id: I8ecdabc0fcfd1d259153e0fd1fa579aca64d9be4
2022-10-20 16:00:30 +02:00
Michal Olech
854785a4bd Add CEC AIDL tests to test mapping (presubmit)
Bug: 250526670
Bug: 250526969
Test: acloud create --local-instance --local-image && atest .
Change-Id: Ib63c617e8177c69852cb6ee55549e7fd5196de2e
2022-10-20 12:54:21 +02:00
Treehugger Robot
1d4085ec13 Merge "CEC: Add AIDL interface" am: 2a5c5fc11e am: 20b8f0aa23 am: 5c24fd738c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2106006

Change-Id: I4185c1e6144739ad2810573e6d2d9c6538599bb6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 07:05:09 +00:00
Yixiao Luo
a779a01cb6 Merge "Fix NativeHandle return in TV Input HAL 2.0 default implementation" 2022-10-19 01:28:43 +00:00
Yixiao Luo
e1a730577c Fix NativeHandle return in TV Input HAL 2.0 default implementation
Bug: 227673740
Test: atest VtsHalTvInputTargetTest
Change-Id: I0b18b77c5f3a0b99a1e705ef61d6691f8d33a561
2022-10-18 16:40:14 -07:00
cmlin0118
5b9ba198ec Fix tunerhal vts feId uninitialized on getFrontendIdByType
Problem: FeId uninitialized on getFrontendIdByType
Solution: Initializ feId
Test: run vts -m VtsHalTvTunerV1_0TargetTest
Bug: 248472007
Change-Id: I373c49cf0a105869743be7f2c0737b4f5b30ae26
2022-10-14 14:52:26 +08:00
Venkatarama Avadhani
820b548de9 CEC: Add AIDL interface
Split and convert to AIDL the HDMI CEC HAL into two separate HALs -
CEC and HDMI. CEC handles the CEC messages while HDMI handles the
hotplug and physical ports.
Also add the default and VTS for the two HALs.

Bug: 233026642
Test: m android.hardware.tv.cec-update-api
      make
Change-Id: I67c6d7aeea6922f69a1ffa7acb36c811c80afabf
2022-10-11 10:03:02 +05:30
Treehugger Robot
81022732af Merge "tunerhal:set default frontend to DVBS [1/1]" into android11-tests-dev 2022-09-28 01:54:02 +00:00
Ray Chin
62ab6c9506 Add setStatusCheckIntervalHint method
Bug: 232426514
Test: atest VtsHalTvTunerTargetTest
Change-Id: Icba606f2cd36bb52a48e7fe5798fb8dcc8c2fb0a
2022-09-27 13:09:51 +08:00
junchao yuan
ab5c449227 tunerhal:set default frontend to DVBS [1/1]
bug:239667706

Problem:
test tunerhal vts fail with DVBS;

Solution:
set defualt frontend to DVBS;

Verify:
s905X4/ohm

Change-Id: I79386738783309b917ec5cff89c48b2bdc99bd7c
2022-09-23 01:49:46 +00:00
Yixiao Luo
04a9ed4b79 Merge "Add OWNERS file to TV Input HAL" am: 511538808f am: a8ca4e0c2b am: d510d715e7 am: 8c943a70d3 am: 668d7b8fc9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2189256

Change-Id: I5084c7797c2111167395bf8171446e266f092ec1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-27 00:54:07 +00:00
Yixiao Luo
f8de1e8e49 Merge "TV Input HAL 2.0 VTS" 2022-08-26 23:19:47 +00:00
Yixiao Luo
dc5ed0b53b Merge "TV Input HAL 2.0 default implementation" 2022-08-26 23:19:47 +00:00
Yixiao Luo
29b6721e15 Merge "TV Input HAL 2.0 AIDL interface" 2022-08-26 23:19:47 +00:00
Hongguang Chen
c45168ad17 Merge "Make the default tuner HAL to be a dynamic AIDL" 2022-08-25 20:18:43 +00:00
Lucas Gates
b6d357a1f4 Merge "Tuner HAL Remove Outdated Filter Buffer Comment" 2022-08-25 05:13:01 +00:00
Lucas Gates
ee301e5d50 Tuner HAL Remove Outdated Filter Buffer Comment
The filter BUFFER_SIZE parameter currently contains a
comment stating that changing its size may cause sudden
crashes due to problems with memory management. This
problem has since been found and solved. Since the buffer
size is no longer a likely source of errors, this comment
should be removed.

Test: Comment only change
Bug: 236847284 introduced this comment, 239741712
covered the real root cause

Change-Id: I9344d136c7220f54d8c66dd4f4da68890b841886
2022-08-25 01:43:05 +00:00
Yixiao Luo
ce501336b9 TV Input HAL 2.0 VTS
Initial version, fixed tabs.
Addressed comments.
Updated based on new AIDL interface changes.

Bug: 227673740
Test: VTS
Change-Id: I0b5533ccff8c2c9ab9e0393cadce86b26cfc157b
2022-08-23 18:39:07 -07:00
Yixiao Luo
aaa523018f TV Input HAL 2.0 default implementation
Initial version, fixed tabs.
Addressed comments.
Updated based on new AIDL interface changes.

Bug: 227673740
Test: atest VtsHalTvInputTargetTest
Change-Id: I49af8baa30404700fc38662b813913fe8cf08c0f
2022-08-24 01:31:36 +00:00
Yixiao Luo
2b41ee5263 TV Input HAL 2.0 AIDL interface
Initial version, fixed tabs.
Addressed comments.

Bug: 227673740
Test: atest VtsHalTvInputTargetTest
Change-Id: Id4bc501c4898239bd9325c8688687d95db74cf1d
2022-08-23 17:17:22 -07:00
Hongguang
4a8ac29204 Make the default tuner HAL to be a dynamic AIDL
Add lazy tuner service.
Refine code to allow Tuner reference count to be 0 when no one uses it.

Bug: 236002754
Test: atest VtsHalTvTunerTargetTest on both lazy and normal HALs
Test: atest android.media.tv.tuner.cts on both lazy and normal HALs
Change-Id: I0cc69fe8ffd79a66db00cb72d212c222130629b5
2022-08-23 15:37:21 -07:00
Yixiao Luo
7c22a89d1d Add OWNERS file to TV Input HAL
Bug: 227673740
Test: N/A
Change-Id: I35db194e2597cdd17ecb7b15c5591fb1009e1be8
2022-08-17 18:46:14 -07:00
Frankie Lizcano
bcf4ebbbc2 Tuner HAL VTS: Dynamically Configure LnbDescrambling
This CL allows the vendor to ommit LnbDescrambling from the
configuration file. The VTS will look at the devices configured by the
vendors and automatically configure the dataflows and determine which
tests to run for LnbDescrambling.

Bug: b/240476983

Test: Test: ts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: I003c6405e7fcc4e3494ef976dca83b9f7d6160a6
2022-08-11 18:00:44 +00:00
Frankie Lizcano
82101d2d5b Tuner HAL VTS: Testing LnbDescrambling
This CL implements integration tests for LnbDescrambling. The new
testing function ScrambledBroadcastTestWithLnb tests the functionality
of the Lnb and, if the frontend is not software, tests passing a signal
through the tuner and descrambling a broadcast.

Additionally, this CL adds a context variable to the
ScrambledBroadcastTest function to determine which dataflow
(LnbDescrambling or Descrambling) is being tested. It specializes
behavior differently for each datflow to model real world
use cases. Notably, a Descrambler could be tested with no frontend when
playing back a descrambled recording, whereas testing an Lnb broadcast
would require a hardware frontend.

Bug: b/240476983

Test: ts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: Ia35d2d45dca4411b0a15f0585d6ddaecd3f9321a
2022-08-11 18:00:27 +00:00
Frankie Lizcano
523e5455fd Tuner HAL VTS: Added LnbDescrambling
This CL implements a new dataflow: LnbDescrambling, which aims to test
descrambling a broadcast brought into the tuner with an Lnb attached.
The struct for the configuration and a function to read this dataflow
from the vendor's input file were added. Additionally, the api was
updated to allow the automatic xml parser to read this new dataflow.
Note, no tests were added for this object yet. Those come later in the
chain. The vendor, at this moment, can only harcode this dataflow. It
will be dynamically configurable later in the chain.

Bug: b/240476983

Test: ts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: I545be7d4b2bea0b80a67fd542a80bba7fa38c4ca
2022-08-11 17:59:48 +00:00
Frankie Lizcano
8b87f25f99 Improve Tuner VTS: Generate Live Combos
This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the Live dataflow, and generate
all combinations of units to run them on corresponding integration tests.
Each combination is error checked to ensure they meet the minumum
requirements, and any invalid ones are discared, which may narrow the
combination space immensely.

This CL also adds logic to store IP and PCR filter IDs to include
using them in any configuration combinations. We also pair PCR filters
with audio and video filters if the vendor chooses to provide more than
1, enforcing the invariant that the number of pcr, audio, and video
filters must be equal.  If there is only 1 pcr filters, we default to
use that one.

Bug: b/182519645

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

Change-Id: Icb2d96b32ed7a14b845c752a79744c44fdaf04e3
2022-08-09 23:53:26 +00:00
Frankie Lizcano
9c464f7c5c Improve Tuner VTS: Generate DVR Record Combos
This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the DVR Record dataflow, and runs the
integration tests with all valid combinations.

2 functions were added to help drive the testing logic.
  generateRecordCombinations() generates all valid record dataflow
  configurations, and the integration tests call
  generateRecordCombinations() to analyze whether to generate these
  combinations or use the data flow provided by the vendor (if there is
  one).

Additionally, when dynamically configuring DVR_Record, a bug was exposed
in the VTS that came about from recycling the function
recordSingleFilterTest(). When LnbRecord was initialized with a software
frontend, the VTS was looking to the record dataflow's dvr source for
input. If record is not hardcoded by the vendor, the VTS would crash.

To fix this error, an enum class was added as a parameter to
RecordSingleFilterTest() to take into consideration which dataflow
(lnbRecord or record [no Lnb]) was calling the function. New behavior is
defined to take into account both cases. Also, lnbRecord will not be
tested if there are no hardware frontends, as this is not very likely to
be configured by vendors.

Bug: b/182519645

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

Change-Id: I76c05ca2e33767e4bdcd2072db5144d495d623b0
2022-08-09 20:44:31 +00:00
Frankie Lizcano
0c0695379d Improve Tuner VTS: Generate TimeFilter Combinations
This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the TimeFilter dataflow, and generate
all combinations of units to run them on corresponding integration tests.
Additionally, the configuration file is checked to see if the vendors
provide the dataflow themselves. If not, the combinations are created.

Bug: b/182519645

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

Change-Id: Icdbf8961e9dc06fd979be953027409a0a197cba4
2022-08-04 19:23:58 +00:00
Frankie Lizcano
14aa8484b7 Tuner VTS: Pair Audio and Video Filters
This CL enforces the invariant that vendors provide audio and video
filters in pairs to the Tuner Hal VTS. Thus, the number of each must be
equal. If they do not, the tests are not
ran, and the test suite exits.

Additionally, this CL enforces the assupmtion that vendors will pair
their audio and video filters in the order they are provided, and it
treats the audioFilterIds and videoFilterIds vectors as 2 parallel
structures, where members at the same indicies correspond to a pair.
This is how media filter pairs are chosen when configuring them in the
VTS testing combinations.

Bug: b/182519645

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest. Manual
    tests with different input configuration files.
Change-Id: I74cc059ed610bb08d0929f250f252a16c9f954a8
2022-08-04 19:17:18 +00:00
Frankie Lizcano
d1f520e595 Tuner HAL VTS: LnbLive Test Fix
This CL checks to see if the frontends given in the LnbLive dataflow are
accompanied by a software frontend. If so, these tests are not ran,
because this does not model a real world use case that would be
intentionally configured by a vendor.

Furthermore, the implemented code fixes a bug that would cause the VTS
to crash if the LnbLive tests were ran using a software frontend without
the vendor having configred the Live dataflow. Previously, the
workaround for using a software frontend with an Lnb was to use the dvr
source configured in the live dataflow to simulate input to the frontend.
Now that vendors do not need to provide this in their configuration file
(because it will be automatically generated for them), this access causes
an error that makes the VTS crash. With this new fix, this logic will never be
exectuted, and the VTS will not crash in this case.

Bug: b/240305035

Test: Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest.
Change-Id: I68dc7ff4cfd103a51e3e8d7c6ff787d349a9e241
2022-07-29 18:21:38 +00:00
Frankie Lizcano
8742181688 Tuner HAL VTS: Fix Memory Leak
This CL fixes an issue on the Tuner HAL VTS that lead to a memory leak.
Heap space was allocated to store Lnb Id's for dataflows without being
cleaned using Free(). The fix includes switching to the use of an
integer passed by reference. No heap memory is allocated.

Bug: b/240572001

Test: Test: ts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: I9fcad4c05f548ee4b64cfb34175f34834eec6c56
2022-07-28 17:47:17 +00:00
Frankie Lizcano
81dcde82a8 Merge changes Ic1b9dae6,I470d5931,Ic6756e28,Iba526237,I8e8be258
* changes:
  Improve Tuner VTS: Generate Descrambling Combos
  Improve Tuner VTS: Generate LnbRecord Combos
  Improve Tuner VTS: Generate Scan Combos
  Improve Tuner VTS: Generate LnbLive Combos
  Improve Tuner VTS: Generate DVR Playback Combos
2022-07-25 23:50:44 +00:00
Frankie Lizcano
1c8ba7b8f3 Merge "Improve Tuner VTS: Add DVBS Settings" 2022-07-25 20:38:11 +00:00
Lucas Gates
e1bafc9bc0 Merge "TunerHAL Fix filterDispatcher returning false" 2022-07-25 17:50:42 +00:00
Frankie Lizcano
42caff499e Improve Tuner VTS: Add DVBS Settings
This CL expands the settings and specs that can be added by vendors to
DVBS frontend types. It also updates the value expectations to model the
format present in the other types.

Bug: b/239968750

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: Ifd4a97ce71cfea11e4f5c1293a6342e337cb5699
2022-07-22 20:33:23 +00:00
Frankie Lizcano
d2c09c4703 Improve VTS: Allow Extra Filters for Live and Playback
This CL allows vendors to specify extra filters they would like to
include in the Live dataflow. Note, however, that these filters are not
included in any integration tests yet, as those will come later.

Additionally, this CL cleans up the code originally used to configure
extra filters for DVR playback. It converts the code and API strucutre
to a uniform format consistent with that of other dataflows that allow
extra filters.

Bug: b/239751563

Test: vts-tradefed run vts --module VtsHalTvTunerTargetTest
Change-Id: I662814666873254eff84791b5057da1f44f5e73e
2022-07-21 00:02:35 +00:00
Lucas Gates
11afa26d34 TunerHAL Fix filterDispatcher returning false
The Dvr::startFilterDispatcher method is intended to
call the startFilterHandler method on every filter by using
pass through methods in the Demux. However, the method
currently returns early with a failure (false return value)
whenever isVirtualFrontend and isRecording are both false.
This causes the thread that the method is called from to
immediately log and exit.

This error occurs when the Dvr::startFilterDispatcher
method is called from the Dvr threadloop, but not when it
is called from the Demux threadloop due to their different
parameters. As noted by current bug 239731089, this means
that this error is only exhibited inconsistently due to
a race condition.

Bug: 237718541
Test: Manually using Cuttlefish, as well as VTS. Previous
inconsistent Dvr filtering errors no longer occur.

Change-Id: I677b66bdc0dacf1a7d57bcbd3085ffd6475547dd
2022-07-20 23:56:58 +00:00
Frankie Lizcano
f4e0796ef3 Improve Tuner VTS: Generate Descrambling Combos
This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the Descrambling dataflow, and generate
all combinations of units to run them on corresponding integration tests.
Each combination is error checked to ensure they meet the minumum
requirements, and any invalid ones are discared, which may narrow the
combination space immensely.

Bug: b/182519645

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

Change-Id: Ic1b9dae6b43f8f01bc4e490ef9e910a933562bd2
2022-07-19 20:35:09 +00:00
Frankie Lizcano
ecba02ae0e Improve Tuner VTS: Generate LnbRecord Combos
This CL allows the VTS to read a vendor's configuration file, determine
if the given devices could support the LnbRecord dataflow, and generate
all combinations of units (frontend, record filter, dvr, lnb)
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: I470d593195d3f6e81cea9758b5758ec47ad3d21c
2022-07-19 20:33:13 +00:00
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
Gregory Montoir
9fc37c0d3c Merge "Fix VTS PlaybackDataFlowWithTsVideoFilterTest sometimes failed." into android12-tests-dev am: 14ecb1c6a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2141155

Change-Id: I1e3a07087b606a28c98bd4f61f84d74d99d40931
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 07:45:50 +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
mike liao
a230f3af3d 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-30 16:17:04 +08: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