diff options
author | Glenn Kasten <gkasten@google.com> | 2014-02-21 14:51:43 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-03-26 14:46:28 -0700 |
commit | adad3d7d935da176ff24941b4ae9edf7340e9b96 (patch) | |
tree | 7a8a2f8e31c7dd690805c1cfd9982d218c66296b | |
parent | 1392eb3d1802e9f894f87d7a7387207d1b6faca1 (diff) | |
download | frameworks_av-adad3d7d935da176ff24941b4ae9edf7340e9b96.zip frameworks_av-adad3d7d935da176ff24941b4ae9edf7340e9b96.tar.gz frameworks_av-adad3d7d935da176ff24941b4ae9edf7340e9b96.tar.bz2 |
Use LOG_ALWAYS_FATAL instead of LOG_FATAL
LOG_FATAL is compiled out in most builds, so the
assertion checks were not being performed.
Change-Id: I774f0985ab9c5ccecd8989a0f1c940386b73fc35
-rw-r--r-- | media/libmedia/AudioTrackShared.cpp | 6 | ||||
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.cpp | 2 | ||||
-rw-r--r-- | services/audioflinger/AudioMixer.cpp | 8 | ||||
-rw-r--r-- | services/audioflinger/FastMixer.cpp | 2 | ||||
-rw-r--r-- | services/audioflinger/Threads.cpp | 18 | ||||
-rw-r--r-- | services/audioflinger/Tracks.cpp | 2 |
6 files changed, 19 insertions, 19 deletions
diff --git a/media/libmedia/AudioTrackShared.cpp b/media/libmedia/AudioTrackShared.cpp index fdd1a12..58c9fc1 100644 --- a/media/libmedia/AudioTrackShared.cpp +++ b/media/libmedia/AudioTrackShared.cpp @@ -200,7 +200,7 @@ status_t ClientProxy::obtainBuffer(Buffer* buffer, const struct timespec *reques ts = &remaining; break; default: - LOG_FATAL("obtainBuffer() timeout=%d", timeout); + LOG_ALWAYS_FATAL("obtainBuffer() timeout=%d", timeout); ts = NULL; break; } @@ -429,7 +429,7 @@ status_t AudioTrackClientProxy::waitStreamEndDone(const struct timespec *request ts = &remaining; break; default: - LOG_FATAL("waitStreamEndDone() timeout=%d", timeout); + LOG_ALWAYS_FATAL("waitStreamEndDone() timeout=%d", timeout); ts = NULL; break; } @@ -470,7 +470,7 @@ StaticAudioTrackClientProxy::StaticAudioTrackClientProxy(audio_track_cblk_t* cbl void StaticAudioTrackClientProxy::flush() { - LOG_FATAL("static flush"); + LOG_ALWAYS_FATAL("static flush"); } void StaticAudioTrackClientProxy::setLoop(size_t loopStart, size_t loopEnd, int loopCount) diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 200c561..778eb9a 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -1679,7 +1679,7 @@ void MediaPlayerService::AudioOutput::switchToNextOutput() { ssize_t MediaPlayerService::AudioOutput::write(const void* buffer, size_t size) { - LOG_FATAL_IF(mCallback != NULL, "Don't call write if supplying a callback."); + LOG_ALWAYS_FATAL_IF(mCallback != NULL, "Don't call write if supplying a callback."); //ALOGV("write(%p, %u)", buffer, size); if (mTrack != 0) { diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index 3ac5da9..a1783fe 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -449,7 +449,7 @@ void AudioMixer::setParameter(int name, int target, int param, void *value) } } break; default: - LOG_FATAL("bad param"); + LOG_ALWAYS_FATAL("setParameter track: bad param %d", param); } break; @@ -474,7 +474,7 @@ void AudioMixer::setParameter(int name, int target, int param, void *value) invalidateState(1 << name); break; default: - LOG_FATAL("bad param"); + LOG_ALWAYS_FATAL("setParameter resample: bad param %d", param); } break; @@ -522,12 +522,12 @@ void AudioMixer::setParameter(int name, int target, int param, void *value) } break; default: - LOG_FATAL("bad param"); + LOG_ALWAYS_FATAL("setParameter volume: bad param %d", param); } break; default: - LOG_FATAL("bad target"); + LOG_ALWAYS_FATAL("setParameter: bad target %d", target); } } diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp index 90122e0..adb4aca 100644 --- a/services/audioflinger/FastMixer.cpp +++ b/services/audioflinger/FastMixer.cpp @@ -212,7 +212,7 @@ bool FastMixer::threadLoop() case FastMixerState::MIX_WRITE: break; default: - LOG_FATAL("bad command %d", command); + LOG_ALWAYS_FATAL("bad command %d", command); } // there is a non-idle state available to us; did the state change? diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index e046e03..69f3b6a 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -1711,24 +1711,24 @@ int AudioFlinger::PlaybackThread::asyncCallback(stream_callback_event_t event, void AudioFlinger::PlaybackThread::readOutputParameters_l() { - // unfortunately we have no way of recovering from errors here, hence the LOG_FATAL + // unfortunately we have no way of recovering from errors here, hence the LOG_ALWAYS_FATAL mSampleRate = mOutput->stream->common.get_sample_rate(&mOutput->stream->common); mChannelMask = mOutput->stream->common.get_channels(&mOutput->stream->common); if (!audio_is_output_channel(mChannelMask)) { - LOG_FATAL("HAL channel mask %#x not valid for output", mChannelMask); + LOG_ALWAYS_FATAL("HAL channel mask %#x not valid for output", mChannelMask); } if ((mType == MIXER || mType == DUPLICATING) && mChannelMask != AUDIO_CHANNEL_OUT_STEREO) { - LOG_FATAL("HAL channel mask %#x not supported for mixed output; " + LOG_ALWAYS_FATAL("HAL channel mask %#x not supported for mixed output; " "must be AUDIO_CHANNEL_OUT_STEREO", mChannelMask); } mChannelCount = popcount(mChannelMask); mFormat = mOutput->stream->common.get_format(&mOutput->stream->common); if (!audio_is_valid_format(mFormat)) { - LOG_FATAL("HAL format %#x not valid for output", mFormat); + LOG_ALWAYS_FATAL("HAL format %#x not valid for output", mFormat); } if ((mType == MIXER || mType == DUPLICATING) && mFormat != AUDIO_FORMAT_PCM_16_BIT) { - LOG_FATAL("HAL format %#x not supported for mixed output; must be AUDIO_FORMAT_PCM_16_BIT", - mFormat); + LOG_ALWAYS_FATAL("HAL format %#x not supported for mixed output; " + "must be AUDIO_FORMAT_PCM_16_BIT", mFormat); } mFrameSize = audio_stream_frame_size(&mOutput->stream->common); mBufferSize = mOutput->stream->common.get_buffer_size(&mOutput->stream->common); @@ -3118,7 +3118,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac break; case TrackBase::IDLE: default: - LOG_FATAL("unexpected track state %d", track->mState); + LOG_ALWAYS_FATAL("unexpected track state %d", track->mState); } if (isActive) { @@ -3149,7 +3149,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac // because we're about to decrement the last sp<> on those tracks. block = FastMixerStateQueue::BLOCK_UNTIL_ACKED; } else { - LOG_FATAL("fast track %d should have been active", j); + LOG_ALWAYS_FATAL("fast track %d should have been active", j); } tracksToRemove->add(track); // Avoids a misleading display in dumpsys @@ -4765,7 +4765,7 @@ reacquire_wakelock: continue; default: - LOG_FATAL("Unexpected activeTrackState %d", activeTrackState); + LOG_ALWAYS_FATAL("Unexpected activeTrackState %d", activeTrackState); } activeTracks.add(activeTrack); diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp index 9fe459b..2cf10e2 100644 --- a/services/audioflinger/Tracks.cpp +++ b/services/audioflinger/Tracks.cpp @@ -1525,7 +1525,7 @@ void AudioFlinger::PlaybackThread::TimedTrack::releaseBuffer( mTrimQueueHeadOnRelease = false; } } else { - LOG_FATAL("TimedTrack::releaseBuffer of non-silence buffer with no" + LOG_ALWAYS_FATAL("TimedTrack::releaseBuffer of non-silence buffer with no" " buffers in the timed buffer queue"); } |