From 43d9b8706b3916ee0f1d745a2832f792c3406ca8 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Thu, 6 Mar 2014 09:03:34 -0800 Subject: Remove restriction for HAL streams of AUDIO_FORMAT_PCM_16_BIT Change-Id: I6b89a3ac4b77b9a5a84e3b623987186c3d2db89d --- media/libnbaio/AudioStreamInSource.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'media/libnbaio/AudioStreamInSource.cpp') diff --git a/media/libnbaio/AudioStreamInSource.cpp b/media/libnbaio/AudioStreamInSource.cpp index efbc1a7..cee90dd 100644 --- a/media/libnbaio/AudioStreamInSource.cpp +++ b/media/libnbaio/AudioStreamInSource.cpp @@ -43,13 +43,11 @@ ssize_t AudioStreamInSource::negotiate(const NBAIO_Format offers[], size_t numOf if (!Format_isValid(mFormat)) { mStreamBufferSizeBytes = mStream->common.get_buffer_size(&mStream->common); audio_format_t streamFormat = mStream->common.get_format(&mStream->common); - if (streamFormat == AUDIO_FORMAT_PCM_16_BIT) { - uint32_t sampleRate = mStream->common.get_sample_rate(&mStream->common); - audio_channel_mask_t channelMask = - (audio_channel_mask_t) mStream->common.get_channels(&mStream->common); - mFormat = Format_from_SR_C(sampleRate, popcount(channelMask)); - mFrameSize = Format_frameSize(mFormat); - } + uint32_t sampleRate = mStream->common.get_sample_rate(&mStream->common); + audio_channel_mask_t channelMask = + (audio_channel_mask_t) mStream->common.get_channels(&mStream->common); + mFormat = Format_from_SR_C(sampleRate, popcount(channelMask)); + mFrameSize = Format_frameSize(mFormat); } return NBAIO_Source::negotiate(offers, numOffers, counterOffers, numCounterOffers); } -- cgit v1.1