Loading services/audioflinger/AudioStreamOut.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,10 @@ status_t AudioStreamOut::open( stream = outStream; mHalFormatHasProportionalFrames = audio_has_proportional_frames(config->format); status = stream->getFrameSize(&mHalFrameSize); LOG_ALWAYS_FATAL_IF(status != OK, "Error retrieving frame size from HAL: %d", status); LOG_ALWAYS_FATAL_IF(mHalFrameSize <= 0, "Error frame size was %zu but must be greater than" " zero", mHalFrameSize); } return status; Loading services/audioflinger/Threads.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -8436,13 +8436,14 @@ void AudioFlinger::RecordThread::readInputParameters_l() } result = mInput->stream->getFrameSize(&mFrameSize); LOG_ALWAYS_FATAL_IF(result != OK, "Error retrieving frame size from HAL: %d", result); LOG_ALWAYS_FATAL_IF(mFrameSize <= 0, "Error frame size was %zu but must be greater than zero", mFrameSize); result = mInput->stream->getBufferSize(&mBufferSize); LOG_ALWAYS_FATAL_IF(result != OK, "Error retrieving buffer size from HAL: %d", result); mFrameCount = mBufferSize / mFrameSize; ALOGV("%p RecordThread params: mChannelCount=%u, mFormat=%#x, mFrameSize=%lld, " "mBufferSize=%lld, mFrameCount=%lld", this, mChannelCount, mFormat, (long long)mFrameSize, (long long)mBufferSize, (long long)mFrameCount); ALOGV("%p RecordThread params: mChannelCount=%u, mFormat=%#x, mFrameSize=%zu, " "mBufferSize=%zu, mFrameCount=%zu", this, mChannelCount, mFormat, mFrameSize, mBufferSize, mFrameCount); // This is the formula for calculating the temporary buffer size. // With 7 HAL buffers, we can guarantee ability to down-sample the input by ratio of 6:1 to // 1 full output buffer, regardless of the alignment of the available input. Loading Loading @@ -9018,6 +9019,8 @@ void AudioFlinger::MmapThread::readHalParameters_l() LOG_ALWAYS_FATAL_IF(!audio_is_linear_pcm(mFormat), "HAL format %#x is not linear pcm", mFormat); result = mHalStream->getFrameSize(&mFrameSize); LOG_ALWAYS_FATAL_IF(result != OK, "Error retrieving frame size from HAL: %d", result); LOG_ALWAYS_FATAL_IF(mFrameSize <= 0, "Error frame size was %zu but must be greater than zero", mFrameSize); result = mHalStream->getBufferSize(&mBufferSize); LOG_ALWAYS_FATAL_IF(result != OK, "Error retrieving buffer size from HAL: %d", result); mFrameCount = mBufferSize / mFrameSize; Loading Loading
services/audioflinger/AudioStreamOut.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,10 @@ status_t AudioStreamOut::open( stream = outStream; mHalFormatHasProportionalFrames = audio_has_proportional_frames(config->format); status = stream->getFrameSize(&mHalFrameSize); LOG_ALWAYS_FATAL_IF(status != OK, "Error retrieving frame size from HAL: %d", status); LOG_ALWAYS_FATAL_IF(mHalFrameSize <= 0, "Error frame size was %zu but must be greater than" " zero", mHalFrameSize); } return status; Loading
services/audioflinger/Threads.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -8436,13 +8436,14 @@ void AudioFlinger::RecordThread::readInputParameters_l() } result = mInput->stream->getFrameSize(&mFrameSize); LOG_ALWAYS_FATAL_IF(result != OK, "Error retrieving frame size from HAL: %d", result); LOG_ALWAYS_FATAL_IF(mFrameSize <= 0, "Error frame size was %zu but must be greater than zero", mFrameSize); result = mInput->stream->getBufferSize(&mBufferSize); LOG_ALWAYS_FATAL_IF(result != OK, "Error retrieving buffer size from HAL: %d", result); mFrameCount = mBufferSize / mFrameSize; ALOGV("%p RecordThread params: mChannelCount=%u, mFormat=%#x, mFrameSize=%lld, " "mBufferSize=%lld, mFrameCount=%lld", this, mChannelCount, mFormat, (long long)mFrameSize, (long long)mBufferSize, (long long)mFrameCount); ALOGV("%p RecordThread params: mChannelCount=%u, mFormat=%#x, mFrameSize=%zu, " "mBufferSize=%zu, mFrameCount=%zu", this, mChannelCount, mFormat, mFrameSize, mBufferSize, mFrameCount); // This is the formula for calculating the temporary buffer size. // With 7 HAL buffers, we can guarantee ability to down-sample the input by ratio of 6:1 to // 1 full output buffer, regardless of the alignment of the available input. Loading Loading @@ -9018,6 +9019,8 @@ void AudioFlinger::MmapThread::readHalParameters_l() LOG_ALWAYS_FATAL_IF(!audio_is_linear_pcm(mFormat), "HAL format %#x is not linear pcm", mFormat); result = mHalStream->getFrameSize(&mFrameSize); LOG_ALWAYS_FATAL_IF(result != OK, "Error retrieving frame size from HAL: %d", result); LOG_ALWAYS_FATAL_IF(mFrameSize <= 0, "Error frame size was %zu but must be greater than zero", mFrameSize); result = mHalStream->getBufferSize(&mBufferSize); LOG_ALWAYS_FATAL_IF(result != OK, "Error retrieving buffer size from HAL: %d", result); mFrameCount = mBufferSize / mFrameSize; Loading