Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23d2240e authored by Sharad Sangle's avatar Sharad Sangle Committed by Linux Build Service Account
Browse files

audio: add support for 5.1 channel recording

- Add support for 5.1 channel recording

Change-Id: If060fffb2e198f516f40e85390489de2108be5d1
parent e5127e44
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -365,7 +365,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 > 6) {
        ALOGE("Invalid number of audio channels: %d", channels);
        return BAD_VALUE;
    }
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,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;
+1 −0
Original line number Diff line number Diff line
@@ -199,6 +199,7 @@ const InputChannelConverter::Table InputChannelConverter::mTable[] = {
    MAKE_STRING_FROM_ENUM(AUDIO_CHANNEL_IN_MONO),
    MAKE_STRING_FROM_ENUM(AUDIO_CHANNEL_IN_STEREO),
    MAKE_STRING_FROM_ENUM(AUDIO_CHANNEL_IN_FRONT_BACK),
    MAKE_STRING_FROM_ENUM(AUDIO_CHANNEL_IN_5POINT1),
};
template<>
const size_t InputChannelConverter::mSize = sizeof(InputChannelConverter::mTable) /