Loading audio/7.0/types.hal +14 −8 Original line number Diff line number Diff line Loading @@ -44,8 +44,10 @@ enum AudioDrain : int32_t { * A substitute for POSIX timespec. */ struct TimeSpec { uint64_t tvSec; // seconds uint64_t tvNSec; // nanoseconds /** Seconds. */ uint64_t tvSec; /** Nanoseconds. */ uint64_t tvNSec; }; struct ParameterValue { Loading Loading @@ -85,8 +87,10 @@ struct MmapBufferInfo { * Used by streams opened in mmap mode. */ struct MmapPosition { int64_t timeNanoseconds; // time stamp in ns, CLOCK_MONOTONIC int32_t positionFrames; // increasing 32 bit frame count reset when IStream.stop() is called /** Timestamp in ns, CLOCK_MONOTONIC. */ int64_t timeNanoseconds; /** Increasing 32 bit frame count reset when IStream.stop() is called. */ int32_t positionFrames; }; /** Loading Loading @@ -128,9 +132,12 @@ struct AudioMicrophoneCoordinate { */ @export(name="audio_microphone_channel_mapping_t", value_prefix="AUDIO_MICROPHONE_CHANNEL_MAPPING_") enum AudioMicrophoneChannelMapping : uint32_t { UNUSED = 0, /* Channel not used */ DIRECT = 1, /* Channel used and signal not processed */ PROCESSED = 2, /* Channel used and signal has some processing */ /** Channel not used. */ UNUSED = 0, /** Channel used and signal not processed. */ DIRECT = 1, /** Channel used and signal has some processing. */ PROCESSED = 2, }; /** Loading Loading @@ -269,7 +276,6 @@ enum DualMonoMode : int32_t { // frameworks/base/media/java/android/media/AudioTrack.java /** * Disable any Dual Mono presentation effect. * */ OFF = 0, /** Loading audio/common/7.0/types.hal +24 −12 Original line number Diff line number Diff line Loading @@ -332,14 +332,22 @@ typedef string AudioGainMode; * A gain stage is always attached to an audio port. */ struct AudioGain { vec<AudioGainMode> mode; // modes of operation AudioChannelMask channelMask; // channels which gain can be controlled int32_t minValue; // minimum gain value in millibels int32_t maxValue; // maximum gain value in millibels int32_t defaultValue; // default gain value in millibels uint32_t stepValue; // gain step in millibels uint32_t minRampMs; // minimum ramp duration in ms uint32_t maxRampMs; // maximum ramp duration in ms /** Modes of operation. */ vec<AudioGainMode> mode; /** Channels which gain can be controlled. */ AudioChannelMask channelMask; /** Minimum gain value in millibels. */ int32_t minValue; /** Maximum gain value in millibels. */ int32_t maxValue; /** Default gain value in millibels. */ int32_t defaultValue; /** Gain step in millibels. */ uint32_t stepValue; /** Ramp duration in ms. */ uint32_t minRampMs; /** Maximum ramp duration in ms. */ uint32_t maxRampMs; }; /** Loading @@ -347,16 +355,20 @@ struct AudioGain { * given port. */ struct AudioGainConfig { int32_t index; // index of the corresponding AudioGain in AudioPort.gains vec<AudioGainMode> mode; // modes of operation AudioChannelMask channelMask; // channels which gain value follows /** Index of the corresponding AudioGain in AudioPort.gains. */ int32_t index; /** Modes of operation. */ vec<AudioGainMode> mode; /** Channels which gain value follows. */ AudioChannelMask channelMask; /** * Gain values in millibels for each channel ordered from LSb to MSb in * channel mask. The number of values is 1 in joint mode or * the number of channels in the channel mask. */ vec<int32_t> values; uint32_t rampDurationMs; // ramp duration in ms /** Ramp duration in ms. */ uint32_t rampDurationMs; }; Loading audio/effect/7.0/types.hal +40 −23 Original line number Diff line number Diff line Loading @@ -202,16 +202,26 @@ 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 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 /** UUID of to the OpenSL ES interface implemented by this effect. */ Uuid type; /** UUID for this particular implementation. */ Uuid uuid; /** Effect engine capabilities/requirements flags. */ bitfield<EffectFlags> flags; /** * CPU load indication expressed in 0.1 MIPS units as estimated on * an ARM9E core (ARMv5TE) with 0 WS. */ uint16_t cpuLoad; /** * Data memory usage expressed in KB and includes only dynamically * allocated memory. */ uint16_t memoryUsage; /** Human readable effect name. */ uint8_t[64] name; /** Human readable effect implementor name. */ uint8_t[64] implementor; }; /** Loading Loading @@ -242,11 +252,16 @@ enum EffectBufferAccess : int32_t { */ @export(name="", value_prefix="EFFECT_CONFIG_") enum EffectConfigParameters : int32_t { BUFFER = 0x0001, // buffer field SMP_RATE = 0x0002, // samplingRate CHANNELS = 0x0004, // channels FORMAT = 0x0008, // format ACC_MODE = 0x0010, // accessMode /** Buffer field. */ BUFFER = 0x0001, /** Sampling rate. */ SMP_RATE = 0x0002, /** Channels. */ CHANNELS = 0x0004, /** Format. */ FORMAT = 0x0008, /** Access mode. */ ACC_MODE = 0x0010, // Note that the 2.0 ALL have been moved to an helper function }; Loading @@ -270,21 +285,23 @@ struct EffectConfig { @export(name="effect_feature_e", value_prefix="EFFECT_FEATURE_") enum EffectFeature : int32_t { AUX_CHANNELS, // supports auxiliary channels // (e.g. dual mic noise suppressor) /** Supports auxiliary channels (e.g. dual mic noise suppressor). */ AUX_CHANNELS, CNT }; struct EffectAuxChannelsConfig { vec<AudioChannelMask> mainChannels; // channel mask for main channels vec<AudioChannelMask> auxChannels; // channel mask for auxiliary channels /** Channel mask for main channels. */ vec<AudioChannelMask> mainChannels; /** Channel mask for auxiliary channels. */ vec<AudioChannelMask> auxChannels; }; struct EffectOffloadParameter { bool isOffload; // true if the playback thread the effect // is attached to is offloaded AudioIoHandle ioHandle; // io handle of the playback thread // the effect is attached to /** True if the playback thread the effect is attached to is offloaded. */ bool isOffload; /** I/O handle of the playback thread the effect is attached to. */ AudioIoHandle ioHandle; }; /** Loading compatibility_matrices/compatibility_matrix.current.xml +8 −0 Original line number Diff line number Diff line Loading @@ -429,6 +429,14 @@ <instance>default</instance> </interface> </hal> <hal format="hidl" optional="true"> <name>android.hardware.radio.config</name> <version>1.3</version> <interface> <name>IRadioConfig</name> <instance>default</instance> </interface> </hal> <hal format="hidl" optional="true"> <name>android.hardware.renderscript</name> <version>1.0</version> Loading identity/support/src/IdentityCredentialSupport.cpp +18 −4 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ #include <keymaster/contexts/soft_attestation_cert.h> #include <keymaster/keymaster_tags.h> #include <keymaster/km_openssl/attestation_utils.h> #include <keymaster/km_openssl/certificate_utils.h> namespace android { namespace hardware { Loading Loading @@ -962,6 +963,18 @@ optional<vector<vector<uint8_t>>> createAttestation( return {}; } ::keymaster::X509_NAME_Ptr subjectName; if (KM_ERROR_OK != ::keymaster::make_name_from_str("Android Identity Credential Key", &subjectName)) { LOG(ERROR) << "Cannot create attestation subject"; return {}; } vector<uint8_t> subject(i2d_X509_NAME(subjectName.get(), NULL)); unsigned char* subjectPtr = subject.data(); i2d_X509_NAME(subjectName.get(), &subjectPtr); ::keymaster::AuthorizationSet auth_set( ::keymaster::AuthorizationSetBuilder() .Authorization(::keymaster::TAG_ATTESTATION_CHALLENGE, challenge.data(), Loading @@ -976,6 +989,8 @@ optional<vector<vector<uint8_t>>> createAttestation( // includes app id. .Authorization(::keymaster::TAG_ATTESTATION_APPLICATION_ID, applicationId.data(), applicationId.size()) .Authorization(::keymaster::TAG_CERTIFICATE_SUBJECT, subject.data(), subject.size()) .Authorization(::keymaster::TAG_USAGE_EXPIRE_DATETIME, expireTimeMilliSeconds)); // Unique id and device id is not applicable for identity credential attestation, Loading Loading @@ -1010,10 +1025,9 @@ optional<vector<vector<uint8_t>>> createAttestation( // ::keymaster::PureSoftKeymasterContext context(KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT); error = generate_attestation_from_EVP_with_subject_name( key, swEnforced, hwEnforced, auth_set, context, ::keymaster::kCurrentKeymasterVersion, *attestation_chain, *attestation_signing_key, "Android Identity Credential Key", &cert_chain_out); error = generate_attestation_from_EVP(key, swEnforced, hwEnforced, auth_set, context, ::keymaster::kCurrentKeymasterVersion, *attestation_chain, *attestation_signing_key, &cert_chain_out); if (KM_ERROR_OK != error || !cert_chain_out) { LOG(ERROR) << "Error generate attestation from EVP key" << error; Loading Loading
audio/7.0/types.hal +14 −8 Original line number Diff line number Diff line Loading @@ -44,8 +44,10 @@ enum AudioDrain : int32_t { * A substitute for POSIX timespec. */ struct TimeSpec { uint64_t tvSec; // seconds uint64_t tvNSec; // nanoseconds /** Seconds. */ uint64_t tvSec; /** Nanoseconds. */ uint64_t tvNSec; }; struct ParameterValue { Loading Loading @@ -85,8 +87,10 @@ struct MmapBufferInfo { * Used by streams opened in mmap mode. */ struct MmapPosition { int64_t timeNanoseconds; // time stamp in ns, CLOCK_MONOTONIC int32_t positionFrames; // increasing 32 bit frame count reset when IStream.stop() is called /** Timestamp in ns, CLOCK_MONOTONIC. */ int64_t timeNanoseconds; /** Increasing 32 bit frame count reset when IStream.stop() is called. */ int32_t positionFrames; }; /** Loading Loading @@ -128,9 +132,12 @@ struct AudioMicrophoneCoordinate { */ @export(name="audio_microphone_channel_mapping_t", value_prefix="AUDIO_MICROPHONE_CHANNEL_MAPPING_") enum AudioMicrophoneChannelMapping : uint32_t { UNUSED = 0, /* Channel not used */ DIRECT = 1, /* Channel used and signal not processed */ PROCESSED = 2, /* Channel used and signal has some processing */ /** Channel not used. */ UNUSED = 0, /** Channel used and signal not processed. */ DIRECT = 1, /** Channel used and signal has some processing. */ PROCESSED = 2, }; /** Loading Loading @@ -269,7 +276,6 @@ enum DualMonoMode : int32_t { // frameworks/base/media/java/android/media/AudioTrack.java /** * Disable any Dual Mono presentation effect. * */ OFF = 0, /** Loading
audio/common/7.0/types.hal +24 −12 Original line number Diff line number Diff line Loading @@ -332,14 +332,22 @@ typedef string AudioGainMode; * A gain stage is always attached to an audio port. */ struct AudioGain { vec<AudioGainMode> mode; // modes of operation AudioChannelMask channelMask; // channels which gain can be controlled int32_t minValue; // minimum gain value in millibels int32_t maxValue; // maximum gain value in millibels int32_t defaultValue; // default gain value in millibels uint32_t stepValue; // gain step in millibels uint32_t minRampMs; // minimum ramp duration in ms uint32_t maxRampMs; // maximum ramp duration in ms /** Modes of operation. */ vec<AudioGainMode> mode; /** Channels which gain can be controlled. */ AudioChannelMask channelMask; /** Minimum gain value in millibels. */ int32_t minValue; /** Maximum gain value in millibels. */ int32_t maxValue; /** Default gain value in millibels. */ int32_t defaultValue; /** Gain step in millibels. */ uint32_t stepValue; /** Ramp duration in ms. */ uint32_t minRampMs; /** Maximum ramp duration in ms. */ uint32_t maxRampMs; }; /** Loading @@ -347,16 +355,20 @@ struct AudioGain { * given port. */ struct AudioGainConfig { int32_t index; // index of the corresponding AudioGain in AudioPort.gains vec<AudioGainMode> mode; // modes of operation AudioChannelMask channelMask; // channels which gain value follows /** Index of the corresponding AudioGain in AudioPort.gains. */ int32_t index; /** Modes of operation. */ vec<AudioGainMode> mode; /** Channels which gain value follows. */ AudioChannelMask channelMask; /** * Gain values in millibels for each channel ordered from LSb to MSb in * channel mask. The number of values is 1 in joint mode or * the number of channels in the channel mask. */ vec<int32_t> values; uint32_t rampDurationMs; // ramp duration in ms /** Ramp duration in ms. */ uint32_t rampDurationMs; }; Loading
audio/effect/7.0/types.hal +40 −23 Original line number Diff line number Diff line Loading @@ -202,16 +202,26 @@ 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 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 /** UUID of to the OpenSL ES interface implemented by this effect. */ Uuid type; /** UUID for this particular implementation. */ Uuid uuid; /** Effect engine capabilities/requirements flags. */ bitfield<EffectFlags> flags; /** * CPU load indication expressed in 0.1 MIPS units as estimated on * an ARM9E core (ARMv5TE) with 0 WS. */ uint16_t cpuLoad; /** * Data memory usage expressed in KB and includes only dynamically * allocated memory. */ uint16_t memoryUsage; /** Human readable effect name. */ uint8_t[64] name; /** Human readable effect implementor name. */ uint8_t[64] implementor; }; /** Loading Loading @@ -242,11 +252,16 @@ enum EffectBufferAccess : int32_t { */ @export(name="", value_prefix="EFFECT_CONFIG_") enum EffectConfigParameters : int32_t { BUFFER = 0x0001, // buffer field SMP_RATE = 0x0002, // samplingRate CHANNELS = 0x0004, // channels FORMAT = 0x0008, // format ACC_MODE = 0x0010, // accessMode /** Buffer field. */ BUFFER = 0x0001, /** Sampling rate. */ SMP_RATE = 0x0002, /** Channels. */ CHANNELS = 0x0004, /** Format. */ FORMAT = 0x0008, /** Access mode. */ ACC_MODE = 0x0010, // Note that the 2.0 ALL have been moved to an helper function }; Loading @@ -270,21 +285,23 @@ struct EffectConfig { @export(name="effect_feature_e", value_prefix="EFFECT_FEATURE_") enum EffectFeature : int32_t { AUX_CHANNELS, // supports auxiliary channels // (e.g. dual mic noise suppressor) /** Supports auxiliary channels (e.g. dual mic noise suppressor). */ AUX_CHANNELS, CNT }; struct EffectAuxChannelsConfig { vec<AudioChannelMask> mainChannels; // channel mask for main channels vec<AudioChannelMask> auxChannels; // channel mask for auxiliary channels /** Channel mask for main channels. */ vec<AudioChannelMask> mainChannels; /** Channel mask for auxiliary channels. */ vec<AudioChannelMask> auxChannels; }; struct EffectOffloadParameter { bool isOffload; // true if the playback thread the effect // is attached to is offloaded AudioIoHandle ioHandle; // io handle of the playback thread // the effect is attached to /** True if the playback thread the effect is attached to is offloaded. */ bool isOffload; /** I/O handle of the playback thread the effect is attached to. */ AudioIoHandle ioHandle; }; /** Loading
compatibility_matrices/compatibility_matrix.current.xml +8 −0 Original line number Diff line number Diff line Loading @@ -429,6 +429,14 @@ <instance>default</instance> </interface> </hal> <hal format="hidl" optional="true"> <name>android.hardware.radio.config</name> <version>1.3</version> <interface> <name>IRadioConfig</name> <instance>default</instance> </interface> </hal> <hal format="hidl" optional="true"> <name>android.hardware.renderscript</name> <version>1.0</version> Loading
identity/support/src/IdentityCredentialSupport.cpp +18 −4 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ #include <keymaster/contexts/soft_attestation_cert.h> #include <keymaster/keymaster_tags.h> #include <keymaster/km_openssl/attestation_utils.h> #include <keymaster/km_openssl/certificate_utils.h> namespace android { namespace hardware { Loading Loading @@ -962,6 +963,18 @@ optional<vector<vector<uint8_t>>> createAttestation( return {}; } ::keymaster::X509_NAME_Ptr subjectName; if (KM_ERROR_OK != ::keymaster::make_name_from_str("Android Identity Credential Key", &subjectName)) { LOG(ERROR) << "Cannot create attestation subject"; return {}; } vector<uint8_t> subject(i2d_X509_NAME(subjectName.get(), NULL)); unsigned char* subjectPtr = subject.data(); i2d_X509_NAME(subjectName.get(), &subjectPtr); ::keymaster::AuthorizationSet auth_set( ::keymaster::AuthorizationSetBuilder() .Authorization(::keymaster::TAG_ATTESTATION_CHALLENGE, challenge.data(), Loading @@ -976,6 +989,8 @@ optional<vector<vector<uint8_t>>> createAttestation( // includes app id. .Authorization(::keymaster::TAG_ATTESTATION_APPLICATION_ID, applicationId.data(), applicationId.size()) .Authorization(::keymaster::TAG_CERTIFICATE_SUBJECT, subject.data(), subject.size()) .Authorization(::keymaster::TAG_USAGE_EXPIRE_DATETIME, expireTimeMilliSeconds)); // Unique id and device id is not applicable for identity credential attestation, Loading Loading @@ -1010,10 +1025,9 @@ optional<vector<vector<uint8_t>>> createAttestation( // ::keymaster::PureSoftKeymasterContext context(KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT); error = generate_attestation_from_EVP_with_subject_name( key, swEnforced, hwEnforced, auth_set, context, ::keymaster::kCurrentKeymasterVersion, *attestation_chain, *attestation_signing_key, "Android Identity Credential Key", &cert_chain_out); error = generate_attestation_from_EVP(key, swEnforced, hwEnforced, auth_set, context, ::keymaster::kCurrentKeymasterVersion, *attestation_chain, *attestation_signing_key, &cert_chain_out); if (KM_ERROR_OK != error || !cert_chain_out) { LOG(ERROR) << "Error generate attestation from EVP key" << error; Loading