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

Commit 8e099d6f authored by Phil Burk's avatar Phil Burk
Browse files

aaudio: return error code when sample rate rejected

This will prevent us from trying to configure the
FlowGraph with invalid parameters.

The bug occurs when media_audio >> Enable Sample Rate Conversion
flag is turned off.

Bug: 316971461
Test: See bug for repro steps.
Test: If fixed then you should not see the message:
Test: Channel reduction not supported.
Change-Id: I886d334e2b04a8df71e1e8e67498caa3efc9d7cc
parent 60626006
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -199,6 +199,7 @@ aaudio_result_t AudioStreamInternal::open(const AudioStreamBuilder &builder) {
        if (getSampleRate() != getDeviceSampleRate()) {
            ALOGD("%s - skipping sample rate converter. SR = %d, Device SR = %d", __func__,
                    getSampleRate(), getDeviceSampleRate());
            result = AAUDIO_ERROR_INVALID_RATE;
            goto error;
        }
    }