audiohal: Add diagnostic message to check the number of bytes written
Temporary change for investigating b/35813113. Need to test the hypothesis that sometimes either legacy HAL, or the wrapper reports more bytes written than being asked for. Bug: 35813113 Change-Id: I6596403e0ddcdcc8b061d1977e329f67670f30db Test: make
This commit is contained in:
parent
bdef4b98da
commit
8d391c8eed
1 changed files with 4 additions and 0 deletions
|
@ -79,6 +79,10 @@ void WriteThread::doWrite() {
|
|||
ssize_t writeResult = mStream->write(mStream, &mBuffer[0], availToRead);
|
||||
if (writeResult >= 0) {
|
||||
mStatus.reply.written = writeResult;
|
||||
// Diagnostics of the cause of b/35813113.
|
||||
ALOGE_IF(writeResult > availToRead,
|
||||
"legacy hal reports more bytes written than asked for: %lld > %lld",
|
||||
(long long)writeResult, (long long)availToRead);
|
||||
} else {
|
||||
mStatus.retval = Stream::analyzeStatus("write", writeResult);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue