summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryidongh <quic_yidongh@quicinc.com>2022-05-24 19:30:33 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2022-06-13 19:29:56 -0700
commitf0b117f1f163d63484f26c625ab881f2a7d902f7 (patch)
tree4ef096050a0dc78f222cbcab29bef312bcc08433
parent8f494538d093642f4fafd30d1eec92e3b3ce702c (diff)
ahal: return proper read size when SVA is internally stopped
For dualVA, when one model is unloaded during lab reading for another model, graph may be restarted and no further lab data can be provided. In this case we should return read data as zeros and do not notify any error to framework side. Return requested size if SVA lab read fails. Change-Id: I48fe70708107fc6a975dd27b1dca8b273bafdfa7
-rw-r--r--hal/AudioStream.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/hal/AudioStream.cpp b/hal/AudioStream.cpp
index c10b5bf5..a47ba2a7 100644
--- a/hal/AudioStream.cpp
+++ b/hal/AudioStream.cpp
@@ -4265,6 +4265,7 @@ ssize_t StreamInPrimary::read(const void *buffer, size_t bytes) {
memset(palBuffer.buffer, 0, palBuffer.size);
AHAL_ERR("error, failed to read data from PAL");
ATRACE_END();
+ ret = bytes;
goto exit;
} else {
size += ret;