diff options
| author | 2022-12-15 14:56:22 +0000 | |
|---|---|---|
| committer | 2022-12-15 23:13:02 +0000 | |
| commit | ac4038295f11b2d9793d895bb2721878b2f70dbc (patch) | |
| tree | d435f418cad41b48e2d8394408dc65b038b8d179 | |
| parent | c7237c1b0ef9d8471784c5c28551aa9611583371 (diff) | |
increase HotwordAudioStream copy chunk size
Each read to the read end of the HotwordAudioStream pipe provided by the
HotwordDetectionService is now performed with 32KB size. This request
will return early with whatever bytes are available to be read.
The reason for increasing the default buffer size is to improve the
throughput latency of data egressed from the HotwordDetectionService.
Bug: 262433815
Test: Manual testing with test app
Change-Id: I922bd28e6018bd5abb1c8b5e5e79f500c0b4c093
| -rw-r--r-- | services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordAudioStreamCopier.java | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordAudioStreamCopier.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordAudioStreamCopier.java index b9d2ae6b0d39..f1e86100b8a4 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordAudioStreamCopier.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordAudioStreamCopier.java @@ -60,10 +60,10 @@ final class HotwordAudioStreamCopier {      private static final String OP_MESSAGE = "Streaming hotword audio to VoiceInteractionService";      private static final String TASK_ID_PREFIX = "HotwordDetectedResult@";      private static final String THREAD_NAME_PREFIX = "Copy-"; -    private static final int DEFAULT_COPY_BUFFER_LENGTH_BYTES = 2_560;      // Corresponds to the OS pipe capacity in bytes      private static final int MAX_COPY_BUFFER_LENGTH_BYTES = 65_536; +    private static final int DEFAULT_COPY_BUFFER_LENGTH_BYTES = 32_768;      private final AppOpsManager mAppOpsManager;      private final int mDetectorType;  |