Commit graph

653 commits

Author SHA1 Message Date
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
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
TreeHugger Robot
d709be7d8c Merge "Add blindScan condition to blindScan test" 2021-11-16 20:03:56 +00:00
ming.lo
d4c22d8e55 Add blindScan condition to blindScan test
Bug: 203389496
Test: Tested by partners
Change-Id: If44df620ab90b5b0247fbee15e2b2a57e27683b5
2021-11-16 10:53:38 -08:00
Hongguang
ad63be13cf Restart media.tuner when tuner HAL is restarted.
Bug: 206042321
Test: Kill tuner HAL and check media.tuner
Change-Id: I527a5b517042494140af9d6e0e671d07f996ff78
2021-11-13 00:15:45 +00:00
Hongguang
3d17d7d5b4 Flush events before stopping filter.
All the filter events in scheduler should be cleaned before stopping.
Sending events after stopping may cause problems if frameworks has
release some references.

Bug: 205763272
Test: atest VtsHalTvTunerTargetTest
Test: atest android.media.tv.tuner.cts
Change-Id: I2d3875b348035e14314034ff90aa8c066108affe
2021-11-11 14:20:29 -08:00
TreeHugger Robot
dd8ae189ce Merge "add note to FilterDelayHint" 2021-11-08 16:46:23 +00:00
Patrick Rohr
7ddf1046cc clean up notification of FilterCallbackScheduler when stopping
I am adding two minor tweaks to change
I2b9d45fa7df3f2490893cc24d98c0e0baaaf0c2c which notifies the condition
variable when trying to join the thread:
    1. the mutex lock does not need to be held to notify the condition
    variable.
    2. adding isRunning check to existing if condition in
    threadLoopOnce to condense the code.

Bug: 183057734
Test: atest android.media.tv.tuner.cts
Change-Id: Ia35e645bddd5005218e8e017a22b87b349997658
2021-11-08 14:41:00 +00:00
Patrick Rohr
0d3ff43405 add note to FilterDelayHint
FilterDelayHints are not supported for media events.

Bug: 183057734
Test: TreeHugger
Change-Id: I71cf3dd23c864e6aac2f350bea1d597e93753d82
2021-11-05 10:17:32 +01:00
Hongguang
74bc43bdc2 Notify FilterCallbackScheduler to wake up it while stopping.
Bug: 183057734
Test: atest android.media.tv.tuner.cts
Change-Id: I2b9d45fa7df3f2490893cc24d98c0e0baaaf0c2c
2021-11-05 00:02:36 +00:00
Hongguang Chen
bdd3958912 Merge "Add ISDB-T Multi-Layer Support." 2021-11-04 21:29:23 +00:00
TreeHugger Robot
05c7eced95 Merge changes I03f744b2,I154eb05b
* changes:
  remove dead code from FilterTests
  add filter delay hint default implementation
2021-11-04 17:42:46 +00:00
Patrick Rohr
1030b6dcdc remove dead code from FilterTests
Test: atest VtsHalTvTunerTargetTest
Change-Id: I03f744b28367fa5cd8850f1f721bd1c73b5c77e5
2021-11-04 15:43:32 +01:00
Patrick Rohr
1ac8d4a6df add filter delay hint default implementation
Adds a event buffering / scheduling mechanism that is configured using
the delay hint.

Bug: 183057734
Test: atest VtsHalTvTunerTargetTest
Change-Id: I154eb05bc419f827008161f85a6304a8599dc399
2021-11-04 15:43:32 +01:00
Hongguang
788284fb57 Add ISDB-T Multi-Layer Support.
Because ISDB-T has up to three layers
(1) It is necessary to be able to obtain the hierarchical structure and
information of each hierarchy by getFrontendStatus. Various transmission
parameters, partial reception flags, error states at each level, etc.
(2) It is necessary to be able to set the transmission parameters of
each layer at the time of request. Various transmission parameters and
partial reception flags.

