diff options
author | Andy Hung <hunga@google.com> | 2015-04-07 13:43:36 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2015-04-08 15:58:56 -0700 |
commit | 6770c6faa3467c92eabc5ec9b23d60eb556a0d03 (patch) | |
tree | 45470127b227dbda5a346bb1902f92f8998c25bb /media/libmedia/AudioRecord.cpp | |
parent | 73c02e4277b399c2ec1555d32b6ad5df23bb83dc (diff) | |
download | frameworks_av-6770c6faa3467c92eabc5ec9b23d60eb556a0d03.zip frameworks_av-6770c6faa3467c92eabc5ec9b23d60eb556a0d03.tar.gz frameworks_av-6770c6faa3467c92eabc5ec9b23d60eb556a0d03.tar.bz2 |
Enable 8 bit and float pcm record formats for AudioFlinger
Update sampling rate handling as well.
Bug: 19570772
Change-Id: I872248e64c0578b2e48869a68fee0d51bd0640c3
Diffstat (limited to 'media/libmedia/AudioRecord.cpp')
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 100a914..f4cdde2 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -189,13 +189,9 @@ status_t AudioRecord::set( } // validate parameters - if (!audio_is_valid_format(format)) { - ALOGE("Invalid format %#x", format); - return BAD_VALUE; - } - // Temporary restriction: AudioFlinger currently supports 16-bit PCM only - if (format != AUDIO_FORMAT_PCM_16_BIT) { - ALOGE("Format %#x is not supported", format); + // AudioFlinger capture only supports linear PCM + if (!audio_is_valid_format(format) || !audio_is_linear_pcm(format)) { + ALOGE("Format %#x is not linear pcm", format); return BAD_VALUE; } mFormat = format; |