Commit graph

691 commits

Author SHA1 Message Date
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
Hongguang
d99c82dc5c Support not tuned PLP info query.
Bug: 209762260
Test: atest VtsHalTvTunerTargetTest
Change-Id: Iefc02ae7f4145cfabae8c5a5d60f28ef02ec9bc0
2022-01-13 15:08:16 -08:00
Kensuke Miyagi
efbebcdf45 Merge "Enable LnbCallback in hidl/aidl default tuner implementation" 2022-01-13 05:06:48 +00:00
Hongguang
e106f475b6 Add API to filter out unnecessary PIDs from frontend output.
Bug: 213287138
Test: atest VtsHalTvTunerTargetTest
Change-Id: I075d68d722b2804f54d57a1ac9c350e2a9724ae3
2022-01-11 12:16:13 -08:00
Hongguang
494ba666ac Add CRC32 checking hint.
Bug: 172985025
Test: atest VtsHalTvTunerTargetTest
Change-Id: Ie26cfee7ba0254fe20e485cd173e65d391f7a254
2022-01-10 11:24:51 -08:00
Hongguang Chen
63253c7fb2 Merge "Support enable/disable Frontends." 2022-01-04 22:39:32 +00:00
Hongguang
5766ddfaca Support enable/disable Frontends.
Bug: 210199978
Test: atest VtsHalTvTunerTargetTest
Change-Id: I08411ef92d83be6623ed60565d65d6e9093405ad
2021-12-27 19:15:10 -08:00
Patrick Rohr
2b0e9ee4ac Fix time measurement in FilterDelayHintTest
The startTime needs to be set before setting the delayHint timeout as
that is when the callback scheduler's clock start ticking.

In addition, we need to await the first callback before starting the
test to make sure the scheduler thread has been run at least once (so
the timeout should be initialized correctly).

Test: atest TunerFilterAidlTest#FilterDelayHintTest
Bug: 210943300
Change-Id: I0b2443f3e7d33977fb6666ba09d3ff51d8b1f152
2021-12-27 14:25:15 +01:00
Hongguang
6c09bff372 Put tuner scan handling to a thread.
Bug: 210747502
Fix: 210747502
Test: atest android.media.tv.tuner.cts on AIDL and HILD HALs.
Test: atest VtsHalTvTunerTargetTest
Test: atest VtsHalTvTunerV1_1TargetTest
Test: atest VtsHalTvTunerV1_0TargetTest
Change-Id: Iead93df1dc09ef2a047893037ad2345ad4183b1e
2021-12-23 21:43:16 +00:00
TreeHugger Robot
4caf79c5ae Merge "Add new features to tuner AIDL HAL." 2021-12-23 08:04:12 +00:00
Hongguang
7eda78274c Support DVB-T Cell Ids.
Bug: 210358443
Test: atest VtsHalTvTunerTargetTest
Change-Id: I36a61a78e919c036cde5ea24634eed28d7eb4e5d
2021-12-20 18:32:04 -08:00
Treehugger Robot
4cdc4f20b7 Merge "VTS: fix some logic errors for tuner HAL vts [1/1]" into android11-tests-dev am: 0638fc1ede
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1919318

Bug: 208191849
Change-Id: Ida7b10a22c9c72ac9bc0fffc97750aaf27860fd7
2021-12-20 19:52:32 +00:00
TreeHugger Robot
0a5a431d31 Merge "Section filter isRepeat clarification." 2021-12-17 01:12:34 +00:00
Hongguang
a2c195d5e0 Section filter isRepeat clarification.
Bug: 210999986
Test: make
Change-Id: I07fdd17a3c9d4f573f92ced6b89b7ab4bb570948
2021-12-16 23:33:01 +00:00
Kensuke Miyagi
afe17c5093 Enable LnbCallback in hidl/aidl default tuner implementation
Bug: 210960436
Test: cts.TunerTest#testLnbAddAndRemoveSharee
Change-Id: I11443144dcd1979afe9b077c446faaa293ccb61c
2021-12-16 13:57:10 -08:00
Hongguang
fcedda02cc Add new features to tuner AIDL HAL.
*) Adding key frame info (ScIndexMask) to DemuxFilterMediaEvent.
*) Add more AAC formats.
*) Support dumping frontend hardware information.
*) Move LNA from IFrontend to ITuner.

Bug: 202978951
Bug: 205265630
Bug: 184017033
Bug: 203623028
Test: atest VtsHalTvTunerTargetTest
Change-Id: I8256da7f41c96d7de66d2796dd35c51637078da0
2021-12-15 16:02:32 -08:00
Hongguang
5e86eed7df Update some comments for tuner AIDL HAL.
*) Clarify the meaning and unit of FrontendStatus.
*) Add comment for STC ready support.
*) Support for control signal (e.g. TMCC) change monitoring