Bug: 171537116
Test: atest VtsHalTvTunerTargetTest
Test: atest android.media.tv.tuner.cts
Change-Id: I9a4b2296b83d97dcea5806f464ccf50885829f76
2021-11-02 14:45:12 -07:00
Nathalie Le Clair
e8e607e7f9 Merge "CEC: Add support for multiple ports to default HdmiCec" am: 63a8152f8e am: bfd12e9bf5 am: db777a32de am: 482a869a8e am: bed065db43
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1773889

Change-Id: I0c328b758fcdb2f3cddb5789b446a5125d772f10
2021-11-02 18:26:21 +00:00
Nathalie Le Clair
031bdef8a5 Merge "CEC: Add implementation of SYSTEM_CEC_CONTROL option to default HdmiCec" am: 3f3e91faa9 am: abb6a8067b am: 1296b84014 am: 0a3de30dce am: a1803dbd83
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1772433

Change-Id: I0930b639e0bd0360ee969d9a44059fd832315038
2021-11-02 18:26:04 +00:00
Nathalie Le Clair
a0ba3a5b66 Merge "CEC: Refactor HdmiCecDefault class" am: a2b3a8ffca am: 4e169ac218 am: 9dcb8e29b4 am: 23c5235371 am: 936af16a1a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1833914

Change-Id: I6094e3389b2451266b9af688433868d906676481
2021-11-02 18:24:55 +00:00
Nathalie Le Clair
db777a32de Merge "CEC: Add support for multiple ports to default HdmiCec" am: 63a8152f8e am: bfd12e9bf5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1773889

Change-Id: I66714a05753aeea2f2fcc17c5605f387c6662947
2021-11-02 17:48:22 +00:00
Nathalie Le Clair
1296b84014 Merge "CEC: Add implementation of SYSTEM_CEC_CONTROL option to default HdmiCec" am: 3f3e91faa9 am: abb6a8067b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1772433

Change-Id: Id140ea6b62689eb8cac5d5f3822aa6ea31b7ddf5
2021-11-02 17:48:14 +00:00
Nathalie Le Clair
9dcb8e29b4 Merge "CEC: Refactor HdmiCecDefault class" am: a2b3a8ffca am: 4e169ac218
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1833914

Change-Id: I2bcfdc24141142657b6e1a2694f6069797223239
2021-11-02 17:48:00 +00:00
Patrick Rohr
6a4e929c1c add filter delay hint
Test: TreeHugger
Bug: 183057734
Change-Id: Ifcff75b0d46661678bce79d5587c898a2348c2dc
2021-10-28 19:45:43 +02:00
Gareth Fenn
53ae3838d5 Fix TunerHAL deadlock issue
testRecordOutput() holds msgLock preventing record thread from progressing
  Calls to stopRecordThread() block forever
  Therefore remove the calls to stopRecordThread()
Fix mDataOutputBuffer copy size
Fix getCiCamInfo config

Bug: 201556155
Test: VtsHalTvTunerV1_{0,1}TargetTest on BCM device
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
Change-Id: I7faeed032281b58fdc3361f297cb541491c4049d
2021-10-19 12:37:43 -07:00
Gareth Fenn
282fb370ab TunerHAL fixes
TunerHAL expects Hz
Fix stopRecordThread race
Push segment000000.ts to device
getFrontendIdByType() should return INVALID_ID when no FE found

Bug: 201556155
Test: VtsHalTvTunerV1_{0,1}TargetTest on BCM device
Change-Id: Idab6817e47f3e10f07a36a8b2fd805336b9f0e5d
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
2021-10-19 12:34:22 -07:00
Shraddha Basantwani
65165d5b94 CEC: Add support for multiple ports to default HdmiCec
Bug: 185434120
Test: manual
Change-Id: I4e1a1f2ff7cb4530e8b223169d8efd452412089b
2021-10-19 11:11:50 +05:30
Shraddha Basantwani
9fb5e8232e CEC: Add implementation of SYSTEM_CEC_CONTROL option to default HdmiCec
SYSTEM_CEC_CONTROL is updated when system goes into or comes out of
standby mode.
When set to true, Android system is handling CEC commands.
When set to false, microprocessor is handling CEC commands.

