mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Revert "audio: Populate MicrophoneInfo with vendor data" am: 5eea7fb0d7 am: ca9d26dc44 am: ab0818f638 am: 96baf7e609 am: 40d47b9456
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2786756 Change-Id: I3ed92f5ac5acc7bc9a7d33dfc313f30bc81d2a1b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -43,7 +43,6 @@ using aidl::android::hardware::audio::common::SourceMetadata;
|
||||
using aidl::android::hardware::audio::core::sounddose::ISoundDose;
|
||||
using aidl::android::media::audio::common::AudioChannelLayout;
|
||||
using aidl::android::media::audio::common::AudioDevice;
|
||||
using aidl::android::media::audio::common::AudioDeviceType;
|
||||
using aidl::android::media::audio::common::AudioFormatDescription;
|
||||
using aidl::android::media::audio::common::AudioFormatType;
|
||||
using aidl::android::media::audio::common::AudioInputFlags;
|
||||
@@ -801,7 +800,7 @@ ndk::ScopedAStatus Module::openInputStream(const OpenInputStreamArguments& in_ar
|
||||
context.fillDescriptor(&_aidl_return->desc);
|
||||
std::shared_ptr<StreamIn> stream;
|
||||
RETURN_STATUS_IF_ERROR(createInputStream(std::move(context), in_args.sinkMetadata,
|
||||
getMicrophoneInfos(), &stream));
|
||||
getConfig().microphones, &stream));
|
||||
StreamWrapper streamWrapper(stream);
|
||||
if (auto patchIt = mPatches.find(in_args.portConfigId); patchIt != mPatches.end()) {
|
||||
RETURN_STATUS_IF_ERROR(
|
||||
@@ -1235,7 +1234,7 @@ ndk::ScopedAStatus Module::setMicMute(bool in_mute) {
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus Module::getMicrophones(std::vector<MicrophoneInfo>* _aidl_return) {
|
||||
*_aidl_return = getMicrophoneInfos();
|
||||
*_aidl_return = getConfig().microphones;
|
||||
LOG(DEBUG) << __func__ << ": returning " << ::android::internal::ToString(*_aidl_return);
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
@@ -1514,29 +1513,6 @@ ndk::ScopedAStatus Module::onMasterVolumeChanged(float volume __unused) {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
std::vector<MicrophoneInfo> Module::getMicrophoneInfos() {
|
||||
std::vector<MicrophoneInfo> result;
|
||||
Configuration& config = getConfig();
|
||||
for (const AudioPort& port : config.ports) {
|
||||
if (port.ext.getTag() == AudioPortExt::Tag::device) {
|
||||
const AudioDeviceType deviceType =
|
||||
port.ext.get<AudioPortExt::Tag::device>().device.type.type;
|
||||
if (deviceType == AudioDeviceType::IN_MICROPHONE ||
|
||||
deviceType == AudioDeviceType::IN_MICROPHONE_BACK) {
|
||||
// Placeholder values. Vendor implementations must populate MicrophoneInfo
|
||||
// accordingly based on their physical microphone parameters.
|
||||
result.push_back(MicrophoneInfo{
|
||||
.id = port.name,
|
||||
.device = port.ext.get<AudioPortExt::Tag::device>().device,
|
||||
.group = 0,
|
||||
.indexInTheGroup = 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Module::BtProfileHandles Module::getBtProfileManagerHandles() {
|
||||
return std::make_tuple(std::weak_ptr<IBluetooth>(), std::weak_ptr<IBluetoothA2dp>(),
|
||||
std::weak_ptr<IBluetoothLe>());
|
||||
|
||||
Reference in New Issue
Block a user