# No sound on Huawei P20

**URL:** <https://qa.fmod.com/t/no-sound-on-huawei-p20/15226>\
**Category:** FMOD Engine\
**Created:** [November 18, 2019, 4:26pm UTC](https://qa.fmod.com/t/no-sound-on-huawei-p20/15226 "2019-11-18T16:26:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ipetcu](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@ipetcu](https://qa.fmod.com/u/ipetcu)\
**Post date:** [November 18, 2019, 4:26pm UTC](https://qa.fmod.com/t/no-sound-on-huawei-p20/15226/1 "2019-11-18T16:26:43Z")

</div>

I’m using FMOD 2.00.05 library on Huawei P20 and no sound can be played.  
I’ve tried sounds with samplerate 48000 / 41400 / 32000 and same thing, no sound.

the error is  
2019-11-15 00:35:32.510 3196-3223/? W/AudioTrack: AUDIO\_OUTPUT\_FLAG\_FAST denied by client; transfer 3, track 48000 Hz, output 48000 Hz

2019-11-15 00:35:32.511 723-2254/? I/hash\_map\_utils: key: ‘mode’ value: ‘’

2019-11-15 00:35:32.511 723-2254/? D/HuaweiAudioFlinger: AudioException do not check.now is not communication state!

2019-11-15 00:35:32.512 723-2254/? D/AudioFlinger: event 162

2019-11-15 00:35:32.512 723-2254/? W/AudioFlinger: createTrack\_l(): mismatch between requested flags (00000100) and output flags (00000002)

From what I’ve read the eror “AUDIO\_OUTPUT\_FLAG\_FAST denied by client” appear when the phone doesn’t support “android fast audio path” . But FMOD is implemented using this type of support.

more details in this log:

2019-11-15 00:35:32.507 3196-3223/? D/AAudio: AAudioStreamBuilder\_openStream() called ----------------------------------------  
2019-11-15 00:35:32.507 3196-3223/? D/AAudio: AudioStreamBuilder(): mmapPolicy = 1, mapExclusivePolicy = 1  
2019-11-15 00:35:32.508 3196-3223/? I/AAudio: AudioStream::open() rate = 0, channels = 0, format = 0, sharing = 1, dir = OUTPUT  
2019-11-15 00:35:32.508 3196-3223/? I/AAudio: AudioStream::open() device = 0, perfMode = 12, callbackFrames = 0  
2019-11-15 00:35:32.508 3196-3223/? D/AAudio: AudioStreamTrack::open(), request notificationFrames = 0, frameCount = 0  
2019-11-15 00:35:32.508 723-2254/? D/AudioFlinger: event 162  
2019-11-15 00:35:32.509 723-2254/? I/APM\_AudioPolicyManager: getOutputForDevice() returns output 13  
2019-11-15 00:35:32.509 723-2254/? I/APM\_AudioPolicyManager: getOutputForAttr() returns output 13 stream 3  
2019-11-15 00:35:32.510 3196-3223/? W/AudioTrack: AUDIO\_OUTPUT\_FLAG\_FAST denied by client; transfer 3, track 48000 Hz, output 48000 Hz  
2019-11-15 00:35:32.511 723-2254/? I/hash\_map\_utils: key: ‘mode’ value: ‘’  
2019-11-15 00:35:32.511 723-2254/? D/HuaweiAudioFlinger: AudioException do not check.now is not communication state!  
2019-11-15 00:35:32.512 723-2254/? D/AudioFlinger: event 162  
2019-11-15 00:35:32.512 723-2254/? W/AudioFlinger: createTrack\_l(): mismatch between requested flags (00000100) and output flags (00000002)  
2019-11-15 00:35:32.512 723-2254/? I/AudioMixer: Pid:723 add track (3)  
2019-11-15 00:35:32.512 723-2254/? D/AudioFlinger: DevSched: uid is 10306, factor is 1.000000  
2019-11-15 00:35:32.513 3196-3223/? D/AudioTrack: OFFLOAD 0,mNotificationFrames 0,mStreamType =3,mOriginalSampleRate 48000,mAfSampleRate 48000,mTransfer 3  
2019-11-15 00:35:32.513 3196-3223/? D/AudioTrack: Client defaulted notificationFrames to 962 for frameCount 1924  
2019-11-15 00:35:32.513 1725-1838/? D/AudioState: SESSION\_ID\_NEW, containsKey, pid: 3196, sessionId: 609,uid: 10306  
2019-11-15 00:35:32.514 723-2254/? D/AudioFlinger: event 162  
2019-11-15 00:35:32.514 3196-3223/? W/AAudio: AudioStreamTrack::open() sampleRate changed from 0 to 48000  
2019-11-15 00:35:32.515 3196-3223/? W/AAudio: AudioStreamTrack::open() flags changed from 0x00000104 to 0x00000000  
2019-11-15 00:35:32.515 3196-3223/? W/AAudio: AudioStreamTrack::open() perfMode changed from 12 to 10  
2019-11-15 00:35:32.515 3196-3223/? D/AAudio: AAudioStreamBuilder\_openStream() returns 0 = AAUDIO\_OK for (0x749d299200) ----------------  
2019-11-15 00:35:32.515 3196-3223/? D/AAudio: AAudioStream\_close(0x749d299200)  
2019-11-15 00:35:32.515 723-2254/? I/AudioMixer: Pid:723 deleteTrackName(3)  
2019-11-15 00:35:32.515 723-723/? D/AudioFlinger: event 163  
2019-11-15 00:35:32.515 723-960/? V/APM\_AudioPolicyManager: releaseOutput() 13  
2019-11-15 00:35:32.515 3196-3223/? D/AAudio: AAudioStreamBuilder\_openStream() called ----------------------------------------  
2019-11-15 00:35:32.515 3196-3223/? D/AAudio: AudioStreamBuilder(): mmapPolicy = 1, mapExclusivePolicy = 1  
2019-11-15 00:35:32.516 3196-3223/? I/AAudio: AudioStream::open() rate = 0, channels = 0, format = 0, sharing = 1, dir = OUTPUT  
2019-11-15 00:35:32.516 3196-3223/? I/AAudio: AudioStream::open() device = 0, perfMode = 12, callbackFrames = 0  
2019-11-15 00:35:32.516 3196-3223/? D/AAudio: AudioStreamTrack::open(), request notificationFrames = -8, frameCount = 0  
2019-11-15 00:35:32.516 723-2254/? D/AudioFlinger: event 162  
2019-11-15 00:35:32.517 723-2254/? I/APM\_AudioPolicyManager: getOutputForDevice() returns output 13  
2019-11-15 00:35:32.517 723-2254/? I/APM\_AudioPolicyManager: getOutputForAttr() returns output 13 stream 3  
2019-11-15 00:35:32.517 723-2254/? I/hash\_map\_utils: key: ‘mode’ value: ‘’  
2019-11-15 00:35:32.518 723-2254/? D/HuaweiAudioFlinger: AudioException do not check.now is not communication state!  
2019-11-15 00:35:32.518 723-2254/? D/AudioFlinger: event 162  
2019-11-15 00:35:32.518 723-2254/? W/AudioFlinger: createTrack\_l(): mismatch between requested flags (00000104) and output flags (00000002)  
2019-11-15 00:35:32.518 723-2254/? I/AudioMixer: Pid:723 add track (3)  
2019-11-15 00:35:32.518 723-2254/? D/AudioFlinger: DevSched: uid is 10306, factor is 1.000000  
2019-11-15 00:35:32.519 3196-3223/? W/AudioTrack: AUDIO\_OUTPUT\_FLAG\_FAST denied by server; frameCount 7680 -\> 7680  
2019-11-15 00:35:32.519 3196-3223/? D/AudioTrack: OFFLOAD 0,mNotificationFrames -8,mStreamType =3,mOriginalSampleRate 48000,mAfSampleRate 48000,mTransfer 1  
2019-11-15 00:35:32.519 3196-3223/? D/AudioTrack: Client defaulted notificationFrames to 480 for frameCount 7680  
2019-11-15 00:35:32.519 1725-1838/? D/AudioState: SESSION\_ID\_NEW, containsKey, pid: 3196, sessionId: 617,uid: 10306  
2019-11-15 00:35:32.520 723-2254/? D/AudioFlinger: event 162  
2019-11-15 00:35:32.521 3196-3223/? W/AAudio: AudioStreamTrack::open() sampleRate changed from 0 to 48000  
2019-11-15 00:35:32.521 3196-3223/? W/AAudio: AudioStreamTrack::open() flags changed from 0x00000104 to 0x00000000  
2019-11-15 00:35:32.521 3196-3223/? W/AAudio: AudioStreamTrack::open() perfMode changed from 12 to 10  
2019-11-15 00:35:32.521 3196-3223/? D/AAudio: AAudioStreamBuilder\_openStream() returns 0 = AAUDIO\_OK for (0x749d299200) ----------------  
2019-11-15 00:35:32.525 3196-3223/? D/AAudio: AAudioStream\_requestStart(0x749d299200)  
2019-11-15 00:35:32.525 723-2254/? I/APM\_AudioPolicyManager: startOutput() output 13, stream 3, session 617  
2019-11-15 00:35:32.525 723-2254/? D/APM\_AudioPolicyManager: event 164  
2019-11-15 00:35:32.526 723-2254/? V/APM\_AudioPolicyManager: setBeaconMute(1) mBeaconMuteRefCount=1 mBeaconPlayingRefCount=0  
2019-11-15 00:35:32.526 723-2254/? V/APM\_AudioPolicyManager: selectOutputForMusicEffects activeOnly 1 outputs[0] flags 0x00000002  
2019-11-15 00:35:32.526 723-2254/? V/APM\_AudioPolicyManager: selectOutputForMusicEffects selected output 13  
2019-11-15 00:35:32.526 723-2254/? I/APM\_AudioPolicyManager: getNewOutputDevice() selected device 2  
2019-11-15 00:35:32.526 723-2254/? I/APM\_AudioPolicyManager: setOutputDevice() device 0x0002 delayMs 0 force 0  
2019-11-15 00:35:32.526 723-2254/? V/APM\_AudioPolicyManager: setOutputDevice() prevDevice 0x0002  
2019-11-15 00:35:32.526 723-2254/? I/APM\_AudioPolicyManager: setOutputDevice() setting same device 0x0002 or null device  
2019-11-15 00:35:32.526 723-2254/? D/APM::Gains: volIndexToDb sUseVolCurveCust true  
2019-11-15 00:35:32.526 723-2254/? D/APM\_AudioPolicyManager: set streamType 3, volume = 8, device = 2 for sws  
2019-11-15 00:35:32.526 723-2254/? D/APM::Gains: volIndexToDb sUseVolCurveCust true  
2019-11-15 00:35:32.528 723-959/? E/stereoWidening\_frame: sws is turned on  
2019-11-15 00:35:32.528 660-660/? I/audio\_hw\_effect: offload effect sws state: [1]  
2019-11-15 00:35:32.529 723-2254/? I/APM\_AudioPolicyManager: checkOutputForStrategy() getDeviceForStrategy strategy=3 newDevice=2 oldDevice=2  
2019-11-15 00:35:32.529 1725-1838/? I/PGServer: report state:2 event type:1 pid:3196 uid:10306 pkg:null to pid: 1134  
2019-11-15 00:35:32.530 1725-1838/? I/PGServer: report state:2 event type:1 pid:3196 uid:10306 pkg:null to pid: 1725  
2019-11-15 00:35:32.530 1725-1838/? D/AudioState: auido type:out state:start pid:3196 uid:10306

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [November 25, 2019, 4:23am UTC](https://qa.fmod.com/t/no-sound-on-huawei-p20/15226/2 "2019-11-25T04:23:20Z")

</div>

I cannot see any FMOD logging in there, do you have a log file with any/more FMOD information?

---

<div class="post-metadata">

**Author:** ![ipetcu](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@ipetcu](https://qa.fmod.com/u/ipetcu)\
**Post date:** [November 25, 2019, 3:37pm UTC](https://qa.fmod.com/t/no-sound-on-huawei-p20/15226/3 "2019-11-25T15:37:29Z")

</div>

The issue was resolved after changing the initialization way

FROM

```auto
FmodSfx::FmodSfx(FMOD_SYSTEM* pSystem, FileStream* pFileStream, FMOD_SOUND_FORMAT format, bool bIsStream)
{
	m_pSound = NULL;
	
	FMOD_RESULT result;

#ifdef TARGET_ANDROID
		char pPath[1000] = {0};
		sprintf(pPath, "file:///android_asset/%s", "sound1");
	
		result = FMOD_System_CreateSound(pSystem, pPath, FMOD_LOOP_NORMAL | FMOD_CREATESTREAM, 0, &m_pSound);
#else
		result = FMOD_System_CreateSound(pSystem, pFileStream->GetFilePath(), FMOD_CREATESTREAM | FMOD_LOOP_NORMAL, 0, &m_pSound);
#endif
}

```

TO

```auto
FmodSfx::FmodSfx(FMOD::System* pSystem, FileStream* pFileStream, FMOD_SOUND_FORMAT format, bool bIsStream)
{
	m_pSound = NULL;
	
	FMOD_RESULT result;

#ifdef TARGET_ANDROID
		char pPath[1000] = {0};
		sprintf(pPath, "file:///android_asset/%s", "sound1");

		result = pSystem->createSound(pPath, FMOD_DEFAULT | FMOD_LOOP_NORMAL, 0, &m_pSound);
#else
		result = pSystem->createSound(pFileStream->GetFilePath(), FMOD_DEFAULT | FMOD_LOOP_NORMAL, 0, &m_pSound);
#endif
}

```

thank you for your support
