Audio V4: Use of EffectFlags over bitfield<EffectFlags>

This was breaking Treble interface consistency test.

Bug: 77853088
Test: play music effect work
Change-Id: Ieb54f9c154e346286da353d0c3cdc770574c9bfe
Signed-off-by: Kevin Rocard <krocard@google.com>
This commit is contained in:
Kevin Rocard
2018-04-10 09:42:15 -07:00
parent 7f8caede5f
commit 4be23925c0
3 changed files with 15 additions and 12 deletions

View File

@@ -200,16 +200,16 @@ enum EffectFlags : int32_t {
* enumeration of the effect engines present in a library.
*/
struct EffectDescriptor {
Uuid type; // UUID of to the OpenSL ES interface implemented
// by this effect
Uuid uuid; // UUID for this particular implementation
EffectFlags flags; // effect engine capabilities/requirements flags
uint16_t cpuLoad; // CPU load indication expressed in 0.1 MIPS units
// as estimated on an ARM9E core (ARMv5TE) with 0 WS
uint16_t memoryUsage; // data memory usage expressed in KB and includes
// only dynamically allocated memory
uint8_t[64] name; // human readable effect name
uint8_t[64] implementor; // human readable effect implementor name
Uuid type; // UUID of to the OpenSL ES interface implemented
// by this effect
Uuid uuid; // UUID for this particular implementation
bitfield<EffectFlags> flags; // effect engine capabilities/requirements flags
uint16_t cpuLoad; // CPU load indication expressed in 0.1 MIPS units
// as estimated on an ARM9E core (ARMv5TE) with 0 WS
uint16_t memoryUsage; // data memory usage expressed in KB and includes
// only dynamically allocated memory
uint8_t[64] name; // human readable effect name
uint8_t[64] implementor; // human readable effect implementor name
};
/**

View File

@@ -19,7 +19,10 @@
#include <memory.h>
#include <stdio.h>
#include <common/all-versions/VersionUtils.h>
using ::android::hardware::audio::common::AUDIO_HAL_VERSION::HidlUtils;
using ::android::hardware::audio::common::utils::mkEnumConverter;
namespace android {
namespace hardware {
@@ -32,7 +35,7 @@ void effectDescriptorFromHal(const effect_descriptor_t& halDescriptor,
EffectDescriptor* descriptor) {
HidlUtils::uuidFromHal(halDescriptor.type, &descriptor->type);
HidlUtils::uuidFromHal(halDescriptor.uuid, &descriptor->uuid);
descriptor->flags = EffectFlags(halDescriptor.flags);
descriptor->flags = mkEnumConverter<EffectFlags>(halDescriptor.flags);
descriptor->cpuLoad = halDescriptor.cpuLoad;
descriptor->memoryUsage = halDescriptor.memoryUsage;
memcpy(descriptor->name.data(), halDescriptor.name, descriptor->name.size());

View File

@@ -286,7 +286,7 @@ a91b547f5922f39fe4231d97fac1c3825c1c1b0c8ef7a5136689ceed37e8bfe9 android.hardwar
3661fa0623056922fdc4235ac5a9c91a2d066ab6f1ab4297e3b240fe302ba500 android.hardware.audio.effect@4.0::IPresetReverbEffect
e88e520f8c98a62fccd8d5316c6687808f775de145d1405a7a9a66587ee6a001 android.hardware.audio.effect@4.0::IVirtualizerEffect
fe28829dab10d171783b79ac9cc45412739f8ff275e90228d7c6370ef189b859 android.hardware.audio.effect@4.0::IVisualizerEffect
5d92f6fd58d40c56611bb12f03be6af9bcf2bb73dfb35b77a99bbf2c3ea5439b android.hardware.audio.effect@4.0::types
21c8a702579356480236c6851b5b2c16b9bd369ce12bdd6ffdc4626a89f34f73 android.hardware.audio.effect@4.0::types
42a06dc288f61b0690580f3d37b30b663c31d74d50bb58d0772386b550d5faab android.hardware.authsecret@1.0::IAuthSecret
a0f93c768c353cecee6237fe479bce47404eb10b629fafe07e32a054fd67f2af android.hardware.automotive.audiocontrol@1.0::IAudioControl
ca515ff4b63c80cf5ad7b3395c997c57d6c56157361f6c367d1c96f23cc4860a android.hardware.automotive.audiocontrol@1.0::types