diff options
author | Glenn Kasten <gkasten@google.com> | 2014-03-06 09:03:34 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-03-06 09:08:05 -0800 |
commit | 43d9b8706b3916ee0f1d745a2832f792c3406ca8 (patch) | |
tree | ba8fd8933eb7e1e994625e51f607ab4c32a2ceba /media/libnbaio/AudioStreamInSource.cpp | |
parent | c326e1c3d122917462f1cda4f03d9c639ad92902 (diff) | |
download | frameworks_av-43d9b8706b3916ee0f1d745a2832f792c3406ca8.zip frameworks_av-43d9b8706b3916ee0f1d745a2832f792c3406ca8.tar.gz frameworks_av-43d9b8706b3916ee0f1d745a2832f792c3406ca8.tar.bz2 |
Remove restriction for HAL streams of AUDIO_FORMAT_PCM_16_BIT
Change-Id: I6b89a3ac4b77b9a5a84e3b623987186c3d2db89d
Diffstat (limited to 'media/libnbaio/AudioStreamInSource.cpp')
-rw-r--r-- | media/libnbaio/AudioStreamInSource.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
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); } |