diff options
author | Steve Block <steveblock@google.com> | 2011-10-20 11:56:19 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-10-25 18:16:16 +0100 |
commit | 22f2554680715d1ea993409217a4a21f652ef130 (patch) | |
tree | ab6df099cfcb12f10f706dec4b857914c7c9e008 | |
parent | 9d5cb0ab6a94985f12b0ec4122a2e540703d8fd8 (diff) | |
download | msm7k-22f2554680715d1ea993409217a4a21f652ef130.tar.gz |
Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865
Bug: 5449033
Change-Id: I90081db21c71365e7b11427a859522acabf6fdc3
-rw-r--r-- | libaudio-qdsp5v2/AudioHardware.cpp | 18 | ||||
-rw-r--r-- | libaudio-qdsp5v2/AudioPolicyManager.cpp | 8 | ||||
-rw-r--r-- | libaudio-qsd8k/AudioHardware.cpp | 132 | ||||
-rw-r--r-- | libaudio-qsd8k/AudioPolicyManager.cpp | 8 | ||||
-rw-r--r-- | libaudio/AudioHardware.cpp | 56 | ||||
-rw-r--r-- | libcamera/QualcommCameraHardware.cpp | 212 | ||||
-rw-r--r-- | libgralloc-qsd8k/pmemalloc.cpp | 6 | ||||
-rw-r--r-- | liblights/lights.c | 6 |
8 files changed, 223 insertions, 223 deletions
diff --git a/libaudio-qdsp5v2/AudioHardware.cpp b/libaudio-qdsp5v2/AudioHardware.cpp index 6835453..c8d67b4 100644 --- a/libaudio-qdsp5v2/AudioHardware.cpp +++ b/libaudio-qdsp5v2/AudioHardware.cpp @@ -135,7 +135,7 @@ String8 AudioHardware::getParameters(const String8& keys) AudioParameter request = AudioParameter(keys); AudioParameter reply = AudioParameter(); - LOGV("getParameters() %s", keys.string()); + ALOGV("getParameters() %s", keys.string()); return reply.toString(); } @@ -220,7 +220,7 @@ ssize_t AudioHardware::AudioStreamOutQ5V2::write(const void* buffer, size_t byte const uint8_t* p = static_cast<const uint8_t*>(buffer); if (mStandby) { - LOGV("open pcm_out driver"); + ALOGV("open pcm_out driver"); status = ::open("/dev/msm_pcm_out", O_RDWR); if (status < 0) { LOGE("Cannot open /dev/msm_pcm_out errno: %d", errno); @@ -229,7 +229,7 @@ ssize_t AudioHardware::AudioStreamOutQ5V2::write(const void* buffer, size_t byte mFd = status; // configuration - LOGV("get config"); + ALOGV("get config"); struct msm_audio_config config; status = ioctl(mFd, AUDIO_GET_CONFIG, &config); if (status < 0) { @@ -237,7 +237,7 @@ ssize_t AudioHardware::AudioStreamOutQ5V2::write(const void* buffer, size_t byte goto Error; } - LOGV("set pcm_out config"); + ALOGV("set pcm_out config"); config.channel_count = AudioSystem::popCount(channels()); config.sample_rate = mSampleRate; config.buffer_size = mBufferSize; @@ -249,10 +249,10 @@ ssize_t AudioHardware::AudioStreamOutQ5V2::write(const void* buffer, size_t byte goto Error; } - LOGV("buffer_size: %u", config.buffer_size); - LOGV("buffer_count: %u", config.buffer_count); - LOGV("channel_count: %u", config.channel_count); - LOGV("sample_rate: %u", config.sample_rate); + ALOGV("buffer_size: %u", config.buffer_size); + ALOGV("buffer_count: %u", config.buffer_count); + ALOGV("channel_count: %u", config.channel_count); + ALOGV("sample_rate: %u", config.sample_rate); #if 0 status = ioctl(mFd, AUDIO_START, &acdb_id); @@ -325,7 +325,7 @@ status_t AudioHardware::AudioStreamOutQ5V2::setParameters(const String8& keyValu String8 AudioHardware::AudioStreamOutQ5V2::getParameters(const String8& keys) { AudioParameter param = AudioParameter(keys); - LOGV("AudioStreamOutQ5V2::getParameters() %s", param.toString().string()); + ALOGV("AudioStreamOutQ5V2::getParameters() %s", param.toString().string()); return param.toString(); } diff --git a/libaudio-qdsp5v2/AudioPolicyManager.cpp b/libaudio-qdsp5v2/AudioPolicyManager.cpp index 82289bf..79231f3 100644 --- a/libaudio-qdsp5v2/AudioPolicyManager.cpp +++ b/libaudio-qdsp5v2/AudioPolicyManager.cpp @@ -55,7 +55,7 @@ uint32_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strategy, boo if (fromCache) { device = mDeviceForStrategy[strategy]; - LOGV("getDeviceForStrategy() from cache strategy %d, device %x", strategy, device); + ALOGV("getDeviceForStrategy() from cache strategy %d, device %x", strategy, device); return device; } @@ -220,7 +220,7 @@ uint32_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strategy, boo !AudioSystem::isA2dpDevice((AudioSystem::audio_devices)device) && device != getDeviceForStrategy(STRATEGY_PHONE, false)) { device = 0; - LOGV("getDeviceForStrategy() incompatible media and phone devices"); + ALOGV("getDeviceForStrategy() incompatible media and phone devices"); } } break; @@ -229,7 +229,7 @@ uint32_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strategy, boo break; } - LOGV("getDeviceForStrategy() strategy %d, device %x", strategy, device); + ALOGV("getDeviceForStrategy() strategy %d, device %x", strategy, device); return device; } @@ -250,7 +250,7 @@ float AudioPolicyManager::computeVolume(int stream, int index, audio_io_handle_t // avoid saturation if (mPhoneState == AudioSystem::MODE_IN_CALL && AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)device)) { if (volume > IN_CALL_SCO_VOLUME_MAX) { - LOGV("computeVolume limiting SYSTEM volume %f to %f",volume, IN_CALL_SCO_VOLUME_MAX); + ALOGV("computeVolume limiting SYSTEM volume %f to %f",volume, IN_CALL_SCO_VOLUME_MAX); volume = IN_CALL_SCO_VOLUME_MAX; } } diff --git a/libaudio-qsd8k/AudioHardware.cpp b/libaudio-qsd8k/AudioHardware.cpp index 9773413..0337982 100644 --- a/libaudio-qsd8k/AudioHardware.cpp +++ b/libaudio-qsd8k/AudioHardware.cpp @@ -156,10 +156,10 @@ AudioHardware::AudioHardware() : } mNumBTEndpoints = snd_get_num(); - LOGV("mNumBTEndpoints = %d", mNumBTEndpoints); + ALOGV("mNumBTEndpoints = %d", mNumBTEndpoints); mBTEndpoints = new msm_bt_endpoint[mNumBTEndpoints]; mInit = true; - LOGV("constructed %d SND endpoints)", mNumBTEndpoints); + ALOGV("constructed %d SND endpoints)", mNumBTEndpoints); ept = mBTEndpoints; snd_get_bt_endpoint = (int (*)(msm_bt_endpoint *))::dlsym(acoustic, "snd_get_bt_endpoint"); if ((*snd_get_bt_endpoint) == 0 ) { @@ -169,7 +169,7 @@ AudioHardware::AudioHardware() : snd_get_bt_endpoint(mBTEndpoints); for (int i = 0; i < mNumBTEndpoints; i++) { - LOGV("BT name %s (tx,rx)=(%d,%d)", mBTEndpoints[i].name, mBTEndpoints[i].tx, mBTEndpoints[i].rx); + ALOGV("BT name %s (tx,rx)=(%d,%d)", mBTEndpoints[i].name, mBTEndpoints[i].tx, mBTEndpoints[i].rx); } // reset voice mode in case media_server crashed and restarted while in call @@ -186,21 +186,21 @@ AudioHardware::AudioHardware() : // Check the system property to enable or not the special recording modes property_get("media.a1026.enableA1026", value, "1"); enable1026 = atoi(value); - LOGV("Enable mode selection for A1026 is %d", enable1026); + ALOGV("Enable mode selection for A1026 is %d", enable1026); // Check the system property for which VR mode to use property_get("media.a1026.nsForVoiceRec", value, "0"); vr_uses_ns = atoi(value); - LOGV("Using Noise Suppression for Voice Rec is %d", vr_uses_ns); + ALOGV("Using Noise Suppression for Voice Rec is %d", vr_uses_ns); // Check the system property for enable or not the ALT function property_get("htc.audio.alt.enable", value, "0"); alt_enable = atoi(value); - LOGV("Enable ALT function: %d", alt_enable); + ALOGV("Enable ALT function: %d", alt_enable); // Check the system property for enable or not the HAC function property_get("htc.audio.hac.enable", value, "0"); hac_enable = atoi(value); - LOGV("Enable HAC function: %d", hac_enable); + ALOGV("Enable HAC function: %d", hac_enable); mInit = true; } @@ -388,7 +388,7 @@ status_t AudioHardware::setParameters(const String8& keyValuePairs) const char HAC_VALUE_ON[] = "ON"; - LOGV("setParameters() %s", keyValuePairs.string()); + ALOGV("setParameters() %s", keyValuePairs.string()); if (keyValuePairs.length() == 0) return BAD_VALUE; @@ -464,7 +464,7 @@ status_t AudioHardware::setParameters(const String8& keyValuePairs) return -1; } } - LOGV("Setting noise suppression %s", value.string()); + ALOGV("Setting noise suppression %s", value.string()); int rc = ioctl(fd_a1026, A1026_SET_NS_STATE, &noiseSuppressionState); if (!rc) { @@ -497,7 +497,7 @@ status_t AudioHardware::setParameters(const String8& keyValuePairs) } if (ttyMode != mTTYMode) { - LOGV("new tty mode %d", ttyMode); + ALOGV("new tty mode %d", ttyMode); mTTYMode = ttyMode; doRouting(); } @@ -513,7 +513,7 @@ String8 AudioHardware::getParameters(const String8& keys) String8 value; String8 key; - LOGV("getParameters() %s", keys.string()); + ALOGV("getParameters() %s", keys.string()); key = "noise_suppression"; if (request.get(key, value) == NO_ERROR) { @@ -851,7 +851,7 @@ status_t AudioHardware::doAudioRouteOrMute(uint32_t device) if (mRecordState) tx_acdb_id = getACDB(MOD_REC, device); } - LOGV("doAudioRouteOrMute: rx acdb %d, tx acdb %d\n", rx_acdb_id, tx_acdb_id); + ALOGV("doAudioRouteOrMute: rx acdb %d, tx acdb %d\n", rx_acdb_id, tx_acdb_id); return do_route_audio_dev_ctrl(device, mMode == AudioSystem::MODE_IN_CALL, rx_acdb_id, tx_acdb_id); } @@ -1053,7 +1053,7 @@ uint32_t AudioHardware::getACDB(int mode, int device) break; } } - LOGV("getACDB, return ID %d\n", acdb_id); + ALOGV("getACDB, return ID %d\n", acdb_id); return acdb_id; } @@ -1141,10 +1141,10 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t case SND_DEVICE_TTY_VCO: if (enable1026) { new_pathid = A1026_PATH_INCALL_RECEIVER; - LOGV("A1026 control: new path is A1026_PATH_INCALL_RECEIVER"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_RECEIVER"); } else { new_pathid = A1026_PATH_INCALL_NO_NS_RECEIVER; - LOGV("A1026 control: new path is A1026_PATH_INCALL_NO_NS_RECEIVER"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_NO_NS_RECEIVER"); } break; case SND_DEVICE_HEADSET: @@ -1153,24 +1153,24 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t case SND_DEVICE_FM_SPEAKER: case SND_DEVICE_HEADSET_AND_SPEAKER_BACK_MIC: new_pathid = A1026_PATH_INCALL_HEADSET; - LOGV("A1026 control: new path is A1026_PATH_INCALL_HEADSET"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_HEADSET"); break; case SND_DEVICE_SPEAKER: //TODO: what do we do for camcorder when in call? case SND_DEVICE_SPEAKER_BACK_MIC: new_pathid = A1026_PATH_INCALL_SPEAKER; - LOGV("A1026 control: new path is A1026_PATH_INCALL_SPEAKER"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_SPEAKER"); break; case SND_DEVICE_BT: case SND_DEVICE_BT_EC_OFF: case SND_DEVICE_CARKIT: new_pathid = A1026_PATH_INCALL_BT; - LOGV("A1026 control: new path is A1026_PATH_INCALL_BT"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_BT"); break; case SND_DEVICE_TTY_HCO: case SND_DEVICE_TTY_FULL: new_pathid = A1026_PATH_INCALL_TTY; - LOGV("A1026 control: new path is A1026_PATH_INCALL_TTY"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_TTY"); break; default: break; @@ -1182,10 +1182,10 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t case SND_DEVICE_TTY_VCO: if (enable1026) { new_pathid = A1026_PATH_INCALL_RECEIVER; /* NS CT mode, Dual MIC */ - LOGV("A1026 control: new path is A1026_PATH_INCALL_RECEIVER"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_RECEIVER"); } else { new_pathid = A1026_PATH_INCALL_NO_NS_RECEIVER; - LOGV("A1026 control: new path is A1026_PATH_INCALL_NO_NS_RECEIVER"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_NO_NS_RECEIVER"); } break; case SND_DEVICE_HEADSET: @@ -1193,22 +1193,22 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t case SND_DEVICE_FM_HEADSET: case SND_DEVICE_FM_SPEAKER: new_pathid = A1026_PATH_INCALL_HEADSET; /* NS disable, Headset MIC */ - LOGV("A1026 control: new path is A1026_PATH_INCALL_HEADSET"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_HEADSET"); break; case SND_DEVICE_SPEAKER: new_pathid = A1026_PATH_INCALL_SPEAKER; /* NS FT mode, Main MIC */ - LOGV("A1026 control: new path is A1026_PATH_INCALL_SPEAKER"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_SPEAKER"); break; case SND_DEVICE_BT: case SND_DEVICE_BT_EC_OFF: case SND_DEVICE_CARKIT: new_pathid = A1026_PATH_INCALL_BT; /* QCOM NS, BT MIC */ - LOGV("A1026 control: new path is A1026_PATH_INCALL_BT"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_BT"); break; case SND_DEVICE_TTY_HCO: case SND_DEVICE_TTY_FULL: new_pathid = A1026_PATH_INCALL_TTY; - LOGV("A1026 control: new path is A1026_PATH_INCALL_TTY"); + ALOGV("A1026 control: new path is A1026_PATH_INCALL_TTY"); break; default: break; @@ -1223,14 +1223,14 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t if (vr_mode_enabled) { if (vr_uses_ns) { new_pathid = A1026_PATH_VR_NS_RECEIVER; - LOGV("A1026 control: new path is A1026_PATH_VR_NS_RECEIVER"); + ALOGV("A1026 control: new path is A1026_PATH_VR_NS_RECEIVER"); } else { new_pathid = A1026_PATH_VR_NO_NS_RECEIVER; - LOGV("A1026 control: new path is A1026_PATH_VR_NO_NS_RECEIVER"); + ALOGV("A1026 control: new path is A1026_PATH_VR_NO_NS_RECEIVER"); } } else { new_pathid = A1026_PATH_RECORD_RECEIVER; /* INT-MIC Recording: NS disable, Main MIC */ - LOGV("A1026 control: new path is A1026_PATH_RECORD_RECEIVER"); + ALOGV("A1026 control: new path is A1026_PATH_RECORD_RECEIVER"); } break; case SND_DEVICE_HEADSET: @@ -1240,14 +1240,14 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t if (vr_mode_enabled) { if (vr_uses_ns) { new_pathid = A1026_PATH_VR_NS_HEADSET; - LOGV("A1026 control: new path is A1026_PATH_VR_NS_HEADSET"); + ALOGV("A1026 control: new path is A1026_PATH_VR_NS_HEADSET"); } else { new_pathid = A1026_PATH_VR_NO_NS_HEADSET; - LOGV("A1026 control: new path is A1026_PATH_VR_NO_NS_HEADSET"); + ALOGV("A1026 control: new path is A1026_PATH_VR_NO_NS_HEADSET"); } } else { new_pathid = A1026_PATH_RECORD_HEADSET; /* EXT-MIC Recording: NS disable, Headset MIC */ - LOGV("A1026 control: new path is A1026_PATH_RECORD_HEADSET"); + ALOGV("A1026 control: new path is A1026_PATH_RECORD_HEADSET"); } break; case SND_DEVICE_SPEAKER_BACK_MIC: @@ -1255,7 +1255,7 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t case SND_DEVICE_HANDSET_BACK_MIC: case SND_DEVICE_HEADSET_AND_SPEAKER_BACK_MIC: new_pathid = A1026_PATH_CAMCORDER; /* CAM-Coder: NS FT mode, Back MIC */ - LOGV("A1026 control: new path is A1026_PATH_CAMCORDER"); + ALOGV("A1026 control: new path is A1026_PATH_CAMCORDER"); break; case SND_DEVICE_BT: case SND_DEVICE_BT_EC_OFF: @@ -1263,14 +1263,14 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t if (vr_mode_enabled) { if (vr_uses_ns) { new_pathid = A1026_PATH_VR_NS_BT; - LOGV("A1026 control: new path is A1026_PATH_VR_NS_BT"); + ALOGV("A1026 control: new path is A1026_PATH_VR_NS_BT"); } else { new_pathid = A1026_PATH_VR_NO_NS_BT; - LOGV("A1026 control: new path is A1026_PATH_VR_NO_NS_BT"); + ALOGV("A1026 control: new path is A1026_PATH_VR_NO_NS_BT"); } } else { new_pathid = A1026_PATH_RECORD_BT; /* BT MIC */ - LOGV("A1026 control: new path is A1026_PATH_RECORD_BT"); + ALOGV("A1026 control: new path is A1026_PATH_RECORD_BT"); } break; default: @@ -1283,7 +1283,7 @@ status_t AudioHardware::doAudience_A1026_Control(int Mode, bool Record, uint32_t case SND_DEVICE_BT_EC_OFF: case SND_DEVICE_CARKIT: new_pathid = A1026_PATH_RECORD_BT; /* BT MIC */ - LOGV("A1026 control: new path is A1026_PATH_RECORD_BT"); + ALOGV("A1026 control: new path is A1026_PATH_RECORD_BT"); break; default: new_pathid = A1026_PATH_SUSPEND; @@ -1589,11 +1589,11 @@ ssize_t AudioHardware::AudioStreamOutMSM72xx::write(const void* buffer, size_t b if (mStandby) { - LOGV("acquire output wakelock"); + ALOGV("acquire output wakelock"); acquire_wake_lock(PARTIAL_WAKE_LOCK, kOutputWakelockStr); // open driver - LOGV("open pcm_out driver"); + ALOGV("open pcm_out driver"); status = ::open("/dev/msm_pcm_out", O_RDWR); if (status < 0) { if (errCount++ < 10) { @@ -1606,7 +1606,7 @@ ssize_t AudioHardware::AudioStreamOutMSM72xx::write(const void* buffer, size_t b mStandby = false; // configuration - LOGV("get config"); + ALOGV("get config"); struct msm_audio_config config; status = ioctl(mFd, AUDIO_GET_CONFIG, &config); if (status < 0) { @@ -1614,7 +1614,7 @@ ssize_t AudioHardware::AudioStreamOutMSM72xx::write(const void* buffer, size_t b goto Error; } - LOGV("set pcm_out config"); + ALOGV("set pcm_out config"); config.channel_count = AudioSystem::popCount(channels()); config.sample_rate = mSampleRate; config.buffer_size = mBufferSize; @@ -1626,10 +1626,10 @@ ssize_t AudioHardware::AudioStreamOutMSM72xx::write(const void* buffer, size_t b goto Error; } - LOGV("buffer_size: %u", config.buffer_size); - LOGV("buffer_count: %u", config.buffer_count); - LOGV("channel_count: %u", config.channel_count); - LOGV("sample_rate: %u", config.sample_rate); + ALOGV("buffer_size: %u", config.buffer_size); + ALOGV("buffer_count: %u", config.buffer_count); + ALOGV("channel_count: %u", config.channel_count); + ALOGV("sample_rate: %u", config.sample_rate); uint32_t acdb_id = mHardware->getACDB(MOD_PLAY, mHardware->get_snd_dev()); status = ioctl(mFd, AUDIO_START, &acdb_id); @@ -1679,7 +1679,7 @@ status_t AudioHardware::AudioStreamOutMSM72xx::standby() ::close(mFd); mFd = -1; } - LOGV("release output wakelock"); + ALOGV("release output wakelock"); release_wake_lock(kOutputWakelockStr); mStandby = true; } @@ -1727,11 +1727,11 @@ status_t AudioHardware::AudioStreamOutMSM72xx::setParameters(const String8& keyV String8 key = String8(AudioParameter::keyRouting); status_t status = NO_ERROR; int device; - LOGV("AudioStreamOutMSM72xx::setParameters() %s", keyValuePairs.string()); + ALOGV("AudioStreamOutMSM72xx::setParameters() %s", keyValuePairs.string()); if (param.getInt(key, device) == NO_ERROR) { mDevices = device; - LOGV("set output routing %x", mDevices); + ALOGV("set output routing %x", mDevices); status = mHardware->doRouting(); param.remove(key); } @@ -1749,11 +1749,11 @@ String8 AudioHardware::AudioStreamOutMSM72xx::getParameters(const String8& keys) String8 key = String8(AudioParameter::keyRouting); if (param.get(key, value) == NO_ERROR) { - LOGV("get routing %x", mDevices); + ALOGV("get routing %x", mDevices); param.addInt(key, (int)mDevices); } - LOGV("AudioStreamOutMSM72xx::getParameters() %s", param.toString().string()); + ALOGV("AudioStreamOutMSM72xx::getParameters() %s", param.toString().string()); return param.toString(); } @@ -1798,7 +1798,7 @@ status_t AudioHardware::AudioStreamInMSM72xx::set( mHardware = hw; - LOGV("AudioStreamInMSM72xx::set(%d, %d, %u)", *pFormat, *pChannels, *pRate); + ALOGV("AudioStreamInMSM72xx::set(%d, %d, %u)", *pFormat, *pChannels, *pRate); if (mFd >= 0) { LOGE("Audio record already open"); return -EPERM; @@ -1816,13 +1816,13 @@ status_t AudioHardware::AudioStreamInMSM72xx::set( AudioHardware::AudioStreamInMSM72xx::~AudioStreamInMSM72xx() { - LOGV("AudioStreamInMSM72xx destructor"); + ALOGV("AudioStreamInMSM72xx destructor"); standby(); } ssize_t AudioHardware::AudioStreamInMSM72xx::read( void* buffer, ssize_t bytes) { -// LOGV("AudioStreamInMSM72xx::read(%p, %ld)", buffer, bytes); +// ALOGV("AudioStreamInMSM72xx::read(%p, %ld)", buffer, bytes); if (!mHardware) return -1; size_t count = bytes; @@ -1832,13 +1832,13 @@ ssize_t AudioHardware::AudioStreamInMSM72xx::read( void* buffer, ssize_t bytes) if (mStandby) { { // scope for the lock Mutex::Autolock lock(mHardware->mLock); - LOGV("acquire input wakelock"); + ALOGV("acquire input wakelock"); acquire_wake_lock(PARTIAL_WAKE_LOCK, kInputWakelockStr); // open audio input device status = ::open("/dev/msm_pcm_in", O_RDWR); if (status < 0) { LOGE("Cannot open /dev/msm_pcm_in errno: %d", errno); - LOGV("release input wakelock"); + ALOGV("release input wakelock"); release_wake_lock(kInputWakelockStr); goto Error; } @@ -1846,7 +1846,7 @@ ssize_t AudioHardware::AudioStreamInMSM72xx::read( void* buffer, ssize_t bytes) mStandby = false; // configuration - LOGV("get config"); + ALOGV("get config"); struct msm_audio_config config; status = ioctl(mFd, AUDIO_GET_CONFIG, &config); if (status < 0) { @@ -1854,7 +1854,7 @@ ssize_t AudioHardware::AudioStreamInMSM72xx::read( void* buffer, ssize_t bytes) goto Error; } - LOGV("set config"); + ALOGV("set config"); config.channel_count = AudioSystem::popCount(mChannels); config.sample_rate = mSampleRate; config.buffer_size = mBufferSize; @@ -1866,10 +1866,10 @@ ssize_t AudioHardware::AudioStreamInMSM72xx::read( void* buffer, ssize_t bytes) goto Error; } - LOGV("buffer_size: %u", config.buffer_size); - LOGV("buffer_count: %u", config.buffer_count); - LOGV("channel_count: %u", config.channel_count); - LOGV("sample_rate: %u", config.sample_rate); + ALOGV("buffer_size: %u", config.buffer_size); + ALOGV("buffer_count: %u", config.buffer_count); + ALOGV("channel_count: %u", config.channel_count); + ALOGV("sample_rate: %u", config.sample_rate); } mHardware->set_mRecordState(1); @@ -1917,7 +1917,7 @@ status_t AudioHardware::AudioStreamInMSM72xx::standby() ::close(mFd); mFd = -1; } - LOGV("release input wakelock"); + ALOGV("release input wakelock"); release_wake_lock(kInputWakelockStr); mStandby = true; @@ -1971,11 +1971,11 @@ status_t AudioHardware::AudioStreamInMSM72xx::setParameters(const String8& keyVa int device; String8 key = String8(AudioParameter::keyInputSource); int source; - LOGV("AudioStreamInMSM72xx::setParameters() %s", keyValuePairs.string()); + ALOGV("AudioStreamInMSM72xx::setParameters() %s", keyValuePairs.string()); // reading input source for voice recognition mode parameter if (param.getInt(key, source) == NO_ERROR) { - LOGV("set input source %d", source); + ALOGV("set input source %d", source); int uses_vr = (source == AUDIO_SOURCE_VOICE_RECOGNITION); vr_mode_change = (vr_mode_enabled != uses_vr); vr_mode_enabled = uses_vr; @@ -1985,7 +1985,7 @@ status_t AudioHardware::AudioStreamInMSM72xx::setParameters(const String8& keyVa // reading routing parameter key = String8(AudioParameter::keyRouting); if (param.getInt(key, device) == NO_ERROR) { - LOGV("set input routing %x", device); + ALOGV("set input routing %x", device); if (device & (device - 1)) { status = BAD_VALUE; } else { @@ -2008,11 +2008,11 @@ String8 AudioHardware::AudioStreamInMSM72xx::getParameters(const String8& keys) String8 key = String8(AudioParameter::keyRouting); if (param.get(key, value) == NO_ERROR) { - LOGV("get routing %x", mDevices); + ALOGV("get routing %x", mDevices); param.addInt(key, (int)mDevices); } - LOGV("AudioStreamInMSM72xx::getParameters() %s", param.toString().string()); + ALOGV("AudioStreamInMSM72xx::getParameters() %s", param.toString().string()); return param.toString(); } diff --git a/libaudio-qsd8k/AudioPolicyManager.cpp b/libaudio-qsd8k/AudioPolicyManager.cpp index 2328847..120eaca 100644 --- a/libaudio-qsd8k/AudioPolicyManager.cpp +++ b/libaudio-qsd8k/AudioPolicyManager.cpp @@ -55,7 +55,7 @@ uint32_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strategy, boo if (fromCache) { device = mDeviceForStrategy[strategy]; - LOGV("getDeviceForStrategy() from cache strategy %d, device %x", strategy, device); + ALOGV("getDeviceForStrategy() from cache strategy %d, device %x", strategy, device); return device; } @@ -220,7 +220,7 @@ uint32_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strategy, boo !AudioSystem::isA2dpDevice((AudioSystem::audio_devices)device) && device != getDeviceForStrategy(STRATEGY_PHONE, false)) { device = 0; - LOGV("getDeviceForStrategy() incompatible media and phone devices"); + ALOGV("getDeviceForStrategy() incompatible media and phone devices"); } } break; @@ -229,7 +229,7 @@ uint32_t AudioPolicyManager::getDeviceForStrategy(routing_strategy strategy, boo break; } - LOGV("getDeviceForStrategy() strategy %d, device %x", strategy, device); + ALOGV("getDeviceForStrategy() strategy %d, device %x", strategy, device); return device; } @@ -257,7 +257,7 @@ float AudioPolicyManager::computeVolume(int stream, int index, audio_io_handle_t // avoid saturation if (mPhoneState == AudioSystem::MODE_IN_CALL && AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)device)) { if (volume > IN_CALL_SCO_VOLUME_MAX) { - LOGV("computeVolume limiting SYSTEM volume %f to %f",volume, IN_CALL_SCO_VOLUME_MAX); + ALOGV("computeVolume limiting SYSTEM volume %f to %f",volume, IN_CALL_SCO_VOLUME_MAX); volume = IN_CALL_SCO_VOLUME_MAX; } } diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp index 78b6a3e..69ff7ce 100644 --- a/libaudio/AudioHardware.cpp +++ b/libaudio/AudioHardware.cpp @@ -100,7 +100,7 @@ AudioHardware::AudioHardware() : LOGD("mNumSndEndpoints = %d", mNumSndEndpoints); mSndEndpoints = new msm_snd_endpoint[mNumSndEndpoints]; mInit = true; - LOGV("constructed %d SND endpoints)", mNumSndEndpoints); + ALOGV("constructed %d SND endpoints)", mNumSndEndpoints); ept = mSndEndpoints; snd_get_endpoint = (int (*)(int, msm_snd_endpoint *))::dlsym(acoustic, "snd_get_endpoint"); if ((*snd_get_endpoint) == 0 ) { @@ -288,7 +288,7 @@ status_t AudioHardware::setParameters(const String8& keyValuePairs) const char BT_NREC_VALUE_ON[] = "on"; - LOGV("setParameters() %s", keyValuePairs.string()); + ALOGV("setParameters() %s", keyValuePairs.string()); if (keyValuePairs.length() == 0) return BAD_VALUE; @@ -483,7 +483,7 @@ status_t AudioHardware::doAudioRouteOrMute(uint32_t device) device = SND_DEVICE_BT_EC_OFF; } } - LOGV("doAudioRouteOrMute() device %x, mMode %d, mMicMute %d", device, mMode, mMicMute); + ALOGV("doAudioRouteOrMute() device %x, mMode %d, mMicMute %d", device, mMode, mMicMute); return do_route_audio_rpc(device, mMode != AudioSystem::MODE_IN_CALL, mMicMute); } @@ -710,7 +710,7 @@ ssize_t AudioHardware::AudioStreamOutMSM72xx::write(const void* buffer, size_t b if (mStandby) { // open driver - LOGV("open driver"); + ALOGV("open driver"); status = ::open("/dev/msm_pcm_out", O_RDWR); if (status < 0) { LOGE("Cannot open /dev/msm_pcm_out errno: %d", errno); @@ -719,7 +719,7 @@ ssize_t AudioHardware::AudioStreamOutMSM72xx::write(const void* buffer, size_t b mFd = status; // configuration - LOGV("get config"); + ALOGV("get config"); struct msm_audio_config config; status = ioctl(mFd, AUDIO_GET_CONFIG, &config); if (status < 0) { @@ -727,7 +727,7 @@ ssize_t AudioHardware::AudioStreamOutMSM72xx::write(const void* buffer, size_t b goto Error; } - LOGV("set config"); + ALOGV("set config"); config.channel_count = AudioSystem::popCount(channels()); config.sample_rate = sampleRate(); config.buffer_size = bufferSize(); @@ -739,10 +739,10 @@ ssize_t AudioHardware::AudioStreamOutMSM72xx::write(const void* buffer, size_t b goto Error; } - LOGV("buffer_size: %u", config.buffer_size); - LOGV("buffer_count: %u", config.buffer_count); - LOGV("channel_count: %u", config.channel_count); - LOGV("sample_rate: %u", config.sample_rate); + ALOGV("buffer_size: %u", config.buffer_size); + ALOGV("buffer_count: %u", config.buffer_count); + ALOGV("channel_count: %u", config.channel_count); + ALOGV("sample_rate: %u", config.sample_rate); // fill 2 buffers before AUDIO_START mStartCount = AUDIO_HW_NUM_OUT_BUF; @@ -831,11 +831,11 @@ status_t AudioHardware::AudioStreamOutMSM72xx::setParameters(const String8& keyV String8 key = String8(AudioParameter::keyRouting); status_t status = NO_ERROR; int device; - LOGV("AudioStreamOutMSM72xx::setParameters() %s", keyValuePairs.string()); + ALOGV("AudioStreamOutMSM72xx::setParameters() %s", keyValuePairs.string()); if (param.getInt(key, device) == NO_ERROR) { mDevices = device; - LOGV("set output routing %x", mDevices); + ALOGV("set output routing %x", mDevices); status = mHardware->doRouting(); param.remove(key); } @@ -853,11 +853,11 @@ String8 AudioHardware::AudioStreamOutMSM72xx::getParameters(const String8& keys) String8 key = String8(AudioParameter::keyRouting); if (param.get(key, value) == NO_ERROR) { - LOGV("get routing %x", mDevices); + ALOGV("get routing %x", mDevices); param.addInt(key, (int)mDevices); } - LOGV("AudioStreamOutMSM72xx::getParameters() %s", param.toString().string()); + ALOGV("AudioStreamOutMSM72xx::getParameters() %s", param.toString().string()); return param.toString(); } @@ -902,7 +902,7 @@ status_t AudioHardware::AudioStreamInMSM72xx::set( mHardware = hw; - LOGV("AudioStreamInMSM72xx::set(%d, %d, %u)", *pFormat, *pChannels, *pRate); + ALOGV("AudioStreamInMSM72xx::set(%d, %d, %u)", *pFormat, *pChannels, *pRate); if (mFd >= 0) { LOGE("Audio record already open"); return -EPERM; @@ -917,7 +917,7 @@ status_t AudioHardware::AudioStreamInMSM72xx::set( mFd = status; // configuration - LOGV("get config"); + ALOGV("get config"); struct msm_audio_config config; status = ioctl(mFd, AUDIO_GET_CONFIG, &config); if (status < 0) { @@ -925,7 +925,7 @@ status_t AudioHardware::AudioStreamInMSM72xx::set( goto Error; } - LOGV("set config"); + ALOGV("set config"); config.channel_count = AudioSystem::popCount(*pChannels); config.sample_rate = *pRate; config.buffer_size = bufferSize(); @@ -945,16 +945,16 @@ status_t AudioHardware::AudioStreamInMSM72xx::set( goto Error; } - LOGV("confirm config"); + ALOGV("confirm config"); status = ioctl(mFd, AUDIO_GET_CONFIG, &config); if (status < 0) { LOGE("Cannot read config"); goto Error; } - LOGV("buffer_size: %u", config.buffer_size); - LOGV("buffer_count: %u", config.buffer_count); - LOGV("channel_count: %u", config.channel_count); - LOGV("sample_rate: %u", config.sample_rate); + ALOGV("buffer_size: %u", config.buffer_size); + ALOGV("buffer_count: %u", config.buffer_count); + ALOGV("channel_count: %u", config.channel_count); + ALOGV("sample_rate: %u", config.sample_rate); mDevices = devices; mFormat = AUDIO_HW_IN_FORMAT; @@ -1000,13 +1000,13 @@ Error: AudioHardware::AudioStreamInMSM72xx::~AudioStreamInMSM72xx() { - LOGV("AudioStreamInMSM72xx destructor"); + ALOGV("AudioStreamInMSM72xx destructor"); standby(); } ssize_t AudioHardware::AudioStreamInMSM72xx::read( void* buffer, ssize_t bytes) { - LOGV("AudioStreamInMSM72xx::read(%p, %ld)", buffer, bytes); + ALOGV("AudioStreamInMSM72xx::read(%p, %ld)", buffer, bytes); if (!mHardware) return -1; size_t count = bytes; @@ -1093,10 +1093,10 @@ status_t AudioHardware::AudioStreamInMSM72xx::setParameters(const String8& keyVa String8 key = String8(AudioParameter::keyRouting); status_t status = NO_ERROR; int device; - LOGV("AudioStreamInMSM72xx::setParameters() %s", keyValuePairs.string()); + ALOGV("AudioStreamInMSM72xx::setParameters() %s", keyValuePairs.string()); if (param.getInt(key, device) == NO_ERROR) { - LOGV("set input routing %x", device); + ALOGV("set input routing %x", device); if (device & (device - 1)) { status = BAD_VALUE; } else { @@ -1119,11 +1119,11 @@ String8 AudioHardware::AudioStreamInMSM72xx::getParameters(const String8& keys) String8 key = String8(AudioParameter::keyRouting); if (param.get(key, value) == NO_ERROR) { - LOGV("get routing %x", mDevices); + ALOGV("get routing %x", mDevices); param.addInt(key, (int)mDevices); } - LOGV("AudioStreamInMSM72xx::getParameters() %s", param.toString().string()); + ALOGV("AudioStreamInMSM72xx::getParameters() %s", param.toString().string()); return param.toString(); } diff --git a/libcamera/QualcommCameraHardware.cpp b/libcamera/QualcommCameraHardware.cpp index 9dbc95c..af61197 100644 --- a/libcamera/QualcommCameraHardware.cpp +++ b/libcamera/QualcommCameraHardware.cpp @@ -49,7 +49,7 @@ static inline void print_time() #if PRINT_TIME struct timeval time; gettimeofday(&time, NULL); - LOGV("time: %lld us.", time.tv_sec * 1000000LL + time.tv_usec); + ALOGV("time: %lld us.", time.tv_sec * 1000000LL + time.tv_usec); #endif } @@ -304,7 +304,7 @@ namespace android { mRawSize(0), mPreviewCount(0) { - LOGV("constructor EX"); + ALOGV("constructor EX"); } void QualcommCameraHardware::initDefaultParameters() @@ -375,7 +375,7 @@ namespace android { #if DLOPEN_LIBQCAMERA == 1 - LOGV("loading libqcamera"); + ALOGV("loading libqcamera"); libqcamera = ::dlopen("liboemcamera.so", RTLD_NOW); if (!libqcamera) { LOGE("FATAL ERROR: could not dlopen liboemcamera.so: %s", dlerror()); @@ -452,26 +452,26 @@ namespace android { rex_init_lock.lock(); LINK_rex_start(); - LOGV("waiting for REX to initialize."); + ALOGV("waiting for REX to initialize."); rex_init_wait.wait(rex_init_lock); - LOGV("REX is ready."); + ALOGV("REX is ready."); rex_init_lock.unlock(); LINK_camera_init(); - LOGV("starting REX emulation"); + ALOGV("starting REX emulation"); // NOTE: camera_start() takes (height, width), not (width, height). LINK_camera_start(camera_cb, this, mPreviewHeight, mPreviewWidth); while(mCameraState != QCS_IDLE && mCameraState != QCS_ERROR) { - LOGV("init camera: waiting for QCS_IDLE"); + ALOGV("init camera: waiting for QCS_IDLE"); mStateWait.wait(mStateLock); - LOGV("init camera: woke up"); + ALOGV("init camera: woke up"); } - LOGV("init camera: initializing parameters"); + ALOGV("init camera: initializing parameters"); } - else LOGV("camera hardware has been started already"); + else ALOGV("camera hardware has been started already"); } status_t QualcommCameraHardware::dump(int fd, const Vector<String16>& args) const @@ -520,7 +520,7 @@ namespace android { setCameraDimensions(); - LOGV("initPreview: preview size=%dx%d", mPreviewWidth, mPreviewHeight); + ALOGV("initPreview: preview size=%dx%d", mPreviewWidth, mPreviewHeight); mPreviewFrameSize = mPreviewWidth * mPreviewHeight * 3 / 2; // reality mPreviewHeap = @@ -549,7 +549,7 @@ namespace android { // Called with mStateLock held! bool QualcommCameraHardware::initRaw(bool initJpegHeap) { - LOGV("initRaw E"); + ALOGV("initRaw E"); startCameraIfNecessary(); // Tell libqcamera what the preview and raw dimensions are. We @@ -561,7 +561,7 @@ namespace android { setCameraDimensions(); - LOGV("initRaw: picture size=%dx%d", + ALOGV("initRaw: picture size=%dx%d", mRawWidth, mRawHeight); // Note that we enforce yuv420 in setParameters(). @@ -571,10 +571,10 @@ namespace android { mJpegMaxSize = mRawWidth * mRawHeight * 2; - LOGV("initRaw: clearing old mJpegHeap."); + ALOGV("initRaw: clearing old mJpegHeap."); mJpegHeap = NULL; - LOGV("initRaw: initializing mRawHeap."); + ALOGV("initRaw: initializing mRawHeap."); mRawHeap = new RawPmemPool("/dev/pmem_camera", kRawFrameHeaderSize + mJpegMaxSize, /* worst */ @@ -590,7 +590,7 @@ namespace android { } if (initJpegHeap) { - LOGV("initRaw: initializing mJpegHeap."); + ALOGV("initRaw: initializing mJpegHeap."); mJpegHeap = new AshmemPool(mJpegMaxSize, kJpegBufferCount, @@ -605,13 +605,13 @@ namespace android { } } - LOGV("initRaw X success"); + ALOGV("initRaw X success"); return true; } void QualcommCameraHardware::release() { - LOGV("release E"); + ALOGV("release E"); Mutex::Autolock l(&mLock); @@ -635,45 +635,45 @@ namespace android { mCameraState = QCS_INTERNAL_STOPPING; mStateLock.unlock(); - LOGV("stopping camera."); + ALOGV("stopping camera."); LINK_camera_stop(stop_camera_cb, this); mStateLock.lock(); if (mCameraState == QCS_INTERNAL_STOPPING) { while (mCameraState != QCS_INIT && mCameraState != QCS_ERROR) { - LOGV("stopping camera: waiting for QCS_INIT"); + ALOGV("stopping camera: waiting for QCS_INIT"); mStateWait.wait(mStateLock); } } - LOGV("Shutting REX down."); + ALOGV("Shutting REX down."); LINK_rex_shutdown(); - LOGV("REX has shut down."); + ALOGV("REX has shut down."); #if DLOPEN_LIBQCAMERA if (libqcamera) { unsigned ref = ::dlclose(libqcamera); - LOGV("dlclose(libqcamera) refcount %d", ref); + ALOGV("dlclose(libqcamera) refcount %d", ref); } #endif mCameraState = QCS_INIT; } mStateLock.unlock(); - LOGV("release X"); + ALOGV("release X"); } QualcommCameraHardware::~QualcommCameraHardware() { - LOGV("~QualcommCameraHardware E"); + ALOGV("~QualcommCameraHardware E"); Mutex::Autolock singletonLock(&singleton_lock); singleton.clear(); - LOGV("~QualcommCameraHardware X"); + ALOGV("~QualcommCameraHardware X"); } sp<IMemoryHeap> QualcommCameraHardware::getPreviewHeap() const { - LOGV("getPreviewHeap"); + ALOGV("getPreviewHeap"); return mPreviewHeap != NULL ? mPreviewHeap->mHeap : NULL; } @@ -699,7 +699,7 @@ namespace android { preview_callback pcb, void *puser, recording_callback rcb, void *ruser) { - LOGV("startPreview E"); + ALOGV("startPreview E"); if (mCameraState == QCS_PREVIEW_IN_PROGRESS) { LOGE("startPreview is already in progress, doing nothing."); @@ -720,7 +720,7 @@ namespace android { mCameraState == QCS_WAITING_JPEG) { while (mCameraState != QCS_IDLE && mCameraState != QCS_ERROR) { - LOGV("waiting for QCS_IDLE"); + ALOGV("waiting for QCS_IDLE"); mStateWait.wait(mStateLock); } } @@ -747,7 +747,7 @@ namespace android { if (qret == CAMERA_SUCCESS) { while(mCameraState != QCS_PREVIEW_IN_PROGRESS && mCameraState != QCS_ERROR) { - LOGV("waiting for QCS_PREVIEW_IN_PROGRESS"); + ALOGV("waiting for QCS_PREVIEW_IN_PROGRESS"); mStateWait.wait(mStateLock); } } @@ -756,14 +756,14 @@ namespace android { mCameraState = QCS_ERROR; } - LOGV("startPreview X"); + ALOGV("startPreview X"); return mCameraState == QCS_PREVIEW_IN_PROGRESS ? NO_ERROR : UNKNOWN_ERROR; } void QualcommCameraHardware::stopPreviewInternal() { - LOGV("stopPreviewInternal E"); + ALOGV("stopPreviewInternal E"); if (mCameraState != QCS_PREVIEW_IN_PROGRESS) { LOGE("Preview not in progress!"); @@ -788,15 +788,15 @@ namespace android { LINK_camera_stop_preview(); while (mCameraState != QCS_IDLE && mCameraState != QCS_ERROR) { - LOGV("waiting for QCS_IDLE"); + ALOGV("waiting for QCS_IDLE"); mStateWait.wait(mStateLock); } - LOGV("stopPreviewInternal: Freeing preview heap."); + ALOGV("stopPreviewInternal: Freeing preview heap."); mPreviewHeap = NULL; mPreviewCallback = NULL; - LOGV("stopPreviewInternal: X Preview has stopped."); + ALOGV("stopPreviewInternal: X Preview has stopped."); } status_t QualcommCameraHardware::startPreview( @@ -810,7 +810,7 @@ namespace android { } void QualcommCameraHardware::stopPreview() { - LOGV("stopPreview: E"); + ALOGV("stopPreview: E"); Mutex::Autolock l(&mLock); if (!setCallbacks(NULL, NULL, mRecordingCallback, @@ -818,7 +818,7 @@ namespace android { Mutex::Autolock statelock(&mStateLock); stopPreviewInternal(); } - LOGV("stopPreview: X"); + ALOGV("stopPreview: X"); } bool QualcommCameraHardware::previewEnabled() { @@ -837,7 +837,7 @@ namespace android { } void QualcommCameraHardware::stopRecording() { - LOGV("stopRecording: E"); + ALOGV("stopRecording: E"); Mutex::Autolock l(&mLock); if (!setCallbacks(mPreviewCallback, mPreviewCallbackCookie, @@ -845,7 +845,7 @@ namespace android { Mutex::Autolock statelock(&mStateLock); stopPreviewInternal(); } - LOGV("stopRecording: X"); + ALOGV("stopRecording: X"); } bool QualcommCameraHardware::recordingEnabled() { @@ -865,7 +865,7 @@ namespace android { status_t QualcommCameraHardware::autoFocus(autofocus_callback af_cb, void *user) { - LOGV("Starting auto focus."); + ALOGV("Starting auto focus."); Mutex::Autolock l(&mLock); Mutex::Autolock lock(&mStateLock); @@ -877,7 +877,7 @@ namespace android { } if (mAutoFocusCallback != NULL) { - LOGV("Auto focus is already in progress"); + ALOGV("Auto focus is already in progress"); return mAutoFocusCallback == af_cb ? NO_ERROR : INVALID_OPERATION; } @@ -892,7 +892,7 @@ namespace android { jpeg_callback jpeg_cb, void* user) { - LOGV("takePicture: E raw_cb = %p, jpeg_cb = %p", + ALOGV("takePicture: E raw_cb = %p, jpeg_cb = %p", raw_cb, jpeg_cb); print_time(); @@ -915,7 +915,7 @@ namespace android { mCameraState == QCS_WAITING_JPEG) { while (mCameraState != QCS_IDLE && mCameraState != QCS_ERROR) { - LOGV("waiting for QCS_IDLE"); + ALOGV("waiting for QCS_IDLE"); mStateWait.wait(mStateLock); } } @@ -970,13 +970,13 @@ namespace android { mCameraState != QCS_WAITING_JPEG && mCameraState != QCS_IDLE && mCameraState != QCS_ERROR) { - LOGV("takePicture: waiting for QCS_WAITING_RAW or QCS_WAITING_JPEG"); + ALOGV("takePicture: waiting for QCS_WAITING_RAW or QCS_WAITING_JPEG"); mStateWait.wait(mStateLock); - LOGV("takePicture: woke up, state is %s", + ALOGV("takePicture: woke up, state is %s", getCameraStateStr(mCameraState)); } - LOGV("takePicture: X"); + ALOGV("takePicture: X"); print_time(); return mCameraState != QCS_ERROR ? NO_ERROR : UNKNOWN_ERROR; @@ -985,7 +985,7 @@ namespace android { status_t QualcommCameraHardware::cancelPicture( bool cancel_shutter, bool cancel_raw, bool cancel_jpeg) { - LOGV("cancelPicture: E cancel_shutter = %d, cancel_raw = %d, cancel_jpeg = %d", + ALOGV("cancelPicture: E cancel_shutter = %d, cancel_raw = %d, cancel_jpeg = %d", cancel_shutter, cancel_raw, cancel_jpeg); Mutex::Autolock l(&mLock); Mutex::Autolock stateLock(&mStateLock); @@ -994,7 +994,7 @@ namespace android { case QCS_INTERNAL_RAW_REQUESTED: case QCS_WAITING_RAW: case QCS_WAITING_JPEG: - LOGV("camera state is %s, stopping picture.", + ALOGV("camera state is %s, stopping picture.", getCameraStateStr(mCameraState)); { @@ -1006,23 +1006,23 @@ namespace android { while (mCameraState != QCS_IDLE && mCameraState != QCS_ERROR) { - LOGV("cancelPicture: waiting for QCS_IDLE"); + ALOGV("cancelPicture: waiting for QCS_IDLE"); mStateWait.wait(mStateLock); } break; default: - LOGV("not taking a picture (state %s)", + ALOGV("not taking a picture (state %s)", getCameraStateStr(mCameraState)); } - LOGV("cancelPicture: X"); + ALOGV("cancelPicture: X"); return NO_ERROR; } status_t QualcommCameraHardware::setParameters( const CameraParameters& params) { - LOGV("setParameters: E params = %p", ¶ms); + ALOGV("setParameters: E params = %p", ¶ms); Mutex::Autolock l(&mLock); Mutex::Autolock lock(&mStateLock); @@ -1046,7 +1046,7 @@ namespace android { // find closest match that doesn't exceed app's request int width, height; params.getPreviewSize(&width, &height); - LOGV("requested size %d x %d", width, height); + ALOGV("requested size %d x %d", width, height); preview_size_type* ps = preview_sizes; size_t i; for (i = 0; i < PREVIEW_SIZE_COUNT; ++i, ++ps) { @@ -1054,7 +1054,7 @@ namespace android { } // app requested smaller size than supported, use smallest size if (i == PREVIEW_SIZE_COUNT) ps--; - LOGV("actual size %d x %d", ps->width, ps->height); + ALOGV("actual size %d x %d", ps->width, ps->height); mParameters.setPreviewSize(ps->width, ps->height); mParameters.getPreviewSize(&mPreviewWidth, &mPreviewHeight); @@ -1067,14 +1067,14 @@ namespace android { initCameraParameters(); - LOGV("setParameters: X mCameraState=%d", mCameraState); + ALOGV("setParameters: X mCameraState=%d", mCameraState); return mCameraState == QCS_IDLE ? NO_ERROR : UNKNOWN_ERROR; } CameraParameters QualcommCameraHardware::getParameters() const { - LOGV("getParameters: EX"); + ALOGV("getParameters: EX"); return mParameters; } @@ -1097,7 +1097,7 @@ namespace android { extern "C" sp<CameraHardwareInterface> HAL_openCameraHardware(int cameraId) { - LOGV("openCameraHardware: call createInstance"); + ALOGV("openCameraHardware: call createInstance"); return QualcommCameraHardware::createInstance(); } @@ -1108,13 +1108,13 @@ namespace android { // and return it. sp<CameraHardwareInterface> QualcommCameraHardware::createInstance() { - LOGV("createInstance: E"); + ALOGV("createInstance: E"); singleton_lock.lock(); if (singleton != 0) { sp<CameraHardwareInterface> hardware = singleton.promote(); if (hardware != 0) { - LOGV("createInstance: X return existing hardware=%p", + ALOGV("createInstance: X return existing hardware=%p", &(*hardware)); singleton_lock.unlock(); return hardware; @@ -1125,7 +1125,7 @@ namespace android { struct stat st; int rc = stat("/dev/oncrpc", &st); if (rc < 0) { - LOGV("createInstance: X failed to create hardware: %s", + ALOGV("createInstance: X failed to create hardware: %s", strerror(errno)); singleton_lock.unlock(); return NULL; @@ -1142,7 +1142,7 @@ namespace android { // it still exists, we need to call this function after we have set the // singleton. cam->initDefaultParameters(); - LOGV("createInstance: X created hardware=%p", &(*hardware)); + ALOGV("createInstance: X created hardware=%p", &(*hardware)); return hardware; } @@ -1170,13 +1170,13 @@ namespace android { // against. uint32_t vaddr = (uint32_t)(base + size*index); - LOGV("get_preview_mem: base %p MALLOC size %d index %d --> %p", + ALOGV("get_preview_mem: base %p MALLOC size %d index %d --> %p", base, size, index, (void *)vaddr); *phy_addr = vaddr; return (void *)vaddr; } } - LOGV("get_preview_mem: X NULL"); + ALOGV("get_preview_mem: X NULL"); return NULL; } @@ -1184,7 +1184,7 @@ namespace android { uint32_t size, uint32_t index) { - LOGV("free_preview_mem: EX NOP"); + ALOGV("free_preview_mem: EX NOP"); return; } @@ -1201,13 +1201,13 @@ namespace android { // patch it against. uint32_t vaddr = (uint32_t)(base + size*index); - LOGV("get_raw_mem: base %p MALLOC size %d index %d --> %p", + ALOGV("get_raw_mem: base %p MALLOC size %d index %d --> %p", base, size, index, (void *)vaddr); *phy_addr = vaddr; return (void *)vaddr; } } - LOGV("get_raw_mem: X NULL"); + ALOGV("get_raw_mem: X NULL"); return NULL; } @@ -1215,7 +1215,7 @@ namespace android { uint32_t size, uint32_t index) { - LOGV("free_raw_mem: EX NOP"); + ALOGV("free_raw_mem: EX NOP"); return; } @@ -1238,7 +1238,7 @@ namespace android { (ssize_t)mPreviewHeap->mHeap->virtualSize()) { #if 0 // frame->buffer includes the header, frame->buf_Virt_Addr skips it - LOGV("PREVIEW FRAME CALLBACK " + ALOGV("PREVIEW FRAME CALLBACK " "base %p addr %p offset %ld " "framesz %dx%d=%ld (expect %d) rotation %d " "(index %ld) size %d header_size 0x%x", @@ -1281,13 +1281,13 @@ namespace android { void QualcommCameraHardware::notifyShutter() { - LOGV("notifyShutter: E"); + ALOGV("notifyShutter: E"); print_time(); Mutex::Autolock lock(&mStateLock); if (mShutterCallback) mShutterCallback(mPictureCallbackCookie); print_time(); - LOGV("notifyShutter: X"); + ALOGV("notifyShutter: X"); } // Pass the pre-LPM raw picture to raw picture callback. @@ -1295,7 +1295,7 @@ namespace android { // which startPreview() or takePicture() are called. void QualcommCameraHardware::receiveRawPicture(camera_frame_type *frame) { - LOGV("receiveRawPicture: E"); + ALOGV("receiveRawPicture: E"); print_time(); Mutex::Autolock cbLock(&mCallbackLock); @@ -1315,7 +1315,7 @@ namespace android { #if 0 // frame->buffer includes the header, frame->buf_Virt_Addr // skips it. - LOGV("receiveRawPicture: RAW CALLBACK (CB %p) " + ALOGV("receiveRawPicture: RAW CALLBACK (CB %p) " "base %p addr %p buffer %p offset %ld " "framesz %dx%d=%ld (expect %d) rotation %d " "(index %ld) size %d header_size 0x%x", @@ -1338,10 +1338,10 @@ namespace android { else LOGE("receiveRawPicture: virtual address %p is out of range!", frame->buf_Virt_Addr); } - else LOGV("Raw-picture callback was canceled--skipping."); + else ALOGV("Raw-picture callback was canceled--skipping."); print_time(); - LOGV("receiveRawPicture: X"); + ALOGV("receiveRawPicture: X"); } // Encode the post-LPM raw picture. @@ -1351,7 +1351,7 @@ namespace android { void QualcommCameraHardware::receivePostLpmRawPicture(camera_frame_type *frame) { - LOGV("receivePostLpmRawPicture: E"); + ALOGV("receivePostLpmRawPicture: E"); print_time(); qualcomm_camera_state new_state = QCS_ERROR; @@ -1364,7 +1364,7 @@ namespace android { #define PARSE_LOCATION(what,type,fmt,desc) do { \ pt.what = 0; \ const char *what##_str = mParameters.get("gps-"#what); \ - LOGV("receiveRawPicture: GPS PARM %s --> [%s]", "gps-"#what, what##_str); \ + ALOGV("receiveRawPicture: GPS PARM %s --> [%s]", "gps-"#what, what##_str); \ if (what##_str) { \ type what = 0; \ if (sscanf(what##_str, fmt, &what) == 1) \ @@ -1392,14 +1392,14 @@ namespace android { #undef PARSE_LOCATION if (encode_location) { - LOGV("receiveRawPicture: setting image location ALT %d LAT %lf LON %lf", + ALOGV("receiveRawPicture: setting image location ALT %d LAT %lf LON %lf", pt.altitude, pt.latitude, pt.longitude); if (LINK_camera_set_position(&pt, NULL, NULL) != CAMERA_SUCCESS) { LOGE("receiveRawPicture: camera_set_position: error"); /* return; */ // not a big deal } } - else LOGV("receiveRawPicture: not setting image location"); + else ALOGV("receiveRawPicture: not setting image location"); mJpegSize = 0; camera_handle.device = CAMERA_DEVICE_MEM; @@ -1416,14 +1416,14 @@ namespace android { LINK_camera_encode_picture(frame, &camera_handle, camera_cb, this); } else { - LOGV("JPEG callback was cancelled--not encoding image."); + ALOGV("JPEG callback was cancelled--not encoding image."); // We need to keep the raw heap around until the JPEG is fully // encoded, because the JPEG encode uses the raw image contained in // that heap. mRawHeap = NULL; } print_time(); - LOGV("receivePostLpmRawPicture: X"); + ALOGV("receivePostLpmRawPicture: X"); } void @@ -1438,7 +1438,7 @@ namespace android { uint32_t remaining = mJpegHeap->mHeap->virtualSize(); remaining -= mJpegSize; - LOGV("receiveJpegPictureFragment: (index %d status %d size %d)", + ALOGV("receiveJpegPictureFragment: (index %d status %d size %d)", index, encInfo->status, size); @@ -1462,7 +1462,7 @@ namespace android { void QualcommCameraHardware::receiveJpegPicture(void) { - LOGV("receiveJpegPicture: E image (%d bytes out of %d)", + ALOGV("receiveJpegPicture: E image (%d bytes out of %d)", mJpegSize, mJpegHeap->mBufferSize); print_time(); Mutex::Autolock cbLock(&mCallbackLock); @@ -1482,7 +1482,7 @@ namespace android { mJpegPictureCallback(buffer, mPictureCallbackCookie); buffer = NULL; } - else LOGV("JPEG callback was cancelled--not delivering image."); + else ALOGV("JPEG callback was cancelled--not delivering image."); // NOTE: the JPEG encoder uses the raw image contained in mRawHeap, so we need // to keep the heap around until the encoding is complete. @@ -1498,7 +1498,7 @@ namespace android { } /* for */ print_time(); - LOGV("receiveJpegPicture: X callback done."); + ALOGV("receiveJpegPicture: X callback done."); } struct str_map { @@ -1578,7 +1578,7 @@ namespace android { void QualcommCameraHardware::initCameraParameters() { - LOGV("initCameraParameters: E"); + ALOGV("initCameraParameters: E"); // Because libqcamera is broken, for the camera_set_parm() calls // QualcommCameraHardware camera_cb() is called synchronously, @@ -1588,7 +1588,7 @@ namespace android { startCameraIfNecessary(); #define SET_PARM(x,y) do { \ - LOGV("initCameraParameters: set parm: %s, %d", #x, y); \ + ALOGV("initCameraParameters: set parm: %s, %d", #x, y); \ LINK_camera_set_parm (x, y, NULL, NULL); \ } while(0) @@ -1601,7 +1601,7 @@ namespace android { // Rotation may be negative, but may not be -1, because it has to be a // multiple of 90. That's why we can still interpret -1 as an error, if (rotation == -1) { - LOGV("rotation not specified or is invalid, defaulting to 0"); + ALOGV("rotation not specified or is invalid, defaulting to 0"); rotation = 0; } else if (rotation % 90) { @@ -1689,7 +1689,7 @@ namespace android { encode_properties.quality); encode_properties.quality = 100; } - else LOGV("Setting JPEG-image quality to %d", + else ALOGV("Setting JPEG-image quality to %d", encode_properties.quality); encode_properties.format = CAMERA_JPEG; encode_properties.file_size = 0x0; @@ -1699,7 +1699,7 @@ namespace android { #endif - LOGV("initCameraParameters: X"); + ALOGV("initCameraParameters: X"); } // Called with mStateLock held! @@ -1731,7 +1731,7 @@ namespace android { // transition on mStateWait. That's why we signal(), not // broadcast(). - LOGV("state transition %s --> %s", + ALOGV("state transition %s --> %s", getCameraStateStr(mCameraState), getCameraStateStr(new_state)); @@ -1742,7 +1742,7 @@ namespace android { return new_state; } -#define CAMERA_STATE(n) case n: if(n != CAMERA_FUNC_START_PREVIEW || cb != CAMERA_EVT_CB_FRAME) LOGV("STATE %s // STATUS %d", #n, cb); +#define CAMERA_STATE(n) case n: if(n != CAMERA_FUNC_START_PREVIEW || cb != CAMERA_EVT_CB_FRAME) ALOGV("STATE %s // STATUS %d", #n, cb); #define TRANSITION(e,s) do { \ obj->change_state(obj->mCameraState == e ? s : QCS_ERROR); \ } while(0) @@ -1861,7 +1861,7 @@ namespace android { // waiting in cancelPicture(), and then delete this object. // If the order were reversed, we might call // receiveRawPicture on a dead object. - LOGV("Receiving post LPM raw picture."); + ALOGV("Receiving post LPM raw picture."); obj->receivePostLpmRawPicture((camera_frame_type *)parm4); { Mutex::Autolock lock(&obj->mStateLock); @@ -1933,10 +1933,10 @@ namespace android { if (obj->mAutoFocusCallback) { switch (cb) { case CAMERA_RSP_CB_SUCCESS: - LOGV("camera cb: autofocus has started."); + ALOGV("camera cb: autofocus has started."); break; case CAMERA_EXIT_CB_DONE: { - LOGV("camera cb: autofocus succeeded."); + ALOGV("camera cb: autofocus succeeded."); Mutex::Autolock lock(&obj->mStateLock); if (obj->mAutoFocusCallback) { obj->mAutoFocusCallback(true, @@ -2025,7 +2025,7 @@ namespace android { frame_offset, name) { - LOGV("constructing MemPool %s backed by ashmem: " + ALOGV("constructing MemPool %s backed by ashmem: " "%d frames @ %d bytes, offset %d, " "buffer size %d", mName, @@ -2052,7 +2052,7 @@ namespace android { frame_offset, name) { - LOGV("constructing MemPool %s backed by pmem pool %s: " + ALOGV("constructing MemPool %s backed by pmem pool %s: " "%d frames @ %d bytes, offset %d, buffer size %d", mName, pmem_pool, num_buffers, frame_size, frame_offset, @@ -2080,7 +2080,7 @@ namespace android { return; } - LOGV("pmem pool %s ioctl(PMEM_GET_SIZE) is %ld", + ALOGV("pmem pool %s ioctl(PMEM_GET_SIZE) is %ld", pmem_pool, mSize.len); @@ -2102,7 +2102,7 @@ namespace android { frame_offset, name) { - LOGV("constructing PreviewPmemPool"); + ALOGV("constructing PreviewPmemPool"); if (initialized()) { LINK_camera_assoc_pmem(QDSP_MODULE_VFETASK, mFd, @@ -2114,10 +2114,10 @@ namespace android { QualcommCameraHardware::PreviewPmemPool::~PreviewPmemPool() { - LOGV("destroying PreviewPmemPool"); + ALOGV("destroying PreviewPmemPool"); if(initialized()) { void *base = mHeap->base(); - LOGV("releasing PreviewPmemPool memory %p from module %d", + ALOGV("releasing PreviewPmemPool memory %p from module %d", base, QDSP_MODULE_VFETASK); LINK_camera_release_pmem(QDSP_MODULE_VFETASK, base, mAlignedSize, @@ -2138,7 +2138,7 @@ namespace android { frame_offset, name) { - LOGV("constructing RawPmemPool"); + ALOGV("constructing RawPmemPool"); if (initialized()) { LINK_camera_assoc_pmem(QDSP_MODULE_VFETASK, @@ -2161,10 +2161,10 @@ namespace android { QualcommCameraHardware::RawPmemPool::~RawPmemPool() { - LOGV("destroying RawPmemPool"); + ALOGV("destroying RawPmemPool"); if(initialized()) { void *base = mHeap->base(); - LOGV("releasing RawPmemPool memory %p from modules %d, %d, and %d", + ALOGV("releasing RawPmemPool memory %p from modules %d, %d, and %d", base, QDSP_MODULE_VFETASK, QDSP_MODULE_LPMTASK, QDSP_MODULE_JPEGTASK); LINK_camera_release_pmem(QDSP_MODULE_VFETASK, @@ -2178,11 +2178,11 @@ namespace android { QualcommCameraHardware::MemPool::~MemPool() { - LOGV("destroying MemPool %s", mName); + ALOGV("destroying MemPool %s", mName); if (mFrameSize > 0) delete [] mBuffers; mHeap.clear(); - LOGV("destroying MemPool %s completed", mName); + ALOGV("destroying MemPool %s completed", mName); } status_t QualcommCameraHardware::MemPool::dump(int fd, const Vector<String16>& args) const @@ -2254,7 +2254,7 @@ namespace android { static void cb_rex_signal_ready(void) { - LOGV("Received REX-ready signal."); + ALOGV("Received REX-ready signal."); rex_init_lock.lock(); rex_init_wait.broadcast(); rex_init_lock.unlock(); diff --git a/libgralloc-qsd8k/pmemalloc.cpp b/libgralloc-qsd8k/pmemalloc.cpp index e42e898..afecd84 100644 --- a/libgralloc-qsd8k/pmemalloc.cpp +++ b/libgralloc-qsd8k/pmemalloc.cpp @@ -32,8 +32,8 @@ #include "pmemalloc.h" -#define BEGIN_FUNC LOGV("%s begin", __PRETTY_FUNCTION__) -#define END_FUNC LOGV("%s end", __PRETTY_FUNCTION__) +#define BEGIN_FUNC ALOGV("%s begin", __PRETTY_FUNCTION__) +#define END_FUNC ALOGV("%s end", __PRETTY_FUNCTION__) static int get_open_flags(int usage) { @@ -179,7 +179,7 @@ int PmemUserspaceAllocator::alloc_pmem_buffer(size_t size, int usage, allocator.deallocate(offset); fd = -1; } else { - LOGV("%s: mapped fd %d at offset %d, size %d", pmemdev, fd, offset, size); + ALOGV("%s: mapped fd %d at offset %d, size %d", pmemdev, fd, offset, size); memset((char*)base + offset, 0, size); *pBase = base; *pOffset = offset; diff --git a/liblights/lights.c b/liblights/lights.c index 555833b..b6e7926 100644 --- a/liblights/lights.c +++ b/liblights/lights.c @@ -134,7 +134,7 @@ handle_trackball_light_locked(struct light_device_t* dev) if (mode == 7 && g_backlight) { mode = 0; } - LOGV("%s g_backlight = %d, mode = %d, g_attention = %d\n", + ALOGV("%s g_backlight = %d, mode = %d, g_attention = %d\n", __func__, g_backlight, mode, g_attention); // If the value isn't changing, don't set it, because this @@ -311,7 +311,7 @@ set_light_notifications(struct light_device_t* dev, { pthread_mutex_lock(&g_lock); g_notification = *state; - LOGV("set_light_notifications g_trackball=%d color=0x%08x", + ALOGV("set_light_notifications g_trackball=%d color=0x%08x", g_trackball, state->color); if (g_haveTrackballLight) { handle_trackball_light_locked(dev); @@ -326,7 +326,7 @@ set_light_attention(struct light_device_t* dev, struct light_state_t const* state) { pthread_mutex_lock(&g_lock); - LOGV("set_light_attention g_trackball=%d color=0x%08x", + ALOGV("set_light_attention g_trackball=%d color=0x%08x", g_trackball, state->color); if (state->flashMode == LIGHT_FLASH_HARDWARE) { g_attention = state->flashOnMS; |