Bug: 183634950
Bug: 202247846
Bug: 183630794
Test: Make
Change-Id: I3c48993c354e865b0edfe56adbd34c7fce120efc
2021-12-15 22:26:48 +00:00
TreeHugger Robot
be94a3fcd4 Merge "Add new features to tuner HAL." 2021-12-14 09:24:54 +00:00
Hongguang
2ecfc3989d Add new features to tuner HAL.
*) Add DTS info to DemuxFilterMediaEvent.
*) Allow to ignore download Id in DemuxFilterDownloadSettings and put
download id into DemuxFilterDownloadEvent.
*) Support dumpsys.
*) Change section data size 64 bits.
*) Support FrontendStatus streamIdList.

Bug: 183583908
Bug: 183024067
Bug: 184017033
Bug: 203181023
Bug: 171540818
Test: atest VtsHalTvTunerTargetTest
Test: atest android.media.tv.tuner.cts
Test: dumpsys android.hardware.tv.tuner.ITuner/default
Change-Id: I7478d008fc50da6700c551ae398dca15f8b350be
2021-12-08 17:51:46 +00:00
Patrick Rohr
1586d21f64 Add VTS for FilterDelayHint
The VTS can be configured by adding timeDelayInMs and dataDelayInBytes
attributes to the VTS configuration's filter tags (as long as the filter
is not a media filter (media filters do not support FilterDelayHints)).

In order to circumvent a FilterDelayHint race condition around
configuring the hint (where the internal condition variable is notified
when the delay hint changes. If the scheduler thread has not been
scheduled to run before adjusting the delay hint, and callbacks are
added right after, they are always sent out immediately (as the cv predicate
still returns true when it is first evaluated after adjusting the delay)).

Test: atest VtsHalTvTunerTargetTest
Test: atest android.media.tv.tuner.cts
Bug: 183057734
CTS-Coverage-Bug: 209593343
Change-Id: I1b0893afce262b18ee385ec0f384e6ceebf58c7d
2021-12-08 14:16:10 +01:00
Patrick Rohr
892366fe60 fix tuner filter callback scheduler
This fixes multiple issues in filter callback scheduler:
- currently, when mDataSizeDelayInBytes is 0, filter events are sent
every time onFilterEvent is called. When mTimeDelayInMs is set (to
something else than 0), this will falsely override the time delay.
- when datasize delay or time delays are updated, the cv needs to be
notified so the new delay goes into effect right away.
- std::condition_variables *must* make use of a shared variable in order
to prevent lost and spurious wakeups.

Test: atest VtsHalTvTunerTargetTest
Bug: 183057734
Change-Id: I9fb4e87e8ba887f0ce891ccb9981bfa49a3ceada
2021-11-29 19:02:12 +01:00
Patrick Rohr
0b85b97213 fix filter event creation
Change I154eb05bc419f827008161f85a6304a8599dc399 was incomplete and
caused some filter events to not be produced anymore. This change fixes
that issue and moves to a cleaner (and clearer!) way of creating filter events.
Note: Change I154eb05bc419f827008161f85a6304a8599dc399 did not break
VTS which is problematic.

Test: atest VtsHalTvTunerTargetTest
Bug: 183057734
Change-Id: Id018c33c16c07a9dd9de725aea64207008d317b3
2021-11-29 19:02:12 +01:00
Patrick Rohr
6e6a0b04fd fix mFilterEvents locking
mFilterEventsLock was not always being held when mFilterEvents is
modified.

Test: atest VtsHalTvTunerTargetTest
Bug: 183057734
Change-Id: I5b6bdb3bb8674d6da89665182ce1694f04dc64b2
2021-11-29 19:02:12 +01:00
Hongguang Chen
77251cf798 Merge "Add some new features to tuner AIDL HAL." 2021-11-24 01:48:29 +00:00
TreeHugger Robot
7b03aa95c6 Merge "Add VTS for Filter TimeDelayHint" 2021-11-22 20:51:19 +00:00
Patrick Rohr
149b087169 Add VTS for Filter TimeDelayHint
Test: atest VtsHalTvTunerTargetTest
Bug: 183057734
Change-Id: I4a97d81c0100ca4114353ed84335fc1593bff800
2021-11-22 18:26:02 +01:00
Hongguang
16dacc10b6 Add some new features to tuner AIDL HAL.
*) Allow section filter version to be optional.
*) Add separate DemuxScAvcIndex for the AVC.
*) Support for secure MediaFilter buffer configuration.
*) Remove duplicated UNDEFINED and NONE from DemuxRecordScIndexType.

Bug: 191825295
Bug: 204807405
Bug: 204178547
Test: atest VtsHalTvTunerTargetTest
Test: atest android.media.tv.tuner.cts
Change-Id: I34af9483b3496099a159ae22360415740dd792c1
2021-11-18 20:37:05 -08:00