From 7095d52573b56c8fde7ddc8e57077705a67a3900 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Fri, 5 May 2023 14:24:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9frames=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=B8=BA=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hwwuhaobo --- services/audiohdiproxy/include/idaudio_hdi_callback.h | 2 +- .../test/unittest/daudio_hdi_handler/include/audio_test_utils.h | 2 +- .../unittest/daudio_manager_callback/include/audio_test_utils.h | 2 +- services/audiomanager/managersource/include/dmic_dev.h | 2 +- services/audiomanager/managersource/include/dspeaker_dev.h | 2 +- services/audiomanager/managersource/src/dmic_dev.cpp | 2 +- services/audiomanager/managersource/src/dspeaker_dev.cpp | 2 +- services/audiomanager/test/unittest/BUILD.gn | 2 +- .../test/unittest/{source_device => sourcedevice}/BUILD.gn | 0 .../include/daudio_source_dev_test.h | 0 .../{source_device => sourcedevice}/include/dmic_dev_test.h | 0 .../{source_device => sourcedevice}/include/dspeaker_dev_test.h | 0 .../src/daudio_source_dev_test.cpp | 0 .../{source_device => sourcedevice}/src/dmic_dev_test.cpp | 0 .../{source_device => sourcedevice}/src/dspeaker_dev_test.cpp | 0 15 files changed, 8 insertions(+), 8 deletions(-) rename services/audiomanager/test/unittest/{source_device => sourcedevice}/BUILD.gn (100%) rename services/audiomanager/test/unittest/{source_device => sourcedevice}/include/daudio_source_dev_test.h (100%) rename services/audiomanager/test/unittest/{source_device => sourcedevice}/include/dmic_dev_test.h (100%) rename services/audiomanager/test/unittest/{source_device => sourcedevice}/include/dspeaker_dev_test.h (100%) rename services/audiomanager/test/unittest/{source_device => sourcedevice}/src/daudio_source_dev_test.cpp (100%) rename services/audiomanager/test/unittest/{source_device => sourcedevice}/src/dmic_dev_test.cpp (100%) rename services/audiomanager/test/unittest/{source_device => sourcedevice}/src/dspeaker_dev_test.cpp (100%) diff --git a/services/audiohdiproxy/include/idaudio_hdi_callback.h b/services/audiohdiproxy/include/idaudio_hdi_callback.h index bf31d81f..2502031a 100644 --- a/services/audiohdiproxy/include/idaudio_hdi_callback.h +++ b/services/audiohdiproxy/include/idaudio_hdi_callback.h @@ -39,7 +39,7 @@ public: virtual int32_t ReadStreamData(const std::string &devId, const int32_t dhId, std::shared_ptr &data) = 0; virtual int32_t ReadMmapPosition(const std::string &devId, const int32_t dhId, - uint64_t frames, CurrentTimeHDF &time) = 0; + uint64_t &frames, CurrentTimeHDF &time) = 0; virtual int32_t RefreshAshmemInfo(const std::string &devId, const int32_t dhId, int32_t fd, int32_t ashmemLength, int32_t lengthPerTrans) = 0; diff --git a/services/audiohdiproxy/test/unittest/daudio_hdi_handler/include/audio_test_utils.h b/services/audiohdiproxy/test/unittest/daudio_hdi_handler/include/audio_test_utils.h index 7e99332d..8a4e8c2c 100644 --- a/services/audiohdiproxy/test/unittest/daudio_hdi_handler/include/audio_test_utils.h +++ b/services/audiohdiproxy/test/unittest/daudio_hdi_handler/include/audio_test_utils.h @@ -86,7 +86,7 @@ public: } int32_t ReadMmapPosition(const std::string &devId, const int32_t dhId, - uint64_t frames, CurrentTimeHDF &time) + uint64_t &frames, CurrentTimeHDF &time) { return DH_SUCCESS; } diff --git a/services/audiohdiproxy/test/unittest/daudio_manager_callback/include/audio_test_utils.h b/services/audiohdiproxy/test/unittest/daudio_manager_callback/include/audio_test_utils.h index 50deca2d..ff79cb6f 100644 --- a/services/audiohdiproxy/test/unittest/daudio_manager_callback/include/audio_test_utils.h +++ b/services/audiohdiproxy/test/unittest/daudio_manager_callback/include/audio_test_utils.h @@ -59,7 +59,7 @@ public: } int32_t ReadMmapPosition(const std::string &devId, const int32_t dhId, - uint64_t frames, CurrentTimeHDF &time) + uint64_t &frames, CurrentTimeHDF &time) { return DH_SUCCESS; } diff --git a/services/audiomanager/managersource/include/dmic_dev.h b/services/audiomanager/managersource/include/dmic_dev.h index 9430e029..3c328b4d 100644 --- a/services/audiomanager/managersource/include/dmic_dev.h +++ b/services/audiomanager/managersource/include/dmic_dev.h @@ -52,7 +52,7 @@ public: int32_t ReadStreamData(const std::string &devId, const int32_t dhId, std::shared_ptr &data) override; int32_t NotifyEvent(const std::string &devId, const int32_t dhId, const AudioEvent &event) override; int32_t ReadMmapPosition(const std::string &devId, const int32_t dhId, - uint64_t frames, CurrentTimeHDF &time) override; + uint64_t &frames, CurrentTimeHDF &time) override; int32_t RefreshAshmemInfo(const std::string &devId, const int32_t dhId, int32_t fd, int32_t ashmemLength, int32_t lengthPerTrans) override; int32_t MmapStart(); diff --git a/services/audiomanager/managersource/include/dspeaker_dev.h b/services/audiomanager/managersource/include/dspeaker_dev.h index 4996c251..401d37cf 100644 --- a/services/audiomanager/managersource/include/dspeaker_dev.h +++ b/services/audiomanager/managersource/include/dspeaker_dev.h @@ -51,7 +51,7 @@ public: int32_t ReadStreamData(const std::string &devId, const int32_t dhId, std::shared_ptr &data) override; int32_t NotifyEvent(const std::string &devId, const int32_t dhId, const AudioEvent &event) override; int32_t ReadMmapPosition(const std::string &devId, const int32_t dhId, - uint64_t frames, CurrentTimeHDF &time) override; + uint64_t &frames, CurrentTimeHDF &time) override; int32_t RefreshAshmemInfo(const std::string &devId, const int32_t dhId, int32_t fd, int32_t ashmemLength, int32_t lengthPerTrans) override; int32_t MmapStart(); diff --git a/services/audiomanager/managersource/src/dmic_dev.cpp b/services/audiomanager/managersource/src/dmic_dev.cpp index d07286f4..2863579c 100644 --- a/services/audiomanager/managersource/src/dmic_dev.cpp +++ b/services/audiomanager/managersource/src/dmic_dev.cpp @@ -296,7 +296,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) + uint64_t &frames, CurrentTimeHDF &time) { DHLOGI("Read mmap position. frames: %lu, tvsec: %lu, tvNSec:%lu", writeNum_, writeTvSec_, writeTvNSec_); diff --git a/services/audiomanager/managersource/src/dspeaker_dev.cpp b/services/audiomanager/managersource/src/dspeaker_dev.cpp index 2876e7a5..b963cd0b 100644 --- a/services/audiomanager/managersource/src/dspeaker_dev.cpp +++ b/services/audiomanager/managersource/src/dspeaker_dev.cpp @@ -311,7 +311,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) + uint64_t &frames, CurrentTimeHDF &time) { DHLOGI("Read mmap position. frames: %lu, tvsec: %lu, tvNSec:%lu", readNum_, readTvSec_, readTvNSec_); diff --git a/services/audiomanager/test/unittest/BUILD.gn b/services/audiomanager/test/unittest/BUILD.gn index e9e5589c..38dae039 100644 --- a/services/audiomanager/test/unittest/BUILD.gn +++ b/services/audiomanager/test/unittest/BUILD.gn @@ -22,7 +22,7 @@ group("daudio_manager_test") { "${services_path}/audiomanager/test/unittest/managersink:manager_sink_test", "${services_path}/audiomanager/test/unittest/servicesink:DaudioSinkServiceTest", "${services_path}/audiomanager/test/unittest/servicesource:DaudioSourceServiceTest", - "${services_path}/audiomanager/test/unittest/source_device:daudio_source_dev_test", + "${services_path}/audiomanager/test/unittest/sourcedevice:daudio_source_dev_test", "${services_path}/audiomanager/test/unittest/sourcemanager:daudio_source_mgr_test", "${services_path}/common/test/unittest/audiodata:audio_data_test", ] diff --git a/services/audiomanager/test/unittest/source_device/BUILD.gn b/services/audiomanager/test/unittest/sourcedevice/BUILD.gn similarity index 100% rename from services/audiomanager/test/unittest/source_device/BUILD.gn rename to services/audiomanager/test/unittest/sourcedevice/BUILD.gn diff --git a/services/audiomanager/test/unittest/source_device/include/daudio_source_dev_test.h b/services/audiomanager/test/unittest/sourcedevice/include/daudio_source_dev_test.h similarity index 100% rename from services/audiomanager/test/unittest/source_device/include/daudio_source_dev_test.h rename to services/audiomanager/test/unittest/sourcedevice/include/daudio_source_dev_test.h diff --git a/services/audiomanager/test/unittest/source_device/include/dmic_dev_test.h b/services/audiomanager/test/unittest/sourcedevice/include/dmic_dev_test.h similarity index 100% rename from services/audiomanager/test/unittest/source_device/include/dmic_dev_test.h rename to services/audiomanager/test/unittest/sourcedevice/include/dmic_dev_test.h diff --git a/services/audiomanager/test/unittest/source_device/include/dspeaker_dev_test.h b/services/audiomanager/test/unittest/sourcedevice/include/dspeaker_dev_test.h similarity index 100% rename from services/audiomanager/test/unittest/source_device/include/dspeaker_dev_test.h rename to services/audiomanager/test/unittest/sourcedevice/include/dspeaker_dev_test.h diff --git a/services/audiomanager/test/unittest/source_device/src/daudio_source_dev_test.cpp b/services/audiomanager/test/unittest/sourcedevice/src/daudio_source_dev_test.cpp similarity index 100% rename from services/audiomanager/test/unittest/source_device/src/daudio_source_dev_test.cpp rename to services/audiomanager/test/unittest/sourcedevice/src/daudio_source_dev_test.cpp diff --git a/services/audiomanager/test/unittest/source_device/src/dmic_dev_test.cpp b/services/audiomanager/test/unittest/sourcedevice/src/dmic_dev_test.cpp similarity index 100% rename from services/audiomanager/test/unittest/source_device/src/dmic_dev_test.cpp rename to services/audiomanager/test/unittest/sourcedevice/src/dmic_dev_test.cpp diff --git a/services/audiomanager/test/unittest/source_device/src/dspeaker_dev_test.cpp b/services/audiomanager/test/unittest/sourcedevice/src/dspeaker_dev_test.cpp similarity index 100% rename from services/audiomanager/test/unittest/source_device/src/dspeaker_dev_test.cpp rename to services/audiomanager/test/unittest/sourcedevice/src/dspeaker_dev_test.cpp -- Gitee From 2a38b55b841ac3945794587524b82ce254ebd75e Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Fri, 5 May 2023 15:12:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9drivers=E7=9A=84=E5=AD=90?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=B8=BAhdf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hwwuhaobo --- hdf_interfaces/distributed_audio/audio/v1_0/BUILD.gn | 2 +- hdf_interfaces/distributed_audio/audioext/v1_0/BUILD.gn | 2 +- hdf_interfaces/distributed_audio/bundle.json | 2 +- hdf_service/distributed_audio/bundle.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hdf_interfaces/distributed_audio/audio/v1_0/BUILD.gn b/hdf_interfaces/distributed_audio/audio/v1_0/BUILD.gn index 05f1c7e2..333eb216 100644 --- a/hdf_interfaces/distributed_audio/audio/v1_0/BUILD.gn +++ b/hdf_interfaces/distributed_audio/audio/v1_0/BUILD.gn @@ -24,6 +24,6 @@ hdi("daudio") { ] language = "cpp" root = "ohos.hdi://foundation/distributedhardware/distributed_audio/hdf_interfaces/" - subsystem_name = "distributedhardware" + subsystem_name = "hdf" part_name = "drivers_interface_distributed_audio" } diff --git a/hdf_interfaces/distributed_audio/audioext/v1_0/BUILD.gn b/hdf_interfaces/distributed_audio/audioext/v1_0/BUILD.gn index 7c8160df..22a30fba 100644 --- a/hdf_interfaces/distributed_audio/audioext/v1_0/BUILD.gn +++ b/hdf_interfaces/distributed_audio/audioext/v1_0/BUILD.gn @@ -21,6 +21,6 @@ hdi("daudioext") { ] language = "cpp" root = "ohos.hdi://foundation/distributedhardware/distributed_audio/hdf_interfaces/" - subsystem_name = "distributedhardware" + subsystem_name = "hdf" part_name = "drivers_interface_distributed_audio" } diff --git a/hdf_interfaces/distributed_audio/bundle.json b/hdf_interfaces/distributed_audio/bundle.json index 3d0799d4..1d532a01 100644 --- a/hdf_interfaces/distributed_audio/bundle.json +++ b/hdf_interfaces/distributed_audio/bundle.json @@ -8,7 +8,7 @@ }, "component": { "name": "drivers_interface_distributed_audio", - "subsystem": "distributedhardware", + "subsystem": "hdf", "adapted_system_type":[ "standard" ], diff --git a/hdf_service/distributed_audio/bundle.json b/hdf_service/distributed_audio/bundle.json index c01de7d0..6cb84e6b 100644 --- a/hdf_service/distributed_audio/bundle.json +++ b/hdf_service/distributed_audio/bundle.json @@ -8,7 +8,7 @@ }, "component": { "name": "drivers_peripheral_distributed_audio", - "subsystem": "distributedhardware", + "subsystem": "hdf", "adapted_system_type":[ "standard" ], -- Gitee From 43d8e4f1739e8dcb13fc137e3f77709a2254aa66 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Fri, 5 May 2023 17:42:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9drivers=E7=9A=84=E5=AD=90?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=B8=BAhdf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hwwuhaobo --- hdf_interfaces/distributed_audio/bundle.json | 2 +- hdf_service/distributed_audio/bundle.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hdf_interfaces/distributed_audio/bundle.json b/hdf_interfaces/distributed_audio/bundle.json index 1d532a01..3d0799d4 100644 --- a/hdf_interfaces/distributed_audio/bundle.json +++ b/hdf_interfaces/distributed_audio/bundle.json @@ -8,7 +8,7 @@ }, "component": { "name": "drivers_interface_distributed_audio", - "subsystem": "hdf", + "subsystem": "distributedhardware", "adapted_system_type":[ "standard" ], diff --git a/hdf_service/distributed_audio/bundle.json b/hdf_service/distributed_audio/bundle.json index 6cb84e6b..c01de7d0 100644 --- a/hdf_service/distributed_audio/bundle.json +++ b/hdf_service/distributed_audio/bundle.json @@ -8,7 +8,7 @@ }, "component": { "name": "drivers_peripheral_distributed_audio", - "subsystem": "hdf", + "subsystem": "distributedhardware", "adapted_system_type":[ "standard" ], -- Gitee