Extract stable AIDL modules
These types are intended to be shared with HAL interfaces and are moved to a more generic directory/namespace and a stable build target. There is no semantic change here. Test: m Change-Id: I4cedbab7e87d4895994ce8d26bd7e89f059a0103
This commit is contained in:
@@ -19,19 +19,19 @@ package android.hardware.soundtrigger;
|
||||
import android.annotation.Nullable;
|
||||
import android.media.AudioFormat;
|
||||
import android.media.audio.common.AudioConfig;
|
||||
import android.media.soundtrigger_middleware.AudioCapabilities;
|
||||
import android.media.soundtrigger_middleware.ConfidenceLevel;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.Phrase;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.RecognitionMode;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger.AudioCapabilities;
|
||||
import android.media.soundtrigger.ConfidenceLevel;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.Phrase;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.Properties;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.RecognitionMode;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleDescriptor;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleProperties;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.SharedMemory;
|
||||
|
||||
@@ -43,7 +43,7 @@ import java.util.UUID;
|
||||
class ConversionUtil {
|
||||
public static SoundTrigger.ModuleProperties aidl2apiModuleDescriptor(
|
||||
SoundTriggerModuleDescriptor aidlDesc) {
|
||||
SoundTriggerModuleProperties properties = aidlDesc.properties;
|
||||
Properties properties = aidlDesc.properties;
|
||||
return new SoundTrigger.ModuleProperties(
|
||||
aidlDesc.handle,
|
||||
properties.implementor,
|
||||
@@ -328,9 +328,9 @@ class ConversionUtil {
|
||||
public static int api2aidlModelParameter(int apiParam) {
|
||||
switch (apiParam) {
|
||||
case ModelParams.THRESHOLD_FACTOR:
|
||||
return android.media.soundtrigger_middleware.ModelParameter.THRESHOLD_FACTOR;
|
||||
return android.media.soundtrigger.ModelParameter.THRESHOLD_FACTOR;
|
||||
default:
|
||||
return android.media.soundtrigger_middleware.ModelParameter.INVALID;
|
||||
return android.media.soundtrigger.ModelParameter.INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ import android.media.AudioFormat;
|
||||
import android.media.permission.ClearCallingIdentityContext;
|
||||
import android.media.permission.Identity;
|
||||
import android.media.permission.SafeCloseable;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerMiddlewareService;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleDescriptor;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
|
||||
@@ -22,13 +22,13 @@ import android.compat.annotation.UnsupportedAppUsage;
|
||||
import android.media.permission.ClearCallingIdentityContext;
|
||||
import android.media.permission.Identity;
|
||||
import android.media.permission.SafeCloseable;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerCallback;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerMiddlewareService;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerModule;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
|
||||
113
media/Android.bp
113
media/Android.bp
@@ -7,23 +7,6 @@ package {
|
||||
default_applicable_licenses: ["frameworks_base_license"],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "audio_common-aidl",
|
||||
unstable: true,
|
||||
host_supported: true,
|
||||
vendor_available: true,
|
||||
local_include_dir: "aidl",
|
||||
double_loadable: true,
|
||||
srcs: [
|
||||
"aidl/android/media/audio/common/AudioChannelMask.aidl",
|
||||
"aidl/android/media/audio/common/AudioConfig.aidl",
|
||||
"aidl/android/media/audio/common/AudioFormat.aidl",
|
||||
"aidl/android/media/audio/common/AudioOffloadInfo.aidl",
|
||||
"aidl/android/media/audio/common/AudioStreamType.aidl",
|
||||
"aidl/android/media/audio/common/AudioUsage.aidl",
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "media_permission-aidl",
|
||||
unstable: true,
|
||||
@@ -40,30 +23,92 @@ aidl_interface {
|
||||
name: "soundtrigger_middleware-aidl",
|
||||
unstable: true,
|
||||
local_include_dir: "aidl",
|
||||
backend: {
|
||||
java: {
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
},
|
||||
srcs: [
|
||||
"aidl/android/media/soundtrigger_middleware/AudioCapabilities.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/ConfidenceLevel.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/ISoundTriggerCallback.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/ISoundTriggerMiddlewareService.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/ISoundTriggerModule.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/ModelParameter.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/ModelParameterRange.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/Phrase.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/PhraseRecognitionEvent.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/PhraseRecognitionExtra.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/PhraseSoundModel.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/RecognitionConfig.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/RecognitionEvent.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/RecognitionMode.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/RecognitionStatus.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/SoundModel.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/SoundModelType.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/SoundTriggerModuleDescriptor.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/SoundTriggerModuleProperties.aidl",
|
||||
"aidl/android/media/soundtrigger_middleware/Status.aidl",
|
||||
],
|
||||
imports: [
|
||||
"audio_common-aidl",
|
||||
"android.media.soundtrigger.types",
|
||||
"media_permission-aidl",
|
||||
],
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "android.media.audio.common.types",
|
||||
vendor_available: true,
|
||||
host_supported: true,
|
||||
double_loadable: true,
|
||||
flags: ["-Werror", "-Weverything", ],
|
||||
local_include_dir: "aidl",
|
||||
srcs: [
|
||||
"aidl/android/media/audio/common/AudioChannelMask.aidl",
|
||||
"aidl/android/media/audio/common/AudioConfig.aidl",
|
||||
"aidl/android/media/audio/common/AudioFormat.aidl",
|
||||
"aidl/android/media/audio/common/AudioOffloadInfo.aidl",
|
||||
"aidl/android/media/audio/common/AudioStreamType.aidl",
|
||||
"aidl/android/media/audio/common/AudioUsage.aidl",
|
||||
],
|
||||
stability: "vintf",
|
||||
backend: {
|
||||
cpp: {
|
||||
enabled: true,
|
||||
},
|
||||
java: {
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
ndk: {
|
||||
vndk: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
name: "android.media.soundtrigger.types",
|
||||
vendor_available: true,
|
||||
flags: ["-Werror", "-Weverything", ],
|
||||
local_include_dir: "aidl",
|
||||
srcs: [
|
||||
"aidl/android/media/soundtrigger/AudioCapabilities.aidl",
|
||||
"aidl/android/media/soundtrigger/ConfidenceLevel.aidl",
|
||||
"aidl/android/media/soundtrigger/ModelParameter.aidl",
|
||||
"aidl/android/media/soundtrigger/ModelParameterRange.aidl",
|
||||
"aidl/android/media/soundtrigger/Phrase.aidl",
|
||||
"aidl/android/media/soundtrigger/PhraseRecognitionEvent.aidl",
|
||||
"aidl/android/media/soundtrigger/PhraseRecognitionExtra.aidl",
|
||||
"aidl/android/media/soundtrigger/PhraseSoundModel.aidl",
|
||||
"aidl/android/media/soundtrigger/Properties.aidl",
|
||||
"aidl/android/media/soundtrigger/RecognitionConfig.aidl",
|
||||
"aidl/android/media/soundtrigger/RecognitionEvent.aidl",
|
||||
"aidl/android/media/soundtrigger/RecognitionMode.aidl",
|
||||
"aidl/android/media/soundtrigger/RecognitionStatus.aidl",
|
||||
"aidl/android/media/soundtrigger/SoundModel.aidl",
|
||||
"aidl/android/media/soundtrigger/SoundModelType.aidl",
|
||||
"aidl/android/media/soundtrigger/Status.aidl",
|
||||
],
|
||||
stability: "vintf",
|
||||
backend: {
|
||||
cpp: {
|
||||
enabled: true,
|
||||
},
|
||||
java: {
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
ndk: {
|
||||
vndk: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
imports: [
|
||||
"android.media.audio.common.types",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -57,8 +57,11 @@ package android.media.audio.common;
|
||||
* checking the channel mask, the implementer should look for ways to fix it
|
||||
* with additional information outside of the mask.
|
||||
*
|
||||
* TODO: this should be replaced with strings or other mechanisms that are easy to extend, in line
|
||||
* with the audio HAL conventions.
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum AudioChannelMask {
|
||||
/**
|
||||
@@ -113,42 +116,43 @@ enum AudioChannelMask {
|
||||
*/
|
||||
OUT_HAPTIC_A = 0x20000000,
|
||||
OUT_HAPTIC_B = 0x10000000,
|
||||
// TODO(ytai): Aliases not currently supported in AIDL - can inline the values.
|
||||
// OUT_MONO = OUT_FRONT_LEFT,
|
||||
// OUT_STEREO = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT),
|
||||
// OUT_2POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_LOW_FREQUENCY),
|
||||
// OUT_2POINT0POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
|
||||
// OUT_2POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY),
|
||||
// OUT_3POINT0POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
|
||||
// OUT_3POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY),
|
||||
// OUT_QUAD = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_BACK_LEFT | OUT_BACK_RIGHT),
|
||||
// OUT_QUAD_BACK = OUT_QUAD,
|
||||
// /**
|
||||
// * like OUT_QUAD_BACK with *_SIDE_* instead of *_BACK_*
|
||||
// */
|
||||
// OUT_QUAD_SIDE = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
|
||||
// OUT_SURROUND = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_BACK_CENTER),
|
||||
// OUT_PENTA = (OUT_QUAD | OUT_FRONT_CENTER),
|
||||
// OUT_5POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT),
|
||||
// OUT_5POINT1_BACK = OUT_5POINT1,
|
||||
// /**
|
||||
// * like OUT_5POINT1_BACK with *_SIDE_* instead of *_BACK_*
|
||||
// */
|
||||
// OUT_5POINT1_SIDE = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
|
||||
// OUT_5POINT1POINT2 = (OUT_5POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
|
||||
// OUT_5POINT1POINT4 = (OUT_5POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT),
|
||||
// OUT_6POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_BACK_CENTER),
|
||||
// /**
|
||||
// * matches the correct AudioFormat.CHANNEL_OUT_7POINT1_SURROUND
|
||||
// */
|
||||
// OUT_7POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
|
||||
// OUT_7POINT1POINT2 = (OUT_7POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
|
||||
// OUT_7POINT1POINT4 = (OUT_7POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT),
|
||||
// OUT_MONO_HAPTIC_A = (OUT_FRONT_LEFT | OUT_HAPTIC_A),
|
||||
// OUT_STEREO_HAPTIC_A = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_HAPTIC_A),
|
||||
// OUT_HAPTIC_AB = (OUT_HAPTIC_A | OUT_HAPTIC_B),
|
||||
// OUT_MONO_HAPTIC_AB = (OUT_FRONT_LEFT | OUT_HAPTIC_A | OUT_HAPTIC_B),
|
||||
// OUT_STEREO_HAPTIC_AB = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_HAPTIC_A | OUT_HAPTIC_B),
|
||||
|
||||
OUT_MONO = OUT_FRONT_LEFT,
|
||||
OUT_STEREO = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT),
|
||||
OUT_2POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_LOW_FREQUENCY),
|
||||
OUT_2POINT0POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
|
||||
OUT_2POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY),
|
||||
OUT_3POINT0POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
|
||||
OUT_3POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY),
|
||||
OUT_QUAD = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_BACK_LEFT | OUT_BACK_RIGHT),
|
||||
OUT_QUAD_BACK = OUT_QUAD,
|
||||
/**
|
||||
* like OUT_QUAD_BACK with *_SIDE_* instead of *_BACK_*
|
||||
*/
|
||||
OUT_QUAD_SIDE = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
|
||||
OUT_SURROUND = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_BACK_CENTER),
|
||||
OUT_PENTA = (OUT_QUAD | OUT_FRONT_CENTER),
|
||||
OUT_5POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT),
|
||||
OUT_5POINT1_BACK = OUT_5POINT1,
|
||||
/**
|
||||
* like OUT_5POINT1_BACK with *_SIDE_* instead of *_BACK_*
|
||||
*/
|
||||
OUT_5POINT1_SIDE = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
|
||||
OUT_5POINT1POINT2 = (OUT_5POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
|
||||
OUT_5POINT1POINT4 = (OUT_5POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT),
|
||||
OUT_6POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_BACK_CENTER),
|
||||
/**
|
||||
* matches the correct AudioFormat.CHANNEL_OUT_7POINT1_SURROUND
|
||||
*/
|
||||
OUT_7POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
|
||||
OUT_7POINT1POINT2 = (OUT_7POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
|
||||
OUT_7POINT1POINT4 = (OUT_7POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT),
|
||||
OUT_MONO_HAPTIC_A = (OUT_FRONT_LEFT | OUT_HAPTIC_A),
|
||||
OUT_STEREO_HAPTIC_A = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_HAPTIC_A),
|
||||
OUT_HAPTIC_AB = (OUT_HAPTIC_A | OUT_HAPTIC_B),
|
||||
OUT_MONO_HAPTIC_AB = (OUT_FRONT_LEFT | OUT_HAPTIC_A | OUT_HAPTIC_B),
|
||||
OUT_STEREO_HAPTIC_AB = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_HAPTIC_A | OUT_HAPTIC_B),
|
||||
|
||||
/**
|
||||
* These are bits only, not complete values
|
||||
*
|
||||
|
||||
@@ -27,10 +27,11 @@ import android.media.audio.common.AudioOffloadInfo;
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable AudioConfig {
|
||||
int sampleRateHz;
|
||||
int channelMask;
|
||||
AudioFormat format;
|
||||
AudioFormat format = AudioFormat.INVALID;
|
||||
AudioOffloadInfo offloadInfo;
|
||||
long frameCount;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ package android.media.audio.common;
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum AudioFormat {
|
||||
INVALID = 0xFFFFFFFF,
|
||||
|
||||
@@ -28,17 +28,18 @@ import android.media.audio.common.AudioUsage;
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable AudioOffloadInfo {
|
||||
int sampleRateHz;
|
||||
int channelMask;
|
||||
AudioFormat format;
|
||||
AudioStreamType streamType;
|
||||
AudioFormat format = AudioFormat.INVALID;
|
||||
AudioStreamType streamType = AudioStreamType.INVALID;
|
||||
int bitRatePerSecond;
|
||||
long durationMicroseconds;
|
||||
boolean hasVideo;
|
||||
boolean isStreaming;
|
||||
int bitWidth;
|
||||
int bufferSize;
|
||||
AudioUsage usage;
|
||||
AudioUsage usage = AudioUsage.INVALID;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,14 @@ package android.media.audio.common;
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum AudioStreamType {
|
||||
/**
|
||||
* Used as default value in parcelables to indicate that a value was not set.
|
||||
* Should never be considered a valid setting, except for backward compatibility scenarios.
|
||||
*/
|
||||
INVALID = -2,
|
||||
DEFAULT = -1,
|
||||
MIN = 0,
|
||||
VOICE_CALL = 0,
|
||||
|
||||
@@ -22,8 +22,14 @@ package android.media.audio.common;
|
||||
/**
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum AudioUsage {
|
||||
/**
|
||||
* Used as default value in parcelables to indicate that a value was not set.
|
||||
* Should never be considered a valid setting, except for backward compatibility scenarios.
|
||||
*/
|
||||
INVALID = -1,
|
||||
UNKNOWN = 0,
|
||||
MEDIA = 1,
|
||||
VOICE_COMMUNICATION = 2,
|
||||
|
||||
@@ -13,12 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* AudioCapabilities supported by the implemented HAL driver.
|
||||
* @hide
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum AudioCapabilities {
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* A recognition confidence level.
|
||||
@@ -21,6 +21,7 @@ package android.media.soundtrigger_middleware;
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ConfidenceLevel {
|
||||
/** user ID. */
|
||||
int userId;
|
||||
@@ -13,13 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* Model specific parameters to be used with parameter set and get APIs.
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum ModelParameter {
|
||||
/**
|
||||
@@ -13,13 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* Value range for a model parameter.
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable ModelParameterRange {
|
||||
/** Minimum (inclusive) */
|
||||
int minInclusive;
|
||||
@@ -13,13 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* Key phrase descriptor.
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable Phrase {
|
||||
/** Unique keyphrase ID assigned at enrollment time. */
|
||||
int id;
|
||||
@@ -13,16 +13,17 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
|
||||
/**
|
||||
* An event that gets sent to indicate a phrase recognition (or aborting of the recognition
|
||||
process).
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable PhraseRecognitionEvent {
|
||||
/** Common recognition event. */
|
||||
RecognitionEvent common;
|
||||
@@ -13,23 +13,22 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
import android.media.soundtrigger_middleware.ConfidenceLevel;
|
||||
import android.media.soundtrigger.ConfidenceLevel;
|
||||
|
||||
/**
|
||||
* Specialized recognition event for key phrase detection.
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable PhraseRecognitionExtra {
|
||||
// TODO(ytai): Constants / enums.
|
||||
|
||||
/** keyphrase ID */
|
||||
/** Keyphrase ID */
|
||||
int id;
|
||||
/** recognition modes used for this keyphrase */
|
||||
/** Bitfield, indexed by RecognitionMode. */
|
||||
int recognitionModes;
|
||||
/** confidence level for mode RECOGNITION_MODE_VOICE_TRIGGER */
|
||||
/** Confidence level for mode RECOGNITION_MODE_VOICE_TRIGGER. Value is between 0-100. */
|
||||
int confidenceLevel;
|
||||
/** number of user confidence levels */
|
||||
/** Number of user confidence levels */
|
||||
ConfidenceLevel[] levels;
|
||||
}
|
||||
@@ -13,10 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.Phrase;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.Phrase;
|
||||
|
||||
/**
|
||||
* Specialized sound model for key phrase detection.
|
||||
@@ -24,6 +24,7 @@ import android.media.soundtrigger_middleware.Phrase;
|
||||
* information indicated by phrases field.
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable PhraseSoundModel {
|
||||
/** Common part of sound model descriptor */
|
||||
SoundModel common;
|
||||
@@ -13,13 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* Capabilities of a sound trigger module.
|
||||
* {@hide}
|
||||
*/
|
||||
parcelable SoundTriggerModuleProperties {
|
||||
@VintfStability
|
||||
parcelable Properties {
|
||||
/** Implementor name */
|
||||
String implementor;
|
||||
/** Implementation description */
|
||||
@@ -44,7 +45,7 @@ parcelable SoundTriggerModuleProperties {
|
||||
int maxKeyPhrases;
|
||||
/** Maximum number of concurrent users detected */
|
||||
int maxUsers;
|
||||
/** All supported modes. e.g RecognitionMode.VOICE_TRIGGER */
|
||||
/** All supported modes. Bitfield, indexed by RecognitionMode. */
|
||||
int recognitionModes;
|
||||
/** Supports seamless transition from detection to capture */
|
||||
boolean captureTransition;
|
||||
@@ -13,14 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger.PhraseRecognitionExtra;
|
||||
|
||||
/**
|
||||
* Configuration for tuning behavior of an active recognition process.
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable RecognitionConfig {
|
||||
/* Capture and buffer audio for this recognition instance. */
|
||||
boolean captureRequested;
|
||||
@@ -34,6 +35,6 @@ parcelable RecognitionConfig {
|
||||
*/
|
||||
int audioCapabilities;
|
||||
|
||||
/** Opaque capture configuration data. */
|
||||
/** Capture configuration data. Content is implementation-defined. */
|
||||
byte[] data;
|
||||
}
|
||||
@@ -13,21 +13,22 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
import android.media.audio.common.AudioConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionStatus;
|
||||
import android.media.soundtrigger_middleware.SoundModelType;
|
||||
import android.media.soundtrigger.RecognitionStatus;
|
||||
import android.media.soundtrigger.SoundModelType;
|
||||
|
||||
/**
|
||||
* An event that gets sent to indicate a recognition (or aborting of the recognition process).
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable RecognitionEvent {
|
||||
/** Recognition status. */
|
||||
RecognitionStatus status;
|
||||
RecognitionStatus status = RecognitionStatus.INVALID;
|
||||
/** Event type, same as sound model type. */
|
||||
SoundModelType type;
|
||||
SoundModelType type = SoundModelType.INVALID;
|
||||
/** Is it possible to capture audio from this utterance buffered by the implementation. */
|
||||
boolean captureAvailable;
|
||||
/* Audio session ID. framework use. */
|
||||
@@ -13,12 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* Recognition mode.
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum RecognitionMode {
|
||||
/** Simple voice trigger. */
|
||||
@@ -13,14 +13,20 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* A status for indicating the type of a recognition event.
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum RecognitionStatus {
|
||||
/**
|
||||
* Used as default value in parcelables to indicate that a value was not set.
|
||||
* Should never be considered a valid setting, except for backward compatibility scenarios.
|
||||
*/
|
||||
INVALID = -1,
|
||||
/** Recognition success. */
|
||||
SUCCESS = 0,
|
||||
/** Recognition aborted (e.g. capture preempted by another use-case. */
|
||||
@@ -13,9 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
import android.media.soundtrigger_middleware.SoundModelType;
|
||||
import android.media.soundtrigger.SoundModelType;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
|
||||
/**
|
||||
@@ -23,9 +23,10 @@ import android.os.ParcelFileDescriptor;
|
||||
* aggregation.
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
parcelable SoundModel {
|
||||
/** Model type. */
|
||||
SoundModelType type;
|
||||
SoundModelType type = SoundModelType.INVALID;
|
||||
/** Unique sound model ID. */
|
||||
String uuid;
|
||||
/**
|
||||
@@ -13,16 +13,20 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* Sound model type.
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum SoundModelType {
|
||||
/** Unspecified sound model type */
|
||||
UNKNOWN = -1,
|
||||
/**
|
||||
* Used as default value in parcelables to indicate that a value was not set.
|
||||
* Should never be considered a valid setting, except for backward compatibility scenarios.
|
||||
*/
|
||||
INVALID = -1,
|
||||
/** Key phrase sound models */
|
||||
KEYPHRASE = 0,
|
||||
/** All models other than keyphrase */
|
||||
@@ -13,13 +13,19 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
package android.media.soundtrigger;
|
||||
|
||||
/**
|
||||
* {@hide}
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum Status {
|
||||
/**
|
||||
* Used as default value in parcelables to indicate that a value was not set.
|
||||
* Should never be considered a valid setting, except for backward compatibility scenarios.
|
||||
*/
|
||||
INVALID = -1,
|
||||
/** Success. */
|
||||
SUCCESS = 0,
|
||||
/** Failure due to resource contention. This is typically a temporary condition. */
|
||||
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
|
||||
/**
|
||||
* Main interface for a client to get notifications of events coming from this module.
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
|
||||
import android.media.soundtrigger_middleware.ModelParameter;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger.ModelParameter;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
|
||||
/**
|
||||
* A sound-trigger module.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package android.media.soundtrigger_middleware;
|
||||
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleProperties;
|
||||
import android.media.soundtrigger.Properties;
|
||||
|
||||
/**
|
||||
* A descriptor of an available sound trigger module, containing the handle used to reference the
|
||||
@@ -26,6 +26,6 @@ parcelable SoundTriggerModuleDescriptor {
|
||||
/** Module handle to be used for attaching to it. */
|
||||
int handle;
|
||||
/** Module capabilities. */
|
||||
SoundTriggerModuleProperties properties;
|
||||
Properties properties;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/// This file has been semi-automatically generated using hidl2aidl from its counterpart in
|
||||
// hardware/interfaces/audio/common/5.0/types.hal
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.audio.common;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum AudioChannelMask {
|
||||
REPRESENTATION_POSITION = 0,
|
||||
REPRESENTATION_INDEX = 2,
|
||||
NONE = 0,
|
||||
INVALID = -1073741824,
|
||||
OUT_FRONT_LEFT = 1,
|
||||
OUT_FRONT_RIGHT = 2,
|
||||
OUT_FRONT_CENTER = 4,
|
||||
OUT_LOW_FREQUENCY = 8,
|
||||
OUT_BACK_LEFT = 16,
|
||||
OUT_BACK_RIGHT = 32,
|
||||
OUT_FRONT_LEFT_OF_CENTER = 64,
|
||||
OUT_FRONT_RIGHT_OF_CENTER = 128,
|
||||
OUT_BACK_CENTER = 256,
|
||||
OUT_SIDE_LEFT = 512,
|
||||
OUT_SIDE_RIGHT = 1024,
|
||||
OUT_TOP_CENTER = 2048,
|
||||
OUT_TOP_FRONT_LEFT = 4096,
|
||||
OUT_TOP_FRONT_CENTER = 8192,
|
||||
OUT_TOP_FRONT_RIGHT = 16384,
|
||||
OUT_TOP_BACK_LEFT = 32768,
|
||||
OUT_TOP_BACK_CENTER = 65536,
|
||||
OUT_TOP_BACK_RIGHT = 131072,
|
||||
OUT_TOP_SIDE_LEFT = 262144,
|
||||
OUT_TOP_SIDE_RIGHT = 524288,
|
||||
OUT_HAPTIC_A = 536870912,
|
||||
OUT_HAPTIC_B = 268435456,
|
||||
OUT_MONO = 1,
|
||||
OUT_STEREO = 3,
|
||||
OUT_2POINT1 = 11,
|
||||
OUT_2POINT0POINT2 = 786435,
|
||||
OUT_2POINT1POINT2 = 786443,
|
||||
OUT_3POINT0POINT2 = 786439,
|
||||
OUT_3POINT1POINT2 = 786447,
|
||||
OUT_QUAD = 51,
|
||||
OUT_QUAD_BACK = 51,
|
||||
OUT_QUAD_SIDE = 1539,
|
||||
OUT_SURROUND = 263,
|
||||
OUT_PENTA = 55,
|
||||
OUT_5POINT1 = 63,
|
||||
OUT_5POINT1_BACK = 63,
|
||||
OUT_5POINT1_SIDE = 1551,
|
||||
OUT_5POINT1POINT2 = 786495,
|
||||
OUT_5POINT1POINT4 = 184383,
|
||||
OUT_6POINT1 = 319,
|
||||
OUT_7POINT1 = 1599,
|
||||
OUT_7POINT1POINT2 = 788031,
|
||||
OUT_7POINT1POINT4 = 185919,
|
||||
OUT_MONO_HAPTIC_A = 536870913,
|
||||
OUT_STEREO_HAPTIC_A = 536870915,
|
||||
OUT_HAPTIC_AB = 805306368,
|
||||
OUT_MONO_HAPTIC_AB = 805306369,
|
||||
OUT_STEREO_HAPTIC_AB = 805306371,
|
||||
IN_LEFT = 4,
|
||||
IN_RIGHT = 8,
|
||||
IN_FRONT = 16,
|
||||
IN_BACK = 32,
|
||||
IN_LEFT_PROCESSED = 64,
|
||||
IN_RIGHT_PROCESSED = 128,
|
||||
IN_FRONT_PROCESSED = 256,
|
||||
IN_BACK_PROCESSED = 512,
|
||||
IN_PRESSURE = 1024,
|
||||
IN_X_AXIS = 2048,
|
||||
IN_Y_AXIS = 4096,
|
||||
IN_Z_AXIS = 8192,
|
||||
IN_BACK_LEFT = 65536,
|
||||
IN_BACK_RIGHT = 131072,
|
||||
IN_CENTER = 262144,
|
||||
IN_LOW_FREQUENCY = 1048576,
|
||||
IN_TOP_LEFT = 2097152,
|
||||
IN_TOP_RIGHT = 4194304,
|
||||
IN_VOICE_UPLINK = 16384,
|
||||
IN_VOICE_DNLINK = 32768,
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/// This file has been semi-automatically generated using hidl2aidl from its counterpart in
|
||||
// hardware/interfaces/audio/common/5.0/types.hal
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.audio.common;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable AudioConfig {
|
||||
int sampleRateHz;
|
||||
int channelMask;
|
||||
android.media.audio.common.AudioFormat format = android.media.audio.common.AudioFormat.INVALID;
|
||||
android.media.audio.common.AudioOffloadInfo offloadInfo;
|
||||
long frameCount;
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/// This file has been semi-automatically generated using hidl2aidl from its counterpart in
|
||||
// hardware/interfaces/audio/common/5.0/types.hal
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.audio.common;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum AudioFormat {
|
||||
INVALID = -1,
|
||||
DEFAULT = 0,
|
||||
PCM = 0,
|
||||
MP3 = 16777216,
|
||||
AMR_NB = 33554432,
|
||||
AMR_WB = 50331648,
|
||||
AAC = 67108864,
|
||||
HE_AAC_V1 = 83886080,
|
||||
HE_AAC_V2 = 100663296,
|
||||
VORBIS = 117440512,
|
||||
OPUS = 134217728,
|
||||
AC3 = 150994944,
|
||||
E_AC3 = 167772160,
|
||||
DTS = 184549376,
|
||||
DTS_HD = 201326592,
|
||||
IEC61937 = 218103808,
|
||||
DOLBY_TRUEHD = 234881024,
|
||||
EVRC = 268435456,
|
||||
EVRCB = 285212672,
|
||||
EVRCWB = 301989888,
|
||||
EVRCNW = 318767104,
|
||||
AAC_ADIF = 335544320,
|
||||
WMA = 352321536,
|
||||
WMA_PRO = 369098752,
|
||||
AMR_WB_PLUS = 385875968,
|
||||
MP2 = 402653184,
|
||||
QCELP = 419430400,
|
||||
DSD = 436207616,
|
||||
FLAC = 452984832,
|
||||
ALAC = 469762048,
|
||||
APE = 486539264,
|
||||
AAC_ADTS = 503316480,
|
||||
SBC = 520093696,
|
||||
APTX = 536870912,
|
||||
APTX_HD = 553648128,
|
||||
AC4 = 570425344,
|
||||
LDAC = 587202560,
|
||||
MAT = 603979776,
|
||||
AAC_LATM = 620756992,
|
||||
CELT = 637534208,
|
||||
APTX_ADAPTIVE = 654311424,
|
||||
LHDC = 671088640,
|
||||
LHDC_LL = 687865856,
|
||||
APTX_TWSP = 704643072,
|
||||
MAIN_MASK = -16777216,
|
||||
SUB_MASK = 16777215,
|
||||
PCM_SUB_16_BIT = 1,
|
||||
PCM_SUB_8_BIT = 2,
|
||||
PCM_SUB_32_BIT = 3,
|
||||
PCM_SUB_8_24_BIT = 4,
|
||||
PCM_SUB_FLOAT = 5,
|
||||
PCM_SUB_24_BIT_PACKED = 6,
|
||||
MP3_SUB_NONE = 0,
|
||||
AMR_SUB_NONE = 0,
|
||||
AAC_SUB_MAIN = 1,
|
||||
AAC_SUB_LC = 2,
|
||||
AAC_SUB_SSR = 4,
|
||||
AAC_SUB_LTP = 8,
|
||||
AAC_SUB_HE_V1 = 16,
|
||||
AAC_SUB_SCALABLE = 32,
|
||||
AAC_SUB_ERLC = 64,
|
||||
AAC_SUB_LD = 128,
|
||||
AAC_SUB_HE_V2 = 256,
|
||||
AAC_SUB_ELD = 512,
|
||||
AAC_SUB_XHE = 768,
|
||||
VORBIS_SUB_NONE = 0,
|
||||
E_AC3_SUB_JOC = 1,
|
||||
MAT_SUB_1_0 = 1,
|
||||
MAT_SUB_2_0 = 2,
|
||||
MAT_SUB_2_1 = 3,
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/// This file has been semi-automatically generated using hidl2aidl from its counterpart in
|
||||
// hardware/interfaces/audio/common/5.0/types.hal
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.audio.common;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable AudioOffloadInfo {
|
||||
int sampleRateHz;
|
||||
int channelMask;
|
||||
android.media.audio.common.AudioFormat format = android.media.audio.common.AudioFormat.INVALID;
|
||||
android.media.audio.common.AudioStreamType streamType = android.media.audio.common.AudioStreamType.INVALID;
|
||||
int bitRatePerSecond;
|
||||
long durationMicroseconds;
|
||||
boolean hasVideo;
|
||||
boolean isStreaming;
|
||||
int bitWidth;
|
||||
int bufferSize;
|
||||
android.media.audio.common.AudioUsage usage = android.media.audio.common.AudioUsage.INVALID;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/// This file has been semi-automatically generated using hidl2aidl from its counterpart in
|
||||
// hardware/interfaces/audio/common/5.0/types.hal
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.audio.common;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum AudioStreamType {
|
||||
INVALID = -2,
|
||||
DEFAULT = -1,
|
||||
MIN = 0,
|
||||
VOICE_CALL = 0,
|
||||
SYSTEM = 1,
|
||||
RING = 2,
|
||||
MUSIC = 3,
|
||||
ALARM = 4,
|
||||
NOTIFICATION = 5,
|
||||
BLUETOOTH_SCO = 6,
|
||||
ENFORCED_AUDIBLE = 7,
|
||||
DTMF = 8,
|
||||
TTS = 9,
|
||||
ACCESSIBILITY = 10,
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/// This file has been semi-automatically generated using hidl2aidl from its counterpart in
|
||||
// hardware/interfaces/audio/common/5.0/types.hal
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.audio.common;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum AudioUsage {
|
||||
INVALID = -1,
|
||||
UNKNOWN = 0,
|
||||
MEDIA = 1,
|
||||
VOICE_COMMUNICATION = 2,
|
||||
VOICE_COMMUNICATION_SIGNALLING = 3,
|
||||
ALARM = 4,
|
||||
NOTIFICATION = 5,
|
||||
NOTIFICATION_TELEPHONY_RINGTONE = 6,
|
||||
ASSISTANCE_ACCESSIBILITY = 11,
|
||||
ASSISTANCE_NAVIGATION_GUIDANCE = 12,
|
||||
ASSISTANCE_SONIFICATION = 13,
|
||||
GAME = 14,
|
||||
VIRTUAL_SOURCE = 15,
|
||||
ASSISTANT = 16,
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum AudioCapabilities {
|
||||
ECHO_CANCELLATION = 1,
|
||||
NOISE_SUPPRESSION = 2,
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable ConfidenceLevel {
|
||||
int userId;
|
||||
int levelPercent;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum ModelParameter {
|
||||
INVALID = -1,
|
||||
THRESHOLD_FACTOR = 0,
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable ModelParameterRange {
|
||||
int minInclusive;
|
||||
int maxInclusive;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable Phrase {
|
||||
int id;
|
||||
int recognitionModes;
|
||||
int[] users;
|
||||
String locale;
|
||||
String text;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable PhraseRecognitionEvent {
|
||||
android.media.soundtrigger.RecognitionEvent common;
|
||||
android.media.soundtrigger.PhraseRecognitionExtra[] phraseExtras;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable PhraseRecognitionExtra {
|
||||
int id;
|
||||
int recognitionModes;
|
||||
int confidenceLevel;
|
||||
android.media.soundtrigger.ConfidenceLevel[] levels;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable PhraseSoundModel {
|
||||
android.media.soundtrigger.SoundModel common;
|
||||
android.media.soundtrigger.Phrase[] phrases;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable Properties {
|
||||
String implementor;
|
||||
String description;
|
||||
int version;
|
||||
String uuid;
|
||||
String supportedModelArch;
|
||||
int maxSoundModels;
|
||||
int maxKeyPhrases;
|
||||
int maxUsers;
|
||||
int recognitionModes;
|
||||
boolean captureTransition;
|
||||
int maxBufferMs;
|
||||
boolean concurrentCapture;
|
||||
boolean triggerInEvent;
|
||||
int powerConsumptionMw;
|
||||
int audioCapabilities;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable RecognitionConfig {
|
||||
boolean captureRequested;
|
||||
android.media.soundtrigger.PhraseRecognitionExtra[] phraseRecognitionExtras;
|
||||
int audioCapabilities;
|
||||
byte[] data;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable RecognitionEvent {
|
||||
android.media.soundtrigger.RecognitionStatus status = android.media.soundtrigger.RecognitionStatus.INVALID;
|
||||
android.media.soundtrigger.SoundModelType type = android.media.soundtrigger.SoundModelType.INVALID;
|
||||
boolean captureAvailable;
|
||||
int captureSession;
|
||||
int captureDelayMs;
|
||||
int capturePreambleMs;
|
||||
boolean triggerInData;
|
||||
@nullable android.media.audio.common.AudioConfig audioConfig;
|
||||
byte[] data;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum RecognitionMode {
|
||||
VOICE_TRIGGER = 1,
|
||||
USER_IDENTIFICATION = 2,
|
||||
USER_AUTHENTICATION = 4,
|
||||
GENERIC_TRIGGER = 8,
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum RecognitionStatus {
|
||||
INVALID = -1,
|
||||
SUCCESS = 0,
|
||||
ABORTED = 1,
|
||||
FAILURE = 2,
|
||||
FORCED = 3,
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@VintfStability
|
||||
parcelable SoundModel {
|
||||
android.media.soundtrigger.SoundModelType type = android.media.soundtrigger.SoundModelType.INVALID;
|
||||
String uuid;
|
||||
String vendorUuid;
|
||||
@nullable ParcelFileDescriptor data;
|
||||
int dataSize;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum SoundModelType {
|
||||
INVALID = -1,
|
||||
KEYPHRASE = 0,
|
||||
GENERIC = 1,
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||
// two cases:
|
||||
// 1). this is a frozen version file - do not edit this in any case.
|
||||
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||
// the interface (from the latest frozen version), the build system will
|
||||
// prompt you to update this file with `m <name>-update-api`.
|
||||
//
|
||||
// You must not make a backward incompatible change to any AIDL file built
|
||||
// with the aidl_interface module type with versions property set. The module
|
||||
// type is used to build AIDL files in a way that they can be used across
|
||||
// independently updatable components of the system. If a device is shipped
|
||||
// with such a backward incompatible change, it has a high risk of breaking
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.media.soundtrigger;
|
||||
/* @hide */
|
||||
@Backing(type="int") @VintfStability
|
||||
enum Status {
|
||||
INVALID = -1,
|
||||
SUCCESS = 0,
|
||||
RESOURCE_CONTENTION = 1,
|
||||
OPERATION_NOT_SUPPORTED = 2,
|
||||
TEMPORARY_PERMISSION_DENIED = 3,
|
||||
DEAD_OBJECT = 4,
|
||||
INTERNAL_ERROR = 5,
|
||||
}
|
||||
@@ -21,24 +21,23 @@ import android.annotation.Nullable;
|
||||
import android.hardware.audio.common.V2_0.Uuid;
|
||||
import android.hardware.soundtrigger.V2_1.ISoundTriggerHwCallback;
|
||||
import android.hardware.soundtrigger.V2_3.ISoundTriggerHw;
|
||||
import android.hardware.soundtrigger.V2_3.Properties;
|
||||
import android.media.soundtrigger.AudioCapabilities;
|
||||
import android.media.soundtrigger.ConfidenceLevel;
|
||||
import android.media.soundtrigger.ModelParameter;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.Phrase;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.Properties;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.RecognitionMode;
|
||||
import android.media.soundtrigger.RecognitionStatus;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.SoundModelType;
|
||||
import android.media.audio.common.AudioConfig;
|
||||
import android.media.audio.common.AudioOffloadInfo;
|
||||
import android.media.soundtrigger_middleware.AudioCapabilities;
|
||||
import android.media.soundtrigger_middleware.ConfidenceLevel;
|
||||
import android.media.soundtrigger_middleware.ModelParameter;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.Phrase;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.RecognitionMode;
|
||||
import android.media.soundtrigger_middleware.RecognitionStatus;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundModelType;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleProperties;
|
||||
import android.os.HidlMemory;
|
||||
import android.os.HidlMemoryUtil;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
@@ -55,9 +54,9 @@ import java.util.regex.Matcher;
|
||||
*/
|
||||
class ConversionUtil {
|
||||
static @NonNull
|
||||
SoundTriggerModuleProperties hidl2aidlProperties(
|
||||
Properties hidl2aidlProperties(
|
||||
@NonNull ISoundTriggerHw.Properties hidlProperties) {
|
||||
SoundTriggerModuleProperties aidlProperties = new SoundTriggerModuleProperties();
|
||||
Properties aidlProperties = new Properties();
|
||||
aidlProperties.implementor = hidlProperties.implementor;
|
||||
aidlProperties.description = hidlProperties.description;
|
||||
aidlProperties.version = hidlProperties.version;
|
||||
@@ -75,9 +74,9 @@ class ConversionUtil {
|
||||
return aidlProperties;
|
||||
}
|
||||
|
||||
static @NonNull SoundTriggerModuleProperties hidl2aidlProperties(
|
||||
@NonNull Properties hidlProperties) {
|
||||
SoundTriggerModuleProperties aidlProperties = hidl2aidlProperties(hidlProperties.base);
|
||||
static @NonNull Properties hidl2aidlProperties(
|
||||
@NonNull android.hardware.soundtrigger.V2_3.Properties hidlProperties) {
|
||||
Properties aidlProperties = hidl2aidlProperties(hidlProperties.base);
|
||||
aidlProperties.supportedModelArch = hidlProperties.supportedModelArch;
|
||||
aidlProperties.audioCapabilities =
|
||||
hidl2aidlAudioCapabilities(hidlProperties.audioCapabilities);
|
||||
|
||||
@@ -36,7 +36,7 @@ import android.os.IHwBinder;
|
||||
* <li>This interface will always include all the methods from the latest 2.x version (and thus
|
||||
* from every 2.x version) interface, with the convention that unsupported methods throw a
|
||||
* {@link RecoverableException} with a
|
||||
* {@link android.media.soundtrigger_middleware.Status#OPERATION_NOT_SUPPORTED}
|
||||
* {@link android.media.soundtrigger.Status#OPERATION_NOT_SUPPORTED}
|
||||
* code.
|
||||
* <li>Cases where the original interface had multiple versions of a method representing the exact
|
||||
* thing, or there exists a trivial conversion between the new and old version, this interface
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.android.server.soundtrigger_middleware;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.hardware.soundtrigger.V2_0.ISoundTriggerHw;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.os.IHwBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.system.OsConstants;
|
||||
@@ -41,7 +41,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
* <li>All {@link RemoteException}s get rethrown as {@link RuntimeException}.
|
||||
* <li>All HAL malfunctions get thrown as {@link HalException}.
|
||||
* <li>All unsupported operations get thrown as {@link RecoverableException} with a
|
||||
* {@link android.media.soundtrigger_middleware.Status#OPERATION_NOT_SUPPORTED}
|
||||
* {@link android.media.soundtrigger.Status#OPERATION_NOT_SUPPORTED}
|
||||
* code.
|
||||
* </ul>
|
||||
*/
|
||||
|
||||
@@ -22,10 +22,10 @@ import android.hardware.soundtrigger.V2_1.ISoundTriggerHwCallback;
|
||||
import android.hardware.soundtrigger.V2_3.ModelParameterRange;
|
||||
import android.hardware.soundtrigger.V2_3.Properties;
|
||||
import android.hardware.soundtrigger.V2_3.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionStatus;
|
||||
import android.media.soundtrigger.SoundModelType;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.media.permission.SafeCloseable;
|
||||
import android.media.soundtrigger_middleware.RecognitionStatus;
|
||||
import android.media.soundtrigger_middleware.SoundModelType;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.os.IHwBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ import android.hardware.soundtrigger.V2_1.ISoundTriggerHwCallback;
|
||||
import android.hardware.soundtrigger.V2_3.ModelParameterRange;
|
||||
import android.hardware.soundtrigger.V2_3.Properties;
|
||||
import android.hardware.soundtrigger.V2_3.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionStatus;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.media.soundtrigger.RecognitionStatus;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.IHwBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
@@ -21,7 +21,7 @@ import android.hardware.soundtrigger.V2_1.ISoundTriggerHw;
|
||||
import android.hardware.soundtrigger.V2_3.ModelParameterRange;
|
||||
import android.hardware.soundtrigger.V2_3.Properties;
|
||||
import android.hardware.soundtrigger.V2_3.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.os.IHwBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.List;
|
||||
* <li>There is no binder instance associated with this implementation. Do not call asBinder().
|
||||
* <li>The implementation may throw a {@link RecoverableException} to indicate non-fatal,
|
||||
* recoverable faults. The error code would one of the
|
||||
* {@link android.media.soundtrigger_middleware.Status}
|
||||
* {@link android.media.soundtrigger.Status}
|
||||
* constants. Any other exception thrown should be regarded as a bug in the implementation or one
|
||||
* of its dependencies (assuming correct usage).
|
||||
* <li>The implementation is designed for testibility by featuring dependency injection (the
|
||||
@@ -119,4 +119,4 @@ public class SoundTriggerMiddlewareImpl implements ISoundTriggerMiddlewareIntern
|
||||
ISoundTriggerModule attach(int handle, @NonNull ISoundTriggerCallback callback) {
|
||||
return mModules[handle].attach(callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,16 +18,16 @@ package com.android.server.soundtrigger_middleware;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.permission.Identity;
|
||||
import android.media.permission.IdentityContext;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerCallback;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerModule;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleDescriptor;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
@@ -23,20 +23,20 @@ import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.content.Context;
|
||||
import android.content.PermissionChecker;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.media.permission.Identity;
|
||||
import android.media.permission.IdentityContext;
|
||||
import android.media.permission.PermissionUtil;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerCallback;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerMiddlewareService;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerModule;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleDescriptor;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceSpecificException;
|
||||
|
||||
@@ -21,6 +21,10 @@ import static android.Manifest.permission.SOUNDTRIGGER_DELEGATE_IDENTITY;
|
||||
import android.annotation.NonNull;
|
||||
import android.content.Context;
|
||||
import android.hardware.soundtrigger.V2_0.ISoundTriggerHw;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.permission.ClearCallingIdentityContext;
|
||||
import android.media.permission.Identity;
|
||||
import android.media.permission.PermissionUtil;
|
||||
@@ -28,10 +32,6 @@ import android.media.permission.SafeCloseable;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerCallback;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerMiddlewareService;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerModule;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleDescriptor;
|
||||
import android.os.HwBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
@@ -18,21 +18,21 @@ package com.android.server.soundtrigger_middleware;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.Properties;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.RecognitionStatus;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.media.permission.Identity;
|
||||
import android.media.permission.IdentityContext;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerCallback;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerMiddlewareService;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerModule;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.RecognitionStatus;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleDescriptor;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleProperties;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceSpecificException;
|
||||
@@ -112,10 +112,10 @@ public class SoundTriggerMiddlewareValidation implements ISoundTriggerMiddleware
|
||||
}
|
||||
|
||||
private class ModuleState {
|
||||
public @NonNull SoundTriggerModuleProperties properties;
|
||||
public @NonNull Properties properties;
|
||||
public Set<Session> sessions = new HashSet<>();
|
||||
|
||||
private ModuleState(@NonNull SoundTriggerModuleProperties properties) {
|
||||
private ModuleState(@NonNull Properties properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,17 +20,17 @@ import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.hardware.soundtrigger.V2_1.ISoundTriggerHwCallback;
|
||||
import android.hardware.soundtrigger.V2_2.ISoundTriggerHw;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.Properties;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.RecognitionStatus;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerCallback;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerModule;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.RecognitionStatus;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleProperties;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.os.IBinder;
|
||||
import android.os.IHwBinder;
|
||||
import android.os.RemoteException;
|
||||
@@ -68,9 +68,8 @@ import java.util.Set;
|
||||
* <li>There is no binder instance associated with this implementation. Do not call asBinder().
|
||||
* <li>The implementation may throw a {@link RecoverableException} to indicate non-fatal,
|
||||
* recoverable faults. The error code would one of the
|
||||
* {@link android.media.soundtrigger_middleware.Status} constants. Any other exception
|
||||
* thrown should be regarded as a bug in the implementation or one of its dependencies
|
||||
* (assuming correct usage).
|
||||
* {@link android.media.soundtrigger.Status} constants. Any other exception thrown should be
|
||||
* regarded as a bug in the implementation or one of its dependencies (assuming correct usage).
|
||||
* <li>The implementation is designed for testability by featuring dependency injection (the
|
||||
* underlying HAL driver instances are passed to the ctor) and by minimizing dependencies
|
||||
* on Android runtime.
|
||||
@@ -91,7 +90,7 @@ class SoundTriggerModule implements IHwBinder.DeathRecipient, ISoundTriggerHw2.G
|
||||
@NonNull private ISoundTriggerHw2 mHalService;
|
||||
@NonNull private final SoundTriggerMiddlewareImpl.AudioSessionProvider mAudioSessionProvider;
|
||||
private final Set<Session> mActiveSessions = new HashSet<>();
|
||||
private SoundTriggerModuleProperties mProperties;
|
||||
private Properties mProperties;
|
||||
|
||||
/**
|
||||
* Ctor.
|
||||
@@ -132,7 +131,7 @@ class SoundTriggerModule implements IHwBinder.DeathRecipient, ISoundTriggerHw2.G
|
||||
* @return The properties structure.
|
||||
*/
|
||||
synchronized @NonNull
|
||||
SoundTriggerModuleProperties getProperties() {
|
||||
Properties getProperties() {
|
||||
return mProperties;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,21 +17,18 @@
|
||||
package com.android.server.soundtrigger_middleware;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.media.soundtrigger_middleware.ConfidenceLevel;
|
||||
import android.media.soundtrigger_middleware.ModelParameter;
|
||||
import android.media.soundtrigger_middleware.Phrase;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionMode;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundModelType;
|
||||
|
||||
import com.android.internal.util.Preconditions;
|
||||
import android.media.soundtrigger.ConfidenceLevel;
|
||||
import android.media.soundtrigger.ModelParameter;
|
||||
import android.media.soundtrigger.Phrase;
|
||||
import android.media.soundtrigger.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionMode;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.SoundModelType;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Utilities for asserting the validity of various data types used by this module.
|
||||
|
||||
@@ -37,7 +37,7 @@ import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.os.HwParcel;
|
||||
import android.os.IHwBinder;
|
||||
import android.os.IHwInterface;
|
||||
|
||||
@@ -30,19 +30,19 @@ import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.hardware.soundtrigger.V2_0.ISoundTriggerHwCallback;
|
||||
import android.media.soundtrigger.ModelParameter;
|
||||
import android.media.soundtrigger.ModelParameterRange;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.Properties;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.RecognitionStatus;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.Status;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerCallback;
|
||||
import android.media.soundtrigger_middleware.ISoundTriggerModule;
|
||||
import android.media.soundtrigger_middleware.ModelParameter;
|
||||
import android.media.soundtrigger_middleware.ModelParameterRange;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.RecognitionStatus;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleDescriptor;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleProperties;
|
||||
import android.media.soundtrigger_middleware.Status;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Pair;
|
||||
|
||||
@@ -163,7 +163,7 @@ public class SoundTriggerMiddlewareImplTest {
|
||||
SoundTriggerModuleDescriptor[] allDescriptors = mService.listModules();
|
||||
assertEquals(1, allDescriptors.length);
|
||||
|
||||
SoundTriggerModuleProperties properties = allDescriptors[0].properties;
|
||||
Properties properties = allDescriptors[0].properties;
|
||||
|
||||
TestUtil.validateDefaultProperties(properties, false);
|
||||
}
|
||||
|
||||
@@ -26,18 +26,18 @@ import android.hardware.soundtrigger.V2_1.ISoundTriggerHw;
|
||||
import android.hardware.soundtrigger.V2_4.ISoundTriggerHwCallback;
|
||||
import android.media.audio.common.AudioChannelMask;
|
||||
import android.media.audio.common.AudioFormat;
|
||||
import android.media.soundtrigger_middleware.AudioCapabilities;
|
||||
import android.media.soundtrigger_middleware.ConfidenceLevel;
|
||||
import android.media.soundtrigger_middleware.Phrase;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger_middleware.PhraseSoundModel;
|
||||
import android.media.soundtrigger_middleware.RecognitionConfig;
|
||||
import android.media.soundtrigger_middleware.RecognitionEvent;
|
||||
import android.media.soundtrigger_middleware.RecognitionMode;
|
||||
import android.media.soundtrigger_middleware.SoundModel;
|
||||
import android.media.soundtrigger_middleware.SoundModelType;
|
||||
import android.media.soundtrigger_middleware.SoundTriggerModuleProperties;
|
||||
import android.media.soundtrigger.AudioCapabilities;
|
||||
import android.media.soundtrigger.ConfidenceLevel;
|
||||
import android.media.soundtrigger.Phrase;
|
||||
import android.media.soundtrigger.PhraseRecognitionEvent;
|
||||
import android.media.soundtrigger.PhraseRecognitionExtra;
|
||||
import android.media.soundtrigger.PhraseSoundModel;
|
||||
import android.media.soundtrigger.Properties;
|
||||
import android.media.soundtrigger.RecognitionConfig;
|
||||
import android.media.soundtrigger.RecognitionEvent;
|
||||
import android.media.soundtrigger.RecognitionMode;
|
||||
import android.media.soundtrigger.SoundModel;
|
||||
import android.media.soundtrigger.SoundModelType;
|
||||
import android.os.HidlMemoryUtil;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.SharedMemory;
|
||||
@@ -184,7 +184,7 @@ public class TestUtil {
|
||||
return properties;
|
||||
}
|
||||
|
||||
public static void validateDefaultProperties(SoundTriggerModuleProperties properties,
|
||||
public static void validateDefaultProperties(Properties properties,
|
||||
boolean supportConcurrentCapture) {
|
||||
assertEquals("implementor", properties.implementor);
|
||||
assertEquals("description", properties.description);
|
||||
|
||||
Reference in New Issue
Block a user