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

Commit 94365445 authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: minor log and dump fixes

Fix DeviceDescriptorBase dump formatting and add more
info to getOffoadSupport() verbose log.

Test: adb shell dumpsys media.audio_policy
Change-Id: Ibbc4f80305d5b326c316f7510a03688ebeadb33a
parent 5feac6b6
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -122,9 +122,9 @@ void DeviceDescriptorBase::dump(std::string *dst, int spaces, int index,
            spaces, "", ::android::toString(mDeviceTypeAddr.mType).c_str()));
            spaces, "", ::android::toString(mDeviceTypeAddr.mType).c_str()));


    dst->append(base::StringPrintf(
    dst->append(base::StringPrintf(
            "%*s- supported encapsulation modes: %u", spaces, "", mEncapsulationModes));
            "%*s- supported encapsulation modes: %u\n", spaces, "", mEncapsulationModes));
    dst->append(base::StringPrintf(
    dst->append(base::StringPrintf(
            "%*s- supported encapsulation metadata types: %u",
            "%*s- supported encapsulation metadata types: %u\n",
            spaces, "", mEncapsulationMetadataTypes));
            spaces, "", mEncapsulationMetadataTypes));


    if (mDeviceTypeAddr.address().size() != 0) {
    if (mDeviceTypeAddr.address().size() != 0) {
+3 −1
Original line number Original line Diff line number Diff line
@@ -3547,7 +3547,9 @@ audio_offload_mode_t AudioPolicyManager::getOffloadSupport(const audio_offload_i
                                            offloadInfo.channel_mask,
                                            offloadInfo.channel_mask,
                                            AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD,
                                            AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD,
                                            true /* directOnly */);
                                            true /* directOnly */);
    ALOGV("%s: profile %sfound", __func__, profile != 0 ? "" : "NOT ");
    ALOGV("%s: profile %sfound%s", __func__, profile != nullptr ? "" : "NOT ",
            (profile != nullptr && (profile->getFlags() & AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD) != 0)
            ? ", supports gapless" : "");
    if (profile == nullptr) {
    if (profile == nullptr) {
        return AUDIO_OFFLOAD_NOT_SUPPORTED;
        return AUDIO_OFFLOAD_NOT_SUPPORTED;
    }
    }