From ab222c63bcbd6ebb1ecf7fe68cbf5534f7716f09 Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Tue, 21 May 2024 14:23:13 -0700 Subject: [PATCH] audio: Allow onError callback in any state In practice, the AoC can crash while the stream is in any state, thus this should be allowed for correct handling of error conditions in the framework. The list of states when `IStreamCallback.onError` can be received is not enforced in VTS tests, thus no test regressions are expected. Bug: 339400414 Test: repro steps for simulating AoC crash in b/339400414 Change-Id: I9a52779f773307882109e159d715072de5af2ece --- audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv b/audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv index a3f0de9e59..56b7926a21 100644 --- a/audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv +++ b/audio/aidl/android/hardware/audio/core/stream-out-async-sm.gv @@ -51,9 +51,7 @@ digraph stream_out_async_state_machine { DRAIN_PAUSED -> DRAINING [label="start"]; // consumer -> active DRAIN_PAUSED -> TRANSFER_PAUSED [label="burst"]; // producer -> active DRAIN_PAUSED -> IDLE [label="flush"]; // buffer is cleared - IDLE -> ERROR [label="←IStreamCallback.onError"]; - DRAINING -> ERROR [label="←IStreamCallback.onError"]; - TRANSFERRING -> ERROR [label="←IStreamCallback.onError"]; + ANY_STATE -> ERROR [label="←IStreamCallback.onError"]; ANY_STATE -> CLOSED [label="→IStream*.close"]; CLOSED -> F; }