diff options
author | Glenn Kasten <gkasten@google.com> | 2014-03-13 15:02:40 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-03-14 14:49:17 -0700 |
commit | 0e0e846f3d86906ff990025981e514d6bcf44d8e (patch) | |
tree | f3293f7c07b80af8cb952b6aa9187e61943d7d4d /services | |
parent | 758799cef41fc5495f59eeb6249d02ce9154cde8 (diff) | |
download | frameworks_av-0e0e846f3d86906ff990025981e514d6bcf44d8e.zip frameworks_av-0e0e846f3d86906ff990025981e514d6bcf44d8e.tar.gz frameworks_av-0e0e846f3d86906ff990025981e514d6bcf44d8e.tar.bz2 |
Prepare for additional capture formats
Change-Id: Ib10b004f0029191b33a97671e41b0d86ebfbe0b9
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 92ee30e..779d855 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -1342,9 +1342,9 @@ sp<IAudioRecord> AudioFlinger::openRecord( goto Exit; } - // FIXME when we support more formats, add audio_is_valid_format(format) - // and any explicit restrictions if audio_is_linear_pcm(format) - if (format != AUDIO_FORMAT_PCM_16_BIT) { + // we don't yet support anything other than 16-bit PCM + if (!(audio_is_valid_format(format) && + audio_is_linear_pcm(format) && format == AUDIO_FORMAT_PCM_16_BIT)) { ALOGE("openRecord() invalid format %#x", format); lStatus = BAD_VALUE; goto Exit; |