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

Commit 74e29ad4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "aaudio: show format as text"

parents da93c9f6 ed782c88
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -321,9 +321,8 @@ void AudioStreamBuilder::logParameters() const {
          mFramesPerDataCallback);
    ALOGI("usage  = %6d, contentType = %d, inputPreset = %d, allowedCapturePolicy = %d",
          getUsage(), getContentType(), getInputPreset(), getAllowedCapturePolicy());
    ALOGI("privacy sensitive = %s", isPrivacySensitive() ? "true" : "false");
    ALOGI("opPackageName = %s", !getOpPackageName().has_value() ?
        "(null)" : getOpPackageName().value().c_str());
    ALOGI("attributionTag = %s", !getAttributionTag().has_value() ?
        "(null)" : getAttributionTag().value().c_str());
    ALOGI("privacy sensitive = %s, opPackageName = %s, attributionTag = %s",
          isPrivacySensitive() ? "true" : "false",
          !getOpPackageName().has_value() ? "(null)" : getOpPackageName().value().c_str(),
          !getAttributionTag().has_value() ? "(null)" : getAttributionTag().value().c_str());
}
+2 −1
Original line number Diff line number Diff line
@@ -60,7 +60,8 @@ std::string AAudioServiceEndpoint::dump() const NO_THREAD_SAFETY_ANALYSIS {
    result << "    Sample Rate:          " << getSampleRate() << "\n";
    result << "    Channel Count:        " << getSamplesPerFrame() << "\n";
    result << "    Channel Mask:         0x" << std::hex << getChannelMask() << std::dec << "\n";
    result << "    Format:               " << getFormat() << "\n";
    result << "    Format:               " << getFormat()
                                           << " (" << audio_format_to_string(getFormat()) << ")\n";
    result << "    Frames Per Burst:     " << mFramesPerBurst << "\n";
    result << "    Usage:                " << getUsage() << "\n";
    result << "    ContentType:          " << getContentType() << "\n";
+7 −4
Original line number Diff line number Diff line
@@ -183,7 +183,9 @@ aaudio_result_t AAudioServiceEndpointMMAP::openWithFormat(audio_format_t audioFo
            ? AAUDIO_SESSION_ID_NONE
            : (aaudio_session_id_t) sessionId;
    setSessionId(actualSessionId);
    ALOGD("%s() deviceId = %d, sessionId = %d", __func__, getDeviceId(), getSessionId());

    ALOGD("%s(format = 0x%X) deviceId = %d, sessionId = %d",
          __func__, audioFormat, getDeviceId(), getSessionId());

    // Create MMAP/NOIRQ buffer.
    result = createMmapBuffer(&mAudioDataFileDescriptor);
@@ -207,12 +209,13 @@ aaudio_result_t AAudioServiceEndpointMMAP::openWithFormat(audio_format_t audioFo
    mTimestampGracePeriodMs = ((int64_t) kTimestampGraceBurstCount * mFramesPerBurst
            * AAUDIO_MILLIS_PER_SECOND) / getSampleRate();

    ALOGD("%s() actual rate = %d, channels = %d channelMask = %#x, deviceId = %d, capacity = %d\n",
    ALOGD("%s() got rate = %d, channels = %d channelMask = %#x, deviceId = %d, capacity = %d\n",
          __func__, getSampleRate(), getSamplesPerFrame(), getChannelMask(),
          deviceId, getBufferCapacity());

    ALOGD("%s() format = 0x%08x, frame size = %d, burst size = %d",
          __func__, getFormat(), calculateBytesPerFrame(), mFramesPerBurst);
    ALOGD("%s() got format = 0x%X = %s, frame size = %d, burst size = %d",
          __func__, getFormat(), audio_format_to_string(getFormat()),
          calculateBytesPerFrame(), mFramesPerBurst);

    return result;