Loading broadcastradio/1.1/default/BroadcastRadio.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,16 @@ Return<void> BroadcastRadio::getProperties_1_1(getProperties_1_1_cb _hidl_cb) { prop10.numAudioSources = 1; prop10.supportsCapture = false; prop11.supportsBackgroundScanning = false; prop11.supportedProgramTypes = vector<uint32_t>({ static_cast<uint32_t>(ProgramType::AM), static_cast<uint32_t>(ProgramType::FM), static_cast<uint32_t>(ProgramType::AM_HD), static_cast<uint32_t>(ProgramType::FM_HD), }); prop11.supportedIdentifierTypes = vector<uint32_t>({ static_cast<uint32_t>(IdentifierType::AMFM_FREQUENCY), static_cast<uint32_t>(IdentifierType::RDS_PI), static_cast<uint32_t>(IdentifierType::HD_STATION_ID_EXT), static_cast<uint32_t>(IdentifierType::HD_SUBCHANNEL), }); prop11.vendorExension = "dummy"; prop10.bands.resize(mConfig.amFmBands.size()); Loading broadcastradio/1.1/types.hal +23 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,29 @@ struct Properties { */ bool supportsBackgroundScanning; /** * A list of supported ProgramType values. * * If a program type is supported by radio module, it means it can tune * to ProgramSelector of a given type. * * Support for VENDOR program type does not guarantee compatibility, as * other module properties (implementor, product, version) must be checked. */ vec<uint32_t> supportedProgramTypes; /** * A list of supported IdentifierType values. * * If an identifier is supported by radio module, it means it can use it for * tuning to ProgramSelector with either primary or secondary Identifier of * a given type. * * Support for VENDOR identifier type does not guarantee compatibility, as * other module properties (implementor, product, version) must be checked. */ vec<uint32_t> supportedIdentifierTypes; /** * Opaque vendor-specific string, to be passed to front-end without changes. * Format of this string can vary across vendors. Loading broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,8 @@ void BroadcastRadioHalTest::SetUp() { ASSERT_TRUE(propResult.isOk()); EXPECT_EQ(radioClass, prop10.classId); EXPECT_GT(prop10.numTuners, 0u); EXPECT_GT(prop11.supportedProgramTypes.size(), 0u); EXPECT_GT(prop11.supportedIdentifierTypes.size(), 0u); if (radioClass == Class::AM_FM) { EXPECT_GT(prop10.bands.size(), 0u); } Loading Loading
broadcastradio/1.1/default/BroadcastRadio.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,16 @@ Return<void> BroadcastRadio::getProperties_1_1(getProperties_1_1_cb _hidl_cb) { prop10.numAudioSources = 1; prop10.supportsCapture = false; prop11.supportsBackgroundScanning = false; prop11.supportedProgramTypes = vector<uint32_t>({ static_cast<uint32_t>(ProgramType::AM), static_cast<uint32_t>(ProgramType::FM), static_cast<uint32_t>(ProgramType::AM_HD), static_cast<uint32_t>(ProgramType::FM_HD), }); prop11.supportedIdentifierTypes = vector<uint32_t>({ static_cast<uint32_t>(IdentifierType::AMFM_FREQUENCY), static_cast<uint32_t>(IdentifierType::RDS_PI), static_cast<uint32_t>(IdentifierType::HD_STATION_ID_EXT), static_cast<uint32_t>(IdentifierType::HD_SUBCHANNEL), }); prop11.vendorExension = "dummy"; prop10.bands.resize(mConfig.amFmBands.size()); Loading
broadcastradio/1.1/types.hal +23 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,29 @@ struct Properties { */ bool supportsBackgroundScanning; /** * A list of supported ProgramType values. * * If a program type is supported by radio module, it means it can tune * to ProgramSelector of a given type. * * Support for VENDOR program type does not guarantee compatibility, as * other module properties (implementor, product, version) must be checked. */ vec<uint32_t> supportedProgramTypes; /** * A list of supported IdentifierType values. * * If an identifier is supported by radio module, it means it can use it for * tuning to ProgramSelector with either primary or secondary Identifier of * a given type. * * Support for VENDOR identifier type does not guarantee compatibility, as * other module properties (implementor, product, version) must be checked. */ vec<uint32_t> supportedIdentifierTypes; /** * Opaque vendor-specific string, to be passed to front-end without changes. * Format of this string can vary across vendors. Loading
broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,8 @@ void BroadcastRadioHalTest::SetUp() { ASSERT_TRUE(propResult.isOk()); EXPECT_EQ(radioClass, prop10.classId); EXPECT_GT(prop10.numTuners, 0u); EXPECT_GT(prop11.supportedProgramTypes.size(), 0u); EXPECT_GT(prop11.supportedIdentifierTypes.size(), 0u); if (radioClass == Class::AM_FM) { EXPECT_GT(prop10.bands.size(), 0u); } Loading