Commit graph

349 commits

Author SHA1 Message Date
Devin Moore
a8efdb127e Vendor API level 202404 is now frozen
Ignore-AOSP-First: VINTF 202404 Finalization
Bug: 279809333
Test: build
Change-Id: Ie6d38d27a287e258c30516e0030ad8c931d06432
2024-02-20 21:05:23 +00:00
Treehugger Robot
f14f75ab25 Merge "Added config flag test for default bcradio HAL" into main 2024-02-14 22:29:09 +00:00
Weilin Xu
f6a462d9fa Added config flag test for default bcradio HAL
Added unit tests for methods related to config flag in the default AIDL
broadcast radio HAL implementation.

Bug: 316630344
Test: atest DefaultBroadcastRadioHalTestCase
Change-Id: Id42915613f931ebcd40ca05d9534dc087e479461
2024-02-14 13:02:31 -08:00
Treehugger Robot
1fdd38f48e Merge "Migrate bcradio HAL test to new test owner model" into main 2024-02-13 22:41:32 +00:00
Weilin Xu
942eb1cdad Migrate bcradio HAL test to new test owner model
Bug: 324978397
Test: build okay
Change-Id: I9c62d40c590f7c81381cfa9668ae34525308dc1f
2024-02-13 11:58:57 -08:00
Weilin Xu
ed44150e86 Add program list test for default bcradio HAL
Added unit tests for methods related to program list updates
in the default AIDL broadcast radio HAL implementation and the
corresponding mock tuner callback methods.

Bug: 316630344
Test: atest DefaultBroadcastRadioHalTestCase
Change-Id: I0bde2b9cc376315320521a1d13ec521781a77cca
2024-02-12 13:59:15 -08:00
Weilin Xu
382b44d40e Added seek unit tests for default bcradio HAL
Added unit tests for the seek method in the default AIDL broadcast
radio HAL implementation.

Bug: 316630344
Test: atest DefaultBroadcastRadioHalTestCase
Change-Id: Ia82b420f9c1d86125eaf9672715d5391aa14f3e8
2024-02-08 10:53:39 -08:00
Weilin Xu
b5dd5a7362 Add idenfitier iterator test for bcradio HAL utils
Added unit tests for identifier iterator in AIDL broadcast radio
HAL utils library.

Bug: 310708886
Test: atest broadcastradio_utils_aidl_test
Change-Id: I09ea6b73e50edcc4a503758ea1af75b260f426f1
2024-02-06 10:57:40 -08:00
Treehugger Robot
7bce2972f6 Merge "Add bcradio HAL tests to presubmit" into main 2024-02-03 00:13:39 +00:00
Treehugger Robot
13a6753ea3 Merge "Add step and cancel tests for default bcradio HAL" into main 2024-02-02 23:44:58 +00:00
Weilin Xu
8ec8a37f23 Add bcradio HAL tests to presubmit
Bug: 320556913
Test: m -j
Change-Id: I873e48fedecde88e4eaa7adde1a2a33ac0c8465b
2024-02-02 15:03:43 -08:00
Weilin Xu
ed2d124ec1 Add step and cancel tests for default bcradio HAL
Added unit tests for step and cancel methods in the default AIDL
broadcast radio HAL implementation.

Bug: 316630344
Test: atest DefaultBroadcastRadioHalTestCase
Change-Id: I83b7e9321ebd8bad1eb035d4f23bedce47712511
2024-02-02 14:32:31 -08:00
Treehugger Robot
082411ee97 Merge "Add tests for comparator in AIDL bcradio HAL utils" into main 2024-02-01 19:35:14 +00:00
Weilin Xu
6519fd8ce9 Merge "Add tests for isValid methods bcradio HAL utils" into main 2024-01-23 20:54:02 +00:00
Weilin Xu
ffe00b7fb8 Add tune test for default bcradio HAL
Added unit tests for tune method in the default AIDL broadcast radio
HAL implementation.

