diff --git a/distributedaudio.gni b/distributedaudio.gni
index 9ce5fe6aa41415232518b3eabe86bd709aaedd11..ceb4f789895190974c1ab666753fe2193c888e10 100644
--- a/distributedaudio.gni
+++ b/distributedaudio.gni
@@ -32,9 +32,8 @@ audio_processor_path = "${services_path}/audioprocessor"
audio_transport_path = "${services_path}/audiotransport"
softbusadapter_path = "${services_path}/softbusadapter"
interfaces_path = "${distributedaudio_path}/interfaces"
-hdf_interfaces_path =
- "${distributedaudio_path}/hdf_interfaces/distributed_audio"
-hdf_service_path = "${distributedaudio_path}/hdf_service/distributed_audio"
+hdf_interfaces_path = "//drivers/interface/distributed_audio"
+hdf_service_path = "//drivers/peripheral/distributed_audio"
hdf_ser_aud_path = "${hdf_service_path}/hdi_service/audio/v1_0"
hdf_ser_aud_ext_path = "${hdf_service_path}/hdi_service/audio_ext/v1_0"
diff --git a/hdf_interfaces/distributed_audio/audio/v1_0/AudioTypes.idl b/hdf_interfaces/distributed_audio/audio/v1_0/AudioTypes.idl
deleted file mode 100644
index 38cb481b6baae59cb90084a6a053d28251cea6ce..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audio/v1_0/AudioTypes.idl
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ohos.hdi.distributed_audio.audio.v1_0;
-
-enum AudioPortDirection {
- PORT_OUT = 1, /**< Output port */
- PORT_IN = 2, /**< Input port */
- PORT_OUT_IN = 3, /**< Input/output port, supporting both audio input and output */
-};
-enum AudioPortPin {
- PIN_NONE = 0, /**< Invalid pin */
- PIN_OUT_SPEAKER = 1 << 0, /**< Speaker output pin */
- PIN_OUT_HEADSET = 1 << 1, /**< Wired headset pin for output */
- PIN_OUT_LINEOUT = 1 << 2, /**< Line-out pin */
- PIN_OUT_HDMI = 1 << 3, /**< HDMI output pin */
- PIN_OUT_USB = 1 << 4, /**< USB output pin */
- PIN_OUT_USB_EXT = 1 << 5, /**< Extended USB output pin*/
- PIN_OUT_EARPIECE = 1 << 5 | 1 << 4, /**< Earpiece output pin */
- PIN_OUT_BLUETOOTH_SCO = 1 << 6, /**< Bluetooth SCO output pin */
- PIN_OUT_DAUDIO_DEFAULT = 1 << 7,
- PIN_IN_MIC = 1 << 27 | 1 << 0, /**< Microphone input pin */
- PIN_IN_HS_MIC = 1 << 27 | 1 << 1, /**< Wired headset microphone pin for input */
- PIN_IN_LINEIN = 1 << 27 | 1 << 2, /**< Line-in pin */
- PIN_IN_USB_EXT = 1 << 27 | 1 << 3, /**< Extended USB input pin*/
- PIN_IN_BLUETOOTH_SCO_HEADSET = 1 << 27 | 1 << 4, /**< Bluetooth SCO headset input pin */
- PIN_IN_DAUDIO_DEFAULT = 1 << 27 | 1 << 5,
-};
-enum AudioCategory {
- AUDIO_IN_MEDIA = 0,
- AUDIO_IN_COMMUNICATION = 1,
- AUDIO_IN_RINGTONE = 2,
- AUDIO_IN_CALL = 3,
- AUDIO_MMAP_NOIRQ = 4,
-};
-enum AudioFormat {
- AUDIO_FORMAT_TYPE_PCM_8_BIT = 1 << 0, /**< 8-bit PCM */
- AUDIO_FORMAT_TYPE_PCM_16_BIT = 1 << 1, /**< 16-bit PCM */
- AUDIO_FORMAT_TYPE_PCM_24_BIT = 1 << 1 | 1 << 0, /**< 24-bit PCM */
- AUDIO_FORMAT_TYPE_PCM_32_BIT = 1 << 2, /**< 32-bit PCM */
- AUDIO_FORMAT_TYPE_AAC_MAIN = 1 << 24 | 1 << 0, /**< AAC main */
- AUDIO_FORMAT_TYPE_AAC_LC = 1 << 24 | 1 << 1, /**< AAC LC */
- AUDIO_FORMAT_TYPE_AAC_LD = 1 << 24 | 1 << 1 | 1 << 0, /**< AAC LD */
- AUDIO_FORMAT_TYPE_AAC_ELD = 1 << 24 | 1 << 2, /**< AAC ELD */
- AUDIO_FORMAT_TYPE_AAC_HE_V1 = 1 << 24 | 1 << 2 | 1 << 0, /**< AAC HE_V1 */
- AUDIO_FORMAT_TYPE_AAC_HE_V2 = 1 << 24 | 1 << 2 | 1 << 1, /**< AAC HE_V2 */
- AUDIO_FORMAT_TYPE_G711A = 1 << 25 | 1 << 0, /**< G711A */
- AUDIO_FORMAT_TYPE_G711U = 1 << 25 | 1 << 1, /**< G711u */
- AUDIO_FORMAT_TYPE_G726 = 1 << 25 | 1 << 1 | 1 << 0, /**< G726 */
-};
-enum AudioChannelMask {
- AUDIO_CHANNEL_FRONT_LEFT = 1, /**< Front left channel */
- AUDIO_CHANNEL_FRONT_RIGHT = 2, /**< Front right channel */
- AUDIO_CHANNEL_MONO = 1, /**< Mono channel */
- AUDIO_CHANNEL_STEREO = 3, /**< Stereo channel, consisting of front left and front right channels */
-};
-enum AudioSampleRatesMask {
- AUDIO_SAMPLE_RATE_MASK_8000 = 1 << 0, /**< 8 kHz */
- AUDIO_SAMPLE_RATE_MASK_12000 = 1 << 1, /**< 12 kHz */
- AUDIO_SAMPLE_RATE_MASK_11025 = 1 << 2, /**< 11.025 kHz */
- AUDIO_SAMPLE_RATE_MASK_16000 = 1 << 3, /**< 16 kHz */
- AUDIO_SAMPLE_RATE_MASK_22050 = 1 << 4, /**< 22.050 kHz */
- AUDIO_SAMPLE_RATE_MASK_24000 = 1 << 5, /**< 24 kHz */
- AUDIO_SAMPLE_RATE_MASK_32000 = 1 << 6, /**< 32 kHz */
- AUDIO_SAMPLE_RATE_MASK_44100 = 1 << 7, /**< 44.1 kHz */
- AUDIO_SAMPLE_RATE_MASK_48000 = 1 << 8, /**< 48 kHz */
- AUDIO_SAMPLE_RATE_MASK_64000 = 1 << 9, /**< 64 kHz */
- AUDIO_SAMPLE_RATE_MASK_96000 = 1 << 10, /**< 96 kHz */
- AUDIO_SAMPLE_RATE_MASK_INVALID = 4294967295, /**< Invalid sampling rate */
-};
-enum AudioPortPassthroughMode {
- PORT_PASSTHROUGH_LPCM = 1,
- PORT_PASSTHROUGH_RAW = 2,
- PORT_PASSTHROUGH_HBR2LBR = 4,
- PORT_PASSTHROUGH_AUTO = 8,
-};
-enum AudioSampleFormat {
- AUDIO_SAMPLE_FORMAT_S8 = 0,
- AUDIO_SAMPLE_FORMAT_S8P = 1,
- AUDIO_SAMPLE_FORMAT_U8 = 2,
- AUDIO_SAMPLE_FORMAT_U8P = 3,
- AUDIO_SAMPLE_FORMAT_S16 = 4,
- AUDIO_SAMPLE_FORMAT_S16P = 5,
- AUDIO_SAMPLE_FORMAT_U16 = 6,
- AUDIO_SAMPLE_FORMAT_U16P = 7,
- AUDIO_SAMPLE_FORMAT_S24 = 8,
- AUDIO_SAMPLE_FORMAT_S24P = 9,
- AUDIO_SAMPLE_FORMAT_U24 = 10,
- AUDIO_SAMPLE_FORMAT_U24P = 11,
- AUDIO_SAMPLE_FORMAT_S32 = 12,
- AUDIO_SAMPLE_FORMAT_S32P = 13,
- AUDIO_SAMPLE_FORMAT_U32 = 14,
- AUDIO_SAMPLE_FORMAT_U32P = 15,
- AUDIO_SAMPLE_FORMAT_S64 = 16,
- AUDIO_SAMPLE_FORMAT_S64P = 17,
- AUDIO_SAMPLE_FORMAT_U64 = 18,
- AUDIO_SAMPLE_FORMAT_U64P = 19,
- AUDIO_SAMPLE_FORMAT_F32 = 20,
- AUDIO_SAMPLE_FORMAT_F32P = 21,
- AUDIO_SAMPLE_FORMAT_F64 = 22,
- AUDIO_SAMPLE_FORMAT_F64P = 23,
-};
-enum AudioChannelMode {
- AUDIO_CHANNEL_NORMAL = 0,
- AUDIO_CHANNEL_BOTH_LEFT = 1,
- AUDIO_CHANNEL_BOTH_RIGHT = 2,
- AUDIO_CHANNEL_EXCHANGE = 3,
- AUDIO_CHANNEL_MIX = 4,
- AUDIO_CHANNEL_LEFT_MUTE = 5,
- AUDIO_CHANNEL_RIGHT_MUTE = 6,
- AUDIO_CHANNEL_BOTH_MUTE = 7,
-};
-enum AudioDrainNotifyType {
- AUDIO_DRAIN_NORMAL_MODE = 0,
- AUDIO_DRAIN_EARLY_MODE = 1,
-};
-enum AudioCallbackType {
- AUDIO_NONBLOCK_WRITE_COMPELETED = 0,
- AUDIO_DRAIN_COMPELETED = 1,
- AUDIO_FLUSH_COMPLETED = 2,
- AUDIO_RENDER_FULL = 3,
- AUDIO_ERROR_OCCUR = 4,
-};
-enum AudioPortRole {
- AUDIO_PORT_UNASSIGNED_ROLE = 0,
- AUDIO_PORT_SOURCE_ROLE = 1,
- AUDIO_PORT_SINK_ROLE = 2,
-};
-enum AudioPortType {
- AUDIO_PORT_UNASSIGNED_TYPE = 0,
- AUDIO_PORT_DEVICE_TYPE = 1,
- AUDIO_PORT_MIX_TYPE = 2,
- AUDIO_PORT_SESSION_TYPE = 3,
-};
-enum AudioSessionType {
- AUDIO_OUTPUT_STAGE_SESSION = 0,
- AUDIO_OUTPUT_MIX_SESSION = 1,
- AUDIO_ALLOCATE_SESSION = 2,
- AUDIO_INVALID_SESSION = 3,
-};
-enum AudioDeviceType {
- AUDIO_LINEOUT = 1 << 0,
- AUDIO_HEADPHONE = 1 << 1,
- AUDIO_HEADSET = 1 << 2,
- AUDIO_USB_HEADSET = 1 << 3,
- AUDIO_USB_HEADPHONE = 1 << 4,
- AUDIO_USBA_HEADSET = 1 << 5,
- AUDIO_USBA_HEADPHONE = 1 << 6,
- AUDIO_PRIMARY_DEVICE = 1 << 7,
- AUDIO_USB_DEVICE = 1 << 8,
- AUDIO_A2DP_DEVICE = 1 << 9,
- AUDIO_DEVICE_UNKNOWN,
-};
-enum AudioEventType {
- AUDIO_DEVICE_ADD = 1,
- AUDIO_DEVICE_REMOVE = 2,
- AUDIO_LOAD_SUCCESS = 3,
- AUDIO_LOAD_FAILURE = 4,
- AUDIO_UNLOAD = 5,
- AUDIO_SERVICE_VALID = 7,
- AUDIO_SERVICE_INVALID = 8,
- AUDIO_CAPTURE_THRESHOLD = 9,
- AUDIO_EVENT_UNKNOWN = 10,
-};
-enum AudioExtParamKey {
- AUDIO_EXT_PARAM_KEY_NONE = 0, /**< Distributed audio extra param key none */
- AUDIO_EXT_PARAM_KEY_VOLUME = 1, /**< Distributed audio extra param key volume event */
- AUDIO_EXT_PARAM_KEY_FOCUS = 2, /**< Distributed audio extra param key focus event */
- AUDIO_EXT_PARAM_KEY_BUTTON = 3, /**< Distributed audio extra param key media button event */
- AUDIO_EXT_PARAM_KEY_EFFECT = 4, /**< Distributed audio extra param key audio effect event */
- AUDIO_EXT_PARAM_KEY_STATUS = 5, /**< Distributed audio extra param key device status event */
- AUDIO_EXT_PARAM_KEY_LOWPOWER = 1000, /**< Low power event type */
-};
-struct AudioDeviceStatus {
- unsigned int pnpStatus;
-};
-union SceneDesc {
- unsigned int id;
-};
-struct AudioPort {
- enum AudioPortDirection dir;
- unsigned int portId;
- String portName;
-};
-struct AudioAdapterDescriptor {
- String adapterName;
- struct AudioPort[] ports;
-};
-struct AudioDeviceDescriptor {
- unsigned int portId;
- enum AudioPortPin pins;
- String desc;
-};
-struct AudioSceneDescriptor {
- union SceneDesc scene;
- struct AudioDeviceDescriptor desc;
-};
-struct AudioSampleAttributes {
- enum AudioCategory type;
- boolean interleaved;
- enum AudioFormat format;
- unsigned int sampleRate;
- unsigned int channelCount;
- unsigned int period;
- unsigned int frameSize;
- boolean isBigEndian;
- boolean isSignedData;
- unsigned int startThreshold;
- unsigned int stopThreshold;
- unsigned int silenceThreshold;
- int streamId;
-};
-struct AudioTimeStamp {
- long tvSec;
- long tvNSec;
-};
-struct AudioSubPortCapability {
- unsigned int portId;
- String desc;
- enum AudioPortPassthroughMode mask;
-};
-struct AudioPortCapability {
- unsigned int deviceType;
- unsigned int deviceId;
- boolean hardwareMode;
- unsigned int formatNum;
- enum AudioFormat[] formats;
- unsigned int sampleRateMasks;
- enum AudioChannelMask channelMasks;
- unsigned int channelCount;
- struct AudioSubPortCapability[] subPorts;
- enum AudioSampleFormat[] supportSampleFormats;
-};
-struct AudioMmapBufferDescriptor {
- byte[] memoryAddress;
- FileDescriptor memoryFd;
- int totalBufferFrames;
- int transferFrameSize;
- int isShareable;
- unsigned int offset;
- String filePath;
-};
-struct AudioDevExtInfo {
- int moduleId;
- enum AudioPortPin type;
- String desc;
-};
-struct AudioMixExtInfo {
- int moduleId;
- int streamId;
-};
-struct AudioSessionExtInfo {
- enum AudioSessionType sessionType;
-};
-struct AudioInfo {
- struct AudioDevExtInfo device;
- struct AudioMixExtInfo mix;
- struct AudioSessionExtInfo session;
-};
-struct AudioRouteNode {
- int portId;
- enum AudioPortRole role;
- enum AudioPortType type;
- struct AudioInfo ext;
-};
-struct AudioRoute {
- struct AudioRouteNode[] sources;
- struct AudioRouteNode[] sinks;
-};
-struct AudioEvent {
- unsigned int eventType; /**< @link enum AudioEventType */
- unsigned int deviceType; /**< @link enum AudioDeviceType */
-};
diff --git a/hdf_interfaces/distributed_audio/audio/v1_0/BUILD.gn b/hdf_interfaces/distributed_audio/audio/v1_0/BUILD.gn
deleted file mode 100644
index 333eb2161c47519c655cc4698aeb70904a4ba81b..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audio/v1_0/BUILD.gn
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (c) 2022 Huawei Device Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import("//drivers/hdf_core/adapter/uhdf2/hdi.gni")
-hdi("daudio") {
- module_name = "daudio"
- sources = [
- "AudioTypes.idl",
- "IAudioAdapter.idl",
- "IAudioCallback.idl",
- "IAudioCapture.idl",
- "IAudioManager.idl",
- "IAudioRender.idl",
- ]
- language = "cpp"
- root = "ohos.hdi://foundation/distributedhardware/distributed_audio/hdf_interfaces/"
- subsystem_name = "hdf"
- part_name = "drivers_interface_distributed_audio"
-}
diff --git a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioAdapter.idl b/hdf_interfaces/distributed_audio/audio/v1_0/IAudioAdapter.idl
deleted file mode 100644
index 39f5ff59c1e0cc76a76aa1da8596006f282eb880..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioAdapter.idl
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ohos.hdi.distributed_audio.audio.v1_0;
-
-import ohos.hdi.distributed_audio.audio.v1_0.AudioTypes;
-import ohos.hdi.distributed_audio.audio.v1_0.IAudioCapture;
-import ohos.hdi.distributed_audio.audio.v1_0.IAudioRender;
-import ohos.hdi.distributed_audio.audio.v1_0.IAudioCallback;
-
-interface IAudioAdapter {
- InitAllPorts();
- CreateRender([in] struct AudioDeviceDescriptor desc, [in] struct AudioSampleAttributes attrs, [out] IAudioRender render);
- DestroyRender([in] struct AudioDeviceDescriptor desc);
- CreateCapture([in] struct AudioDeviceDescriptor desc, [in] struct AudioSampleAttributes attrs, [out] IAudioCapture capture);
- DestroyCapture([in] struct AudioDeviceDescriptor desc);
- GetPortCapability([in] struct AudioPort port, [out] struct AudioPortCapability capability);
- SetPassthroughMode([in] struct AudioPort port, [in] enum AudioPortPassthroughMode mode);
- GetPassthroughMode([in] struct AudioPort port, [out] enum AudioPortPassthroughMode mode);
- GetDeviceStatus([out] struct AudioDeviceStatus status);
- UpdateAudioRoute([in] struct AudioRoute route, [out] int routeHandle);
- ReleaseAudioRoute([in] int routeHandle);
- SetMicMute([in] boolean mute);
- GetMicMute([out] boolean mute);
- SetVoiceVolume([in] float volume);
- SetExtraParams([in] enum AudioExtParamKey key, [in] String condition, [in] String value);
- GetExtraParams([in] enum AudioExtParamKey key, [in] String condition, [out] String value);
- RegExtraParamObserver([in] IAudioCallback audioCallback, [in] byte cookie);
-}
diff --git a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioCallback.idl b/hdf_interfaces/distributed_audio/audio/v1_0/IAudioCallback.idl
deleted file mode 100644
index f73ff31b06421ee75bd55528ce8bcf8a4be5726d..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioCallback.idl
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @addtogroup HdiAudio
- * @{
- *
- * @brief Provides unified APIs for audio services to access audio drivers.
- *
- * An audio service can obtain an audio driver object or agent and then call APIs provided by this object or agent to
- * access different types of audio devices based on the audio IDs, thereby obtaining audio information,
- * subscribing to or unsubscribing from audio data, enabling or disabling an audio,
- * setting the audio data reporting mode, and setting audio options such as the accuracy and measurement range.
- *
- * @version 1.0
- */
-
-package ohos.hdi.distributed_audio.audio.v1_0;
-
-import ohos.hdi.distributed_audio.audio.v1_0.AudioTypes;
-
-/**
- * @brief Called when an event defined in {@link AudioCallbackType} occurs.
- *
- * @param AudioCallbackType Indicates the occurred event that triggers this callback.
- * @param reserved Indicates the pointer to a reserved field.
- * @param cookie Indicates the pointer to the cookie for data transmission.
- * @return Returns 0 if the callback is successfully executed; returns a negative value otherwise.
- * @see RegCallback
- */
-[callback] interface IAudioCallback {
- RenderCallback([in] enum AudioCallbackType type, [out] byte reserved, [out] byte cookie);
- ParamCallback([in] enum AudioExtParamKey key, [in] String condition, [in] String value, [out] byte reserved, [out] byte cookie);
-}
diff --git a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioCapture.idl b/hdf_interfaces/distributed_audio/audio/v1_0/IAudioCapture.idl
deleted file mode 100644
index c93ae0115a449c2c19b632379a1cfacc5455b33b..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioCapture.idl
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ohos.hdi.distributed_audio.audio.v1_0;
-
-import ohos.hdi.distributed_audio.audio.v1_0.AudioTypes;
-
-interface IAudioCapture {
- CaptureFrame([out] byte[] frame, [in] unsigned long requestBytes);
- GetCapturePosition([out] unsigned long frames, [out] struct AudioTimeStamp time);
- CheckSceneCapability([in] struct AudioSceneDescriptor scene, [out] boolean supported);
- SelectScene([in] struct AudioSceneDescriptor scene);
- SetMute([in] boolean mute);
- GetMute([out] boolean mute);
- SetVolume([in] float volume);
- GetVolume([out] float volume);
- GetGainThreshold([out] float min, [out] float max);
- GetGain([out] float gain);
- SetGain([in] float gain);
- GetFrameSize([out] unsigned long size);
- GetFrameCount([out] unsigned long count);
- SetSampleAttributes([in] struct AudioSampleAttributes attrs);
- GetSampleAttributes([out] struct AudioSampleAttributes attrs);
- GetCurrentChannelId([out] unsigned int channelId);
- SetExtraParams([in] String keyValueList);
- GetExtraParams([out] String keyValueList);
- ReqMmapBuffer([in] int reqSize, [out] struct AudioMmapBufferDescriptor desc);
- GetMmapPosition([out] unsigned long frames, [out] struct AudioTimeStamp time);
- AddAudioEffect([in] unsigned long effectid);
- RemoveAudioEffect([in] unsigned long effectid);
- GetFrameBufferSize([out] unsigned long bufferSize);
- Start();
- Stop();
- Pause();
- Resume();
- Flush();
- TurnStandbyMode();
- AudioDevDump([in] int range, [in] int fd);
- IsSupportsPauseAndResume([out] boolean supportPause, [out] boolean supportResume);
-}
\ No newline at end of file
diff --git a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioManager.idl b/hdf_interfaces/distributed_audio/audio/v1_0/IAudioManager.idl
deleted file mode 100644
index beef5cafae6a062b16dc6f77e7bb602f8393f531..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioManager.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ohos.hdi.distributed_audio.audio.v1_0;
-
-import ohos.hdi.distributed_audio.audio.v1_0.AudioTypes;
-import ohos.hdi.distributed_audio.audio.v1_0.IAudioAdapter;
-
-interface IAudioManager {
- GetAllAdapters([out] struct AudioAdapterDescriptor[] descs);
- LoadAdapter([in] struct AudioAdapterDescriptor desc, [out] IAudioAdapter adapter);
- UnloadAdapter([in] String adapterName);
- ReleaseAudioManagerObject();
-}
diff --git a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioRender.idl b/hdf_interfaces/distributed_audio/audio/v1_0/IAudioRender.idl
deleted file mode 100644
index 4e24e431d9284cfc0c2b9b3495441ece618db2fc..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audio/v1_0/IAudioRender.idl
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ohos.hdi.distributed_audio.audio.v1_0;
-
-import ohos.hdi.distributed_audio.audio.v1_0.AudioTypes;
-import ohos.hdi.distributed_audio.audio.v1_0.IAudioCallback;
-
-interface IAudioRender {
- GetLatency([out] unsigned int ms);
- RenderFrame([in] byte[] frame, [out] unsigned long replyBytes);
- GetRenderPosition([out] unsigned long frames, [out] struct AudioTimeStamp time);
- SetRenderSpeed([in] float speed);
- GetRenderSpeed([out] float speed);
- SetChannelMode([in] enum AudioChannelMode mode);
- GetChannelMode([out] enum AudioChannelMode mode);
- RegCallback([in] IAudioCallback audioCallback, [in] byte cookie);
- DrainBuffer([out] enum AudioDrainNotifyType type);
- IsSupportsDrain([out] boolean support);
- CheckSceneCapability([in] struct AudioSceneDescriptor scene, [out] boolean supported);
- SelectScene([in] struct AudioSceneDescriptor scene);
- SetMute([in] boolean mute);
- GetMute([out] boolean mute);
- SetVolume([in] float volume);
- GetVolume([out] float volume);
- GetGainThreshold([out] float min, [out] float max);
- GetGain([out] float gain);
- SetGain([in] float gain);
- GetFrameSize([out] unsigned long size);
- GetFrameCount([out] unsigned long count);
- SetSampleAttributes([in] struct AudioSampleAttributes attrs);
- GetSampleAttributes([out] struct AudioSampleAttributes attrs);
- GetCurrentChannelId([out] unsigned int channelId);
- SetExtraParams([in] String keyValueList);
- GetExtraParams([out] String keyValueList);
- ReqMmapBuffer([in] int reqSize, [out] struct AudioMmapBufferDescriptor desc);
- GetMmapPosition([out] unsigned long frames, [out] struct AudioTimeStamp time);
- AddAudioEffect([in] unsigned long effectid);
- RemoveAudioEffect([in] unsigned long effectid);
- GetFrameBufferSize([out] unsigned long bufferSize);
- Start();
- Stop();
- Pause();
- Resume();
- Flush();
- TurnStandbyMode();
- AudioDevDump([in] int range, [in] int fd);
- IsSupportsPauseAndResume([out] boolean supportPause, [out] boolean supportResume);
-}
\ No newline at end of file
diff --git a/hdf_interfaces/distributed_audio/audioext/v1_0/BUILD.gn b/hdf_interfaces/distributed_audio/audioext/v1_0/BUILD.gn
deleted file mode 100644
index 22a30fba844e41d93103da71e304a69cd99b38c4..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audioext/v1_0/BUILD.gn
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2022 Huawei Device Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import("//drivers/hdf_core/adapter/uhdf2/hdi.gni")
-hdi("daudioext") {
- module_name = "daudioext"
- sources = [
- "IDAudioCallback.idl",
- "IDAudioManager.idl",
- "Types.idl",
- ]
- language = "cpp"
- root = "ohos.hdi://foundation/distributedhardware/distributed_audio/hdf_interfaces/"
- subsystem_name = "hdf"
- part_name = "drivers_interface_distributed_audio"
-}
diff --git a/hdf_interfaces/distributed_audio/audioext/v1_0/IDAudioCallback.idl b/hdf_interfaces/distributed_audio/audioext/v1_0/IDAudioCallback.idl
deleted file mode 100644
index b4f787c74dc56948a30b3986be291b3317fcfe76..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audioext/v1_0/IDAudioCallback.idl
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ohos.hdi.distributed_audio.audioext.v1_0;
-
-import ohos.hdi.distributed_audio.audioext.v1_0.Types;
-
-[callback] interface IDAudioCallback {
- OpenDevice([in] String adpName, [in] int devId);
- CloseDevice([in] String adpName, [in] int devId);
- SetParameters([in] String adpName, [in] int devId, [in] struct AudioParameter param);
- NotifyEvent([in] String adpName, [in] int devId, [in] struct DAudioEvent event);
- WriteStreamData([in] String adpName, [in] int devId, [in] struct AudioData data);
- ReadStreamData([in] String adpName, [in] int devId, [out] struct AudioData data);
- ReadMmapPosition([in] String adpName, [in] int devId, [out] unsigned long frames, [out] struct CurrentTime time);
- RefreshAshmemInfo([in] String adpName, [in] int devId, [in] FileDescriptor fd, [in] int ashmemLength, [in] int lengthPerTrans);
-}
\ No newline at end of file
diff --git a/hdf_interfaces/distributed_audio/audioext/v1_0/IDAudioManager.idl b/hdf_interfaces/distributed_audio/audioext/v1_0/IDAudioManager.idl
deleted file mode 100644
index 9ea0f8bacd6c1b37b7bb6c80eabcbf43eebfdd42..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audioext/v1_0/IDAudioManager.idl
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ohos.hdi.distributed_audio.audioext.v1_0;
-
-import ohos.hdi.distributed_audio.audioext.v1_0.IDAudioCallback;
-import ohos.hdi.distributed_audio.audioext.v1_0.Types;
-
-interface IDAudioManager {
- RegisterAudioDevice([in] String adpName, [in] int devId, [in] String capability, [in] IDAudioCallback callbackObj);
- UnRegisterAudioDevice([in] String adpName, [in] int devId);
- NotifyEvent([in] String adpName, [in] int devId, [in] struct DAudioEvent event);
-}
\ No newline at end of file
diff --git a/hdf_interfaces/distributed_audio/audioext/v1_0/Types.idl b/hdf_interfaces/distributed_audio/audioext/v1_0/Types.idl
deleted file mode 100644
index 35b5c1fb6b8f382d42205c50922046c8b7f77681..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/audioext/v1_0/Types.idl
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2022 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ohos.hdi.distributed_audio.audioext.v1_0;
-enum PortOperationMode {
- NORMAL_MODE = 0,
- MMAP_MODE = 1,
-};
-struct AudioParameter {
- unsigned int format;
- unsigned int channelCount;
- unsigned int sampleRate;
- unsigned int period;
- unsigned int frameSize;
- unsigned int streamUsage;
- enum PortOperationMode renderFlags;
- enum PortOperationMode capturerFlags;
- String ext;
-};
-struct AudioData {
- struct AudioParameter param;
- byte[] data;
-};
-struct DAudioEvent {
- int type;
- String content;
-};
-struct CurrentTime {
- long tvSec;
- long tvNSec;
-};
\ No newline at end of file
diff --git a/hdf_interfaces/distributed_audio/bundle.json b/hdf_interfaces/distributed_audio/bundle.json
deleted file mode 100644
index a339e95ed5cde8f60b3229a1c038611708b26026..0000000000000000000000000000000000000000
--- a/hdf_interfaces/distributed_audio/bundle.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "name": "@ohos/drivers_interface_distributed_audio",
- "description": "distributed audio device driver interface",
- "version": "4.0",
- "license": "Apache License 2.0",
- "segment":{
- "destPath":"foundation/distributedhardware/distributed_audio/hdf_interfaces/"
- },
- "component": {
- "name": "drivers_interface_distributed_audio",
- "subsystem": "distributedhardware",
- "adapted_system_type":[
- "standard"
- ],
- "rom": "675KB",
- "ram": "1024KB",
- "deps": {
- "components": [
- "ipc",
- "hdf_core",
- "hiviewdfx_hilog_native",
- "c_utils"
- ],
- "third_party": []
- },
- "build": {
- "sub_component": [
- "//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0:daudio_idl_target",
- "//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0:daudioext_idl_target"
- ],
- "test": [
-
- ],
- "inner_kits": [
- {
- "name":"//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0:libdaudio_proxy_1.0",
- "header": {
- "header_files": [
-
- ],
- "header_base": "//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audio"
- }
- },
- {
- "name":"//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0:libdaudioext_proxy_1.0",
- "header": {
- "header_files": [
-
- ],
- "header_base": "//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audioext"
- }
- }
- ]
- }
- }
-}
\ No newline at end of file
diff --git a/hdf_service/distributed_audio/BUILD.gn b/hdf_service/distributed_audio/BUILD.gn
deleted file mode 100644
index 3e332e5e6576eec60d69ee50bc3d3a63192b624e..0000000000000000000000000000000000000000
--- a/hdf_service/distributed_audio/BUILD.gn
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (c) 2022 Huawei Device Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-if (defined(ohos_lite)) {
- group("distributed_audio_entry") {
- deps = []
- }
-} else {
- group("distributed_audio_entry") {
- deps = [
- "./../../hdf_interfaces/distributed_audio/audio/v1_0:daudio_idl_target",
- "./../../hdf_interfaces/distributed_audio/audioext/v1_0:daudioext_idl_target",
- "./hdi_service/audio/v1_0:hdf_daudio_primary_service",
- "./hdi_service/audio_ext/v1_0:hdf_daudio_ext_service",
- ]
- }
-}
diff --git a/hdf_service/distributed_audio/bundle.json b/hdf_service/distributed_audio/bundle.json
deleted file mode 100644
index 37f64fc0e8dc973e2f275cfe6fa4acbe58d18229..0000000000000000000000000000000000000000
--- a/hdf_service/distributed_audio/bundle.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "@ohos/drivers_peripheral_distributed_audio",
- "description": "distributed audo device driver",
- "version": "4.0",
- "license": "Apache License 2.0",
- "segment":{
- "destPath":"foundation/distributedhardware/distributed_audio/hdf_service/"
- },
- "component": {
- "name": "drivers_peripheral_distributed_audio",
- "subsystem": "distributedhardware",
- "adapted_system_type":[
- "standard"
- ],
- "rom": "1000KB",
- "ram": "8000KB",
- "deps": {
- "components": [
- "ipc",
- "hdf_core",
- "hiviewdfx_hilog_native",
- "c_utils"
- ],
- "third_party": [
- "bounds_checking_function"
- ]
- },
- "build": {
- "sub_component": [
- "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio:distributed_audio_entry",
- "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/hdi_service/common:libdaudio_hdf_utils"
- ],
- "test": [
- "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/hdi_service/audio/v1_0/test/unittest:hdi_service_audio_test",
- "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/hdi_service/audio_ext/v1_0/test/unittest:hdi_service_audio_ext_test"
- ],
- "inner_kits": [
- {
- "name": "//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audio/v1_0:libdaudio_proxy_1.0",
- "header": {
- "header_files": [
- ],
- "header_base": "//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audio"
- }
- },
- {
- "name": "//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audioext/v1_0:libdaudioext_proxy_1.0",
- "header": {
- "header_files": [
- ],
- "header_base": "//foundation/distributedhardware/distributed_audio/hdf_interfaces/distributed_audio/audioext"
- }
- }
- ]
- }
- }
-}
diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn b/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn
deleted file mode 100644
index 6fbd906bb9006b8514f907243f898e5f6687d860..0000000000000000000000000000000000000000
--- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright (c) 2023 Huawei Device Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import("//build/ohos.gni")
-import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
-import("../../../../../distributedaudio.gni")
-
-ohos_shared_library("libaudio_manager_daudio_primary_service_1.0") {
- include_dirs = [
- "${hdf_ser_aud_path}/include",
- "${hdf_service_path}/hdi_service/common/include",
- "${hdf_service_path}/hdi_service/common/log/include",
- "${hdf_service_path}/hdi_service/common/utils/include",
- ]
-
- if (distributed_audio_extension) {
- include_dirs +=
- [ "${distributedaudio_ext_path}/hdf_service_extension/include/" ]
- }
-
- sources = [
- "./src/audio_adapter_interface_impl.cpp",
- "./src/audio_capture_interface_impl.cpp",
- "./src/audio_manager_interface_impl.cpp",
- "./src/audio_render_interface_impl.cpp",
- ]
-
- if (distributed_audio_extension) {
- sources += [
- "${distributedaudio_ext_path}/hdf_service_extension/src/audio_capture_ext_impl.cpp",
- "${distributedaudio_ext_path}/hdf_service_extension/src/audio_render_ext_impl.cpp",
- ]
- }
-
- public_deps = [
- "${hdf_interfaces_path}/audio/v1_0:libdaudio_stub_1.0",
- "${hdf_interfaces_path}/audioext/v1_0:libdaudioext_stub_1.0",
- "${hdf_service_path}/hdi_service/common:libdaudio_hdf_utils",
- ]
-
- external_deps = [
- "c_utils:utils",
- "hdf_core:libhdf_host",
- "hdf_core:libhdf_utils",
- "hiviewdfx_hilog_native:libhilog",
- "ipc:ipc_single",
- ]
-
- if (distributed_audio_extension) {
- cflags = [ "-DDAUDIO_SUPPORT_EXTENSION" ]
- }
-
- defines = [
- "HI_LOG_ENABLE",
- "LOG_DOMAIN=0xD004100",
- ]
-
- install_images = [ chipset_base_dir ]
- subsystem_name = "hdf"
- part_name = "drivers_peripheral_distributed_audio"
-}
-
-ohos_shared_library("libdaudio_primary_driver") {
- include_dirs = [ "${hdf_ser_aud_path}/include" ]
-
- sources = [ "./src/audio_driver.cpp" ]
-
- deps = [ "${hdf_ser_aud_path}:libaudio_manager_daudio_primary_service_1.0" ]
-
- external_deps = [
- "c_utils:utils",
- "hdf_core:libhdf_host",
- "hdf_core:libhdf_ipc_adapter",
- "hdf_core:libhdf_utils",
- "hdf_core:libhdi",
- "hiviewdfx_hilog_native:libhilog",
- "ipc:ipc_single",
- ]
-
- shlib_type = "hdi"
- install_images = [ chipset_base_dir ]
- subsystem_name = "hdf"
- part_name = "drivers_peripheral_distributed_audio"
-}
-
-group("hdf_daudio_primary_service") {
- deps = [
- ":libaudio_manager_daudio_primary_service_1.0",
- ":libdaudio_primary_driver",
- ]
-}
diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_adapter_interface_impl.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_adapter_interface_impl.h
deleted file mode 100644
index cee31f40caa666312a3b1f7d05a3bc906aa18865..0000000000000000000000000000000000000000
--- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_adapter_interface_impl.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2023 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef OHOS_AUDIO_ADAPTER_INTERFACE_IMPL_H
-#define OHOS_AUDIO_ADAPTER_INTERFACE_IMPL_H
-
-#include
-#include