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

Commit d3bb645f authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Re-format to decrease the maximum line length of files to 100 characters

Test: compiles OK
Change-Id: Ibe663032cd390ed2bcca6dc921d47732e6e15e21
parent 0012417d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -66,7 +66,8 @@ status_t AudioRecord::getMinFrameCount(
// ---------------------------------------------------------------------------

AudioRecord::AudioRecord(const String16 &opPackageName)
    : mActive(false), mStatus(NO_INIT), mOpPackageName(opPackageName), mSessionId(AUDIO_SESSION_ALLOCATE),
    : mActive(false), mStatus(NO_INIT), mOpPackageName(opPackageName),
      mSessionId(AUDIO_SESSION_ALLOCATE),
      mPreviousPriority(ANDROID_PRIORITY_NORMAL), mPreviousSchedulingGroup(SP_DEFAULT),
      mSelectedDeviceId(AUDIO_PORT_HANDLE_NONE), mPortId(AUDIO_PORT_HANDLE_NONE)
{
+2 −1
Original line number Diff line number Diff line
@@ -554,7 +554,8 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(audio_io_config_event even
                    "channel mask %#x frameCount %zu frameCountHAL %zu deviceId %d",
                    event == AUDIO_OUTPUT_CONFIG_CHANGED ? "output" : "input",
                    ioDesc->mIoHandle, ioDesc->mSamplingRate, ioDesc->mFormat,
                    ioDesc->mChannelMask, ioDesc->mFrameCount, ioDesc->mFrameCountHAL, ioDesc->getDeviceId());
                    ioDesc->mChannelMask, ioDesc->mFrameCount, ioDesc->mFrameCountHAL,
                    ioDesc->getDeviceId());

        } break;
        }
+6 −4
Original line number Diff line number Diff line
@@ -917,7 +917,8 @@ status_t AudioTrack::setPlaybackRate(const AudioPlaybackRate &playbackRate)
    }

    // Check resampler ratios are within bounds
    if ((uint64_t)effectiveRate > (uint64_t)mSampleRate * (uint64_t)AUDIO_RESAMPLER_DOWN_RATIO_MAX) {
    if ((uint64_t)effectiveRate > (uint64_t)mSampleRate *
            (uint64_t)AUDIO_RESAMPLER_DOWN_RATIO_MAX) {
        ALOGV("setPlaybackRate(%f, %f) failed. Resample rate exceeds max accepted value",
                playbackRate.mSpeed, playbackRate.mPitch);
        return BAD_VALUE;
@@ -1274,9 +1275,10 @@ status_t AudioTrack::createTrack_l()
                                           mFlags, mSelectedDeviceId, &mPortId);

    if (status != NO_ERROR || output == AUDIO_IO_HANDLE_NONE) {
        ALOGE("Could not get audio output for session %d, stream type %d, usage %d, sample rate %u, format %#x,"
              " channel mask %#x, flags %#x",
              mSessionId, streamType, mAttributes.usage, mSampleRate, mFormat, mChannelMask, mFlags);
        ALOGE("Could not get audio output for session %d, stream type %d, usage %d, sample rate %u,"
              " format %#x, channel mask %#x, flags %#x",
              mSessionId, streamType, mAttributes.usage, mSampleRate, mFormat, mChannelMask,
              mFlags);
        return BAD_VALUE;
    }
    {
+11 −8
Original line number Diff line number Diff line
@@ -289,7 +289,8 @@ status_t AudioFlinger::openMmapStream(MmapStreamInterface::stream_direction_t di
                                            sessionId,
                                            &streamType, client.clientUid,
                                            &fullConfig,
                                            (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_MMAP_NOIRQ | AUDIO_OUTPUT_FLAG_DIRECT),
                                            (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_MMAP_NOIRQ |
                                                    AUDIO_OUTPUT_FLAG_DIRECT),
                                            *deviceId, &portId);
    } else {
        ret = AudioSystem::getInputForAttr(attr, &io,
@@ -1979,7 +1980,8 @@ status_t AudioFlinger::openOutput(audio_module_handle_t module,
                                  uint32_t *latencyMs,
                                  audio_output_flags_t flags)
{
    ALOGI("openOutput() this %p, module %d Device %x, SamplingRate %d, Format %#08x, Channels %x, flags %x",
    ALOGI("openOutput() this %p, module %d Device %x, SamplingRate %d, Format %#08x, Channels %x, "
              "flags %x",
              this, module,
              (devices != NULL) ? *devices : 0,
              config->sample_rate,
@@ -2077,13 +2079,13 @@ status_t AudioFlinger::closeOutput_nonvirtual(audio_io_handle_t output)
            if (mPlaybackThreads.size()) {
                PlaybackThread *dstThread = checkPlaybackThread_l(mPlaybackThreads.keyAt(0));
                if (dstThread != NULL) {
                    // audioflinger lock is held here so the acquisition order of thread locks does not
                    // matter
                    // audioflinger lock is held so order of thread lock acquisition doesn't matter
                    Mutex::Autolock _dl(dstThread->mLock);
                    Mutex::Autolock _sl(playbackThread->mLock);
                    Vector< sp<EffectChain> > effectChains = playbackThread->getEffectChains_l();
                    for (size_t i = 0; i < effectChains.size(); i ++) {
                        moveEffectChain_l(effectChains[i]->sessionId(), playbackThread.get(), dstThread, true);
                        moveEffectChain_l(effectChains[i]->sessionId(), playbackThread.get(),
                                dstThread, true);
                    }
                }
            }
@@ -2255,7 +2257,8 @@ sp<AudioFlinger::ThreadBase> AudioFlinger::openInput_l(audio_module_handle_t mod
                                          inHwDev, inputStream,
                                          primaryOutputDevice_l(), devices, mSystemReady);
            mMmapThreads.add(*input, thread);
            ALOGV("openInput_l() created mmap capture thread: ID %d thread %p", *input, thread.get());
            ALOGV("openInput_l() created mmap capture thread: ID %d thread %p", *input,
                    thread.get());
            return thread;
        } else {
#ifdef TEE_SINK
@@ -2361,7 +2364,7 @@ status_t AudioFlinger::closeInput_nonvirtual(audio_io_handle_t input)
                }
            }
            if (chain != 0) {
                // first check if a record thread is already opened with a client on the same session.
                // first check if a record thread is already opened with a client on same session.
                // This should only happen in case of overlap between one thread tear down and the
                // creation of its replacement
                size_t i;
@@ -2378,7 +2381,7 @@ status_t AudioFlinger::closeInput_nonvirtual(audio_io_handle_t input)
                        break;
                    }
                }
                // put the chain aside if we could not find a record thread with the same session id.
                // put the chain aside if we could not find a record thread with the same session id
                if (i == mRecordThreads.size()) {
                    putOrphanEffectChain_l(chain);
                }
+2 −1
Original line number Diff line number Diff line
@@ -561,7 +561,8 @@ private:
        virtual status_t createMmapBuffer(int32_t minSizeFrames,
                                          struct audio_mmap_buffer_info *info);
        virtual status_t getMmapPosition(struct audio_mmap_position *position);
        virtual status_t start(const MmapStreamInterface::Client& client, audio_port_handle_t *handle);
        virtual status_t start(const MmapStreamInterface::Client& client,
                                         audio_port_handle_t *handle);
        virtual status_t stop(audio_port_handle_t handle);

    private:
Loading