diff options
author | Glenn Kasten <gkasten@google.com> | 2013-07-16 17:23:39 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-07-24 16:03:05 -0700 |
commit | 291bb6d8947c5b0c062f0895d623c529259bfa39 (patch) | |
tree | aa527f282bf3523c3692f086e4e088e8e21aa69c /media | |
parent | 39a60318dcd78b2cb406d2c7dba57cbe9c99c3e7 (diff) | |
download | frameworks_av-291bb6d8947c5b0c062f0895d623c529259bfa39.zip frameworks_av-291bb6d8947c5b0c062f0895d623c529259bfa39.tar.gz frameworks_av-291bb6d8947c5b0c062f0895d623c529259bfa39.tar.bz2 |
AudioRecord and HAL input stream must be 16-bit PCM only
Currently there are 16-bit PCM assumptions in several places for capture:
- resampler API
- mRsmpInBuffer and mRsmpOutBuffer
- RecordThread::threadLoop upmix, downmix, and resampling
- possibly other places
Until those assumptions are removed, this CL enforces 16-bit PCM in both
client and server at all places where a format is checked.
Change-Id: I08b0570bff626ad0d341804825a72c14e61b4233
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 8ae0908..603c16e 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -190,6 +190,11 @@ status_t AudioRecord::set( ALOGE("Invalid format %d", format); return BAD_VALUE; } + // Temporary restriction: AudioFlinger currently supports 16-bit PCM only + if (format != AUDIO_FORMAT_PCM_16_BIT) { + ALOGE("Format %d is not supported", format); + return BAD_VALUE; + } mFormat = format; if (!audio_is_input_channel(channelMask)) { |