Bug: 316630344
Test: atest DefaultBroadcastRadioHalTestCase
Change-Id: I62c6ca088c8797fe6c3e9ea1d1fe76d5d7aa5c23
2024-01-22 16:02:51 -08:00
Weilin Xu
278da2e0d3 Merge "Add tests for tunesTo in AIDL bcradio HAL utils" into main 2024-01-19 22:02:22 +00:00
Weilin Xu
b61ee9eb39 Add tuner callback for default bcradio HAL
Implemented mocked tuner callback and added unit test for getting
and setting the default broadcast radio HAL implementation.

Bug: 316630344
Test: atest DefaultBroadcastRadioHalTestCase
Change-Id: I4d41746f7725a79a8d398a1fb798fbc7cab94e09
2024-01-18 17:44:41 -08:00
Weilin Xu
86883f2b54 Add tests for comparator in AIDL bcradio HAL utils
Added unit tests for comparators of program selector and program
info in utils library for AIDL broadcast radio HAL.

Bug: 310708886
Test: atest broadcastradio_utils_aidl_test
Change-Id: I1a46196f183cb6a0a45342f3bb379900fd049f32
2024-01-17 10:45:25 -08:00
Weilin Xu
a8b00cad62 Add tests for isValid methods bcradio HAL utils
Added unit tests for isValid methods in utils library for AIDL
broadcast radio HAL.

Bug: 310708886
Test: atest broadcastradio_utils_aidl_test
Change-Id: I0ff19d624f83e48789142a5cba48b9c896dc4204
2024-01-17 10:44:13 -08:00
Weilin Xu
d1b814885f Add tests for tunesTo in AIDL bcradio HAL utils
Added unit tests for tunesTo method in utils library for AIDL
broadcast radio HAL.

Bug: 310708886
Test: atest broadcastradio_utils_aidl_test
Change-Id: Id69467fdb873cd42f8a875bbd26155bb261d9481
2024-01-17 10:12:17 -08:00
Weilin Xu
7b1e7ce836 Merge "Add test mapping for bcradio HAL" into main 2024-01-17 17:16:09 +00:00
Weilin Xu
92f32b0de8 Add test mapping for bcradio HAL
Bug: 320556913
Test: m -j
Change-Id: I35689fdcc1377040b4e1ae5a046694b9f9d1efb6
2024-01-16 16:23:30 -08:00
Weilin Xu
4a67014830 Merge "Add tests for generic bcradio HAL utils methods" into main 2024-01-16 22:13:45 +00:00
Weilin Xu
ff28474bd5 Merge "Add metadata format check in bcradio VTS" into main 2024-01-16 21:33:06 +00:00
Weilin Xu
f4cfe19efd Add tests for generic bcradio HAL utils methods
Added unit tests for generic methods in utils library for AIDL
broadcast radio HAL.

Bug: 310708886
Test: atest broadcastradio_utils_aidl_test
Change-Id: I968d43c82cd5f9179a63438845dfa167bc30f2cc
2024-01-16 13:22:12 -08:00
Weilin Xu
9eb515c286 Merge "Don't mark SAT/DT as failures" into main am: c22a8ddcb5 am: 0e66031666 am: 928ae6caaf
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2907438

Change-Id: I14ad9c88f8717b284491d1410e694c364db5606c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-13 01:30:00 +00:00
Weilin Xu
2f1dd4cda8 Add metadata format check in bcradio VTS
Added metadata format check in AIDL broadcast radio HAL VTS.

Bug: 318868350
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: I47cdb178e76173941682fd8594fe9da13d661a1b
2024-01-12 15:17:14 -08:00
Weilin Xu
67e83a3c06 Add format check utils method for bcradio metadata
Added format check method for AIDL broadcast radio HAL metadata in
AIDL utils library. Also corrected local variable name in
getMetadataString method.

Bug: 318868350
Test: atest broadcastradio_utils_aidl_test
Change-Id: I8220e2845143931e99b4e4da0e07c9cae585588e
2024-01-12 15:15:27 -08:00
V,Anilkumar
86f31e76b0 Don't mark SAT/DT as failures
If SAT/DT is not supported, should be marked as
ignored but they are marked as failures.
If no support for SAT/DT the implementation returns INVALID_ARGUMENTS
and test is calling the printSkipped function.
Instead of calling printSkipped, if GTEST_SKIP() called
unsupported TC results are parsed properly and test cases will move
to ignored category

Bug: 191229970
Test: VtsHalBroadcastradioV1_0TargetTest

Signed-off-by: V,Anilkumar <anilkumar.v@intel.com>
Change-Id: I4ed7828757a6cc8b83bae989e11289da1a3e814f
2024-01-12 19:31:12 +00:00
Weilin Xu
6633a85732 Add DAB unit test for bcradio utils lib
Added unit tests for utils method related to DAB radio in AIDL broadcast
radio utils library.

Bug: 310708886
Test: atest broadcastradio_utils_aidl_test
Change-Id: I7c7333c11898665ae7e5184bd3022a7019f862ca
2024-01-10 12:49:25 -08:00
Weilin Xu
aeba4a25d5 Merge "Add unit tests for default bcradio HAL" into main 2024-01-10 18:23:19 +00:00
Weilin Xu
2cd50c3199 Merge "Update metadata doc for AIDL 2 bcradio HAL" into main 2024-01-09 01:45:18 +00:00
Weilin Xu
1ccbbd9262 Update metadata doc for AIDL 2 bcradio HAL
Change "must be up to" to "should be <=" in Metadata of broadcast radio
HAL definition so that the format for metadata types is clear.

Bug: 318763229
Test: m -j
Change-Id: Ibd54988587170f2c20f7770be0f8376d9be2d3b2
2024-01-09 00:59:01 +00:00
Weilin Xu
82f17d9ed4 Fix timeout issue for bcradio worker thread
Accessed mIsTerminating inside the same lock as what is used in while
loop in worker thread class of broadcast radio HAL utils lib. This fixed
the race condition that mIsTerminating is accessed as true in threadLoop
while the destructor is setting mIsTerminating as false, which causes the
thread waits forever for lock after lock is released in the desctructor.

Bug: 314100017
Test: atest VtsHalBroadcastradioAidlTargetTest WorkerThreadTest
Change-Id: I885e1487ac39525fc2d1ee2134d24409264ca0fc
2024-01-08 16:48:18 -08:00
Treehugger Robot
f162180e87 Merge "Add AM/FM/HD unit test for bcradio utils lib" into main 2024-01-02 18:55:37 +00:00
Weilin Xu
e3b5cdade1 Add unit tests for default bcradio HAL
Added unit test for the default broadcast radio HAL implementation.

Bug: 316630344
Test: atest DefaultBroadcastRadioHalTestCase
Change-Id: I2dac3ff4611fde3836c5235c50057c4f117a62e0
2023-12-19 12:46:30 -08:00
Weilin Xu
ef98134aae Add AM/FM/HD unit test for bcradio utils lib
Added unit tests for utils method related to AM, FM and HD radio
in AIDL broadcast radio utils library.

Bug: 310708886
Test: atest broadcastradio_utils_aidl_test
Change-Id: I2ba334bb5c0e76cd7fa3b31e79d310bf2a8fa0c2
2023-12-18 20:05:42 -08:00
Weilin Xu
c3301598ec Use GTEST_SKIP in bcradio AIDL HAL VTS
Use GTEST_SKIP in bcradio AIDL HAL VTS so that the tests with
assumption failed are ignored instead of passed.

Bug: 315344807
Test:  atest VtsHalBroadcastradioAidlTargetTest

Change-Id: Ie170b9ed301f0183e8a4b83e53160674b900b658
2023-12-13 13:13:21 -08:00
Weilin Xu
aba14a2412 Fix HD tune test in bcradio VTS
Bug: 315206962
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: Icfdc9af0a18896d6b60900015c9e2063774dff7d
2023-12-13 13:11:22 -08:00
Weilin Xu
a7cc8a9acd Define customized program selector/info comparator
Define customized comparators for program selector and program info
in broadcast radio AIDL HAL utils library, which can be used to
sort program list by the order of frequency in HAL implementation of
devices other than emulator.

