Lines Matching refs:count
178 ssize_t audio_utils_fifo_writer::write(const void *buffer, size_t count, in write() argument
183 ssize_t availToWrite = obtain(iovec, count, timeout); in write()
198 ssize_t audio_utils_fifo_writer::obtain(audio_utils_iovec iovec[2], size_t count, in obtain() argument
220 if (count == 0 || availToWrite > 0 || timeout == NULL || in obtain()
283 if (availToWrite > count) { in obtain()
284 availToWrite = count; in obtain()
303 void audio_utils_fifo_writer::release(size_t count) in release() argument
307 if (count > 0) { in release()
308 if (count > mObtained) { in release()
309 ALOGE("%s(count=%zu) > mObtained=%u", __func__, count, mObtained); in release()
317 mLocalRear = mFifo.sum(mLocalRear, count); in release()
332 if (mIsArmed && filled + count > mTriggerLevel) { in release()
348 mLocalRear = mFifo.sum(mLocalRear, count); in release()
351 mObtained -= count; in release()
352 mTotalReleased += count; in release()
435 ssize_t audio_utils_fifo_reader::read(void *buffer, size_t count, const struct timespec *timeout, in read() argument
440 ssize_t availToRead = obtain(iovec, count, timeout, lost); in read()
454 ssize_t audio_utils_fifo_reader::obtain(audio_utils_iovec iovec[2], size_t count, in obtain() argument
458 return obtain(iovec, count, timeout, NULL /*lost*/); in obtain()
461 void audio_utils_fifo_reader::release(size_t count) in release() argument
465 if (count > 0) { in release()
466 if (count > mObtained) { in release()
467 ALOGE("%s(count=%zu) > mObtained=%u", __func__, count, mObtained); in release()
475 mLocalFront = mFifo.sum(mLocalFront, count); in release()
490 if (mIsArmed && filled - count < mTriggerLevel) { in release()
506 mLocalFront = mFifo.sum(mLocalFront, count); in release()
508 mObtained -= count; in release()
509 mTotalReleased += count; in release()
514 ssize_t audio_utils_fifo_reader::obtain(audio_utils_iovec iovec[2], size_t count, in obtain() argument
524 if (count == 0 || rear != mLocalFront || timeout == NULL || in obtain()
594 if (availToRead > count) { in obtain()
595 availToRead = count; in obtain()