Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 765e0771 authored by David Li's avatar David Li Committed by Android (Google) Code Review
Browse files

Merge "send kDumpFromAudioServerArgument to the HAL modules" into 24D1-dev

parents f84ae537 2128946c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ using aidl::android::media::audio::common::MicrophoneInfo;
using aidl::android::media::audio::IHalAdapterVendorExtension;
using aidl::android::hardware::audio::common::getFrameSizeInBytes;
using aidl::android::hardware::audio::common::isBitPositionFlagSet;
using aidl::android::hardware::audio::common::kDumpFromAudioServerArgument;
using aidl::android::hardware::audio::common::RecordTrackMetadata;
using aidl::android::hardware::audio::core::sounddose::ISoundDose;
using aidl::android::hardware::audio::core::AudioPatch;
@@ -913,7 +914,9 @@ error::Result<audio_hw_sync_t> DeviceHalAidl::getHwAvSync() {
status_t DeviceHalAidl::dump(int fd, const Vector<String16>& args) {
    TIME_CHECK();
    if (mModule == nullptr) return NO_INIT;
    return mModule->dump(fd, Args(args).args(), args.size());
    Vector<String16> newArgs = args;
    newArgs.push(String16(kDumpFromAudioServerArgument));
    return mModule->dump(fd, Args(newArgs).args(), newArgs.size());
}

status_t DeviceHalAidl::supportsBluetoothVariableLatency(bool* supports) {
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ class DeviceHalAidl : public DeviceHalInterface, public ConversionHelperAidl,
    status_t getAudioMixPort(const struct audio_port_v7* devicePort,
                             struct audio_port_v7* mixPort) override;

    status_t dump(int __unused, const Vector<String16>& __unused) override;
    status_t dump(int fd, const Vector<String16>& args) override;

  private:
    friend class sp<DeviceHalAidl>;
+6 −2
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <media/AudioParameter.h>
#include <mediautils/TimeCheck.h>
#include <system/audio.h>
#include <Utils.h>
#include <utils/Log.h>

#include "DeviceHalAidl.h"
@@ -36,13 +37,14 @@
#include "StreamHalAidl.h"

using ::aidl::android::aidl_utils::statusTFromBinderStatus;
using ::aidl::android::hardware::audio::common::kDumpFromAudioServerArgument;
using ::aidl::android::hardware::audio::common::PlaybackTrackMetadata;
using ::aidl::android::hardware::audio::common::RecordTrackMetadata;
using ::aidl::android::hardware::audio::core::IStreamCommon;
using ::aidl::android::hardware::audio::core::IStreamIn;
using ::aidl::android::hardware::audio::core::IStreamOut;
using ::aidl::android::hardware::audio::core::StreamDescriptor;
using ::aidl::android::hardware::audio::core::MmapBufferDescriptor;
using ::aidl::android::hardware::audio::core::StreamDescriptor;
using ::aidl::android::media::audio::common::MicrophoneDynamicInfo;
using ::aidl::android::media::audio::IHalAdapterVendorExtension;

@@ -239,7 +241,9 @@ status_t StreamHalAidl::dump(int fd, const Vector<String16>& args) {
    ALOGD("%p %s::%s", this, getClassName().c_str(), __func__);
    TIME_CHECK();
    if (!mStream) return NO_INIT;
    status_t status = mStream->dump(fd, Args(args).args(), args.size());
    Vector<String16> newArgs = args;
    newArgs.push(String16(kDumpFromAudioServerArgument));
    status_t status = mStream->dump(fd, Args(newArgs).args(), newArgs.size());
    mStreamPowerLog.dump(fd);
    return status;
}