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

Commit 14a849c2 authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

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

* commit '1bf8a210':
  audio policy: add fallback for output selection
parents 6f4428de 1bf8a210
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;