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

Commit b6fce59d authored by Phil Burk's avatar Phil Burk Committed by Android (Google) Code Review
Browse files

Merge "aaudio: ignore device updates for UNSPECIFIED" into main

parents d1d91edc 1cd9ce64
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -261,6 +261,11 @@ aaudio_result_t AudioStreamLegacy::getBestTimestamp(clockid_t clockId,

void AudioStreamLegacy::onAudioDeviceUpdate(audio_io_handle_t /* audioIo */,
            audio_port_handle_t deviceId) {
    // Check for an invalid deviceId. Why change to UNSPECIFIED?
    if (deviceId == AAUDIO_UNSPECIFIED) {
        ALOGE("%s(, deviceId = AAUDIO_UNSPECIFIED)! Why?", __func__);
        return;
    }
    // Device routing is a common source of errors and DISCONNECTS.
    // Please leave this log in place. If there is a bug then this might
    // get called after the stream has been deleted so log before we