Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3566,6 +3566,7 @@ package android.hardware.soundtrigger { field public final int powerConsumptionMw; field public final int recognitionModes; field public final boolean returnsTriggerInEvent; field @NonNull public final String supportedModelArch; field public final boolean supportsCaptureTransition; field public final boolean supportsConcurrentCapture; field @NonNull public final java.util.UUID uuid; Loading core/java/android/hardware/soundtrigger/ConversionUtil.java +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ class ConversionUtil { properties.description, properties.uuid, properties.version, properties.supportedModelArch, properties.maxSoundModels, properties.maxKeyPhrases, properties.maxUsers, Loading core/java/android/hardware/soundtrigger/SoundTrigger.java +19 −6 Original line number Diff line number Diff line Loading @@ -101,6 +101,14 @@ public class SoundTrigger { /** Voice detection engine version */ public final int version; /** * String naming the architecture used for running the supported models. * (eg. a platform running models on a DSP could implement this string to convey the DSP * architecture used) */ @NonNull public final String supportedModelArch; /** Maximum number of active sound models */ public final int maxSoundModels; Loading Loading @@ -130,15 +138,17 @@ public class SoundTrigger { public final boolean returnsTriggerInEvent; ModuleProperties(int id, @NonNull String implementor, @NonNull String description, @NonNull String uuid, int version, int maxSoundModels, int maxKeyphrases, int maxUsers, int recognitionModes, boolean supportsCaptureTransition, int maxBufferMs, boolean supportsConcurrentCapture, int powerConsumptionMw, boolean returnsTriggerInEvent) { @NonNull String uuid, int version, @NonNull String supportedModelArch, int maxSoundModels, int maxKeyphrases, int maxUsers, int recognitionModes, boolean supportsCaptureTransition, int maxBufferMs, boolean supportsConcurrentCapture, int powerConsumptionMw, boolean returnsTriggerInEvent) { this.id = id; this.implementor = requireNonNull(implementor); this.description = requireNonNull(description); this.uuid = UUID.fromString(requireNonNull(uuid)); this.version = version; this.supportedModelArch = requireNonNull(supportedModelArch); this.maxSoundModels = maxSoundModels; this.maxKeyphrases = maxKeyphrases; this.maxUsers = maxUsers; Loading Loading @@ -167,6 +177,7 @@ public class SoundTrigger { String description = in.readString(); String uuid = in.readString(); int version = in.readInt(); String supportedModelArch = in.readString(); int maxSoundModels = in.readInt(); int maxKeyphrases = in.readInt(); int maxUsers = in.readInt(); Loading @@ -177,7 +188,7 @@ public class SoundTrigger { int powerConsumptionMw = in.readInt(); boolean returnsTriggerInEvent = in.readByte() == 1; return new ModuleProperties(id, implementor, description, uuid, version, maxSoundModels, maxKeyphrases, maxUsers, recognitionModes, supportedModelArch, maxSoundModels, maxKeyphrases, maxUsers, recognitionModes, supportsCaptureTransition, maxBufferMs, supportsConcurrentCapture, powerConsumptionMw, returnsTriggerInEvent); } Loading @@ -189,6 +200,7 @@ public class SoundTrigger { dest.writeString(description); dest.writeString(uuid.toString()); dest.writeInt(version); dest.writeString(supportedModelArch); dest.writeInt(maxSoundModels); dest.writeInt(maxKeyphrases); dest.writeInt(maxUsers); Loading @@ -208,7 +220,8 @@ public class SoundTrigger { @Override public String toString() { return "ModuleProperties [id=" + id + ", implementor=" + implementor + ", description=" + description + ", uuid=" + uuid + ", version=" + version + ", maxSoundModels=" + description + ", uuid=" + uuid + ", version=" + version + " , supportedModelArch=" + supportedModelArch + ", maxSoundModels=" + maxSoundModels + ", maxKeyphrases=" + maxKeyphrases + ", maxUsers=" + maxUsers + ", recognitionModes=" + recognitionModes + ", supportsCaptureTransition=" + supportsCaptureTransition + ", maxBufferMs=" Loading media/java/android/media/soundtrigger_middleware/SoundTriggerModuleProperties.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,14 @@ parcelable SoundTriggerModuleProperties { * Unique implementation ID. The UUID must change with each version of the engine implementation */ String uuid; /** * String naming the architecture used for running the supported models. * (eg. a platform running models on a DSP could implement this string to convey the DSP * architecture used) * This property is supported for soundtrigger HAL v2.3 and above. * If running a previous version, the string will be empty. */ String supportedModelArch; /** Maximum number of concurrent sound models loaded */ int maxSoundModels; /** Maximum number of key phrases */ Loading services/core/java/com/android/server/soundtrigger_middleware/ConversionUtil.java +8 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ 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.audio.common.AudioConfig; import android.media.audio.common.AudioOffloadInfo; import android.media.soundtrigger_middleware.ConfidenceLevel; Loading Loading @@ -69,6 +70,13 @@ class ConversionUtil { return aidlProperties; } static @NonNull SoundTriggerModuleProperties hidl2aidlProperties( @NonNull Properties hidlProperties) { SoundTriggerModuleProperties aidlProperties = hidl2aidlProperties(hidlProperties.base); aidlProperties.supportedModelArch = hidlProperties.supportedModelArch; return aidlProperties; } static @NonNull String hidl2aidlUuid(@NonNull Uuid hidlUuid) { if (hidlUuid.node == null || hidlUuid.node.length != 6) { Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3566,6 +3566,7 @@ package android.hardware.soundtrigger { field public final int powerConsumptionMw; field public final int recognitionModes; field public final boolean returnsTriggerInEvent; field @NonNull public final String supportedModelArch; field public final boolean supportsCaptureTransition; field public final boolean supportsConcurrentCapture; field @NonNull public final java.util.UUID uuid; Loading
core/java/android/hardware/soundtrigger/ConversionUtil.java +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ class ConversionUtil { properties.description, properties.uuid, properties.version, properties.supportedModelArch, properties.maxSoundModels, properties.maxKeyPhrases, properties.maxUsers, Loading
core/java/android/hardware/soundtrigger/SoundTrigger.java +19 −6 Original line number Diff line number Diff line Loading @@ -101,6 +101,14 @@ public class SoundTrigger { /** Voice detection engine version */ public final int version; /** * String naming the architecture used for running the supported models. * (eg. a platform running models on a DSP could implement this string to convey the DSP * architecture used) */ @NonNull public final String supportedModelArch; /** Maximum number of active sound models */ public final int maxSoundModels; Loading Loading @@ -130,15 +138,17 @@ public class SoundTrigger { public final boolean returnsTriggerInEvent; ModuleProperties(int id, @NonNull String implementor, @NonNull String description, @NonNull String uuid, int version, int maxSoundModels, int maxKeyphrases, int maxUsers, int recognitionModes, boolean supportsCaptureTransition, int maxBufferMs, boolean supportsConcurrentCapture, int powerConsumptionMw, boolean returnsTriggerInEvent) { @NonNull String uuid, int version, @NonNull String supportedModelArch, int maxSoundModels, int maxKeyphrases, int maxUsers, int recognitionModes, boolean supportsCaptureTransition, int maxBufferMs, boolean supportsConcurrentCapture, int powerConsumptionMw, boolean returnsTriggerInEvent) { this.id = id; this.implementor = requireNonNull(implementor); this.description = requireNonNull(description); this.uuid = UUID.fromString(requireNonNull(uuid)); this.version = version; this.supportedModelArch = requireNonNull(supportedModelArch); this.maxSoundModels = maxSoundModels; this.maxKeyphrases = maxKeyphrases; this.maxUsers = maxUsers; Loading Loading @@ -167,6 +177,7 @@ public class SoundTrigger { String description = in.readString(); String uuid = in.readString(); int version = in.readInt(); String supportedModelArch = in.readString(); int maxSoundModels = in.readInt(); int maxKeyphrases = in.readInt(); int maxUsers = in.readInt(); Loading @@ -177,7 +188,7 @@ public class SoundTrigger { int powerConsumptionMw = in.readInt(); boolean returnsTriggerInEvent = in.readByte() == 1; return new ModuleProperties(id, implementor, description, uuid, version, maxSoundModels, maxKeyphrases, maxUsers, recognitionModes, supportedModelArch, maxSoundModels, maxKeyphrases, maxUsers, recognitionModes, supportsCaptureTransition, maxBufferMs, supportsConcurrentCapture, powerConsumptionMw, returnsTriggerInEvent); } Loading @@ -189,6 +200,7 @@ public class SoundTrigger { dest.writeString(description); dest.writeString(uuid.toString()); dest.writeInt(version); dest.writeString(supportedModelArch); dest.writeInt(maxSoundModels); dest.writeInt(maxKeyphrases); dest.writeInt(maxUsers); Loading @@ -208,7 +220,8 @@ public class SoundTrigger { @Override public String toString() { return "ModuleProperties [id=" + id + ", implementor=" + implementor + ", description=" + description + ", uuid=" + uuid + ", version=" + version + ", maxSoundModels=" + description + ", uuid=" + uuid + ", version=" + version + " , supportedModelArch=" + supportedModelArch + ", maxSoundModels=" + maxSoundModels + ", maxKeyphrases=" + maxKeyphrases + ", maxUsers=" + maxUsers + ", recognitionModes=" + recognitionModes + ", supportsCaptureTransition=" + supportsCaptureTransition + ", maxBufferMs=" Loading
media/java/android/media/soundtrigger_middleware/SoundTriggerModuleProperties.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,14 @@ parcelable SoundTriggerModuleProperties { * Unique implementation ID. The UUID must change with each version of the engine implementation */ String uuid; /** * String naming the architecture used for running the supported models. * (eg. a platform running models on a DSP could implement this string to convey the DSP * architecture used) * This property is supported for soundtrigger HAL v2.3 and above. * If running a previous version, the string will be empty. */ String supportedModelArch; /** Maximum number of concurrent sound models loaded */ int maxSoundModels; /** Maximum number of key phrases */ Loading
services/core/java/com/android/server/soundtrigger_middleware/ConversionUtil.java +8 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ 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.audio.common.AudioConfig; import android.media.audio.common.AudioOffloadInfo; import android.media.soundtrigger_middleware.ConfidenceLevel; Loading Loading @@ -69,6 +70,13 @@ class ConversionUtil { return aidlProperties; } static @NonNull SoundTriggerModuleProperties hidl2aidlProperties( @NonNull Properties hidlProperties) { SoundTriggerModuleProperties aidlProperties = hidl2aidlProperties(hidlProperties.base); aidlProperties.supportedModelArch = hidlProperties.supportedModelArch; return aidlProperties; } static @NonNull String hidl2aidlUuid(@NonNull Uuid hidlUuid) { if (hidlUuid.node == null || hidlUuid.node.length != 6) { Loading