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

Commit 1bf8a210 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio policy: add fallback for output selection" into lmp-mr1-dev

parents d99c6855 a82797fa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1113,6 +1113,10 @@ audio_io_handle_t AudioPolicyManager::getOutputForDevice(
            if (output != AUDIO_IO_HANDLE_NONE) {
                mpClientInterface->closeOutput(output);
            }
            // fall back to mixer output if possible when the direct output could not be open
            if (audio_is_linear_pcm(format) && samplingRate <= MAX_MIXER_SAMPLING_RATE) {
                goto non_direct_output;
            }
            return AUDIO_IO_HANDLE_NONE;
        }
        outputDesc->mSamplingRate = config.sample_rate;