Bug: 185434120
Test: manual
Change-Id: I0fbb13a65639508634c6c163b5eaed1885f9e127
2021-10-18 18:12:37 +05:30
Shraddha Basantwani
dedd40e3e8 CEC: Refactor HdmiCecDefault class
Use class member variables instead of global variables
Remove struct keyword since it is redundant
Replace property_get_int32 usage with libbase API

Bug: 185434120
Test: manual
Change-Id: Ide477efd0f1d65bb684993aff783447adbe43aed
2021-10-18 18:12:36 +05:30
Hongguang
76ca9a880e Stop current tuning before starting a new tuning.
If a new tuning request comes before stop old tuning, there is race
condition that the Frontend loop thread may crash while terminate().

Bug: 202335601
Fix: 202335601
Test: atest android.media.tv.tuner.cts
Change-Id: Ic168b585f0a8fe36bd8eeceee3e0b4c83d5388aa
2021-10-07 12:43:58 -07:00
Pierre Couillaud
626bb861e7 Fix closure of record thread am: f8a4e2ae3a am: 13a2db008e
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15698544

Change-Id: Iaa9df7ee2817296bd3a4b11c659cc07d01504b4d
2021-09-15 23:07:13 +00:00
Pierre Couillaud
f8a4e2ae3a Fix closure of record thread
Bug: 197763854
Fix: 197763854
Change-Id: I8c3e843ddac6ad77aecaca7c91f0884204145ee6
2021-09-15 17:49:00 +00:00
Treehugger Robot
bef23cceeb Merge "Adding OWNERS for CEC HAL" am: 52f4717d0e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1816196

Change-Id: Icc18218ba1422e956a4ed039939ad1359092e544
2021-09-06 12:13:11 +00:00
Nathalie Le Clair
4fc4870973 Adding OWNERS for CEC HAL
Bug: 185434120
Test: none

Change-Id: Ie475d581a7e703f9f82a7afb9188c9a2c789189b
Merged-In: Ie475d581a7e703f9f82a7afb9188c9a2c789189b
2021-09-01 15:50:00 +00:00
Pierre Couillaud
d73352eab9 Fix closure of record thread
Bug: 197763854
Fix: 197763854
Change-Id: I8c3e843ddac6ad77aecaca7c91f0884204145ee6
2021-08-27 17:18:20 -07:00
Hongguang
901aa7b754 Refine tuner aidl hal threads.
Bug: 197763854
Test: VtsHalTvTunerTargetTest
Test: atest android.media.tv.tuner.cts
Test: sampletunertvinput
Change-Id: Id707438178ed93731919f0155cab805436147f86
2021-08-26 13:07:09 -07:00
Hongguang
11da2cb5f7 Adjust tuner default implementation and VTS types size.
Bug: 195693712
Test: atest VtsHalTvTunerTargetTest
Test: atest android.media.tv.tuner.cts
Change-Id: Ie9d20c74b05ecc10333ca883fe38d26d78f33949
2021-08-16 17:33:24 -07:00
Hongguang
22122b3014 Adjust some tuner aidl types size to align with frameworks.
Bug: 195693712
Test: atest VtsHalTvTunerTargetTest
Change-Id: Ia558614759928579bda7dd8e88f5e3fb538bf412
2021-08-16 16:32:33 -07:00
Hongguang Chen
ff2c6b0d85 Add init() to avoid crash when creating ref in constructor.
This reverts commit 50899fb269.

Bug: 195717690
Fix: 195717690
Test: atest VtsHalTvTunerTargetTest
Change-Id: Icae435f1166e6cf2e2f235979e3d1d37d182d517
2021-08-09 15:41:50 -07:00