diff options
author | Mingming Yin <mingming@codeaurora.org> | 2015-08-11 10:28:21 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:24:37 -0600 |
commit | fc78c2cb9d133c3b53d0898b5b746ad408f1234a (patch) | |
tree | 55434a7de0370c21c3bf2b0ec0d4f729fec9ba3d | |
parent | 62b72bd494558a169c0ed307cad8f92a73b8cdd1 (diff) | |
download | frameworks_av-fc78c2cb9d133c3b53d0898b5b746ad408f1234a.zip frameworks_av-fc78c2cb9d133c3b53d0898b5b746ad408f1234a.tar.gz frameworks_av-fc78c2cb9d133c3b53d0898b5b746ad408f1234a.tar.bz2 |
audio: add support for 5.1 channel recording
- Add support for 5.1 channel recording
Change-Id: If060fffb2e198f516f40e85390489de2108be5d1
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 2 | ||||
-rw-r--r-- | media/libstagefright/AudioSource.cpp | 2 | ||||
-rw-r--r-- | services/audiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 872292b..817ae4d 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -367,7 +367,7 @@ status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) { status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) { ALOGV("setParamAudioNumberOfChannels: %d", channels); - if (channels <= 0 || channels >= 3) { + if (channels <= 0 || channels >= 7) { ALOGE("Invalid number of audio channels: %d", channels); return BAD_VALUE; } diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index 01400f6..a15bca7 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -61,7 +61,7 @@ AudioSource::AudioSource( mNumClientOwnedBuffers(0) { ALOGV("sampleRate: %u, outSampleRate: %u, channelCount: %u", sampleRate, outSampleRate, channelCount); - CHECK(channelCount == 1 || channelCount == 2); + CHECK(channelCount == 1 || channelCount == 2 || channelCount == 6); CHECK(sampleRate > 0); size_t minFrameCount; diff --git a/services/audiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h b/services/audiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h index 739d82b..71eb380 100644 --- a/services/audiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h +++ b/services/audiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h @@ -234,6 +234,7 @@ const StringToEnum sInChannelsNameToEnumTable[] = { STRING_TO_ENUM(AUDIO_CHANNEL_IN_MONO), STRING_TO_ENUM(AUDIO_CHANNEL_IN_STEREO), STRING_TO_ENUM(AUDIO_CHANNEL_IN_FRONT_BACK), + STRING_TO_ENUM(AUDIO_CHANNEL_IN_5POINT1), }; const StringToEnum sIndexChannelsNameToEnumTable[] = { |