summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-04-04 10:50:50 -0700
committerGlenn Kasten <gkasten@google.com>2011-04-06 10:24:18 -0700
commited0079ddddd4070f3369b13b274222da2e69f4b9 (patch)
treeead156e5b8cbc905126d3e805d813088cdd3a5ff /services
parent9f4ef02aef8f3cc1969f83f59a9be40f1ff71625 (diff)
downloadframeworks_base-ed0079ddddd4070f3369b13b274222da2e69f4b9.zip
frameworks_base-ed0079ddddd4070f3369b13b274222da2e69f4b9.tar.gz
frameworks_base-ed0079ddddd4070f3369b13b274222da2e69f4b9.tar.bz2
Miscellaneous code cleanup in audio framework
Changes: - Move declaration of kClassPathName to top of file so it can be used in more than one place, instead of "android/media/AudioSystem". - Make private methods static. - Add comment to stream_type, audio_mode, force_use types that they must match values in AudioSystem.java. - Add comment about unused types mp3_sub_format and vorbis_sub_format. - Fix typos. - Use @ in javadoc comments. - Delete dead APIs setMode, getMode, setRouting, getRouting in AudioSystem.java (they are all hidden, deprecated, and unused by rest of framework) - Delete unused private log method. - Fix pathname for android_media_AudioSystem.cpp. - Improve code formatting for space after == and !=. - Add logging of delta for changing audio policy manager ref count. Change-Id: I18037c7beb8ab76d1fda08c11e589f6e591d36e1
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp2
-rw-r--r--services/audioflinger/AudioPolicyManagerBase.cpp9
2 files changed, 6 insertions, 5 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 2702242..52135e7 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -5712,7 +5712,7 @@ uint32_t AudioFlinger::EffectModule::deviceAudioSystemToEffectApi(uint32_t devic
const uint32_t i = 31 - __builtin_clz(device);
device &= ~(1 << i);
if (i >= sizeof(sDeviceConvTable)/sizeof(uint32_t)) {
- LOGE("device convertion error for AudioSystem device 0x%08x", device);
+ LOGE("device conversion error for AudioSystem device 0x%08x", device);
return 0;
}
deviceOut |= (uint32_t)sDeviceConvTable[i];
diff --git a/services/audioflinger/AudioPolicyManagerBase.cpp b/services/audioflinger/AudioPolicyManagerBase.cpp
index f653dc5..c0ac669 100644
--- a/services/audioflinger/AudioPolicyManagerBase.cpp
+++ b/services/audioflinger/AudioPolicyManagerBase.cpp
@@ -542,7 +542,7 @@ audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type str
}
- LOGW_IF((output ==0), "getOutput() could not find output for stream %d, samplingRate %d, format %d, channels %x, flags %x",
+ LOGW_IF((output == 0), "getOutput() could not find output for stream %d, samplingRate %d, format %d, channels %x, flags %x",
stream, samplingRate, format, channels, flags);
return output;
@@ -2107,7 +2107,7 @@ bool AudioPolicyManagerBase::needsDirectOuput(AudioSystem::stream_type stream,
uint32_t device)
{
return ((flags & AudioSystem::OUTPUT_FLAG_DIRECT) ||
- (format !=0 && !AudioSystem::isLinearPCM(format)));
+ (format != 0 && !AudioSystem::isLinearPCM(format)));
}
uint32_t AudioPolicyManagerBase::getMaxEffectsCpuLoad()
@@ -2159,7 +2159,7 @@ void AudioPolicyManagerBase::AudioOutputDescriptor::changeRefCount(AudioSystem::
return;
}
mRefCount[stream] += delta;
- LOGV("changeRefCount() stream %d, count %d", stream, mRefCount[stream]);
+ LOGV("changeRefCount() delta %d, stream %d, refCount %d", delta, stream, mRefCount[stream]);
}
uint32_t AudioPolicyManagerBase::AudioOutputDescriptor::refCount()
@@ -2215,7 +2215,8 @@ status_t AudioPolicyManagerBase::AudioOutputDescriptor::dump(int fd)
AudioPolicyManagerBase::AudioInputDescriptor::AudioInputDescriptor()
: mSamplingRate(0), mFormat(0), mChannels(0),
- mAcoustics((AudioSystem::audio_in_acoustics)0), mDevice(0), mRefCount(0)
+ mAcoustics((AudioSystem::audio_in_acoustics)0), mDevice(0), mRefCount(0),
+ mInputSource(0)
{
}