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

Commit 1a3364ab authored by Carter Hsu's avatar Carter Hsu
Browse files

audio: fix the Ultrasound is denied or muted



The STREAM_TTS will be dennied or muted when other
is starting or started

Bug: 200256985
Test: Play Ultrasound with touch sound
Signed-off-by: default avatarCarter Hsu <carterhsu@google.com>
Change-Id: I5af6ef65d456ece2837333b411090d8e8a840fc7
parent e3009b64
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5308,7 +5308,8 @@ void AudioPolicyManager::onNewAudioModulesAvailableInt(DeviceVector *newDevices)
                ALOGW("Output profile contains no device on module %s", hwModule->getName());
                continue;
            }
            if ((outProfile->getFlags() & AUDIO_OUTPUT_FLAG_TTS) != 0) {
            if ((outProfile->getFlags() & AUDIO_OUTPUT_FLAG_TTS) != 0 ||
                (outProfile->getFlags() & AUDIO_OUTPUT_FLAG_ULTRASOUND) != 0) {
                mTtsOutputAvailable = true;
            }

+2 −1
Original line number Diff line number Diff line
@@ -857,7 +857,8 @@ protected:
        uint32_t mBeaconMuteRefCount;   // ref count for stream that would mute beacon
        uint32_t mBeaconPlayingRefCount;// ref count for the playing beacon streams
        bool mBeaconMuted;              // has STREAM_TTS been muted
        bool mTtsOutputAvailable;       // true if a dedicated output for TTS stream is available
        // true if a dedicated output for TTS stream or Ultrasound is available
        bool mTtsOutputAvailable;

        bool mMasterMono;               // true if we wish to force all outputs to mono
        AudioPolicyMixCollection mPolicyMixes; // list of registered mixes