1 /* 2 * Copyright (c) 2021-2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef ST_AUDIO_SERVER_H 17 #define ST_AUDIO_SERVER_H 18 19 #include <mutex> 20 #include <condition_variable> 21 #include <pthread.h> 22 #include <unordered_map> 23 24 #include "accesstoken_kit.h" 25 #include "ipc_skeleton.h" 26 #include "iremote_stub.h" 27 #include "system_ability.h" 28 29 #include "audio_manager_base.h" 30 #include "audio_server_death_recipient.h" 31 #ifdef SUPPORT_OLD_ENGINE 32 #include "audio_server_dump.h" 33 #endif 34 #include "i_audio_server_hpae_dump.h" 35 #include "audio_system_manager.h" 36 #include "audio_inner_call.h" 37 #include "common/hdi_adapter_info.h" 38 #include "sink/i_audio_render_sink.h" 39 #include "source/i_audio_capture_source.h" 40 #include "audio_effect_server.h" 41 #include "audio_asr.h" 42 #include "policy_handler.h" 43 #include "audio_resource_service.h" 44 #include "audio_stream_monitor.h" 45 #include "standard_audio_service_stub.h" 46 47 namespace OHOS { 48 namespace AudioStandard { 49 class AudioServer; 50 class ProxyDeathRecipient : public IRemoteObject::DeathRecipient { 51 public: ProxyDeathRecipient(int32_t pid,AudioServer * audioServer)52 ProxyDeathRecipient(int32_t pid, AudioServer *audioServer) : pid_(pid), audioServer_(audioServer) {}; 53 virtual ~ProxyDeathRecipient() = default; 54 // overridde for DeathRecipient 55 void OnRemoteDied(const wptr<IRemoteObject> &remote) override; 56 private: 57 int32_t pid_ = 0; 58 AudioServer *audioServer_ = nullptr; 59 }; 60 61 class PipeInfoGuard { 62 public: 63 PipeInfoGuard(uint32_t sessionId); 64 ~PipeInfoGuard(); // Checks the flag and calls ReleaseClient if needed 65 void SetReleaseFlag(bool flag); 66 private: 67 bool releaseFlag_ = true; // Determines whether to release pipe info in policy 68 uint32_t sessionId_ = 0; 69 }; 70 71 class AudioServer : public SystemAbility, public StandardAudioServiceStub, 72 public IAudioSinkCallback, IAudioSourceCallback, 73 public IAudioServerInnerCall, public DataTransferStateChangeCallbackForMonitor { 74 DECLARE_SYSTEM_ABILITY(AudioServer); 75 public: 76 DISALLOW_COPY_AND_MOVE(AudioServer); 77 explicit AudioServer(int32_t systemAbilityId, bool runOnCreate = true); 78 virtual ~AudioServer() = default; 79 void OnDump() override; 80 void OnStart() override; 81 void OnStop() override; 82 83 int32_t Dump(int32_t fd, const std::vector<std::u16string> &args) override; 84 85 int32_t LoadAudioEffectLibraries(const std::vector<Library>& libraries, const std::vector<Effect>& effects, 86 std::vector<Effect>& successEffectList, bool& hasEffectsLoaded) override; 87 int32_t CreatePlaybackCapturerManager(bool& isSuccess) override; 88 int32_t CreateEffectChainManager(const std::vector<EffectChain> &effectChains, 89 const EffectChainManagerParam &effectParam, const EffectChainManagerParam &enhanceParam) override; 90 int32_t SetOutputDeviceSink(int32_t deviceType, const std::string &sinkName) override; 91 int32_t SetActiveOutputDevice(int32_t deviceType) override; 92 int32_t SetMicrophoneMute(bool isMute) override; 93 int32_t SetVoiceVolume(float volume) override; 94 int32_t OffloadSetVolume(float volume, const std::string &deviceClass, const std::string &networkId) override; 95 int32_t SetAudioScene(int32_t audioScene, int32_t a2dpOffloadFlag, bool scoExcludeFlag) override; 96 static void *paDaemonThread(void *arg); 97 int32_t SetExtraParameters(const std::string& key, 98 const std::vector<StringPair>& kvpairs) override; 99 int32_t SetAudioParameter(const std::string& key, const std::string& value) override; 100 int32_t SetAudioParameter(const std::string& networkId, int32_t key, const std::string& condition, 101 const std::string& value) override; 102 int32_t GetExtraParameters(const std::string &mainKey, const std::vector<std::string> &subKeys, 103 std::vector<StringPair> &result) override; 104 int32_t GetAudioParameter(const std::string &key, std::string& value) override; 105 int32_t GetAudioParameter(const std::string& networkId, int32_t key, 106 const std::string& condition, std::string& value) override; 107 int32_t GetTransactionId(int32_t deviceType, int32_t deviceRole, uint64_t& transactionId) override; 108 int32_t UpdateActiveDeviceRoute(int32_t type, int32_t flag, int32_t a2dpOffloadFlag) override; 109 int32_t UpdateActiveDevicesRoute(const std::vector<IntPair> &activeDevices, 110 int32_t a2dpOffloadFlag, const std::string &deviceName) override; 111 int32_t SetDmDeviceType(uint16_t dmDeviceType, int32_t deviceType) override; 112 int32_t UpdateDualToneState(bool enable, int32_t sessionId) override; 113 int32_t SetAudioMonoState(bool audioMono) override; 114 int32_t SetAudioBalanceValue(float audioBalance) override; 115 int32_t SuspendRenderSink(const std::string &sinkName) override; 116 int32_t RestoreRenderSink(const std::string &sinkName) override; 117 118 int32_t SetAsrAecMode(int32_t asrAecMode) override; 119 int32_t GetAsrAecMode(int32_t &asrAecMode) override; 120 int32_t SetAsrNoiseSuppressionMode(int32_t asrNoiseSuppressionMode) override; 121 int32_t GetAsrNoiseSuppressionMode(int32_t &asrNoiseSuppressionMode) override; 122 int32_t SetAsrWhisperDetectionMode(int32_t asrWhisperDetectionMode) override; 123 int32_t GetAsrWhisperDetectionMode(int32_t &asrWhisperDetectionMode) override; 124 int32_t SetAsrVoiceControlMode(int32_t asrVoiceControlMode, bool on) override; 125 int32_t SetAsrVoiceMuteMode(int32_t asrVoiceMuteMode, bool on) override; 126 int32_t IsWhispering(int32_t& whisperRes) override; 127 // for effect V3 128 int32_t SetAudioEffectProperty(const AudioEffectPropertyArrayV3 &propertyArray, 129 int32_t deviceType) override; 130 int32_t GetAudioEffectProperty(AudioEffectPropertyArrayV3 &propertyArray, 131 int32_t deviceType) override; 132 // for effect 133 int32_t SetAudioEffectProperty(const AudioEffectPropertyArray &propertyArray) override; 134 int32_t GetAudioEffectProperty(AudioEffectPropertyArray &propertyArray) override; 135 // for enhance 136 int32_t SetAudioEnhanceProperty(const AudioEnhancePropertyArray &propertyArray, 137 int32_t deviceType) override; 138 int32_t GetAudioEnhanceProperty(AudioEnhancePropertyArray &propertyArray, 139 int32_t deviceType) override; 140 141 int32_t NotifyDeviceInfo(const std::string &networkId, bool connected) override; 142 143 int32_t CheckRemoteDeviceState(const std::string& networkId, int32_t deviceRole, bool isStartDevice) override; 144 145 int32_t CreateAudioProcess(const AudioProcessConfig &config, int32_t &errorCode, 146 const AudioPlaybackCaptureConfig &filterConfig, sptr<IRemoteObject>& client) override; 147 148 // ISinkParameterCallback 149 void OnRenderSinkParamChange(const std::string &networkId, const AudioParamKey key, 150 const std::string &condition, const std::string &value) override; 151 152 // IAudioSourceCallback 153 void OnWakeupClose() override; 154 void OnCaptureSourceParamChange(const std::string &networkId, const AudioParamKey key, 155 const std::string &condition, const std::string &value) override; 156 157 int32_t SetParameterCallback(const sptr<IRemoteObject>& object) override; 158 159 int32_t RegiestPolicyProvider(const sptr<IRemoteObject> &object) override; 160 161 int32_t RegistCoreServiceProvider(const sptr<IRemoteObject> &object) override; 162 163 int32_t SetWakeupSourceCallback(const sptr<IRemoteObject>& object) override; 164 165 int32_t UpdateSpatializationState(const AudioSpatializationState& spatializationState) override; 166 167 int32_t UpdateSpatialDeviceType(int32_t spatialDeviceType) override; 168 169 int32_t NotifyStreamVolumeChanged(int32_t streamType, float volume) override; 170 171 int32_t SetSpatializationSceneType(int32_t spatializationSceneType) override; 172 173 int32_t ResetRouteForDisconnect(int32_t type) override; 174 175 int32_t GetEffectLatency(const std::string &sessionId, uint32_t& latency) override; 176 177 int32_t GetMaxAmplitude(bool isOutputDevice, const std::string& deviceClass, int32_t sourceType, 178 float& maxAmplitude) override; 179 180 int32_t GetVolumeDataCount(const std::string &sinkName, int64_t &volumeDataCount) override; 181 182 int32_t ResetAudioEndpoint() override; 183 184 int32_t UpdateLatencyTimestamp(const std::string ×tamp, bool isRenderer) override; 185 186 int32_t GetEffectOffloadEnabled(bool& isEffectOffloadEnabled) override; 187 188 void OnCapturerState(bool isActive, size_t preNum, size_t curNum); 189 190 // IAudioServerInnerCall 191 int32_t SetSinkRenderEmpty(const std::string &devceClass, int32_t durationUs) final; 192 193 int32_t SetSinkMuteForSwitchDevice(const std::string &devceClass, int32_t durationUs, bool mute) override; 194 195 int32_t LoadHdiEffectModel() override; 196 197 int32_t UpdateEffectBtOffloadSupported(bool isSupported) override; 198 199 int32_t RestoreSession(uint32_t sessionID, const RestoreInfoIpc& restoreInfoIpc) override; 200 201 int32_t SetRotationToEffect(uint32_t rotate) override; 202 203 int32_t UpdateSessionConnectionState(int32_t sessionID, int32_t state) override; 204 205 int32_t SetNonInterruptMute(uint32_t sessionId, bool muteFlag) override; 206 207 int32_t SetOffloadMode(uint32_t sessionId, int32_t state, bool isAppBack) override; 208 209 int32_t UnsetOffloadMode(uint32_t sessionId) override; 210 211 void OnRenderSinkStateChange(uint32_t sinkId, bool started) override; 212 213 int32_t CheckHibernateState(bool hibernate) override; 214 215 int32_t CreateIpcOfflineStream(int32_t &errorCode, sptr<IRemoteObject>& client) override; 216 217 int32_t GetOfflineAudioEffectChains(std::vector<std::string> &effectChains) override; 218 219 int32_t SetForegroundList(const std::vector<std::string>& list) override; 220 221 int32_t SetRenderWhitelist(const std::vector<std::string>& list) override; 222 223 int32_t GetStandbyStatus(uint32_t sessionId, bool &isStandby, int64_t &enterStandbyTime) override; 224 225 int32_t GenerateSessionId(uint32_t &sessionId) override; 226 227 int32_t NotifyAccountsChanged() override; 228 229 int32_t NotifySettingsDataReady() override; 230 231 int32_t GetAllSinkInputs(std::vector<SinkInput> &sinkInputs) override; 232 233 int32_t SetDefaultAdapterEnable(bool isEnable) override; 234 235 int32_t NotifyAudioPolicyReady() override; 236 237 int32_t SetInnerCapLimit(uint32_t innerCapLimit) override; 238 int32_t CheckCaptureLimit(const AudioPlaybackCaptureConfig &config, int32_t &innerCapId) override; 239 int32_t ReleaseCaptureLimit(int32_t innerCapId) override; 240 241 int32_t LoadHdiAdapter(uint32_t devMgrType, const std::string &adapterName) override; 242 int32_t UnloadHdiAdapter(uint32_t devMgrType, const std::string &adapterName, bool force) override; 243 int32_t CreateHdiSinkPort(const std::string &deviceClass, const std::string &idInfo, 244 const IAudioSinkAttr &attr, uint32_t& renderId) override; 245 int32_t CreateSinkPort(uint32_t idBase, uint32_t idType, const std::string &idInfo, 246 const IAudioSinkAttr &attr, uint32_t& renderId) override; 247 int32_t CreateHdiSourcePort(const std::string &deviceClass, const std::string &idInfo, 248 const IAudioSourceAttr &attr, uint32_t& captureId) override; 249 int32_t CreateSourcePort(uint32_t idBase, uint32_t idType, const std::string &idInfo, 250 const IAudioSourceAttr &attr, uint32_t& captureId) override; 251 int32_t DestroyHdiPort(uint32_t id) override; 252 int32_t SetDeviceConnectedFlag(bool flag) override; 253 int32_t IsAcousticEchoCancelerSupported(int32_t sourceType, bool& isSupported) override; 254 int32_t SetKaraokeParameters(const std::string ¶meters, bool &ret) override; 255 int32_t IsAudioLoopbackSupported(int32_t mode, bool &isSupported) override; 256 int32_t SetSessionMuteState(uint32_t sessionId, bool insert, bool muteFlag) override; 257 int32_t SetLatestMuteState(uint32_t sessionId, bool muteFlag) override; 258 int32_t ForceStopAudioStream(int32_t audioType) override; 259 260 void RemoveRendererDataTransferCallback(const int32_t &pid); 261 int32_t RegisterDataTransferCallback(const sptr<IRemoteObject> &object) override; 262 int32_t RegisterDataTransferMonitorParam(int32_t callbackId, 263 const DataTransferMonitorParam ¶m) override; 264 int32_t UnregisterDataTransferMonitorParam(int32_t callbackId) override; 265 void OnDataTransferStateChange(const int32_t &pid, const int32_t &callbackId, 266 const AudioRendererDataTransferStateChangeInfo &info) override; 267 void OnMuteStateChange(const int32_t &pid, const int32_t &callbackId, 268 const int32_t &uid, const uint32_t &sessionId, const bool &isMuted) override; 269 int32_t SetBtHdiInvalidState() override; 270 protected: 271 void OnAddSystemAbility(int32_t systemAbilityId, const std::string& deviceId) override; 272 273 private: 274 #ifdef HAS_FEATURE_INNERCAPTURER 275 bool HandleCheckCaptureLimit(AudioProcessConfig &resetConfig, 276 const AudioPlaybackCaptureConfig &filterConfig); 277 int32_t InnerCheckCaptureLimit(const AudioPlaybackCaptureConfig &config, int32_t &innerCapId); 278 #endif 279 int32_t GetAudioEnhancePropertyArray(AudioEffectPropertyArrayV3 &propertyArray, 280 const DeviceType& deviceType); 281 int32_t GetAudioEffectPropertyArray(AudioEffectPropertyArrayV3 &propertyArray); 282 int32_t SetAudioEffectChainProperty(const AudioEffectPropertyArrayV3 &propertyArray); 283 int32_t SetAudioEnhanceChainProperty(const AudioEffectPropertyArrayV3 &propertyArray, 284 const DeviceType& deviceType); 285 286 void SetA2dpAudioParameter(const std::string &renderValue); 287 bool VerifyClientPermission(const std::string &permissionName, 288 Security::AccessToken::AccessTokenID tokenId = Security::AccessToken::INVALID_TOKENID); 289 bool PermissionChecker(const AudioProcessConfig &config); 290 bool CheckPlaybackPermission(const AudioProcessConfig &config); 291 int32_t CheckInnerRecorderPermission(const AudioProcessConfig &config); 292 bool CheckRecorderPermission(const AudioProcessConfig &config); 293 bool HandleCheckRecorderBackgroundCapture(const AudioProcessConfig &config); 294 bool CheckVoiceCallRecorderPermission(Security::AccessToken::AccessTokenID tokenId); 295 296 void ResetRecordConfig(AudioProcessConfig &config); 297 AudioProcessConfig ResetProcessConfig(const AudioProcessConfig &config); 298 bool CheckStreamInfoFormat(const AudioProcessConfig &config); 299 bool CheckRendererFormat(const AudioProcessConfig &config); 300 bool CheckRecorderFormat(const AudioProcessConfig &config); 301 bool CheckConfigFormat(const AudioProcessConfig &config); 302 int32_t GetHapBuildApiVersion(int32_t callerUid); 303 304 void AudioServerDied(pid_t pid, pid_t uid); 305 void RegisterPolicyServerDeathRecipient(); 306 void RegisterAudioCapturerSourceCallback(); 307 void RegisterAudioRendererSinkCallback(); 308 void RegisterDataTransferStateChangeCallback(); 309 310 int32_t SetIORoutes(std::vector<std::pair<DeviceType, DeviceFlag>> &activeDevices, 311 BluetoothOffloadState a2dpOffloadFlag, const std::string &deviceName = ""); 312 int32_t SetIORoutes(DeviceType type, DeviceFlag flag, std::vector<DeviceType> deviceTypes, 313 BluetoothOffloadState a2dpOffloadFlag, const std::string &deviceName = ""); 314 const std::string GetDPParameter(const std::string &condition); 315 const std::string GetUsbParameter(const std::string &condition); 316 void WriteServiceStartupError(); 317 void ParseAudioParameter(); 318 bool CacheExtraParameters(const std::string &key, 319 const std::vector<std::pair<std::string, std::string>> &kvpairs); 320 bool IsNormalIpcStream(const AudioProcessConfig &config) const; 321 void RecognizeAudioEffectType(const std::string &mainkey, const std::string &subkey, 322 const std::string &extraSceneType); 323 int32_t SetSystemVolumeToEffect(const AudioStreamType streamType, float volume); 324 bool IsFastBlocked(int32_t uid, PlayerType playerType); 325 int32_t SetVolumeInfoForEnhanceChain(const AudioStreamType &streamType); 326 int32_t SetMicrophoneMuteForEnhanceChain(const bool &isMute); 327 void InitMaxRendererStreamCntPerUid(); 328 bool IsSatellite(const AudioProcessConfig &config, int32_t callingUid); 329 void SendCreateErrorInfo(const AudioProcessConfig &config, int32_t errorCode); 330 int32_t CheckMaxRendererInstances(); 331 int32_t CheckMaxLoopbackInstances(AudioMode audioMode); 332 bool SetPcmDumpParameter(const std::vector<std::pair<std::string, std::string>> ¶ms); 333 bool GetPcmDumpParameter(const std::vector<std::string> &subKeys, 334 std::vector<std::pair<std::string, std::string>> &result); 335 sptr<IRemoteObject> CreateAudioStream(const AudioProcessConfig &config, int32_t callingUid, 336 std::shared_ptr<PipeInfoGuard> &pipeInfoGuard); 337 int32_t SetAsrVoiceSuppressionControlMode(const AudioParamKey paramKey, AsrVoiceControlMode asrVoiceControlMode, 338 bool on, int32_t modifyVolume); 339 int32_t CheckAndWaitAudioPolicyReady(); 340 void NotifyProcessStatus(); 341 bool ProcessKeyValuePairs(const std::string &key, const std::vector<std::pair<std::string, std::string>> &kvpairs, 342 const std::unordered_map<std::string, std::set<std::string>> &subKeyMap, std::string &value); 343 bool SetEffectLiveParameter(const std::vector<std::pair<std::string, std::string>> ¶ms); 344 bool GetEffectLiveParameter(const std::vector<std::string> &subKeys, 345 std::vector<std::pair<std::string, std::string>> &result); 346 int32_t CreateAudioWorkgroup(int32_t pid, const sptr<IRemoteObject> &object, int32_t &workgroupId) override; 347 int32_t ReleaseAudioWorkgroup(int32_t pid, int32_t workgroupId) override; 348 int32_t AddThreadToGroup(int32_t pid, int32_t workgroupId, int32_t tokenId) override; 349 int32_t RemoveThreadFromGroup(int32_t pid, int32_t workgroupId, int32_t tokenId) override; 350 int32_t StartGroup(int32_t pid, int32_t workgroupId, uint64_t startTime, uint64_t deadlineTime) override; 351 int32_t StopGroup(int32_t pid, int32_t workgroupId) override; 352 353 const std::string GetAudioParameterInner(const std::string &key); 354 const std::string GetAudioParameterInner(const std::string& networkId, const AudioParamKey key, 355 const std::string& condition); 356 int32_t SetAudioSceneInner(AudioScene audioScene, BluetoothOffloadState a2dpOffloadFlag, bool scoExcludeFlag); 357 sptr<IRemoteObject> CreateAudioProcessInner(const AudioProcessConfig &config, int32_t &errorCode, 358 const AudioPlaybackCaptureConfig &filterConfig); 359 int32_t GetExtraParametersInner(const std::string &mainKey, 360 const std::vector<std::string> &subKeys, std::vector<std::pair<std::string, std::string>> &result); 361 int32_t ImproveAudioWorkgroupPrio(int32_t pid, const std::unordered_map<int32_t, bool> &threads) override; 362 int32_t RestoreAudioWorkgroupPrio(int32_t pid, const std::unordered_map<int32_t, int32_t> &threads) override; 363 private: 364 static constexpr int32_t MEDIA_SERVICE_UID = 1013; 365 static constexpr int32_t VASSISTANT_UID = 3001; 366 static constexpr int32_t MAX_VOLUME = 15; 367 static constexpr int32_t MIN_VOLUME = 0; 368 static constexpr int32_t ROOT_UID = 0; 369 static uint32_t paDaemonTid_; 370 static std::unordered_map<int, float> AudioStreamVolumeMap; 371 static std::map<std::string, std::string> audioParameters; 372 static std::unordered_map<std::string, std::unordered_map<std::string, std::set<std::string>>> audioParameterKeys; 373 374 pthread_t m_paDaemonThread; 375 AudioScene audioScene_ = AUDIO_SCENE_DEFAULT; 376 377 // Capturer status flags: each capturer is represented by a single bit. 378 // 0 indicates the capturer has stopped; 1 indicates the capturer has started. 379 std::atomic<uint64_t> capturerStateFlag_ = 0; 380 381 std::shared_ptr<AudioParameterCallback> audioParamCb_; 382 std::mutex onCapturerStateCbMutex_; 383 std::shared_ptr<WakeUpSourceCallback> wakeupCallback_; 384 std::mutex audioParamCbMtx_; 385 std::mutex setWakeupCloseCallbackMutex_; 386 std::mutex audioParameterMutex_; 387 std::mutex audioSceneMutex_; 388 std::unique_ptr<AudioEffectServer> audioEffectServer_; 389 390 std::atomic<bool> isAudioParameterParsed_ = false; 391 std::mutex audioParameterCacheMutex_; 392 std::vector<std::pair<std::string, 393 std::vector<std::pair<std::string, std::string>>>> audioExtraParameterCacheVector_; 394 395 bool isFastControlled_ = true; 396 int32_t maxRendererStreamCntPerUid_ = 0; 397 std::mutex streamLifeCycleMutex_ {}; 398 // Temporary resolution to avoid pcm driver problem 399 std::map<std::string, std::string> usbInfoMap_; 400 401 std::atomic<bool> isAudioPolicyReady_ = false; 402 std::mutex isAudioPolicyReadyMutex_; 403 std::condition_variable isAudioPolicyReadyCv_; 404 405 int32_t waitCreateStreamInServerCount_ = 0; 406 std::shared_ptr<IAudioServerHpaeDump> hpaeDumpObj_ = nullptr; 407 408 std::mutex audioDataTransferMutex_; 409 std::map<int32_t, std::shared_ptr<DataTransferStateChangeCallbackInner>> audioDataTransferCbMap_; 410 }; 411 412 class DataTransferStateChangeCallbackInnerImpl : public DataTransferStateChangeCallbackInner { 413 public: 414 DataTransferStateChangeCallbackInnerImpl() = default; 415 virtual ~DataTransferStateChangeCallbackInnerImpl() = default; 416 void OnDataTransferStateChange(const int32_t &callbackId, 417 const AudioRendererDataTransferStateChangeInfo &info) override; OnMuteStateChange(const int32_t & callbackId,const int32_t & uid,const uint32_t & sessionId,const bool & isMuted)418 void OnMuteStateChange(const int32_t &callbackId, const int32_t &uid, 419 const uint32_t &sessionId, const bool &isMuted) override {} 420 void SetDataTransferMonitorParam(const DataTransferMonitorParam ¶m); 421 private: 422 void ReportEvent(const AudioRendererDataTransferStateChangeInfo &info); 423 424 DataTransferMonitorParam param_; 425 }; 426 } // namespace AudioStandard 427 } // namespace OHOS 428 #endif // ST_AUDIO_SERVER_H 429