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

Commit 2e2ea9c1 authored by Xin Li's avatar Xin Li Committed by Android (Google) Code Review
Browse files

Merge "Merge 25Q1 (ab/BP1A.250305.020) to aosp-main-future" into aosp-main-future

parents b5a7b31a 8f08bdf6
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -80,9 +80,7 @@ static String16 resolveCallingPackage(PermissionController& permissionController
}
}


// NOTE/TODO(b/379754682):
// NOTE/TODO(b/379754682):
// AUDIO_SOURCE_VOICE_DOWNLINK and AUDIO_SOURCE_VOICE_CALL are handled specially:
// AUDIO_SOURCE_VOICE_CALL is handled specially:
// DOWNLINK is an output source, but we still require RecordOp in addition to
// OP_RECORD_INCOMING_PHONE_AUDIO
// CALL includes both uplink and downlink, but we attribute RECORD_OP (only), since
// CALL includes both uplink and downlink, but we attribute RECORD_OP (only), since
// there is not support for noting multiple ops.
// there is not support for noting multiple ops.
int32_t getOpForSource(audio_source_t source) {
int32_t getOpForSource(audio_source_t source) {
@@ -110,7 +108,7 @@ bool isRecordOpRequired(audio_source_t source) {
    case AUDIO_SOURCE_FM_TUNER:
    case AUDIO_SOURCE_FM_TUNER:
    case AUDIO_SOURCE_ECHO_REFERENCE: // fallthrough
    case AUDIO_SOURCE_ECHO_REFERENCE: // fallthrough
    case AUDIO_SOURCE_REMOTE_SUBMIX:
    case AUDIO_SOURCE_REMOTE_SUBMIX:
    // case AUDIO_SOURCE_VOICE_DOWNLINK:
    case AUDIO_SOURCE_VOICE_DOWNLINK:
        return false;
        return false;
    default:
    default:
      return true;
      return true;
+2 −1
Original line number Original line Diff line number Diff line
@@ -367,7 +367,8 @@ audio_utils::trace::Object TrackBase::createDeviceIntervalTrace(const std::strin
            .set(AUDIO_TRACE_OBJECT_KEY_FLAGS, trackFlagsAsString())
            .set(AUDIO_TRACE_OBJECT_KEY_FLAGS, trackFlagsAsString())
            .set(AUDIO_TRACE_OBJECT_KEY_FORMAT, IAfThreadBase::formatToString(mFormat))
            .set(AUDIO_TRACE_OBJECT_KEY_FORMAT, IAfThreadBase::formatToString(mFormat))
            .set(AUDIO_TRACE_OBJECT_KEY_FRAMECOUNT, static_cast<int64_t>(mFrameCount))
            .set(AUDIO_TRACE_OBJECT_KEY_FRAMECOUNT, static_cast<int64_t>(mFrameCount))
            .set(AUDIO_TRACE_OBJECT_KEY_PID, static_cast<int32_t>(mClient->pid()))
            .set(AUDIO_TRACE_OBJECT_KEY_PID, static_cast<int32_t>(
                    mClient ? mClient->pid() : getpid()))
            .set(AUDIO_TRACE_OBJECT_KEY_SAMPLE_RATE, static_cast<int32_t>(sampleRate()));
            .set(AUDIO_TRACE_OBJECT_KEY_SAMPLE_RATE, static_cast<int32_t>(sampleRate()));
    if (const auto thread = mThread.promote()) {
    if (const auto thread = mThread.promote()) {
        trace // continue in alphabetical order
        trace // continue in alphabetical order
+4 −2
Original line number Original line Diff line number Diff line
@@ -418,11 +418,13 @@ status_t Spatializer::loadEngineConfiguration(sp<EffectHalInterface> effect) {
                                   &spatializedChannelMasks);
                                   &spatializedChannelMasks);
    if (status != NO_ERROR) {
    if (status != NO_ERROR) {
        ALOGW("%s: cannot get SPATIALIZER_PARAM_SPATIALIZED_CHANNEL_MASKS", __func__);
        ALOGW("%s: cannot get SPATIALIZER_PARAM_SPATIALIZED_CHANNEL_MASKS", __func__);
        return status;
        // do not return an error yet as spatializer implementations may not have been
        // updated yet to support this parameter
    }
    }
    if (spatializedChannelMasks.empty()) {
    if (spatializedChannelMasks.empty()) {
        ALOGW("%s: SPATIALIZER_PARAM_SPATIALIZED_CHANNEL_MASKS reports empty", __func__);
        ALOGW("%s: SPATIALIZER_PARAM_SPATIALIZED_CHANNEL_MASKS reports empty", __func__);
        return BAD_VALUE;
        // do not return an error yet as spatializer implementations may not have been
        // updated yet to support this parameter
    }
    }
    for (const audio_channel_mask_t spatializedMask : spatializedChannelMasks) {
    for (const audio_channel_mask_t spatializedMask : spatializedChannelMasks) {
        // spatialized masks must be contained in the supported input masks
        // spatialized masks must be contained in the supported input masks