Bug: 315389663
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: Ie8de342f3c123d896589751a6244f871ee07eb81
2023-12-11 12:45:11 -08:00
Weilin Xu
3bab613b4a Add HD radio tune VTS
Bug: 315206962
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: I04f3f5c0e98d5c4a6d018805001809b3a23fa08a
2023-12-08 16:41:29 -08:00
Weilin Xu
90e39f542d Improve DAB radio support in refrence bcRadio HAL
Improved DAB radio support in the reference implementation for AIDL
broadcast radio HAL. Used real DAB service ID, ECC code, freuqnecy
and ensemble values for virtual DAB stations and implemented sub-channel
support for DAB radio.

Bug: 309693129
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: I6a78794e16400f05c6d7c5ec99aa4978adca5b58
2023-11-29 21:26:50 -08:00
Weilin Xu
7991996514 Implement HD signal acquisition state in radio HAL
Implemented HD signal acquisition status change using program info flag
in the reference broadcast radio HAL.

Bug: 309694368
Test: seek/tune to an HD radio station in radio KS app
Change-Id: Ibde570429d4c21b2f894f8658de1b37001541f3a
2023-11-29 21:26:27 -08:00
Weilin Xu
4833896a0d Separate AM/FM band in default radio HAL
Separated AM/FM band so that seeking should loop within the band of
the current program info in default AIDL broadcast radio HAL
implementation. Also updated program list by tuner callback when the
AM/FM band is switched.

Bug: 309694368
Test: switch to AM and do not see FM stations in program list in radio KS app
Test: seek in FM band and do not jump any AM stations in radio KS app
Change-Id: Ia4618232d8726f2d779ac2ec87f169b0263ee979
2023-11-21 15:11:44 -08:00
Weilin Xu
39dd0f832b Add mock HD programs to default AIDL bcradio HAL
Added mocked HD radio programs and HD radio tune/seek/step support with
subchannel in the default AIDL broadcast radio HAL implementiation.

Bug: 309694368
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: Id0ba9b127860d98822e9102ba48d913dc38cade1
2023-11-20 19:50:58 -08:00
Weilin Xu
ee546a6300 Fix missing return in default AIDL radio HAL Impl
Bug: 310027894
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: Iea97042e553ddc2c3a20db189077ca4a41200c89
2023-11-15 13:14:58 -08:00
Weilin Xu
31c541c228 Upgrade default bcRadio AIDL HAL impl to version 2
Bug: 280300929
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: I4bc9b24bf421bad8d980de2c82434abdf7cae74c
2023-10-30 16:02:24 -07:00
Weilin Xu
25409e5b6b Refactor utils and VTS for HD radio HAL support
Refactored AIDL broadcast radio HAL utils library to both support
version 2 HAL and guarantee backward compatibility for version 1 HAL
implementation using version 1 utils lib. Updated VTS to support HAL
of both AIDL versions.

Bug: 280300929
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: I31e631c794f51c8df230b984837dfb4299864e5c
2023-10-30 16:02:13 -07:00
Weilin Xu
95f187b588 Improved HD radio support in broadcast radio HAL
Added identifier types, program info flags and metadata needed for
HD radio in AIDL broadcast radio HAL. Depracated SXM identifier
types since SXM is not supported.

Bug: 280300929
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: I822b43e6452c308db1259b99b961378c14c8b294
2023-10-30 11:15:55 -07:00
Steven Moreland
50f1040abc broadcast radio fuzzer: remove vendor
This fuzzer was crashing immediately due to a
hermeticity issue where a vendor variant of libbinder
was used underneath libbinder_ndk (b/307611931).

Now, it is hanging in ~WorkerThread.

Fixes: 307611931
Test: run fuzzer
Change-Id: Iba16c6eefeb508e41951ba9f5b3e4fc7e2fc3457
2023-10-24 23:40:26 +00:00