diff --git a/audiohandler/src/daudio_handler.cpp b/audiohandler/src/daudio_handler.cpp index ef0dd522f65151be9b8c426db028ef0357ea6f17..3b05a3b0f93841c4c21f74dcfea4c3e6787bcdc6 100644 --- a/audiohandler/src/daudio_handler.cpp +++ b/audiohandler/src/daudio_handler.cpp @@ -46,12 +46,12 @@ DAudioHandler::DAudioHandler() spkInfos_.channelMinVal = 0; micInfos_.channelMaxVal = 0; micInfos_.channelMinVal = 0; - DHLOGI("Distributed audio handler constructed."); + DHLOGD("Distributed audio handler constructed."); } DAudioHandler::~DAudioHandler() { - DHLOGI("Distributed audio handler deconstructed."); + DHLOGD("Distributed audio handler deconstructed."); } int32_t DAudioHandler::Initialize() @@ -69,7 +69,7 @@ int32_t DAudioHandler::Initialize() std::vector DAudioHandler::Query() { - DHLOGI("Query distributed hardware information."); + DHLOGD("Query distributed hardware information."); auto audioSrv = AudioStandard::AudioSystemManager::GetInstance(); std::vector dhItemVec; if (audioSrv == nullptr) { @@ -106,7 +106,7 @@ std::vector DAudioHandler::Query() std::vector DAudioHandler::ablityForDump() { - DHLOGI("Get audio ablity for dump."); + DHLOGD("Get audio ablity for dump."); if (ablityForDumpVec_.size() > 0) { return ablityForDumpVec_; } @@ -116,7 +116,7 @@ std::vector DAudioHandler::ablityForDump() } int32_t DAudioHandler::QueryCodecInfo() { - DHLOGI("Query codec information."); + DHLOGD("Query codec information."); auto avCodecList = Media::AVCodecListFactory::CreateAVCodecList(); if (avCodecList == nullptr) { DHLOGE("Failed to query the avcodec information."); @@ -155,7 +155,7 @@ int32_t DAudioHandler::QueryCodecInfo() int32_t DAudioHandler::QueryAudioInfo() { - DHLOGI("Start to query codec information."); + DHLOGD("Start to query codec information."); audioInfos_.sampleRates = OHOS::AudioStandard::AudioCapturer::GetSupportedSamplingRates(); audioInfos_.formats = OHOS::AudioStandard::AudioCapturer::GetSupportedFormats(); audioInfos_.channels = OHOS::AudioStandard::AudioCapturer::GetSupportedChannels(); @@ -215,14 +215,14 @@ void DAudioHandler::GetSupportAudioInfo(AudioInfo &audioInfos, CoderInfo &encode std::map DAudioHandler::QueryExtraInfo() { - DHLOGI("Query extra information"); + DHLOGD("Query extra information"); std::map extraInfo; return extraInfo; } bool DAudioHandler::IsSupportPlugin() { - DHLOGI("Is support plug in"); + DHLOGD("Is support plug in"); return false; } diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_adapter_interface_impl.cpp b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_adapter_interface_impl.cpp index baa69dd7b3837cf4093f371e5816af4caf5fd24c..57ec5fc02095a5cf1f1fcbca1fe1095b1abc0077 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_adapter_interface_impl.cpp +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_adapter_interface_impl.cpp @@ -204,7 +204,7 @@ int32_t AudioAdapterInterfaceImpl::DestroyCapture(const AudioDeviceDescriptor &d int32_t AudioAdapterInterfaceImpl::GetPortCapability(const AudioPort &port, AudioPortCapability &capability) { - DHLOGI("Get audio port capability."); + DHLOGD("Get audio port capability."); (void)port; capability.sampleRateMasks = AUDIO_SAMPLE_RATE_DEFAULT; capability.channelCount = AUDIO_CHANNEL_COUNT_DEFAULT; @@ -214,7 +214,6 @@ int32_t AudioAdapterInterfaceImpl::GetPortCapability(const AudioPort &port, Audi int32_t AudioAdapterInterfaceImpl::SetPassthroughMode(const AudioPort &port, AudioPortPassthroughMode mode) { - DHLOGI("Distributed audio not support yet."); (void)port; (void)mode; return HDF_SUCCESS; @@ -222,7 +221,6 @@ int32_t AudioAdapterInterfaceImpl::SetPassthroughMode(const AudioPort &port, Aud int32_t AudioAdapterInterfaceImpl::GetPassthroughMode(const AudioPort &port, AudioPortPassthroughMode &mode) { - DHLOGI("Distributed audio not support yet."); (void)port; (void)mode; return HDF_SUCCESS; @@ -230,7 +228,6 @@ int32_t AudioAdapterInterfaceImpl::GetPassthroughMode(const AudioPort &port, Aud int32_t AudioAdapterInterfaceImpl::GetDeviceStatus(AudioDeviceStatus& status) { - DHLOGI("Distributed audio not support yet."); (void) status; return HDF_SUCCESS; } @@ -269,7 +266,7 @@ int32_t AudioAdapterInterfaceImpl::SetVoiceVolume(float volume) int32_t AudioAdapterInterfaceImpl::SetExtraParams(AudioExtParamKey key, const std::string &condition, const std::string &value) { - DHLOGI("Set audio parameters, key = %d, condition: %s value: %s.", key, condition.c_str(), value.c_str()); + DHLOGD("Set audio parameters, key = %d, condition: %s value: %s.", key, condition.c_str(), value.c_str()); int32_t ret = ERR_DH_AUDIO_HDF_FAIL; switch (key) { case AudioExtParamKey::AUDIO_EXT_PARAM_KEY_VOLUME: @@ -293,7 +290,7 @@ int32_t AudioAdapterInterfaceImpl::SetExtraParams(AudioExtParamKey key, const st int32_t AudioAdapterInterfaceImpl::GetExtraParams(AudioExtParamKey key, const std::string &condition, std::string &value) { - DHLOGI("Get audio parameters, key: %d, condition: %s.", key, condition.c_str()); + DHLOGD("Get audio parameters, key: %d, condition: %s.", key, condition.c_str()); int32_t ret = ERR_DH_AUDIO_HDF_FAIL; switch (key) { case AudioExtParamKey::AUDIO_EXT_PARAM_KEY_VOLUME: @@ -316,7 +313,7 @@ int32_t AudioAdapterInterfaceImpl::GetExtraParams(AudioExtParamKey key, const st int32_t AudioAdapterInterfaceImpl::RegExtraParamObserver(const sptr &audioCallback, int8_t cookie) { - DHLOGI("Register audio param observer."); + DHLOGD("Register audio param observer."); paramCallback_ = audioCallback; (void) cookie; return HDF_SUCCESS; @@ -741,7 +738,7 @@ int32_t AudioAdapterInterfaceImpl::HandleRenderStateChangeEvent(const DAudioEven int32_t AudioAdapterInterfaceImpl::HandleSANotifyEvent(const DAudioEvent &event) { if (event.type == HDF_AUDIO_EVENT_OPEN_SPK_RESULT) { - DHLOGI("Notify event: OPEN_SPK_RESULT, event content: %s.", event.content.c_str()); + DHLOGD("Notify event: OPEN_SPK_RESULT, event content: %s.", event.content.c_str()); if (event.content == HDF_EVENT_RESULT_SUCCESS) { isSpkOpened_ = true; } @@ -749,7 +746,7 @@ int32_t AudioAdapterInterfaceImpl::HandleSANotifyEvent(const DAudioEvent &event) spkWaitCond_.notify_all(); return DH_SUCCESS; } else if (event.type == HDF_AUDIO_EVENT_CLOSE_SPK_RESULT) { - DHLOGI("Notify event: CLOSE_SPK_RESULT, event content: %s.", event.content.c_str()); + DHLOGD("Notify event: CLOSE_SPK_RESULT, event content: %s.", event.content.c_str()); if (event.content == HDF_EVENT_RESULT_SUCCESS) { isSpkOpened_ = false; } @@ -757,7 +754,7 @@ int32_t AudioAdapterInterfaceImpl::HandleSANotifyEvent(const DAudioEvent &event) spkWaitCond_.notify_all(); return DH_SUCCESS; } else if (event.type == HDF_AUDIO_EVENT_OPEN_MIC_RESULT) { - DHLOGI("Notify event: OPEN_MIC_RESULT, event content: %s.", event.content.c_str()); + DHLOGD("Notify event: OPEN_MIC_RESULT, event content: %s.", event.content.c_str()); if (event.content == HDF_EVENT_RESULT_SUCCESS) { isMicOpened_ = true; } @@ -765,7 +762,7 @@ int32_t AudioAdapterInterfaceImpl::HandleSANotifyEvent(const DAudioEvent &event) micWaitCond_.notify_all(); return DH_SUCCESS; } else if (event.type == HDF_AUDIO_EVENT_CLOSE_MIC_RESULT) { - DHLOGI("Notify event: CLOSE_MIC_RESULT, event content: %s.", event.content.c_str()); + DHLOGD("Notify event: CLOSE_MIC_RESULT, event content: %s.", event.content.c_str()); if (event.content == HDF_EVENT_RESULT_SUCCESS) { isMicOpened_ = false; } @@ -830,17 +827,17 @@ int32_t AudioAdapterInterfaceImpl::HandleDeviceClosed(const DAudioEvent &event) int32_t ret = paramCallback_->ParamCallback(AUDIO_EXT_PARAM_KEY_STATUS, ss.str(), std::to_string(EVENT_DEV_CLOSED), reserved, cookie); if (ret != DH_SUCCESS) { - DHLOGI("Notify fwk failed."); + DHLOGE("Notify fwk failed."); } } AudioDeviceDescriptor dec; if (isSpkOpened_ == true && event.type == HDF_AUDIO_EVENT_SPK_CLOSED) { - DHLOGI("Render device status error, close render."); + DHLOGE("Render device status error, close render."); dec.pins = static_cast(spkPinInUse_); return DestroyRender(dec); } else if (isMicOpened_ == true && event.type == HDF_AUDIO_EVENT_MIC_CLOSED) { - DHLOGI("Capture device status error, close capture."); + DHLOGE("Capture device status error, close capture."); dec.pins = static_cast(micPinInUse_); return DestroyCapture(dec); } diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_manager_interface_impl.cpp b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_manager_interface_impl.cpp index 73d42619220555e203c5452851ce6ceca25e000c..2a13a42b619f386e2b2175d0cacc22b1e699bc8f 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_manager_interface_impl.cpp +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_manager_interface_impl.cpp @@ -43,12 +43,12 @@ extern "C" IAudioManager *AudioManagerImplGetInstance(void) AudioManagerInterfaceImpl::AudioManagerInterfaceImpl() { - DHLOGI("Distributed audio manager constructed."); + DHLOGD("Distributed audio manager constructed."); } AudioManagerInterfaceImpl::~AudioManagerInterfaceImpl() { - DHLOGI("Distributed audio manager destructed."); + DHLOGD("Distributed audio manager destructed."); } int32_t AudioManagerInterfaceImpl::GetAllAdapters(std::vector &descs) @@ -107,7 +107,7 @@ int32_t AudioManagerInterfaceImpl::UnloadAdapter(const std::string &adapterName) int32_t AudioManagerInterfaceImpl::ReleaseAudioManagerObject() { - DHLOGI("Release distributed audio manager object."); + DHLOGD("Release distributed audio manager object."); return HDF_SUCCESS; } @@ -181,7 +181,7 @@ int32_t AudioManagerInterfaceImpl::RemoveAudioDevice(const std::string &adpName, DAudioDevEvent event = { adpName, devId, HDF_AUDIO_DEVICE_REMOVE, 0, 0, 0 }; ret = NotifyFwk(event); if (ret != DH_SUCCESS) { - DHLOGI("Notify audio fwk failed, ret = %d.", ret); + DHLOGE("Notify audio fwk failed, ret = %d.", ret); } if (adp->second->IsPortsNoReg()) { mapAudioAdapter_.erase(adpName); @@ -210,7 +210,7 @@ int32_t AudioManagerInterfaceImpl::Notify(const std::string &adpName, const uint int32_t AudioManagerInterfaceImpl::NotifyFwk(const DAudioDevEvent &event) { - DHLOGI("Notify audio fwk event(type:%d, adapter:%s, pin:%d).", event.eventType, + DHLOGD("Notify audio fwk event(type:%d, adapter:%s, pin:%d).", event.eventType, GetAnonyString(event.adapterName).c_str(), event.devId); std::stringstream ss; ss << "EVENT_TYPE=" << event.eventType << ";NID=" << event.adapterName << ";PIN=" << event.devId << ";VID=" << diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp index 9c968d5baaf303fdb9fe3e3ff4626a8d6dc40c9d..cf7bd3cd02bd84083954afe4877d816a3ca44f5d 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp @@ -90,7 +90,7 @@ int32_t AudioRenderInterfaceImpl::FadeInProcess(const uint32_t durationFrame, int32_t AudioRenderInterfaceImpl::RenderFrame(const std::vector &frame, uint64_t &replyBytes) { - DHLOGI("Render frame[sampleRate: %d, channelCount: %d, format: %d, frameSize: %d].", devAttrs_.sampleRate, + DHLOGD("Render frame[sampleRate: %d, channelCount: %d, format: %d, frameSize: %d].", devAttrs_.sampleRate, devAttrs_.channelCount, devAttrs_.format, devAttrs_.frameSize); int64_t timeOffset = UpdateTimeOffset(frameIndex_, framePeriodNs_, startTime_); DHLOGD("Render frameIndex: %lld, timeOffset: %lld.", frameIndex_, timeOffset); diff --git a/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/src/daudio_manager_interface_impl.cpp b/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/src/daudio_manager_interface_impl.cpp index ec16842eebecbe11fc2828f218919cc51ac04fca..9a492118de65d9818494d5f21d8f7c60a6f11159 100644 --- a/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/src/daudio_manager_interface_impl.cpp +++ b/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/src/daudio_manager_interface_impl.cpp @@ -41,13 +41,13 @@ extern "C" IDAudioManager *DAudioManagerImplGetInstance(void) DAudioManagerInterfaceImpl::DAudioManagerInterfaceImpl() { - DHLOGI("Distributed audio ext manager constructed."); + DHLOGD("Distributed audio ext manager constructed."); audioMgr_ = AudioManagerInterfaceImpl::GetAudioManager(); } DAudioManagerInterfaceImpl::~DAudioManagerInterfaceImpl() { - DHLOGI("Distributed audio ext manager destructed."); + DHLOGD("Distributed audio ext manager destructed."); } int32_t DAudioManagerInterfaceImpl::RegisterAudioDevice(const std::string &adpName, int32_t devId, diff --git a/interfaces/inner_kits/native_cpp/audio_sink/src/daudio_sink_handler.cpp b/interfaces/inner_kits/native_cpp/audio_sink/src/daudio_sink_handler.cpp index 3fb898413af172df453e3ace07288478ed81fa91..123a535da832a10154f3981852f26c771459be4e 100644 --- a/interfaces/inner_kits/native_cpp/audio_sink/src/daudio_sink_handler.cpp +++ b/interfaces/inner_kits/native_cpp/audio_sink/src/daudio_sink_handler.cpp @@ -34,12 +34,12 @@ IMPLEMENT_SINGLE_INSTANCE(DAudioSinkHandler); DAudioSinkHandler::DAudioSinkHandler() { - DHLOGI("DAudio sink handler constructed."); + DHLOGD("DAudio sink handler constructed."); } DAudioSinkHandler::~DAudioSinkHandler() { - DHLOGI("DAudio sink handler destructed."); + DHLOGD("DAudio sink handler destructed."); } int32_t DAudioSinkHandler::InitSink(const std::string ¶ms) @@ -122,7 +122,7 @@ int32_t DAudioSinkHandler::UnsubscribeLocalHardware(const std::string &dhId) void DAudioSinkHandler::OnRemoteSinkSvrDied(const wptr &remote) { - DHLOGI("The daudio service of sink device died."); + DHLOGD("The daudio service of sink device died."); sptr remoteObject = remote.promote(); if (remoteObject == nullptr) { DHLOGE("OnRemoteDied remote promoted failed."); @@ -138,7 +138,7 @@ void DAudioSinkHandler::OnRemoteSinkSvrDied(const wptr &remote) void DAudioSinkHandler::FinishStartSA(const std::string ¶m, const sptr &remoteObject) { - DHLOGI("Finish start SA."); + DHLOGD("Finish start SA."); std::lock_guard lock(sinkProxyMutex_); remoteObject->AddDeathRecipient(sinkSvrRecipient_); dAudioSinkProxy_ = iface_cast(remoteObject); diff --git a/interfaces/inner_kits/native_cpp/audio_source/src/daudio_source_handler.cpp b/interfaces/inner_kits/native_cpp/audio_source/src/daudio_source_handler.cpp index 01de6b065ec95e7e13345108dd9d270ee7ee7de6..5a37c3b106199f7cf2b4ea06c445c7fbf62ba7f4 100644 --- a/interfaces/inner_kits/native_cpp/audio_source/src/daudio_source_handler.cpp +++ b/interfaces/inner_kits/native_cpp/audio_source/src/daudio_source_handler.cpp @@ -34,7 +34,7 @@ namespace DistributedHardware { IMPLEMENT_SINGLE_INSTANCE(DAudioSourceHandler); DAudioSourceHandler::DAudioSourceHandler() { - DHLOGI("Audio source handler constructed."); + DHLOGD("Audio source handler constructed."); if (!sourceSvrRecipient_) { sourceSvrRecipient_ = new DAudioSourceSvrRecipient(); } @@ -46,7 +46,7 @@ DAudioSourceHandler::DAudioSourceHandler() DAudioSourceHandler::~DAudioSourceHandler() { - DHLOGI("Audio source handler destructed."); + DHLOGD("Audio source handler destructed."); } int32_t DAudioSourceHandler::InitSource(const std::string ¶ms) diff --git a/interfaces/inner_kits/native_cpp/audio_source/src/daudio_source_load_callback.cpp b/interfaces/inner_kits/native_cpp/audio_source/src/daudio_source_load_callback.cpp index ffe57184ead68f8c76a90857db3a96f6ad9bc7f8..3d72678b8482449ba18698e80c68ff419db70a4a 100644 --- a/interfaces/inner_kits/native_cpp/audio_source/src/daudio_source_load_callback.cpp +++ b/interfaces/inner_kits/native_cpp/audio_source/src/daudio_source_load_callback.cpp @@ -37,7 +37,7 @@ void DAudioSourceLoadCallback::OnLoadSystemAbilitySuccess(int32_t systemAbilityI void DAudioSourceLoadCallback::OnLoadSystemAbilityFail(int32_t systemAbilityId) { - DHLOGI("Load audio SA failed, systemAbilityId: %d", systemAbilityId); + DHLOGE("Load audio SA failed, systemAbilityId: %d", systemAbilityId); DAudioHisysevent::GetInstance().SysEventWriteFault(DAUDIO_INIT_FAIL, "daudio source LoadSA call failed."); } } // namespace DistributedHardware diff --git a/services/audioclient/micclient/src/dmic_client.cpp b/services/audioclient/micclient/src/dmic_client.cpp index 107530e2d96b5f11057d68d7bb11726a443acfa3..010044e0b5c66f216620bfdcea0213a5d0055503 100644 --- a/services/audioclient/micclient/src/dmic_client.cpp +++ b/services/audioclient/micclient/src/dmic_client.cpp @@ -35,7 +35,7 @@ DMicClient::~DMicClient() int32_t DMicClient::OnStateChange(const AudioEventType type) { - DHLOGI("On state change type: %d.", type); + DHLOGD("On state change type: %d.", type); AudioEvent event; event.content = ""; switch (type) { @@ -159,7 +159,7 @@ int32_t DMicClient::StartCapture() void DMicClient::CaptureThreadRunning() { - DHLOGI("Start the capturer thread."); + DHLOGD("Start the capturer thread."); if (pthread_setname_np(pthread_self(), CAPTURETHREAD) != DH_SUCCESS) { DHLOGE("Capture data thread setname failed."); } @@ -178,7 +178,7 @@ void DMicClient::CaptureThreadRunning() } } if (errorFlag) { - DHLOGI("Bytes read failed."); + DHLOGE("Bytes read failed."); break; } diff --git a/services/audioclient/spkclient/src/dspeaker_client.cpp b/services/audioclient/spkclient/src/dspeaker_client.cpp index c0685be15243e7671b618f4f4bd6445be86c17c0..fa1101a174836502c899dc63f20044d97e296d9a 100644 --- a/services/audioclient/spkclient/src/dspeaker_client.cpp +++ b/services/audioclient/spkclient/src/dspeaker_client.cpp @@ -26,12 +26,12 @@ namespace OHOS { namespace DistributedHardware { DSpeakerClient::~DSpeakerClient() { - DHLOGI("Release speaker client."); + DHLOGD("Release speaker client."); } int32_t DSpeakerClient::SetUp(const AudioParam ¶m) { - DHLOGI("Set up spk client: {sampleRate: %d, bitFormat: %d, channelMask: %d," + + DHLOGD("Set up spk client: {sampleRate: %d, bitFormat: %d, channelMask: %d," + "frameSize: %d, contentType: %d, renderFlags: %d, streamUsage: %d}.", param.comParam.sampleRate, param.comParam.bitFormat, param.comParam.channelMask, param.comParam.frameSize, param.renderOpts.contentType, param.renderOpts.renderFlags, param.renderOpts.streamUsage); @@ -171,7 +171,7 @@ int32_t DSpeakerClient::StopRender() void DSpeakerClient::PlayThreadRunning() { - DHLOGI("Start the renderer thread."); + DHLOGD("Start the renderer thread."); if (pthread_setname_np(pthread_self(), RENDERTHREAD) != DH_SUCCESS) { DHLOGE("Render data thread setname failed."); } @@ -251,7 +251,7 @@ int32_t DSpeakerClient::OnDecodeTransDataDone(const std::shared_ptr & int32_t DSpeakerClient::OnStateChange(const AudioEventType type) { - DHLOGI("On state change. type: %d", type); + DHLOGD("On state change. type: %d", type); AudioEvent event; switch (type) { case AudioEventType::DATA_OPENED: { @@ -279,7 +279,7 @@ int32_t DSpeakerClient::OnStateChange(const AudioEventType type) string DSpeakerClient::GetVolumeLevel() { - DHLOGI("Get the volume level."); + DHLOGD("Get the volume level."); std::stringstream ss; AudioStandard::AudioStreamType streamType = AudioStandard::AudioStreamType::STREAM_DEFAULT; auto volumeType = static_cast(1); @@ -294,13 +294,13 @@ string DSpeakerClient::GetVolumeLevel() << "MAX_VOLUME_LEVEL=" << maxVolumeLevel << ";" << "MIN_VOLUME_LEVEL=" << minVolumeLevel << ";"; std::string str = ss.str(); - DHLOGI("Get the volume level result, event: %s.", str.c_str()); + DHLOGD("Get the volume level result, event: %s.", str.c_str()); return str; } void DSpeakerClient::OnVolumeKeyEvent(AudioStandard::VolumeEvent volumeEvent) { - DHLOGI("Volume change event."); + DHLOGD("Volume change event."); std::shared_ptr cbObj = eventCallback_.lock(); if (cbObj == nullptr) { DHLOGE("Event callback is nullptr."); @@ -313,7 +313,7 @@ void DSpeakerClient::OnVolumeKeyEvent(AudioStandard::VolumeEvent volumeEvent) << "IS_UPDATEUI=" << volumeEvent.updateUi << ";" << "VOLUME_GROUP_ID=" << volumeEvent.volumeGroupId << ";"; std::string str = ss.str(); - DHLOGI("Volume change notification result, event: %s.", str.c_str()); + DHLOGD("Volume change notification result, event: %s.", str.c_str()); AudioEvent audioEvent(VOLUME_CHANGE, str); cbObj->NotifyEvent(audioEvent); @@ -321,7 +321,7 @@ void DSpeakerClient::OnVolumeKeyEvent(AudioStandard::VolumeEvent volumeEvent) void DSpeakerClient::OnInterrupt(const AudioStandard::InterruptEvent &interruptEvent) { - DHLOGI("Audio focus interrupt event."); + DHLOGD("Audio focus interrupt event."); std::shared_ptr cbObj = eventCallback_.lock(); if (cbObj == nullptr) { DHLOGE("Event callback is nullptr."); @@ -333,7 +333,7 @@ void DSpeakerClient::OnInterrupt(const AudioStandard::InterruptEvent &interruptE << "FORCE_TYPE=" << interruptEvent.forceType << ";" << "HINT_TYPE=" << interruptEvent.hintType << ";"; std::string str = ss.str(); - DHLOGI("Audio focus oninterrupt notification result, event: %s.", str.c_str()); + DHLOGD("Audio focus oninterrupt notification result, event: %s.", str.c_str()); AudioEvent audioEvent(AUDIO_FOCUS_CHANGE, str); cbObj->NotifyEvent(audioEvent); @@ -342,7 +342,7 @@ void DSpeakerClient::OnInterrupt(const AudioStandard::InterruptEvent &interruptE void DSpeakerClient::OnStateChange(const AudioStandard::RendererState state, const AudioStandard::StateChangeCmdType __attribute__((unused)) cmdType) { - DHLOGI("On render state change. state: %d", state); + DHLOGD("On render state change. state: %d", state); std::shared_ptr cbObj = eventCallback_.lock(); if (cbObj == nullptr) { DHLOGE("Event callback is nullptr."); @@ -352,7 +352,7 @@ void DSpeakerClient::OnStateChange(const AudioStandard::RendererState state, ss << "RENDER_STATE_CHANGE_EVENT;" << "STATE=" << state << ";"; std::string str = ss.str(); - DHLOGI("Audio render state changes notification result, event: %s.", str.c_str()); + DHLOGD("Audio render state changes notification result, event: %s.", str.c_str()); AudioEvent audioEvent(AUDIO_RENDER_STATE_CHANGE, str); cbObj->NotifyEvent(audioEvent); @@ -360,7 +360,7 @@ void DSpeakerClient::OnStateChange(const AudioStandard::RendererState state, int32_t DSpeakerClient::SetAudioParameters(const AudioEvent &event) { - DHLOGI("Set the volume, arg: %s.", event.content.c_str()); + DHLOGD("Set the volume, arg: %s.", event.content.c_str()); int32_t audioVolumeType; int32_t ret = GetAudioParamInt(event.content, AUDIO_VOLUME_TYPE, audioVolumeType); @@ -369,7 +369,7 @@ int32_t DSpeakerClient::SetAudioParameters(const AudioEvent &event) return ret; } auto volumeType = static_cast(audioVolumeType); - DHLOGI("Audio volume type, volumeType = %d.", volumeType); + DHLOGD("Audio volume type, volumeType = %d.", volumeType); if (event.type != VOLUME_SET) { DHLOGE("Invalid parameter."); return ERR_DH_AUDIO_CLIENT_INVALID_VOLUME_PARAMETER; @@ -381,7 +381,7 @@ int32_t DSpeakerClient::SetAudioParameters(const AudioEvent &event) DHLOGE("Get audio volume level failed."); return ret; } - DHLOGI("volume level = %d.", audioVolumeLevel); + DHLOGD("volume level = %d.", audioVolumeLevel); ret = AudioStandard::AudioSystemManager::GetInstance()->SetVolume(volumeType, audioVolumeLevel); if (ret != DH_SUCCESS) { DHLOGE("Voloume set failed."); @@ -392,7 +392,7 @@ int32_t DSpeakerClient::SetAudioParameters(const AudioEvent &event) int32_t DSpeakerClient::SetMute(const AudioEvent &event) { - DHLOGI("Set mute, arg: %s.", event.content.c_str()); + DHLOGD("Set mute, arg: %s.", event.content.c_str()); int32_t audioVolumeType; int32_t ret = GetAudioParamInt(event.content, AUDIO_VOLUME_TYPE, audioVolumeType); if (ret != DH_SUCCESS) { @@ -408,7 +408,7 @@ int32_t DSpeakerClient::SetMute(const AudioEvent &event) } auto volumeType = static_cast(audioVolumeType); - DHLOGI("Audio volume type, volumeType = %d.", volumeType); + DHLOGD("Audio volume type, volumeType = %d.", volumeType); if (event.type != VOLUME_MUTE_SET) { DHLOGE("Invalid parameter."); return ERR_DH_AUDIO_CLIENT_INVALID_VOLUME_PARAMETER; @@ -453,7 +453,7 @@ void DSpeakerClient::ReStart() void DSpeakerClient::PlayStatusChange(const std::string &args) { - DHLOGI("Play status change, args: %s.", args.c_str()); + DHLOGD("Play status change, args: %s.", args.c_str()); if (args == AUDIO_EVENT_RESTART) { ReStart(); } else if (args == AUDIO_EVENT_PAUSE) { diff --git a/services/audiocontrol/controlsink/src/daudio_sink_dev_ctrl_manager.cpp b/services/audiocontrol/controlsink/src/daudio_sink_dev_ctrl_manager.cpp index 137a7302bfb66f85809f14565feed67939543b91..5e62147210220cbd9ea9983dcf68d51a80bbf15b 100644 --- a/services/audiocontrol/controlsink/src/daudio_sink_dev_ctrl_manager.cpp +++ b/services/audiocontrol/controlsink/src/daudio_sink_dev_ctrl_manager.cpp @@ -34,17 +34,17 @@ DAudioSinkDevCtrlMgr::DAudioSinkDevCtrlMgr(const std::string &devId, std::shared_ptr audioEventCallback) : devId_(devId), audioEventCallback_(audioEventCallback) { - DHLOGI("Control manager constructed."); + DHLOGD("Control manager constructed."); } DAudioSinkDevCtrlMgr::~DAudioSinkDevCtrlMgr() { - DHLOGI("Control manager deconstructed."); + DHLOGD("Control manager deconstructed."); } void DAudioSinkDevCtrlMgr::OnStateChange(int32_t type) { - DHLOGI("Distributed audio sink device control manager state change, type: %d.", type); + DHLOGD("Distributed audio sink device control manager state change, type: %d.", type); switch (type) { case AudioEventType::CTRL_OPENED: isOpened_.store(true); @@ -92,7 +92,7 @@ int32_t DAudioSinkDevCtrlMgr::Stop() DHLOGI("Stop sink device control manager."); isOpened_.store(false); if (audioCtrlTrans_ == nullptr) { - DHLOGI("Ctrl trans already stop."); + DHLOGD("Ctrl trans already stop."); return DH_SUCCESS; } @@ -108,7 +108,7 @@ int32_t DAudioSinkDevCtrlMgr::Release() { DHLOGI("Release sink device control manager."); if (audioCtrlTrans_ == nullptr) { - DHLOGI("Ctrl trans already release."); + DHLOGD("Ctrl trans already release."); return DH_SUCCESS; } int32_t ret = audioCtrlTrans_->Release(); @@ -127,7 +127,7 @@ bool DAudioSinkDevCtrlMgr::IsOpened() void DAudioSinkDevCtrlMgr::OnEventReceived(const AudioEvent &event) { - DHLOGI("Received event type %d.", event.type); + DHLOGD("Received event type %d.", event.type); auto callback = audioEventCallback_.lock(); if (callback == nullptr) { DHLOGE("Callback is nullptr."); @@ -138,7 +138,7 @@ void DAudioSinkDevCtrlMgr::OnEventReceived(const AudioEvent &event) int32_t DAudioSinkDevCtrlMgr::SendAudioEvent(const AudioEvent &event) { - DHLOGI("Send audio event."); + DHLOGD("Send audio event."); if (audioCtrlTrans_ == nullptr) { return ERR_DH_AUDIO_SA_SINK_CTRL_TRANS_NULL; } diff --git a/services/audiocontrol/controlsource/src/daudio_source_dev_ctrl_manager.cpp b/services/audiocontrol/controlsource/src/daudio_source_dev_ctrl_manager.cpp index ad1efbe67b9480aee613cfeceadf1b552087ca60..3310c5704732973120c87f5fcbebe8dbab1e8c08 100644 --- a/services/audiocontrol/controlsource/src/daudio_source_dev_ctrl_manager.cpp +++ b/services/audiocontrol/controlsource/src/daudio_source_dev_ctrl_manager.cpp @@ -31,12 +31,12 @@ DAudioSourceDevCtrlMgr::DAudioSourceDevCtrlMgr(const std::string &devId, std::shared_ptr audioEventCallback) : devId_(devId), audioEventCallback_(audioEventCallback) { - DHLOGI("Control manager constructed."); + DHLOGD("Control manager constructed."); } DAudioSourceDevCtrlMgr::~DAudioSourceDevCtrlMgr() { - DHLOGI("Control manager deconstructed."); + DHLOGD("Control manager deconstructed."); } int32_t DAudioSourceDevCtrlMgr::SetUp() @@ -113,7 +113,7 @@ bool DAudioSourceDevCtrlMgr::IsOpened() int32_t DAudioSourceDevCtrlMgr::SendAudioEvent(const AudioEvent &event) { - DHLOGI("Send audio event."); + DHLOGD("Send audio event."); if (audioCtrlTrans_ == nullptr) { DHLOGE("Send audio event, Audio ctrl trans is null"); return ERR_DH_AUDIO_SA_CTRL_TRANS_NULL; @@ -123,7 +123,7 @@ int32_t DAudioSourceDevCtrlMgr::SendAudioEvent(const AudioEvent &event) void DAudioSourceDevCtrlMgr::OnStateChange(int32_t type) { - DHLOGI("Daudio source control state change, type: %d.", type); + DHLOGD("Daudio source control state change, type: %d.", type); switch (type) { case AudioEventType::CTRL_OPENED: isOpened_.store(true); @@ -148,7 +148,7 @@ void DAudioSourceDevCtrlMgr::OnStateChange(int32_t type) void DAudioSourceDevCtrlMgr::OnEventReceived(const AudioEvent &event) { - DHLOGI("Received event"); + DHLOGD("Received event"); auto callback = audioEventCallback_.lock(); if (callback == nullptr) { DHLOGE("Callback is nullptr."); diff --git a/services/audiohdiproxy/src/daudio_hdf_operate.cpp b/services/audiohdiproxy/src/daudio_hdf_operate.cpp index 5756034238c8531c48c77a693faa001003368b2e..c0586d4455b45646f9d7cce30975e5ee25c9dac7 100644 --- a/services/audiohdiproxy/src/daudio_hdf_operate.cpp +++ b/services/audiohdiproxy/src/daudio_hdf_operate.cpp @@ -39,7 +39,7 @@ int32_t DaudioHdfOperate::LoadDaudioHDFImpl() { if (audioServStatus_ == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START && audioextServStatus_ == OHOS::HDI::ServiceManager::V1_0::SERVIE_STATUS_START) { - DHLOGI("Service has already start."); + DHLOGD("Service has already start."); return DH_SUCCESS; } servMgr_ = IServiceManager::Get(); diff --git a/services/audiohdiproxy/src/daudio_hdi_handler.cpp b/services/audiohdiproxy/src/daudio_hdi_handler.cpp index db0e82864b83acc13b1e28a9a9e68fe92311f7e2..8c07edc934c0b3ad8631e4a61755d8a5fc1c7e75 100644 --- a/services/audiohdiproxy/src/daudio_hdi_handler.cpp +++ b/services/audiohdiproxy/src/daudio_hdi_handler.cpp @@ -35,12 +35,12 @@ IMPLEMENT_SINGLE_INSTANCE(DAudioHdiHandler); DAudioHdiHandler::DAudioHdiHandler() { - DHLOGI("Distributed audio hdi handler construct."); + DHLOGD("Distributed audio hdi handler construct."); } DAudioHdiHandler::~DAudioHdiHandler() { - DHLOGI("Distributed audio hdi handler deconstructed."); + DHLOGD("Distributed audio hdi handler deconstructed."); } int32_t DAudioHdiHandler::InitHdiHandler() @@ -51,13 +51,13 @@ int32_t DAudioHdiHandler::InitHdiHandler() } DAUDIO_SYNC_TRACE(DAUDIO_LOAD_HDF_DRIVER); - DHLOGI("Load hdf driver start."); + DHLOGD("Load hdf driver start."); int32_t ret = DaudioHdfOperate::GetInstance().LoadDaudioHDFImpl(); if (ret != DH_SUCCESS) { DHLOGE("Load hdf driver failed, ret: %d", ret); return ret; } - DHLOGI("Load hdf driver end."); + DHLOGD("Load hdf driver end."); audioSrvHdf_ = IDAudioManager::Get(HDF_AUDIO_SERVICE_NAME.c_str(), false); if (audioSrvHdf_ == nullptr) { @@ -165,7 +165,7 @@ int32_t DAudioHdiHandler::UnRegisterAudioDevice(const std::string &devId, const int32_t DAudioHdiHandler::NotifyEvent(const std::string &devId, const int32_t dhId, const AudioEvent &audioEvent) { - DHLOGI("Notify event adpname: %s, dhId: %d, event type: %d, event content: %s.", + DHLOGD("Notify event adpname: %s, dhId: %d, event type: %d, event content: %s.", GetAnonyString(devId).c_str(), dhId, audioEvent.type, audioEvent.content.c_str()); if (audioSrvHdf_ == nullptr) { DHLOGE("Audio hdi proxy not init"); diff --git a/services/audiohdiproxy/src/daudio_manager_callback.cpp b/services/audiohdiproxy/src/daudio_manager_callback.cpp index efa740f9a4687fb2cfe8609346985782b0e347f2..f2052db3563e7fe5b1314e0de2b0d98e90287c58 100644 --- a/services/audiohdiproxy/src/daudio_manager_callback.cpp +++ b/services/audiohdiproxy/src/daudio_manager_callback.cpp @@ -111,7 +111,7 @@ int32_t DAudioManagerCallback::GetAudioParamHDF(const AudioParameter& param, Aud int32_t DAudioManagerCallback::SetParameters(const std::string& adpName, int32_t devId, const AudioParameter& param) { - DHLOGI("Set Parameters."); + DHLOGD("Set Parameters."); if (callback_ == nullptr) { DHLOGE("Register hdi callback is nullptr."); return HDF_FAILURE; @@ -184,12 +184,12 @@ int32_t DAudioManagerCallback::NotifyEvent(const std::string& adpName, int32_t d int32_t DAudioManagerCallback::WriteStreamData(const std::string &adpName, int32_t devId, const OHOS::HDI::DistributedAudio::Audioext::V1_0::AudioData &data) { - DHLOGI("Write Stream Data."); + DHLOGD("Write Stream Data."); if (callback_ == nullptr) { DHLOGE("Register hdi callback is nullptr."); return HDF_FAILURE; } - DHLOGI("Audio data param frameSize is %d.", data.param.frameSize); + DHLOGD("Audio data param frameSize is %d.", data.param.frameSize); if (data.param.frameSize == 0 || data.param.frameSize > DEFAULT_AUDIO_DATA_SIZE) { DHLOGE("Audio data param frameSize is 0. or > 4096"); return HDF_FAILURE; @@ -232,7 +232,7 @@ int32_t DAudioManagerCallback::ReadStreamData(const std::string &adpName, int32_ int32_t DAudioManagerCallback::ReadMmapPosition(const std::string &adpName, int32_t devId, uint64_t &frames, OHOS::HDI::DistributedAudio::Audioext::V1_0::CurrentTime &time) { - DHLOGI("Read mmap position"); + DHLOGD("Read mmap position"); if (callback_ == nullptr) { DHLOGE("Regisiter hdi callback id nullptr."); return HDF_FAILURE; @@ -245,14 +245,14 @@ int32_t DAudioManagerCallback::ReadMmapPosition(const std::string &adpName, int3 } time.tvSec = timeHdf.tvSec; time.tvNSec = timeHdf.tvNSec; - DHLOGI("Read mmap position success."); + DHLOGD("Read mmap position success."); return HDF_SUCCESS; } int32_t DAudioManagerCallback::RefreshAshmemInfo(const std::string &adpName, int32_t devId, int fd, int32_t ashmemLength, int32_t lengthPerTrans) { - DHLOGI("Refresh ashmem info."); + DHLOGD("Refresh ashmem info."); if (callback_ == nullptr) { DHLOGE("Regisiter hdi callback id nullptr."); return HDF_FAILURE; @@ -262,7 +262,7 @@ int32_t DAudioManagerCallback::RefreshAshmemInfo(const std::string &adpName, int DHLOGE("Refresh ashmem info failed."); return HDF_FAILURE; } - DHLOGI("Refresh ashmem info success."); + DHLOGD("Refresh ashmem info success."); return HDF_SUCCESS; } } // DistributedHardware diff --git a/services/audiomanager/managersink/src/daudio_sink_dev.cpp b/services/audiomanager/managersink/src/daudio_sink_dev.cpp index 3d3731b63b667ed112d1915380805dbf235efed6..bb0b6cc41cd48475f0eec19d0edc51b6335f4257 100644 --- a/services/audiomanager/managersink/src/daudio_sink_dev.cpp +++ b/services/audiomanager/managersink/src/daudio_sink_dev.cpp @@ -32,7 +32,7 @@ namespace OHOS { namespace DistributedHardware { DAudioSinkDev::DAudioSinkDev(const std::string &devId) : devId_(devId) { - DHLOGI("Distributed audio sink device constructed, devId: %s.", GetAnonyString(devId).c_str()); + DHLOGD("Distributed audio sink device constructed, devId: %s.", GetAnonyString(devId).c_str()); memberFuncMap_[OPEN_CTRL] = &DAudioSinkDev::NotifyOpenCtrlChannel; memberFuncMap_[CLOSE_CTRL] = &DAudioSinkDev::NotifyCloseCtrlChannel; memberFuncMap_[CTRL_OPENED] = &DAudioSinkDev::NotifyCtrlOpened; @@ -56,7 +56,7 @@ DAudioSinkDev::DAudioSinkDev(const std::string &devId) : devId_(devId) DAudioSinkDev::~DAudioSinkDev() { - DHLOGI("Distributed audio sink device destructed, devId: %s.", GetAnonyString(devId_).c_str()); + DHLOGD("Distributed audio sink device destructed, devId: %s.", GetAnonyString(devId_).c_str()); } int32_t DAudioSinkDev::AwakeAudioDev() @@ -79,7 +79,7 @@ void DAudioSinkDev::SleepAudioDev() void DAudioSinkDev::NotifyEvent(const AudioEvent &audioEvent) { - DHLOGI("Notify event, eventType: %d.", (int32_t)audioEvent.type); + DHLOGD("Notify event, eventType: %d.", (int32_t)audioEvent.type); std::map::iterator iter = memberFuncMap_.find(audioEvent.type); if (iter == memberFuncMap_.end()) { @@ -239,7 +239,7 @@ int32_t DAudioSinkDev::NotifyCloseMic(const AudioEvent &audioEvent) int32_t DAudioSinkDev::NotifySetParam(const AudioEvent &audioEvent) { - DHLOGI("Notify set param."); + DHLOGD("Notify set param."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -251,7 +251,7 @@ int32_t DAudioSinkDev::NotifySetParam(const AudioEvent &audioEvent) int32_t DAudioSinkDev::NotifySetVolume(const AudioEvent &audioEvent) { - DHLOGI("Notify set volume."); + DHLOGD("Notify set volume."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -263,7 +263,7 @@ int32_t DAudioSinkDev::NotifySetVolume(const AudioEvent &audioEvent) int32_t DAudioSinkDev::NotifySetMute(const AudioEvent &audioEvent) { - DHLOGI("Notify set mute."); + DHLOGD("Notify set mute."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -275,7 +275,7 @@ int32_t DAudioSinkDev::NotifySetMute(const AudioEvent &audioEvent) int32_t DAudioSinkDev::NotifyVolumeChange(const AudioEvent &audioEvent) { - DHLOGI("Notify volume change."); + DHLOGD("Notify volume change."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -287,7 +287,7 @@ int32_t DAudioSinkDev::NotifyVolumeChange(const AudioEvent &audioEvent) int32_t DAudioSinkDev::NotifyFocusChange(const AudioEvent &audioEvent) { - DHLOGI("Notify focus change."); + DHLOGD("Notify focus change."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -299,7 +299,7 @@ int32_t DAudioSinkDev::NotifyFocusChange(const AudioEvent &audioEvent) int32_t DAudioSinkDev::NotifyRenderStateChange(const AudioEvent &audioEvent) { - DHLOGI("Notify render state change."); + DHLOGD("Notify render state change."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -311,7 +311,7 @@ int32_t DAudioSinkDev::NotifyRenderStateChange(const AudioEvent &audioEvent) int32_t DAudioSinkDev::NotifyPlayStatusChange(const AudioEvent &audioEvent) { - DHLOGI("Notify play status change, content: %s.", audioEvent.content.c_str()); + DHLOGD("Notify play status change, content: %s.", audioEvent.content.c_str()); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -333,7 +333,7 @@ int32_t DAudioSinkDev::TaskOpenCtrlChannel(const std::string &args) } if (audioCtrlMgr_ != nullptr && audioCtrlMgr_->IsOpened()) { - DHLOGI("Ctrl channel already opened."); + DHLOGD("Ctrl channel already opened."); NotifySourceDev(NOTIFY_OPEN_CTRL_RESULT, jParam[KEY_DH_ID], DH_SUCCESS); return DH_SUCCESS; } @@ -354,9 +354,9 @@ int32_t DAudioSinkDev::TaskOpenCtrlChannel(const std::string &args) int32_t DAudioSinkDev::TaskCloseCtrlChannel(const std::string &args) { (void)args; - DHLOGI("Close ctrl channel."); + DHLOGD("Close ctrl channel."); if (audioCtrlMgr_ == nullptr) { - DHLOGI("Ctrl channel already closed."); + DHLOGD("Ctrl channel already closed."); return DH_SUCCESS; } @@ -369,7 +369,7 @@ int32_t DAudioSinkDev::TaskCloseCtrlChannel(const std::string &args) DHLOGE("Release ctrl mgr failed, ret: %d.", ret); } audioCtrlMgr_ = nullptr; - DHLOGI("Close ctrl channel success."); + DHLOGD("Close ctrl channel success."); return DH_SUCCESS; } @@ -422,7 +422,7 @@ int32_t DAudioSinkDev::TaskCloseDSpeaker(const std::string &args) (void)args; DHLOGI("Close speaker device."); if (speakerClient_ == nullptr) { - DHLOGI("Speaker client is null or already closed."); + DHLOGE("Speaker client is null or already closed."); NotifySourceDev(NOTIFY_CLOSE_SPEAKER_RESULT, spkDhId_, DH_SUCCESS); return DH_SUCCESS; } @@ -500,7 +500,7 @@ int32_t DAudioSinkDev::TaskCloseDMic(const std::string &args) (void)args; DHLOGI("Close mic device."); if (micClient_ == nullptr) { - DHLOGI("Mic client is null or already closed."); + DHLOGE("Mic client is null or already closed."); NotifySourceDev(NOTIFY_CLOSE_MIC_RESULT, micDhId_, DH_SUCCESS); return DH_SUCCESS; } @@ -526,7 +526,7 @@ int32_t DAudioSinkDev::TaskCloseDMic(const std::string &args) int32_t DAudioSinkDev::TaskSetParameter(const std::string &args) { - DHLOGI("Set audio param."); + DHLOGD("Set audio param."); AudioEvent event(AudioEventType::EVENT_UNKNOWN, args); if (speakerClient_ == nullptr) { @@ -537,7 +537,7 @@ int32_t DAudioSinkDev::TaskSetParameter(const std::string &args) int32_t DAudioSinkDev::TaskSetVolume(const std::string &args) { - DHLOGI("Set audio volume."); + DHLOGD("Set audio volume."); if (speakerClient_ == nullptr) { DHLOGE("Speaker client already closed."); return ERR_DH_AUDIO_NULLPTR; @@ -548,13 +548,13 @@ int32_t DAudioSinkDev::TaskSetVolume(const std::string &args) DHLOGE("Volume set failed, ret: %d.", ret); return ret; } - DHLOGI("Set audio volume success."); + DHLOGD("Set audio volume success."); return DH_SUCCESS; } int32_t DAudioSinkDev::TaskSetMute(const std::string &args) { - DHLOGI("Set audio mute."); + DHLOGD("Set audio mute."); if (speakerClient_ == nullptr) { DHLOGE("Speaker client already closed."); return ERR_DH_AUDIO_NULLPTR; @@ -565,13 +565,13 @@ int32_t DAudioSinkDev::TaskSetMute(const std::string &args) DHLOGE("Set mute failed, ret: %d.", ret); return ret; } - DHLOGI("Set mute success."); + DHLOGD("Set mute success."); return DH_SUCCESS; } int32_t DAudioSinkDev::TaskVolumeChange(const std::string &args) { - DHLOGI("Audio volume changed."); + DHLOGD("Audio volume changed."); AudioEvent event(AudioEventType::VOLUME_CHANGE, args); if (audioCtrlMgr_ == nullptr) { return ERR_DH_AUDIO_SA_SINKCTRLMGR_NOT_INIT; @@ -581,7 +581,7 @@ int32_t DAudioSinkDev::TaskVolumeChange(const std::string &args) int32_t DAudioSinkDev::TaskFocusChange(const std::string &args) { - DHLOGI("Audio focus changed."); + DHLOGD("Audio focus changed."); AudioEvent event(AudioEventType::AUDIO_FOCUS_CHANGE, args); if (audioCtrlMgr_ == nullptr) { return ERR_DH_AUDIO_SA_SINKCTRLMGR_NOT_INIT; @@ -591,7 +591,7 @@ int32_t DAudioSinkDev::TaskFocusChange(const std::string &args) int32_t DAudioSinkDev::TaskRenderStateChange(const std::string &args) { - DHLOGI("Audio render state changed."); + DHLOGD("Audio render state changed."); AudioEvent event(AudioEventType::AUDIO_RENDER_STATE_CHANGE, args); if (audioCtrlMgr_ == nullptr) { return ERR_DH_AUDIO_SA_SINKCTRLMGR_NOT_INIT; @@ -601,13 +601,13 @@ int32_t DAudioSinkDev::TaskRenderStateChange(const std::string &args) int32_t DAudioSinkDev::TaskPlayStatusChange(const std::string &args) { - DHLOGI("Play status change, content: %s.", args.c_str()); + DHLOGD("Play status change, content: %s.", args.c_str()); if (speakerClient_ == nullptr) { DHLOGE("Speaker client already closed."); return ERR_DH_AUDIO_NULLPTR; } speakerClient_->PlayStatusChange(args); - DHLOGI("Play status change success."); + DHLOGD("Play status change success."); return DH_SUCCESS; } @@ -616,7 +616,7 @@ void DAudioSinkDev::OnTaskResult(int32_t resultCode, const std::string &result, (void)resultCode; (void)result; (void)funcName; - DHLOGI("On task result. resultCode: %d, funcName: %s", resultCode, funcName.c_str()); + DHLOGD("On task result. resultCode: %d, funcName: %s", resultCode, funcName.c_str()); } void DAudioSinkDev::NotifySourceDev(const AudioEventType type, const std::string dhId, const int32_t result) @@ -629,7 +629,7 @@ void DAudioSinkDev::NotifySourceDev(const AudioEventType type, const std::string jEvent[KEY_EVENT_TYPE] = type; jEvent[KEY_RANDOM_TASK_CODE] = std::to_string(randomTaskCode); - DHLOGI("notify source dev, random task code: %s", std::to_string(randomTaskCode).c_str()); + DHLOGD("notify source dev, random task code: %s", std::to_string(randomTaskCode).c_str()); DAudioSinkManager::GetInstance().DAudioNotify(devId_, dhId, type, jEvent.dump()); } diff --git a/services/audiomanager/managersink/src/daudio_sink_manager.cpp b/services/audiomanager/managersink/src/daudio_sink_manager.cpp index 53597bda4c65057065714a7a2b97b135fa9c255e..1dce0c3b907c46899952c3f914fb4238ba1fbbb1 100644 --- a/services/audiomanager/managersink/src/daudio_sink_manager.cpp +++ b/services/audiomanager/managersink/src/daudio_sink_manager.cpp @@ -31,7 +31,7 @@ namespace DistributedHardware { IMPLEMENT_SINGLE_INSTANCE(DAudioSinkManager); DAudioSinkManager::DAudioSinkManager() { - DHLOGI("Distributed audio sink manager constructed."); + DHLOGD("Distributed audio sink manager constructed."); } DAudioSinkManager::~DAudioSinkManager() @@ -39,7 +39,7 @@ DAudioSinkManager::~DAudioSinkManager() if (devClearThread_.joinable()) { devClearThread_.join(); } - DHLOGI("Distributed audio sink manager deconstructed."); + DHLOGD("Distributed audio sink manager deconstructed."); } int32_t DAudioSinkManager::Init() @@ -90,7 +90,7 @@ void DAudioSinkManager::OnSinkDevReleased(const std::string &devId) int32_t DAudioSinkManager::HandleDAudioNotify(const std::string &devId, const std::string &dhId, const int32_t eventType, const std::string &eventContent) { - DHLOGI("Receive audio event from devId: %s, event type: %d.", GetAnonyString(devId).c_str(), eventType); + DHLOGD("Receive audio event from devId: %s, event type: %d.", GetAnonyString(devId).c_str(), eventType); if (eventContent.length() > DAUDIO_MAX_JSON_LEN || eventContent.empty() || !CheckIsNum(dhId) || !CheckDevIdIsLegal(devId) || eventType < 0 || eventType > MAX_EVENT_TYPE_NUM) { @@ -99,7 +99,7 @@ int32_t DAudioSinkManager::HandleDAudioNotify(const std::string &devId, const st json jParam = json::parse(eventContent, nullptr, false); if (JsonParamCheck(jParam, { KEY_RANDOM_TASK_CODE })) { - DHLOGI("Receive audio notify from source, random task code: %s", + DHLOGD("Receive audio notify from source, random task code: %s", ((std::string)jParam[KEY_RANDOM_TASK_CODE]).c_str()); } @@ -127,7 +127,7 @@ int32_t DAudioSinkManager::CreateAudioDevice(const std::string &devId) int32_t DAudioSinkManager::DAudioNotify(const std::string &devId, const std::string &dhId, const int32_t eventType, const std::string &eventContent) { - DHLOGI("Distributed audio notify, devId: %s, dhId: %s, eventType: %d.", + DHLOGD("Distributed audio notify, devId: %s, dhId: %s, eventType: %d.", GetAnonyString(devId).c_str(), dhId.c_str(), eventType); { diff --git a/services/audiomanager/managersource/src/daudio_source_dev.cpp b/services/audiomanager/managersource/src/daudio_source_dev.cpp index 585ec2198c1b3ebeef01f28c8529d9399d5dc279..caca751fff8ab605a750ecd8e754c977dc683131 100644 --- a/services/audiomanager/managersource/src/daudio_source_dev.cpp +++ b/services/audiomanager/managersource/src/daudio_source_dev.cpp @@ -117,7 +117,7 @@ int32_t DAudioSourceDev::DisableDAudio(const std::string &dhId) void DAudioSourceDev::NotifyEvent(const AudioEvent &event) { - DHLOGI("Notify event, eventType: %d.", event.type); + DHLOGD("Notify event, eventType: %d.", event.type); std::map::iterator iter = memberFuncMap_.find(event.type); if (iter == memberFuncMap_.end()) { DHLOGE("Invalid eventType."); @@ -243,7 +243,7 @@ int32_t DAudioSourceDev::CloseCtrlTrans(const AudioEvent &event, bool isSpk) } if ((!isSpk && (speaker_ == nullptr || !speaker_->IsOpened())) || (isSpk && (mic_ == nullptr || !mic_->IsOpened()))) { - DHLOGI("No distributed audio device used, close ctrl trans."); + DHLOGD("No distributed audio device used, close ctrl trans."); auto task = GenerateTask(this, &DAudioSourceDev::TaskCloseCtrlChannel, event.content, "Close Ctrl Trans", &DAudioSourceDev::OnTaskResult); return taskQueue_->Produce(task); @@ -304,7 +304,7 @@ int32_t DAudioSourceDev::HandleNotifyRPC(const AudioEvent &event) } rpcResult_ = (jParam[KEY_RESULT] == DH_SUCCESS) ? true : false; - DHLOGI("Notify RPC event: %d, result: %d.", event.type, rpcResult_); + DHLOGD("Notify RPC event: %d, result: %d.", event.type, rpcResult_); std::map::iterator iter = eventNotifyMap_.find(event.type); if (iter == eventNotifyMap_.end()) { DHLOGE("Invalid eventType."); @@ -317,7 +317,7 @@ int32_t DAudioSourceDev::HandleNotifyRPC(const AudioEvent &event) int32_t DAudioSourceDev::HandleVolumeSet(const AudioEvent &event) { - DHLOGI("Start handle volume set."); + DHLOGD("Start handle volume set."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -329,7 +329,7 @@ int32_t DAudioSourceDev::HandleVolumeSet(const AudioEvent &event) int32_t DAudioSourceDev::HandleVolumeChange(const AudioEvent &event) { - DHLOGI("Start handle volume change."); + DHLOGD("Start handle volume change."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -341,7 +341,7 @@ int32_t DAudioSourceDev::HandleVolumeChange(const AudioEvent &event) int32_t DAudioSourceDev::HandleFocusChange(const AudioEvent &event) { - DHLOGI("Start handle focus change."); + DHLOGD("Start handle focus change."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -353,7 +353,7 @@ int32_t DAudioSourceDev::HandleFocusChange(const AudioEvent &event) int32_t DAudioSourceDev::HandleRenderStateChange(const AudioEvent &event) { - DHLOGI("Start handle render state change."); + DHLOGD("Start handle render state change."); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -365,7 +365,7 @@ int32_t DAudioSourceDev::HandleRenderStateChange(const AudioEvent &event) int32_t DAudioSourceDev::HandlePlayStatusChange(const AudioEvent &event) { - DHLOGI("Play status change, content: %s.", event.content.c_str()); + DHLOGD("Play status change, content: %s.", event.content.c_str()); if (taskQueue_ == nullptr) { DHLOGE("Task queue is null."); return ERR_DH_AUDIO_NULLPTR; @@ -450,10 +450,10 @@ int32_t DAudioSourceDev::WaitForRPC(const AudioEventType type) return ERR_DH_AUDIO_SA_RPC_WAIT_TIMEOUT; } if (!rpcResult_) { - DHLOGI("RPC notify Result Failed."); + DHLOGE("RPC notify Result Failed."); return ERR_DH_AUDIO_FAILED; } - DHLOGI("Receive sink device notify type: %d.", type); + DHLOGD("Receive sink device notify type: %d.", type); return DH_SUCCESS; } @@ -627,7 +627,7 @@ int32_t DAudioSourceDev::TaskCloseDSpeaker(const std::string &args) { DHLOGI("Task close speaker, args: %s.", args.c_str()); if (speaker_ == nullptr) { - DHLOGI("Speaker already closed."); + DHLOGD("Speaker already closed."); NotifyHDF(NOTIFY_CLOSE_SPEAKER_RESULT, HDF_EVENT_RESULT_SUCCESS); return DH_SUCCESS; } @@ -788,7 +788,7 @@ int32_t DAudioSourceDev::TaskCloseCtrlChannel(const std::string &args) { DHLOGI("Task close ctrl channel, args: %s.", args.c_str()); if (audioCtrlMgr_ == nullptr) { - DHLOGI("Audio source ctrl magr already closed."); + DHLOGD("Audio source ctrl magr already closed."); return DH_SUCCESS; } @@ -814,7 +814,7 @@ int32_t DAudioSourceDev::TaskCloseCtrlChannel(const std::string &args) int32_t DAudioSourceDev::TaskSetVolume(const std::string &args) { - DHLOGI("Task set volume, args: %s.", args.c_str()); + DHLOGD("Task set volume, args: %s.", args.c_str()); if (audioCtrlMgr_ == nullptr) { DHLOGE("Audio ctrl mgr not init."); return ERR_DH_AUDIO_NULLPTR; @@ -825,26 +825,25 @@ int32_t DAudioSourceDev::TaskSetVolume(const std::string &args) int32_t DAudioSourceDev::TaskChangeVolume(const std::string &args) { - DHLOGI("Task change volume, args: %s.", args.c_str()); + DHLOGD("Task change volume, args: %s.", args.c_str()); return NotifyHDF(AudioEventType::VOLUME_CHANGE, args); } int32_t DAudioSourceDev::TaskChangeFocus(const std::string &args) { - DHLOGI("Task change focus, args: %s.", args.c_str()); + DHLOGD("Task change focus, args: %s.", args.c_str()); return NotifyHDF(AudioEventType::AUDIO_FOCUS_CHANGE, args); } int32_t DAudioSourceDev::TaskChangeRenderState(const std::string &args) { - DHLOGI("Task change render state, args: %s.", args.c_str()); + DHLOGD("Task change render state, args: %s.", args.c_str()); return NotifyHDF(AudioEventType::AUDIO_RENDER_STATE_CHANGE, args); } - int32_t DAudioSourceDev::TaskPlayStatusChange(const std::string &args) { - DHLOGI("Task play status change, content: %s.", args.c_str()); + DHLOGD("Task play status change, content: %s.", args.c_str()); if (audioCtrlMgr_ == nullptr) { DHLOGE("Audio ctrl mgr not init."); return ERR_DH_AUDIO_NULLPTR; @@ -934,7 +933,7 @@ void DAudioSourceDev::OnTaskResult(int32_t resultCode, const std::string &result (void)resultCode; (void)result; (void)funcName; - DHLOGI("OnTaskResult. resultcode: %d, result: %s, funcName: %s", resultCode, result.c_str(), + DHLOGD("OnTaskResult. resultcode: %d, result: %s, funcName: %s", resultCode, result.c_str(), funcName.c_str()); } @@ -947,7 +946,7 @@ int32_t DAudioSourceDev::NotifySinkDev(const AudioEventType type, const json Par { KEY_EVENT_TYPE, type }, { KEY_AUDIO_PARAM, Param }, { KEY_RANDOM_TASK_CODE, std::to_string(randomTaskCode) } }; - DHLOGI("Notify sink dev, random task code: %s", std::to_string(randomTaskCode).c_str()); + DHLOGD("Notify sink dev, random task code: %s", std::to_string(randomTaskCode).c_str()); DAudioSourceManager::GetInstance().DAudioNotify(devId_, dhId, type, jParam.dump()); return WaitForRPC(static_cast(static_cast(type) + eventOffset)); } diff --git a/services/audiomanager/managersource/src/daudio_source_manager.cpp b/services/audiomanager/managersource/src/daudio_source_manager.cpp index 3b142a543ebe2f3597ce307aec6979316dfbe22c..8eede27205f80210b18a3d7af9efbc93dadf235e 100644 --- a/services/audiomanager/managersource/src/daudio_source_manager.cpp +++ b/services/audiomanager/managersource/src/daudio_source_manager.cpp @@ -36,7 +36,7 @@ constexpr uint32_t MAX_DISTRIBUTED_HAREWARE_ID_LENGTH = 100; IMPLEMENT_SINGLE_INSTANCE(DAudioSourceManager); DAudioSourceManager::DAudioSourceManager() { - DHLOGI("Distributed audio source manager constructed."); + DHLOGD("Distributed audio source manager constructed."); } DAudioSourceManager::~DAudioSourceManager() @@ -44,7 +44,7 @@ DAudioSourceManager::~DAudioSourceManager() if (devClearThread_.joinable()) { devClearThread_.join(); } - DHLOGI("Distributed audio source manager destructed."); + DHLOGD("Distributed audio source manager destructed."); } int32_t DAudioSourceManager::Init(const sptr &callback) @@ -96,7 +96,7 @@ int32_t DAudioSourceManager::UnInit() static bool CheckParams(const std::string &devId, const std::string &dhId) { - DHLOGI("Checking oarams of daudio."); + DHLOGD("Checking oarams of daudio."); if (devId.empty() || dhId.empty() || devId.size() > MAX_DEVICE_ID_LENGTH || dhId.size() > MAX_DISTRIBUTED_HAREWARE_ID_LENGTH) { return false; @@ -149,7 +149,7 @@ int32_t DAudioSourceManager::DisableDAudio(const std::string &devId, const std:: int32_t DAudioSourceManager::HandleDAudioNotify(const std::string &devId, const std::string &dhId, const int32_t eventType, const std::string &eventContent) { - DHLOGI("Handle distributed audio notify, devId: %s, dhId: %s, eventType: %d.", GetAnonyString(devId).c_str(), + DHLOGD("Handle distributed audio notify, devId: %s, dhId: %s, eventType: %d.", GetAnonyString(devId).c_str(), dhId.c_str(), eventType); if (eventContent.length() > DAUDIO_MAX_JSON_LEN || eventContent.empty()) { return ERR_DH_AUDIO_FAILED; @@ -157,7 +157,7 @@ int32_t DAudioSourceManager::HandleDAudioNotify(const std::string &devId, const json jParam = json::parse(eventContent, nullptr, false); if (JsonParamCheck(jParam, { KEY_RANDOM_TASK_CODE })) { - DHLOGI("Receive audio notify from sink, random task code: %s", + DHLOGD("Receive audio notify from sink, random task code: %s", ((std::string)jParam[KEY_RANDOM_TASK_CODE]).c_str()); } @@ -176,7 +176,7 @@ int32_t DAudioSourceManager::HandleDAudioNotify(const std::string &devId, const int32_t DAudioSourceManager::DAudioNotify(const std::string &devId, const std::string &dhId, const int32_t eventType, const std::string &eventContent) { - DHLOGI("Distributed audio notify, devId: %s, dhId: %s, eventType: %d.", GetAnonyString(devId).c_str(), + DHLOGD("Distributed audio notify, devId: %s, dhId: %s, eventType: %d.", GetAnonyString(devId).c_str(), dhId.c_str(), eventType); { std::lock_guard lck(remoteSvrMutex_); diff --git a/services/audiomanager/managersource/src/dmic_dev.cpp b/services/audiomanager/managersource/src/dmic_dev.cpp index dafcf7570c6fcb0bd399196b85f94799ddb10281..705496af812f7902214c1443692fae3cb06e992c 100644 --- a/services/audiomanager/managersource/src/dmic_dev.cpp +++ b/services/audiomanager/managersource/src/dmic_dev.cpp @@ -138,7 +138,7 @@ int32_t DMicDev::CloseDevice(const std::string &devId, const int32_t dhId) int32_t DMicDev::SetParameters(const std::string &devId, const int32_t dhId, const AudioParamHDF ¶m) { - DHLOGI("Set mic parameters {samplerate: %d, channelmask: %d, format: %d, period: %d, " + DHLOGD("Set mic parameters {samplerate: %d, channelmask: %d, format: %d, period: %d, " "framesize: %d, ext{%s}}.", param.sampleRate, param.channelMask, param.bitFormat, param.period, param.frameSize, param.ext.c_str()); @@ -157,7 +157,7 @@ int32_t DMicDev::SetParameters(const std::string &devId, const int32_t dhId, con int32_t DMicDev::NotifyEvent(const std::string &devId, const int32_t dhId, const AudioEvent &event) { - DHLOGI("Notify mic event, type: %d.", event.type); + DHLOGD("Notify mic event, type: %d.", event.type); std::shared_ptr cbObj = audioEventCallback_.lock(); if (cbObj == nullptr) { DHLOGE("Event callback is null"); @@ -281,7 +281,7 @@ int32_t DMicDev::ReadStreamData(const std::string &devId, const int32_t dhId, st if (insertFrameCnt_ >= queSize || queSize == 0) { ++insertFrameCnt_; isExistedEmpty_.store(true); - DHLOGI("Data queue is empty, count :%u.", insertFrameCnt_); + DHLOGD("Data queue is empty, count :%u.", insertFrameCnt_); data = std::make_shared(param_.comParam.frameSize); } else { while (insertFrameCnt_ > 0) { @@ -298,7 +298,7 @@ int32_t DMicDev::ReadStreamData(const std::string &devId, const int32_t dhId, st int32_t DMicDev::ReadMmapPosition(const std::string &devId, const int32_t dhId, uint64_t &frames, CurrentTimeHDF &time) { - DHLOGI("Read mmap position. frames: %lu, tvsec: %lu, tvNSec:%lu", + DHLOGD("Read mmap position. frames: %lu, tvsec: %lu, tvNSec:%lu", writeNum_, writeTvSec_, writeTvNSec_); frames = writeNum_; time.tvSec = writeTvSec_; @@ -309,16 +309,16 @@ int32_t DMicDev::ReadMmapPosition(const std::string &devId, const int32_t dhId, int32_t DMicDev::RefreshAshmemInfo(const std::string &devId, const int32_t dhId, int32_t fd, int32_t ashmemLength, int32_t lengthPerTrans) { - DHLOGI("RefreshAshmemInfo: fd:%d, ashmemLength: %d, lengthPerTrans: %d", fd, ashmemLength, lengthPerTrans); + DHLOGD("RefreshAshmemInfo: fd:%d, ashmemLength: %d, lengthPerTrans: %d", fd, ashmemLength, lengthPerTrans); if (param_.captureOpts.capturerFlags == MMAP_MODE) { - DHLOGI("DMic dev low-latency mode"); + DHLOGD("DMic dev low-latency mode"); if (ashmem_ != nullptr) { return DH_SUCCESS; } ashmem_ = new Ashmem(fd, ashmemLength); ashmemLength_ = ashmemLength; lengthPerTrans_ = lengthPerTrans; - DHLOGI("Create ashmem success. fd:%d, ashmem length: %d, lengthPreTrans: %d", + DHLOGD("Create ashmem success. fd:%d, ashmem length: %d, lengthPreTrans: %d", fd, ashmemLength_, lengthPerTrans_); bool mapRet = ashmem_->MapReadAndWriteAshmem(); if (!mapRet) { @@ -350,7 +350,7 @@ void DMicDev::EnqueueThread() { writeIndex_ = 0; writeNum_ = 0; - DHLOGI("Enqueue thread start, lengthPerWrite length: %d.", lengthPerTrans_); + DHLOGD("Enqueue thread start, lengthPerWrite length: %d.", lengthPerTrans_); FillJitterQueue(); while (ashmem_ != nullptr && isEnqueueRunning_.load()) { int64_t timeOffset = UpdateTimeOffset(frameIndex_, LOW_LATENCY_INTERVAL_NS, @@ -360,7 +360,7 @@ void DMicDev::EnqueueThread() { std::lock_guard lock(dataQueueMtx_); if (dataQueue_.empty()) { - DHLOGI("Data queue is Empty."); + DHLOGD("Data queue is Empty."); audioData = std::make_shared(param_.comParam.frameSize); } else { audioData = dataQueue_.front(); @@ -395,7 +395,7 @@ void DMicDev::FillJitterQueue() } usleep(MMAP_WAIT_FRAME_US); } - DHLOGI("Mic jitter data queue fill end."); + DHLOGD("Mic jitter data queue fill end."); } int32_t DMicDev::MmapStop() @@ -424,7 +424,7 @@ int32_t DMicDev::NotifyHdfAudioEvent(const AudioEvent &event) int32_t DMicDev::OnStateChange(const AudioEventType type) { - DHLOGI("On mic device state change, type: %d", type); + DHLOGD("On mic device state change, type: %d", type); AudioEvent event; switch (type) { case AudioEventType::DATA_OPENED: @@ -462,11 +462,11 @@ int32_t DMicDev::OnDecodeTransDataDone(const std::shared_ptr &audioDa dataQueSize_ = param_.captureOpts.capturerFlags == MMAP_MODE ? dataQueSize_ : DATA_QUEUE_EXT_SIZE; } while (dataQueue_.size() > dataQueSize_) { - DHLOGI("Data queue overflow. buf current size: %d", dataQueue_.size()); + DHLOGD("Data queue overflow. buf current size: %d", dataQueue_.size()); dataQueue_.pop(); } dataQueue_.push(audioData); - DHLOGI("Push new mic data, buf len: %d", dataQueue_.size()); + DHLOGD("Push new mic data, buf len: %d", dataQueue_.size()); return DH_SUCCESS; } } // DistributedHardware diff --git a/services/audiomanager/managersource/src/dspeaker_dev.cpp b/services/audiomanager/managersource/src/dspeaker_dev.cpp index bb7fb95584160ef6d5b9256aeab8063a8cc59a2c..ab05dbc5b4dc0823393b010cca9ff69efeeef437 100644 --- a/services/audiomanager/managersource/src/dspeaker_dev.cpp +++ b/services/audiomanager/managersource/src/dspeaker_dev.cpp @@ -137,7 +137,7 @@ int32_t DSpeakerDev::CloseDevice(const std::string &devId, const int32_t dhId) int32_t DSpeakerDev::SetParameters(const std::string &devId, const int32_t dhId, const AudioParamHDF ¶m) { - DHLOGI("Set speaker parameters {samplerate: %d, channelmask: %d, format: %d, streamusage: %d, period: %d, " + DHLOGD("Set speaker parameters {samplerate: %d, channelmask: %d, format: %d, streamusage: %d, period: %d, " "framesize: %d, renderFlags: %d, ext{%s}}.", param.sampleRate, param.channelMask, param.bitFormat, param.streamUsage, param.period, param.frameSize, param.renderFlags, param.ext.c_str()); @@ -157,7 +157,7 @@ int32_t DSpeakerDev::SetParameters(const std::string &devId, const int32_t dhId, int32_t DSpeakerDev::NotifyEvent(const std::string &devId, int32_t dhId, const AudioEvent &event) { - DHLOGI("Notify speaker event."); + DHLOGD("Notify speaker event."); std::shared_ptr cbObj = audioEventCallback_.lock(); if (cbObj == nullptr) { DHLOGE("Event callback is null"); @@ -313,7 +313,7 @@ int32_t DSpeakerDev::WriteStreamData(const std::string &devId, const int32_t dhI int32_t DSpeakerDev::ReadMmapPosition(const std::string &devId, const int32_t dhId, uint64_t &frames, CurrentTimeHDF &time) { - DHLOGI("Read mmap position. frames: %lu, tvsec: %lu, tvNSec:%lu", + DHLOGD("Read mmap position. frames: %lu, tvsec: %lu, tvNSec:%lu", readNum_, readTvSec_, readTvNSec_); frames = readNum_; time.tvSec = readTvSec_; @@ -323,7 +323,7 @@ int32_t DSpeakerDev::ReadMmapPosition(const std::string &devId, const int32_t dh int32_t DSpeakerDev::RefreshAshmemInfo(const std::string &devId, const int32_t dhId, int32_t fd, int32_t ashmemLength, int32_t lengthPerTrans) { - DHLOGI("RefreshAshmemInfo: fd:%d, ashmemLength: %d, lengthPerTrans: %d", fd, ashmemLength, lengthPerTrans); + DHLOGD("RefreshAshmemInfo: fd:%d, ashmemLength: %d, lengthPerTrans: %d", fd, ashmemLength, lengthPerTrans); if (param_.renderOpts.renderFlags == MMAP_MODE) { DHLOGI("DSpeaker dev low-latency mode"); if (ashmem_ != nullptr) { @@ -362,7 +362,7 @@ void DSpeakerDev::EnqueueThread() readIndex_ = 0; readNum_ = 0; frameIndex_ = 0; - DHLOGI("Enqueue thread start, lengthPerRead length: %d.", lengthPerTrans_); + DHLOGD("Enqueue thread start, lengthPerRead length: %d.", lengthPerTrans_); while (ashmem_ != nullptr && isEnqueueRunning_.load()) { int64_t timeOffset = UpdateTimeOffset(frameIndex_, LOW_LATENCY_INTERVAL_NS, startTime_); diff --git a/services/audiomanager/servicesink/src/daudio_sink_service.cpp b/services/audiomanager/servicesink/src/daudio_sink_service.cpp index 5a9f1a02a1da73e1f6d98a445b2e6e81c60c7bcb..fe17dae7a22e390a6a852ab5ec0fedefafa63ef7 100644 --- a/services/audiomanager/servicesink/src/daudio_sink_service.cpp +++ b/services/audiomanager/servicesink/src/daudio_sink_service.cpp @@ -38,7 +38,7 @@ REGISTER_SYSTEM_ABILITY_BY_ID(DAudioSinkService, DISTRIBUTED_HARDWARE_AUDIO_SINK DAudioSinkService::DAudioSinkService(int32_t saId, bool runOnCreate) : SystemAbility(saId, runOnCreate) { - DHLOGI("Distributed audio sink service constructed."); + DHLOGD("Distributed audio sink service constructed."); } void DAudioSinkService::OnStart() diff --git a/services/audiomanager/servicesink/src/daudio_sink_stub.cpp b/services/audiomanager/servicesink/src/daudio_sink_stub.cpp index 78c96ecef334536f66d28949815827e006e81e91..6b4be032d51aa62fc36b57667de925ea48bebb1f 100644 --- a/services/audiomanager/servicesink/src/daudio_sink_stub.cpp +++ b/services/audiomanager/servicesink/src/daudio_sink_stub.cpp @@ -27,7 +27,7 @@ namespace OHOS { namespace DistributedHardware { DAudioSinkStub::DAudioSinkStub() { - DHLOGI("Distributed audio sink stub constructed."); + DHLOGD("Distributed audio sink stub constructed."); memberFuncMap_[static_cast(IDAudioSinkInterfaceCode::INIT_SINK)] = &DAudioSinkStub::InitSinkInner; memberFuncMap_[static_cast(IDAudioSinkInterfaceCode::RELEASE_SINK)] = @@ -42,12 +42,12 @@ DAudioSinkStub::DAudioSinkStub() DAudioSinkStub::~DAudioSinkStub() { - DHLOGI("Distributed audio sink stub deconstructed."); + DHLOGD("Distributed audio sink stub deconstructed."); } int32_t DAudioSinkStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) { - DHLOGI("On remote request, code: %d.", code); + DHLOGD("On remote request, code: %d.", code); std::u16string desc = DAudioSinkStub::GetDescriptor(); std::u16string remoteDesc = data.ReadInterfaceToken(); if (desc != remoteDesc) { diff --git a/services/audiomanager/servicesource/src/daudio_source_service.cpp b/services/audiomanager/servicesource/src/daudio_source_service.cpp index 7d0d8500a0dc50193f0cb40680a32636b58ed6bb..ec330f19551ab6519c7e8a7fa5a9b7d6edd75355 100644 --- a/services/audiomanager/servicesource/src/daudio_source_service.cpp +++ b/services/audiomanager/servicesource/src/daudio_source_service.cpp @@ -126,14 +126,14 @@ int32_t DAudioSourceService::ConfigDistributedHardware(const std::string &devId, void DAudioSourceService::DAudioNotify(const std::string &devId, const std::string &dhId, const int32_t eventType, const std::string &eventContent) { - DHLOGI("Notify distributed audio device, devId: %s, dhId: %s.", GetAnonyString(devId).c_str(), + DHLOGD("Notify distributed audio device, devId: %s, dhId: %s.", GetAnonyString(devId).c_str(), dhId.c_str()); DAudioSourceManager::GetInstance().HandleDAudioNotify(devId, dhId, eventType, eventContent); } int DAudioSourceService::Dump(int32_t fd, const std::vector& args) { - DHLOGI("Distributed audio source service dump."); + DHLOGD("Distributed audio source service dump."); std::string result; std::vector argsStr; diff --git a/services/audioprocessor/decoder/src/audio_decoder_callback.cpp b/services/audioprocessor/decoder/src/audio_decoder_callback.cpp index 8be8355f8dbdf3533ce01c02f769bd33f1705008..410bc9280a0cc0d14bd2e9a06b2fab89c09260b4 100644 --- a/services/audioprocessor/decoder/src/audio_decoder_callback.cpp +++ b/services/audioprocessor/decoder/src/audio_decoder_callback.cpp @@ -48,7 +48,7 @@ void AudioDecoderCallback::OnInputBufferAvailable(uint32_t index) void AudioDecoderCallback::OnOutputFormatChanged(const Media::Format &format) { - DHLOGI("On output format changed."); + DHLOGD("On output format changed."); std::shared_ptr decObj = audioDecoder_.lock(); if (decObj == nullptr) { DHLOGE("Decoder is nullptr."); diff --git a/services/audioprocessor/encodeprocessor/src/audio_encoder_processor.cpp b/services/audioprocessor/encodeprocessor/src/audio_encoder_processor.cpp index 37ed677f9a4ccbeb79691b199716a7acbf9ec018..d3473b05731a3941d467b44f65eb4ba0542b1de6 100644 --- a/services/audioprocessor/encodeprocessor/src/audio_encoder_processor.cpp +++ b/services/audioprocessor/encodeprocessor/src/audio_encoder_processor.cpp @@ -29,7 +29,7 @@ namespace DistributedHardware { AudioEncoderProcessor::~AudioEncoderProcessor() { if (audioEncoder_ != nullptr) { - DHLOGI("Release audio processor."); + DHLOGD("Release audio processor."); StopAudioProcessor(); ReleaseAudioProcessor(); } @@ -152,7 +152,7 @@ void AudioEncoderProcessor::OnCodecDataDone(const std::shared_ptr &ou void AudioEncoderProcessor::OnCodecStateNotify(const AudioEvent &event) { - DHLOGI("Codec state notify."); + DHLOGD("Codec state notify."); auto cbObj = procCallback_.lock(); if (cbObj == nullptr) { DHLOGE("Processor callback is null."); diff --git a/services/audioprocessor/encoder/src/audio_encoder.cpp b/services/audioprocessor/encoder/src/audio_encoder.cpp index 57b7a73df1ad93ea5e40a505e1243089dbd845b7..7283efbe8778c737d25c5c81eeb64d873c233753 100644 --- a/services/audioprocessor/encoder/src/audio_encoder.cpp +++ b/services/audioprocessor/encoder/src/audio_encoder.cpp @@ -35,7 +35,7 @@ const std::string AudioEncoder::ENCODE_MIME_AAC = "audio/mp4a-latm"; AudioEncoder::~AudioEncoder() { if (audioEncoder_ != nullptr) { - DHLOGI("Release audio codec."); + DHLOGD("Release audio codec."); StopAudioCodec(); ReleaseAudioCodec(); } @@ -44,7 +44,7 @@ AudioEncoder::~AudioEncoder() int32_t AudioEncoder::ConfigureAudioCodec(const AudioCommonParam &codecParam, const std::shared_ptr &codecCallback) { - DHLOGI("Configure audio codec."); + DHLOGD("Configure audio codec."); if (!IsInEncodeRange(codecParam) || codecCallback == nullptr) { DHLOGE("Codec param error or callback is null."); return ERR_DH_AUDIO_BAD_VALUE; diff --git a/services/audioprocessor/encoder/src/audio_encoder_callback.cpp b/services/audioprocessor/encoder/src/audio_encoder_callback.cpp index c0e1074d7ee8bcb8521f528c6bbc7d95877b570b..5849843ff95821a925a6bac9e6102b81c2d03ec4 100644 --- a/services/audioprocessor/encoder/src/audio_encoder_callback.cpp +++ b/services/audioprocessor/encoder/src/audio_encoder_callback.cpp @@ -48,7 +48,7 @@ void AudioEncoderCallback::OnInputBufferAvailable(uint32_t index) void AudioEncoderCallback::OnOutputFormatChanged(const Media::Format &format) { - DHLOGI("On output format changed."); + DHLOGD("On output format changed."); std::shared_ptr encObj = audioEncoder_.lock(); if (encObj == nullptr) { DHLOGE("Encoder is nullptr."); diff --git a/services/audiotransport/audiochannel/audioctrlchannel/src/audio_ctrl_channel.cpp b/services/audiotransport/audiochannel/audioctrlchannel/src/audio_ctrl_channel.cpp index 78e81fecbc65f03ad9829b46d3ffeb73eeaa80ed..42b447226143385f348410e062eabd42ec226f04 100644 --- a/services/audiotransport/audiochannel/audioctrlchannel/src/audio_ctrl_channel.cpp +++ b/services/audiotransport/audiochannel/audioctrlchannel/src/audio_ctrl_channel.cpp @@ -107,7 +107,7 @@ int32_t AudioCtrlChannel::CloseSession() { DHLOGI("Close session, sessionId: %d.", sessionId_); if (sessionId_ == 0) { - DHLOGI("Session is already closed."); + DHLOGD("Session is already closed."); return DH_SUCCESS; } @@ -134,7 +134,7 @@ int32_t AudioCtrlChannel::SendData(const std::shared_ptr &data) int32_t AudioCtrlChannel::SendEvent(const AudioEvent &audioEvent) { - DHLOGI("Send event, sessionId: %d.", sessionId_); + DHLOGD("Send event, sessionId: %d.", sessionId_); json jAudioEvent; jAudioEvent[KEY_TYPE] = audioEvent.type; jAudioEvent[KEY_EVENT_CONTENT] = audioEvent.content; @@ -150,7 +150,7 @@ int32_t AudioCtrlChannel::SendEvent(const AudioEvent &audioEvent) int32_t AudioCtrlChannel::SendMsg(string &message) { - DHLOGI("Start send messages."); + DHLOGD("Start send messages."); uint8_t *buf = reinterpret_cast(calloc((MSG_MAX_SIZE), sizeof(uint8_t))); if (buf == nullptr) { DHLOGE("Malloc memory failed."); @@ -190,7 +190,7 @@ void AudioCtrlChannel::OnSessionClosed(int32_t sessionId) { DHLOGI("On control session closed, sessionId: %d.", sessionId); if (sessionId_ == 0) { - DHLOGI("Session already closed."); + DHLOGD("Session already closed."); return; } auto listener = channelListener_.lock(); diff --git a/services/audiotransport/audiochannel/audiodatachannel/src/audio_data_channel.cpp b/services/audiotransport/audiochannel/audiodatachannel/src/audio_data_channel.cpp index fd2fb2765a0f2139462e7132bd08f597e2fde19c..d68284641061a30ad2fb3efae731a695abcff8a4 100644 --- a/services/audiotransport/audiochannel/audiodatachannel/src/audio_data_channel.cpp +++ b/services/audiotransport/audiochannel/audiodatachannel/src/audio_data_channel.cpp @@ -90,7 +90,7 @@ int32_t AudioDataChannel::CloseSession() { DHLOGI("Close session, sessionId: %d.", sessionId_); if (sessionId_ == 0) { - DHLOGI("Session is already close."); + DHLOGD("Session is already close."); return DH_SUCCESS; } @@ -110,13 +110,13 @@ int32_t AudioDataChannel::SendEvent(const AudioEvent &audioEvent) int32_t AudioDataChannel::SendData(const std::shared_ptr &audioData) { - DHLOGI("Send data, sessionId: %d.", sessionId_); + DHLOGD("Send data, sessionId: %d.", sessionId_); return SoftbusAdapter::GetInstance().SendSoftbusStream(sessionId_, audioData); } void AudioDataChannel::OnSessionOpened(int32_t sessionId, int32_t result) { - DHLOGI("On audio session opened, sessionId: %d, result: %d.", sessionId, result); + DHLOGD("On audio session opened, sessionId: %d, result: %d.", sessionId, result); if (result != 0) { DHLOGE("Session open failed."); return; @@ -137,7 +137,7 @@ void AudioDataChannel::OnSessionClosed(int32_t sessionId) { DHLOGI("On audio session closed, sessionId: %d.", sessionId); if (sessionId_ == 0) { - DHLOGI("Session already closed."); + DHLOGD("Session already closed."); return; } auto listener = channelListener_.lock(); diff --git a/services/audiotransport/audioctrltransport/src/audio_ctrl_transport.cpp b/services/audiotransport/audioctrltransport/src/audio_ctrl_transport.cpp index 08a15ea6d074c05a345e821d0a0480260672ec4b..53656db69d02936126cecbeff8378b37978c4295 100644 --- a/services/audiotransport/audioctrltransport/src/audio_ctrl_transport.cpp +++ b/services/audiotransport/audioctrltransport/src/audio_ctrl_transport.cpp @@ -125,7 +125,7 @@ void AudioCtrlTransport::OnSessionOpened() void AudioCtrlTransport::OnSessionClosed() { - DHLOGI("On channel session closed."); + DHLOGD("On channel session closed."); auto callback = ctrlTransCallback_.lock(); if (callback == nullptr) { DHLOGE("Callback is nullptr."); @@ -141,7 +141,7 @@ void AudioCtrlTransport::OnDataReceived(const std::shared_ptr &data) void AudioCtrlTransport::OnEventReceived(const AudioEvent &event) { - DHLOGI("Audio event received."); + DHLOGD("Audio event received."); auto callback = ctrlTransCallback_.lock(); if (callback == nullptr) { DHLOGE("Callback is null."); diff --git a/services/audiotransport/audiotransportstatus/src/audio_transport_context.cpp b/services/audiotransport/audiotransportstatus/src/audio_transport_context.cpp index a0b29a548a7e2a74f1b7c3e0fced19abbae5d253..1a0a00413526ed93cfdbdc835457067d01213486 100644 --- a/services/audiotransport/audiotransportstatus/src/audio_transport_context.cpp +++ b/services/audiotransport/audiotransportstatus/src/audio_transport_context.cpp @@ -26,7 +26,7 @@ namespace OHOS { namespace DistributedHardware { void AudioTransportContext::SetTransportStatus(TransportStateType stateType) { - DHLOGI("Set transport status in state %d", stateType); + DHLOGD("Set transport status in state %d", stateType); auto stateContext = std::shared_ptr(shared_from_this()); currentState_ = AudioTransportStatusFactory::GetInstance().CreateState(stateType, stateContext); } @@ -44,7 +44,7 @@ int32_t AudioTransportContext::GetTransportStatusType() int32_t AudioTransportContext::Start() { if (currentState_ == nullptr) { - DHLOGI("CurrentState is nullptr."); + DHLOGD("CurrentState is nullptr."); return ERR_DH_AUDIO_NULLPTR; } DHLOGI("Audio transport context start."); @@ -54,7 +54,7 @@ int32_t AudioTransportContext::Start() int32_t AudioTransportContext::Stop() { if (currentState_ == nullptr) { - DHLOGI("CurrentState is nullptr."); + DHLOGD("CurrentState is nullptr."); return ERR_DH_AUDIO_NULLPTR; } DHLOGI("Audio transport context stop."); @@ -64,7 +64,7 @@ int32_t AudioTransportContext::Stop() int32_t AudioTransportContext::Pause() { if (currentState_ == nullptr) { - DHLOGI("CurrentState is nullptr."); + DHLOGD("CurrentState is nullptr."); return ERR_DH_AUDIO_NULLPTR; } DHLOGI("Audio transport context pause."); @@ -74,7 +74,7 @@ int32_t AudioTransportContext::Pause() int32_t AudioTransportContext::Restart(const AudioParam &localParam, const AudioParam &remoteParam) { if (currentState_ == nullptr) { - DHLOGI("CurrentState is nullptr."); + DHLOGD("CurrentState is nullptr."); return ERR_DH_AUDIO_NULLPTR; } DHLOGI("Audio transport context restart."); diff --git a/services/audiotransport/audiotransportstatus/src/audio_transport_pause_status.cpp b/services/audiotransport/audiotransportstatus/src/audio_transport_pause_status.cpp index d8f44be5409c45b0bb583031efdf85230273e17a..a9ea72f05e39e74ceacbc7e0ccddf32f26e1741d 100644 --- a/services/audiotransport/audiotransportstatus/src/audio_transport_pause_status.cpp +++ b/services/audiotransport/audiotransportstatus/src/audio_transport_pause_status.cpp @@ -26,7 +26,7 @@ namespace DistributedHardware { AudioTransportPauseStatus::AudioTransportPauseStatus(std::shared_ptr& stateContext) : stateContext_(stateContext) { - DHLOGI("AudioTransportPauseStatus contruct."); + DHLOGD("AudioTransportPauseStatus contruct."); } int32_t AudioTransportPauseStatus::Start(std::shared_ptr audioChannel, diff --git a/services/audiotransport/audiotransportstatus/src/audio_transport_start_status.cpp b/services/audiotransport/audiotransportstatus/src/audio_transport_start_status.cpp index 07353f60849f82204e3ceb1000f30c5459c52361..5d5a364a7c873f3aa61df2554ff274c8ebea9759 100644 --- a/services/audiotransport/audiotransportstatus/src/audio_transport_start_status.cpp +++ b/services/audiotransport/audiotransportstatus/src/audio_transport_start_status.cpp @@ -26,7 +26,7 @@ namespace DistributedHardware { AudioTransportStartStatus::AudioTransportStartStatus(std::shared_ptr& stateContext) : stateContext_(stateContext) { - DHLOGI("AudioTransportStartStatus contruct."); + DHLOGD("AudioTransportStartStatus contruct."); } int32_t AudioTransportStartStatus::Start(std::shared_ptr audioChannel, std::shared_ptr processor) @@ -108,7 +108,7 @@ int32_t AudioTransportStartStatus::Restart(const AudioParam &localParam, const A TransportStateType AudioTransportStartStatus::GetStateType() { - DHLOGI("Get audiotransport status."); + DHLOGD("Get audiotransport status."); return TRANSPORT_STATE_START; } } // namespace DistributedHardware diff --git a/services/audiotransport/audiotransportstatus/src/audio_transport_stop_status.cpp b/services/audiotransport/audiotransportstatus/src/audio_transport_stop_status.cpp index 042fb2c35131fe5f94de5909d724c3bc5bbee149..73f3bcb48df39c67ce05517b6d8ac7eaad7df6fb 100644 --- a/services/audiotransport/audiotransportstatus/src/audio_transport_stop_status.cpp +++ b/services/audiotransport/audiotransportstatus/src/audio_transport_stop_status.cpp @@ -26,7 +26,7 @@ namespace DistributedHardware { AudioTransportStopStatus::AudioTransportStopStatus(std::shared_ptr& stateContext) : stateContext_(stateContext) { - DHLOGI("AudioTransportStopStatus contruct."); + DHLOGD("AudioTransportStopStatus contruct."); } int32_t AudioTransportStopStatus::Start(std::shared_ptr audioChannel, std::shared_ptr processor) @@ -64,7 +64,7 @@ int32_t AudioTransportStopStatus::Stop(std::shared_ptr audioChann int32_t AudioTransportStopStatus::Pause(std::shared_ptr processor) { (void)processor; - DHLOGI("Audiotransport status is stop, can not pause."); + DHLOGE("Audiotransport status is stop, can not pause."); return ERR_DH_AUDIO_TRANS_ILLEGAL_OPERATION; } diff --git a/services/audiotransport/encodetransport/src/audio_encode_transport.cpp b/services/audiotransport/encodetransport/src/audio_encode_transport.cpp index 79f6d3c74c27ec495049ae3423b20bfbb939d2c2..ec7bd07d9796d7fd352fe92aa3c06ef77b2cc6d3 100644 --- a/services/audiotransport/encodetransport/src/audio_encode_transport.cpp +++ b/services/audiotransport/encodetransport/src/audio_encode_transport.cpp @@ -215,7 +215,7 @@ int32_t AudioEncodeTransport::RegisterProcessorListener(const AudioParam &localP void AudioEncodeTransport::OnSessionOpened() { - DHLOGI("On channel session opened."); + DHLOGD("On channel session opened."); auto cbObj = dataTransCallback_.lock(); if (cbObj == nullptr) { DHLOGE("On channel session opened. callback is nullptr."); @@ -226,7 +226,7 @@ void AudioEncodeTransport::OnSessionOpened() void AudioEncodeTransport::OnSessionClosed() { - DHLOGI("On channel session close."); + DHLOGD("On channel session close."); auto cbObj = dataTransCallback_.lock(); if (cbObj == nullptr) { DHLOGE("On channel session closed. callback is nullptr."); @@ -247,7 +247,7 @@ void AudioEncodeTransport::OnEventReceived(const AudioEvent &event) void AudioEncodeTransport::OnAudioDataDone(const std::shared_ptr &outputData) { - DHLOGI("On audio data done."); + DHLOGD("On audio data done."); if (!audioChannel_) { DHLOGE("Channel is null, setup first."); return; diff --git a/services/common/taskProcessor/src/task_queue.cpp b/services/common/taskProcessor/src/task_queue.cpp index df00aa3ad55e55a096e3a8e33d151b24c358ca57..7725ed63fa29073453265bf1d2ce96d4661d6027 100644 --- a/services/common/taskProcessor/src/task_queue.cpp +++ b/services/common/taskProcessor/src/task_queue.cpp @@ -86,7 +86,7 @@ int32_t TaskQueue::Produce(std::shared_ptr &task) } std::lock_guard lck(taskQueueMutex_); if (taskQueue_.size() >= maxSize_) { - DHLOGI("task queue is full, size: %zu", taskQueue_.size()); + DHLOGD("task queue is full, size: %zu", taskQueue_.size()); return ERR_DH_AUDIO_SA_TASKQUEUE_FULL; } taskQueue_.push(task); diff --git a/services/hdfaudioclient/src/daudio_adapter_internal.cpp b/services/hdfaudioclient/src/daudio_adapter_internal.cpp index 95d38b17e3e5b0dcebb9bc39e1b0b9d09c40a20f..ab71298e9cb0604c20605f76b192282f6e3788d5 100644 --- a/services/hdfaudioclient/src/daudio_adapter_internal.cpp +++ b/services/hdfaudioclient/src/daudio_adapter_internal.cpp @@ -342,7 +342,7 @@ static void ConvertAudioRouteNodeToHAL(const ::AudioRouteNode &node, AudioRouteN halNode.portId = node.portId; halNode.role = static_cast(node.role); halNode.type = static_cast(node.type); - DHLOGI("Convert audio route node To HAL, portId: %d role: %d type: %d.", halNode.portId, halNode.role, + DHLOGD("Convert audio route node To HAL, portId: %d role: %d type: %d.", halNode.portId, halNode.role, halNode.type); switch (node.type) { @@ -363,17 +363,17 @@ static void ConvertAudioRouteNodeToHAL(const ::AudioRouteNode &node, AudioRouteN halNode.ext.mix.moduleId = node.ext.mix.moduleId; halNode.ext.mix.streamId = node.ext.mix.streamId; - DHLOGI("Convert audio route node To HAL, [Mix] moduleId: %d streamId: %d.", + DHLOGD("Convert audio route node To HAL, [Mix] moduleId: %d streamId: %d.", halNode.ext.mix.moduleId, halNode.ext.mix.streamId); break; } case AUDIO_PORT_SESSION_TYPE: { halNode.ext.session.sessionType = static_cast(node.ext.session.sessionType); - DHLOGI("Convert audio route node To HAL, [Session] sessionType: %d.", halNode.ext.session.sessionType); + DHLOGD("Convert audio route node To HAL, [Session] sessionType: %d.", halNode.ext.session.sessionType); break; } default : - DHLOGI("Unknown node Type"); + DHLOGD("Unknown node Type"); } } static int32_t UpdateAudioRouteInternal(struct AudioAdapter *adapter, const struct ::AudioRoute *route, diff --git a/services/hdfaudioclient/src/distributed_audio_client.cpp b/services/hdfaudioclient/src/distributed_audio_client.cpp index 99f5d281f0d8e0c3c3463ff156ecf02aa8177266..aee37506c77096d62108a5f1e963454d526bf35d 100644 --- a/services/hdfaudioclient/src/distributed_audio_client.cpp +++ b/services/hdfaudioclient/src/distributed_audio_client.cpp @@ -57,7 +57,7 @@ static int32_t InitDescriptorPort(const AudioAdapterDescriptor &desc, ::AudioAda break; } if (strcpy_s(portName, port.portName.length() + STR_TERM_LEN, port.portName.c_str()) != EOK) { - DHLOGI("Strcpy_s port name failed."); + DHLOGD("Strcpy_s port name failed."); free(portName); continue; } @@ -103,7 +103,7 @@ static int32_t InitAudioAdapterDescriptor(AudioManagerContext *context, return ERR_DH_AUDIO_HDI_NULLPTR; } if (strcpy_s(adapterName, desc.adapterName.length() + STR_TERM_LEN, desc.adapterName.c_str()) != EOK) { - DHLOGI("Strcpy_s adapter name failed."); + DHLOGD("Strcpy_s adapter name failed."); free(adapterName); continue; } @@ -171,7 +171,7 @@ static int32_t LoadAdapterInternal(struct AudioManager *manager, const struct :: { std::lock_guard lock(context->mtx_); if (context->adapters_.find(adpName) != context->adapters_.end()) { - DHLOGI("Adapter already has been load."); + DHLOGD("Adapter already has been load."); *adapter = &(context->adapters_[adpName]->instance_); return DH_SUCCESS; } diff --git a/services/softbusadapter/src/softbus_adapter.cpp b/services/softbusadapter/src/softbus_adapter.cpp index 8e05acf614573abc3783055f911201f59c26ed59..3d15637008f0efe33072bcb358808915b0a12580 100644 --- a/services/softbusadapter/src/softbus_adapter.cpp +++ b/services/softbusadapter/src/softbus_adapter.cpp @@ -57,7 +57,7 @@ static void AudioOnQosEvent(int sessionId, int eventId, int tvCount, const QosTv SoftbusAdapter::SoftbusAdapter() { - DHLOGI("Softbus adapter constructed."); + DHLOGD("Softbus adapter constructed."); sessListener_.OnSessionOpened = AudioOnSoftbusSessionOpened; sessListener_.OnSessionClosed = AudioOnSoftbusSessionClosed; sessListener_.OnBytesReceived = AudioOnBytesReceived; @@ -68,7 +68,7 @@ SoftbusAdapter::SoftbusAdapter() SoftbusAdapter::~SoftbusAdapter() { - DHLOGI("Softbus adapter destructed."); + DHLOGD("Softbus adapter destructed."); } int32_t SoftbusAdapter::CreateSoftbusSessionServer(const std::string &pkgName, const std::string &sessionName, @@ -83,7 +83,7 @@ int32_t SoftbusAdapter::CreateSoftbusSessionServer(const std::string &pkgName, c return ret; } } else { - DHLOGI("Session is already created."); + DHLOGD("Session is already created."); return DH_SUCCESS; } @@ -226,7 +226,7 @@ int32_t SoftbusAdapter::OnSoftbusSessionOpened(int32_t sessionId, int32_t result std::lock_guard lisLock(listenerMtx_); if (mapListenersI_.empty()) { - DHLOGI("Start softbus send thread."); + DHLOGD("Start softbus send thread."); isSessionOpened_.store(true); sendDataThread_ = std::thread(&SoftbusAdapter::SendAudioData, this); if (pthread_setname_np(sendDataThread_.native_handle(), SENDDATA_THREAD) != DH_SUCCESS) { @@ -294,12 +294,12 @@ void SoftbusAdapter::OnStreamReceived(int32_t sessionId, const StreamData *data, void SoftbusAdapter::OnMessageReceived(int sessionId, const void *data, unsigned int dataLen) { - DHLOGI("On message received, sessionId: %d.", sessionId); + DHLOGD("On message received, sessionId: %d.", sessionId); } void SoftbusAdapter::OnQosEvent(int sessionId, int eventId, int tvCount, const QosTv *tvList) { - DHLOGI("On qos event received, sessionId: %d.", sessionId); + DHLOGD("On qos event received, sessionId: %d.", sessionId); } std::shared_ptr &SoftbusAdapter::GetSoftbusListenerByName(int32_t sessionId)