diff options
Diffstat (limited to 'services')
| -rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 4 | ||||
| -rw-r--r-- | services/audioflinger/AudioPolicyService.cpp | 3 | ||||
| -rw-r--r-- | services/audioflinger/Threads.cpp | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 1e7a8818b7..b8d8aab33f 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -1590,11 +1590,11 @@ sp<IAudioRecord> AudioFlinger::openRecord( goto Exit; } #else -#if defined(QCOM_HARDWARE) +#ifdef QCOM_HARDWARE if (format != AUDIO_FORMAT_PCM_16_BIT && !audio_is_compress_voip_format(format) && !audio_is_compress_capture_format(format)) { -#else +#else if (format != AUDIO_FORMAT_PCM_16_BIT) { #endif ALOGE("openRecord() invalid format %d", format); diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index 32efa0affc..a23d031284 100644 --- a/services/audioflinger/AudioPolicyService.cpp +++ b/services/audioflinger/AudioPolicyService.cpp @@ -540,8 +540,9 @@ bool AudioPolicyService::isStreamActiveRemotely(audio_stream_type_t stream, uint } Mutex::Autolock _l(mLock); return mpAudioPolicy->is_stream_active_remotely(mpAudioPolicy, stream, inPastMs); -#endif +#else return 0; +#endif } bool AudioPolicyService::isSourceActive(audio_source_t source) const diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index c92eeb257c..f93bd1dada 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -3853,7 +3853,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep tracksToRemove->add(track); // indicate to client process that the track was disabled because of underrun; // it will then automatically call start() when data is available -#if defined(QCOM_HARDWARE) && !defined(QCOM_DIRECTTRACK) +#ifdef QCOM_HARDWARE android_atomic_or(CBLK_DISABLED, &cblk->mFlags); #endif } else if (last) { @@ -5680,17 +5680,19 @@ void AudioFlinger::RecordThread::readInputParameters() mChannelMask = mInput->stream->common.get_channels(&mInput->stream->common); mChannelCount = (uint16_t)getInputChannelCount(mChannelMask); mFormat = mInput->stream->common.get_format(&mInput->stream->common); -#ifdef QCOM_HARDWARE +#if defined(QCOM_HARDWARE) && !defined(QCOM_DIRECTTRACK) if (mFormat != AUDIO_FORMAT_PCM_16_BIT && !audio_is_compress_voip_format(mFormat) && !audio_is_compress_capture_format(mFormat)) { ALOGE("HAL format %d not supported", mFormat); } #else +#ifndef QCOM_DIRECTTRACK if (mFormat != AUDIO_FORMAT_PCM_16_BIT) { ALOGE("HAL format %d not supported; must be AUDIO_FORMAT_PCM_16_BIT", mFormat); } #endif +#endif mFrameSize = audio_stream_frame_size(&mInput->stream->common); mBufferSize = mInput->stream->common.get_buffer_size(&mInput->stream->common); mFrameCount = mBufferSize / mFrameSize; |
