Loading services/voiceinteraction/java/com/android/server/soundtrigger_middleware/README.md +1 −3 Original line number Diff line number Diff line Loading @@ -135,8 +135,6 @@ to call another module, while having its local mutex(es) held: changed while the lock has been released. - Release the local lock. - Invoke any synchronous callbacks if needed. - Calling from `SoundTriggerMiddlewareImpl` / `SoundTriggerModule` into the audio policy service via `acquireSession()` / `releaseSession()` while holding the local lock is legal. - `setCaptureState()` calls, originating from Audio Policy Service, into the lower layers of the stack may call into the HAL (specifically, they must invoke `stopRecognition()`, but must not block on callbacks. For this reason, `SoundTriggerHw2ConcurrentCaptureHandler`, which is the Loading services/voiceinteraction/java/com/android/server/soundtrigger_middleware/SoundTriggerModule.java +2 −4 Original line number Diff line number Diff line Loading @@ -257,10 +257,9 @@ class SoundTriggerModule implements IBinder.DeathRecipient, ISoundTriggerHal.Glo @Override public int loadModel(@NonNull SoundModel model) { SoundTriggerMiddlewareImpl.AudioSessionProvider.AudioSession audioSession = null; final var audioSession = mAudioSessionProvider.acquireSession(); try { synchronized (SoundTriggerModule.this) { audioSession = mAudioSessionProvider.acquireSession(); checkValid(); Model loadedModel = new Model(); return loadedModel.load(model, audioSession); Loading @@ -279,10 +278,9 @@ class SoundTriggerModule implements IBinder.DeathRecipient, ISoundTriggerHal.Glo @Override public int loadPhraseModel(@NonNull PhraseSoundModel model) { SoundTriggerMiddlewareImpl.AudioSessionProvider.AudioSession audioSession = null; final var audioSession = mAudioSessionProvider.acquireSession(); try { synchronized (SoundTriggerModule.this) { audioSession = mAudioSessionProvider.acquireSession(); checkValid(); Model loadedModel = new Model(); int result = loadedModel.load(model, audioSession); Loading Loading
services/voiceinteraction/java/com/android/server/soundtrigger_middleware/README.md +1 −3 Original line number Diff line number Diff line Loading @@ -135,8 +135,6 @@ to call another module, while having its local mutex(es) held: changed while the lock has been released. - Release the local lock. - Invoke any synchronous callbacks if needed. - Calling from `SoundTriggerMiddlewareImpl` / `SoundTriggerModule` into the audio policy service via `acquireSession()` / `releaseSession()` while holding the local lock is legal. - `setCaptureState()` calls, originating from Audio Policy Service, into the lower layers of the stack may call into the HAL (specifically, they must invoke `stopRecognition()`, but must not block on callbacks. For this reason, `SoundTriggerHw2ConcurrentCaptureHandler`, which is the Loading
services/voiceinteraction/java/com/android/server/soundtrigger_middleware/SoundTriggerModule.java +2 −4 Original line number Diff line number Diff line Loading @@ -257,10 +257,9 @@ class SoundTriggerModule implements IBinder.DeathRecipient, ISoundTriggerHal.Glo @Override public int loadModel(@NonNull SoundModel model) { SoundTriggerMiddlewareImpl.AudioSessionProvider.AudioSession audioSession = null; final var audioSession = mAudioSessionProvider.acquireSession(); try { synchronized (SoundTriggerModule.this) { audioSession = mAudioSessionProvider.acquireSession(); checkValid(); Model loadedModel = new Model(); return loadedModel.load(model, audioSession); Loading @@ -279,10 +278,9 @@ class SoundTriggerModule implements IBinder.DeathRecipient, ISoundTriggerHal.Glo @Override public int loadPhraseModel(@NonNull PhraseSoundModel model) { SoundTriggerMiddlewareImpl.AudioSessionProvider.AudioSession audioSession = null; final var audioSession = mAudioSessionProvider.acquireSession(); try { synchronized (SoundTriggerModule.this) { audioSession = mAudioSessionProvider.acquireSession(); checkValid(); Model loadedModel = new Model(); int result = loadedModel.load(model, audioSession); Loading