mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
audio: Implement the major functionality of the primary CF HAL
Core HAL changes: 1. Add StreamPrimary implemented via StreamAlsa. 2. Align the configuration with the HIDL HAL. 3. Fix position retrieval vs. standby call. 4. Fix sleeps in StreamAlsa. VTS changes: 1. Use several bursts for stream I/O test scenarios that check observable position increase. This is because the position may not be available until a couple of transfers have been made. 2. Do not require position increase for the scenarios that do not make several bursts. As specified above, the position may not have been increased for the ALSA case. Whereas, using multiple bursts in all scenarios will increase test time, and make the state machine transitions graph more complicated. 3. Hook up the test config file to shut down audioserver during VTS tests, fix the test config file. Bug: 286914845 Test: atest VtsHalAudioCoreTargetTest Test: compare APM dumps for AIDL vs. HIDL Change-Id: I85271564c664fa40008d60e82b32eaa66a99c68f
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include <android-base/logging.h>
|
||||
|
||||
#include "core-impl/ModulePrimary.h"
|
||||
#include "core-impl/StreamStub.h"
|
||||
#include "core-impl/StreamPrimary.h"
|
||||
#include "core-impl/Telephony.h"
|
||||
|
||||
using aidl::android::hardware::audio::common::SinkMetadata;
|
||||
@@ -47,15 +47,15 @@ ndk::ScopedAStatus ModulePrimary::createInputStream(StreamContext&& context,
|
||||
const SinkMetadata& sinkMetadata,
|
||||
const std::vector<MicrophoneInfo>& microphones,
|
||||
std::shared_ptr<StreamIn>* result) {
|
||||
return createStreamInstance<StreamInStub>(result, std::move(context), sinkMetadata,
|
||||
microphones);
|
||||
return createStreamInstance<StreamInPrimary>(result, std::move(context), sinkMetadata,
|
||||
microphones);
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus ModulePrimary::createOutputStream(
|
||||
StreamContext&& context, const SourceMetadata& sourceMetadata,
|
||||
const std::optional<AudioOffloadInfo>& offloadInfo, std::shared_ptr<StreamOut>* result) {
|
||||
return createStreamInstance<StreamOutStub>(result, std::move(context), sourceMetadata,
|
||||
offloadInfo);
|
||||
return createStreamInstance<StreamOutPrimary>(result, std::move(context), sourceMetadata,
|
||||
offloadInfo);
|
||||
}
|
||||
|
||||
} // namespace aidl::android::hardware::audio::core
|
||||
|
||||
Reference in New Issue
Block a user