Closed Bug 1094683 Opened 10 years ago Closed 7 years ago

[FFOS 2.1]we can not hear music when we pull out the headphone.

Categories

(Firefox OS Graveyard :: AudioChannel, defect)

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(blocking-b2g:-, b2g-v2.1 affected, b2g-v2.2 affected)

RESOLVED WONTFIX
blocking-b2g -
Tracking Status
b2g-v2.1 --- affected
b2g-v2.2 --- affected

People

(Reporter: jingmei.zhang, Unassigned)

References

Details

Attachments

(1 file)

[Blocking Requested - why for this release]: STR: 1.Play music 2.pluge in a headphone 3.recieve a call,answer it then hand up 4.open fm 5.recieve a call,answer it then hand up 6.back to home screen 7.pull out the headphone 8.enter music and press to play music we could not hear music while music is playing. the occurency is about 3/10.
the main logs when the issue occur: >before the headphone is connected I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 0 >the headphone is connectted V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 8, state 1, address V/AudioPolicyManagerBase( 103): setDeviceConnectionState() connecting device 8 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() checkOutputsForDevice() returned 1 outputs I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 >open fm V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 80000, state 1, address V/AudioPolicyManagerBase( 103): setDeviceConnectionState() connecting device 80000 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() checkOutputsForDevice() returned 1 outputs V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 8, state 1, address W/AudioPolicyManagerBase( 103): setDeviceConnectionState() device already connected: 8 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 80000, state 0, address 0 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() disconnecting device 80000 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 80000, state 1, address V/AudioPolicyManagerBase( 103): setDeviceConnectionState() connecting device 80000 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() checkOutputsForDevice() returned 1 outputs E/AudioPolicyManagerBase( 103): setDeviceConnectionState() you will make a phone call,device 80000 returned V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 8, state 1, address W/AudioPolicyManagerBase( 103): setDeviceConnectionState() device already connected: 8 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 >pull out the headphone V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 8, state 0, address V/AudioPolicyManagerBase( 103): setDeviceConnectionState() disconnecting device 8 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 0 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 0 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 80000, state 1, address V/AudioPolicyManagerBase( 103): setDeviceConnectionState() connecting device 80000 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() checkOutputsForDevice() returned 1 outputs V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 80000, state 0, address V/AudioPolicyManagerBase( 103): setDeviceConnectionState() disconnecting device 80000 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 0 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 0 >when play music,the fm is started,and then even though the headphone is pulled out,the device still >assume the headphone is connected V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 80000, state 1, address V/AudioPolicyManagerBase( 103): setDeviceConnectionState() connecting device 80000 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() checkOutputsForDevice() returned 1 outputs >sound comes out headphone,even though we play the music,we can not hear the music. I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1 I/audio_hw_primary( 103): Set 'HeadPhone Function'.0 to 1
hi wayne, can you help to check why we reconnectted fm when the issue occur?
Flags: needinfo?(waychen)
Could be related to bug 1082677
Hi Jingme, which device did you use? Sincerely, Wayne
Flags: needinfo?(jingmei.zhang)
(In reply to Wayne Chen [:xwaynec] from comment #4) > Hi Jingme, > > which device did you use? Hi Wayne, I can both reproduce the issue in 1.4 & 2.1. it would be more likely to reproduce the issue in a quick operation.
Flags: needinfo?(jingmei.zhang)
Hi Jingmei, could you please help use this command (adb shell dumpsys) to dump info for me after issue happened? I try to use flame 2.1 to reproduce but flame doesn't work well now. Thanks Sincerely, Wayne
Flags: needinfo?(jingmei.zhang)
Hi Wayne, I reproduce the issue with 2.1 in my locale,and the dump info is as follows: Currently running services: SurfaceFlinger android.security.keystore appops batterypropreg media.audio_flinger media.audio_policy media.camera media.player media.resource_manager permission scheduling_policy ------------------------------------------------------------------------------- DUMP OF SERVICE SurfaceFlinger: ------------------------------------------------------------------------------- DUMP OF SERVICE android.security.keystore: ------------------------------------------------------------------------------- DUMP OF SERVICE appops: ------------------------------------------------------------------------------- DUMP OF SERVICE batterypropreg: ------------------------------------------------------------------------------- DUMP OF SERVICE media.audio_flinger: Clients: pid: 698 Notification Clients: pid: 103 pid: 108 pid: 698 Global session refs: session pid count 10 698 1 Hardware status: 0 Standby Time mSec: 3000 Output thread 0xb5364008 internals Normal frame count: 1280 last write occurred (msecs): 18 total writes: 12681 delayed writes: 12 blocked in write: 1 suspend count: 0 mix buffer : 0xb6fa75f8 Fast track availMask=0xfe io handle: 2 TID: 316 standby: 0 Sample rate: 44100 HAL frame count: 1280 Channel Count: 2 Channel Mask: 0x00000003 Format: 1 Frame size: 4 Pending setParameters commands: Index Command Pending config events: AudioMixer tracks: 00000002 FastMixer not initialized Output thread 0xb5364008 stream volumes in dB: 0:-19, 1:-23, 2:-28, 3:-15, 4:-28, 5:-28, 6:0, 7:-23, 8:-23, 9:-50, 10:0 Output thread 0xb5364008 tracks Name Client Type Fmt Chn mask Session fCount S F SRate L dB R dB Server Main buf Aux Buf Flags UndFrmCnt 1 698 3 00000001 00000003 10 5120 A 3 44100 0 0 005F4100 B6FA75F8 00000000 0x400 0 Output thread 0xb5364008 active tracks Name Client Type Fmt Chn mask Session fCount S F SRate L dB R dB Server Main buf Aux Buf Flags UndFrmCnt 1 698 3 00000001 00000003 10 5120 A 3 44100 0 0 005F4100 B6FA75F8 00000000 0x400 0 Normal mixer raw underrun counters: partial=0 empty=0 - 0 Effect Chains: ------------------------------------------------------------------------------- DUMP OF SERVICE media.audio_policy: PolicyManager Interface: 0xb6f8f310 Command Thread: 0xb6f8ec90 Tones Thread: 0xb6f8e970 AudioCommandThread 0xb6f8ec90 Dump - Commands: Command Time Wait pParam Last Command 02 000524.221 1 0xb6faf528 AudioCommandThread 0xb6f8e970 Dump - Commands: Command Time Wait pParam Last Command -1 000000.000 0 0x0 AudioPolicyManager Dump: 0xb6f8f3a8 Primary Output: 2 A2DP device address: SCO device address: USB audio ALSA Output devices: 00080003 Input devices: 00000004 Phone state: 0 Force use for communications 0 Force use for media 0 Force use for record 0 Force use for dock 0 Force use for system 0 HW Modules dump: - HW Module 1: - name: primary - handle: 1 - outputs: output 0: - sampling rates: 44100 - channel masks: 0x0003 - formats: 0x00000001 - devices: 0x208147f - flags: 0x0002 - inputs: input 0: - sampling rates: 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000 - channel masks: 0x0010, 0x000c - formats: 0x00000001 - devices: 0x8000009c - flags: 0x0000 - HW Module 2: - name: a2dp - handle: 3 - outputs: output 0: - sampling rates: 44100 - channel masks: 0x0003 - formats: 0x00000001 - devices: 0x0380 - flags: 0x0000 - HW Module 3: - name: usb - handle: 4 - outputs: output 0: - sampling rates: 44100 - channel masks: 0x0003 - formats: 0x00000001 - devices: 0x2000 - flags: 0x0000 output 1: - sampling rates: 44100 - channel masks: 0x0003 - formats: 0x00000001 - devices: 0x4000 - flags: 0x0000 Outputs dump: - Output 2 dump: Sampling rate: 44100 Format: 00000001 Channels: 00000003 Latency: 116 Flags 00000002 Devices 00080000 Stream volume refCount muteCount 00 0.110 00 00 01 0.070 00 00 02 0.039 00 00 03 0.177 01 00 04 0.039 00 00 05 0.039 00 00 06 -1.000 00 00 07 0.070 00 00 08 0.070 00 00 09 0.003 00 00 10 -1.000 01 00 Inputs dump: Streams dump: Stream Can be muted Index Min Index Max Index Cur [device : index]... 00 true 00 05 0001 : 04, 0002 : 04, 0004 : 04, 0008 : 04, 0020 : 04, 0080 : 04, 40000000 : 01, 01 true 00 15 0001 : 08, 0002 : 08, 0004 : 08, 0008 : 08, 0020 : 08, 0080 : 08, 40000000 : 01, 02 true 00 15 0001 : 08, 0002 : 08, 0004 : 08, 0008 : 08, 0020 : 08, 0080 : 08, 40000000 : 01, 03 true 00 15 0001 : 08, 0002 : 08, 0004 : 08, 0008 : 08, 0020 : 08, 0080 : 08, 40000000 : 01, 04 true 00 15 0001 : 15, 0002 : 15, 0004 : 15, 0008 : 15, 0020 : 15, 0080 : 15, 40000000 : 01, 05 true 00 15 0001 : 08, 0002 : 08, 0004 : 08, 0008 : 08, 0020 : 08, 0080 : 08, 40000000 : 01, 06 true 00 15 0020 : 15, 40000000 : 01, 07 true 00 15 0001 : 15, 0002 : 15, 0004 : 15, 0008 : 15, 0020 : 15, 0080 : 15, 40000000 : 01, 08 true 00 15 40000000 : 01, 09 true 00 15 40000000 : 01, 10 true 00 15 40000000 : 01, Total Effects CPU: 0.000000 MIPS, Total Effects memory: 0 KB Registered effects: ------------------------------------------------------------------------------- DUMP OF SERVICE media.camera: Camera module HAL API version: 0x0 Camera module API version: 0x1 Camera module name: Sprd camera HAL Camera module author: Spreadtrum Corporation Number of camera devices: 2 Camera 0 static information: Facing: BACK Orientation: 90 Device version: 0x100 Device is closed, no client instance Camera 1 static information: Facing: FRONT Orientation: 270 Device version: 0x100 Device is closed, no client instance No active camera clients yet. Camera traces (0): No camera traces collected. ------------------------------------------------------------------------------- DUMP OF SERVICE media.player: No media recorder client Files opened and/or mapped: ------------------------------------------------------------------------------- DUMP OF SERVICE media.resource_manager: ------------------------------------------------------------------------------- DUMP OF SERVICE permission: ------------------------------------------------------------------------------- DUMP OF SERVICE scheduling_policy: Thank you !
Flags: needinfo?(jingmei.zhang)
Hi Steven, AudioPolicyManager Dump: 0xb6f8f3a8 Primary Output: 2 A2DP device address: SCO device address: USB audio ALSA Output devices: 00080003 I think it's strange because headset is already plugged out, the only one who will use setDeviceConnect 0x8000 is FMRadioService. Could you help to find someone check is it gecko problem or gaia problem? Thanks Sincerely, Wayne
Flags: needinfo?(waychen) → needinfo?(slee)
Look like incorrect set devices status on gecko side, maybe timing issue. ==> Output devices: 00080003
Assignee: nobody → rlin
Flags: needinfo?(slee)
simple repro steps: 1. plug headset, play FM radio 2. answer a call, and hang up [back to FM radio app] 3. back home screen and open music app, play music 4. unplug headset [music stop] 5. press play, then speaker has no sound ----------- Build ID 20141109160204 Gaia Revision 5f8206bab97cdd7b547cc2c8953cadb2a80a7e11 Gaia Date 2014-11-07 19:08:20 Gecko Revision https://hg.mozilla.org/mozilla-central/rev/d380166816dd Gecko Version 36.0a1 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) 39 Firmware Date Thu Oct 16 18:19:14 CST 2014 Bootloader L1TC00011880
blocking-b2g: 2.1? → 2.1+
==> Output devices: 00080003 <---0x00080000 is AUDIO_DEVICE_DEFAULT, not FM Device's ID.
(In reply to Randy Lin [:rlin] from comment #11) > ==> Output devices: 00080003 <---0x00080000 is AUDIO_DEVICE_DEFAULT, not FM > Device's ID. Ignore this comment. This refer to older header file's information.
Hi Reporter, On step 6, could you try to kill music application by dock view too see if this issue can be recovered? I just want to sure this problem is on audiochannel or android HAL problem. I try to let output device equal 0x080003, but music can still playback through speaker.
Flags: needinfo?(jingmei.zhang)
(In reply to Bobby Chien [:bchien] from comment #10) > simple repro steps: > 1. plug headset, play FM radio > 2. answer a call, and hang up [back to FM radio app] > 3. back home screen and open music app, play music > 4. unplug headset [music stop] > 5. press play, then speaker has no sound > > ----------- > > Build ID 20141109160204 > Gaia Revision 5f8206bab97cdd7b547cc2c8953cadb2a80a7e11 > Gaia Date 2014-11-07 19:08:20 > Gecko Revision https://hg.mozilla.org/mozilla-central/rev/d380166816dd > Gecko Version 36.0a1 > Device Name flame > Firmware(Release) 4.4.2 > Firmware(Incremental) 39 > Firmware Date Thu Oct 16 18:19:14 CST 2014 > Bootloader L1TC00011880 Did you flash v188 image first? I check this image and the library isn't the same as v188.
(In reply to Randy Lin [:rlin] from comment #14) > (In reply to Bobby Chien [:bchien] from comment #10) > > simple repro steps: > > 1. plug headset, play FM radio > > 2. answer a call, and hang up [back to FM radio app] > > 3. back home screen and open music app, play music > > 4. unplug headset [music stop] > > 5. press play, then speaker has no sound > > > > ----------- > > > > Build ID 20141109160204 > > Gaia Revision 5f8206bab97cdd7b547cc2c8953cadb2a80a7e11 > > Gaia Date 2014-11-07 19:08:20 > > Gecko Revision https://hg.mozilla.org/mozilla-central/rev/d380166816dd > > Gecko Version 36.0a1 > > Device Name flame > > Firmware(Release) 4.4.2 > > Firmware(Incremental) 39 > > Firmware Date Thu Oct 16 18:19:14 CST 2014 > > Bootloader L1TC00011880 > > Did you flash v188 image first? I check this image and the library isn't the > same as v188. yes. I always update to latest image (v188). do you need crime scene?
Hi Randy, Do you mean when the issue occur,I kill music by press home button,and then check if we could hear music when we restart music? if so,the issue does not recover after restart. Thank you !
Flags: needinfo?(jingmei.zhang) → needinfo?(rlin)
(In reply to Bobby Chien [:bchien] from comment #15) > (In reply to Randy Lin [:rlin] from comment #14) > > (In reply to Bobby Chien [:bchien] from comment #10) > > > simple repro steps: > > > 1. plug headset, play FM radio > > > 2. answer a call, and hang up [back to FM radio app] > > > 3. back home screen and open music app, play music > > > 4. unplug headset [music stop] > > > 5. press play, then speaker has no sound > > > > > > ----------- > > > > > > Build ID 20141109160204 > > > Gaia Revision 5f8206bab97cdd7b547cc2c8953cadb2a80a7e11 > > > Gaia Date 2014-11-07 19:08:20 > > > Gecko Revision https://hg.mozilla.org/mozilla-central/rev/d380166816dd > > > Gecko Version 36.0a1 > > > Device Name flame > > > Firmware(Release) 4.4.2 > > > Firmware(Incremental) 39 > > > Firmware Date Thu Oct 16 18:19:14 CST 2014 > > > Bootloader L1TC00011880 > > > > Did you flash v188 image first? I check this image and the library isn't the > > same as v188. > > yes. I always update to latest image (v188). do you need crime scene? Sure, let me investigating it. BTW, This bug 1082677's patch would fix part of this issue.
Flags: needinfo?(rlin)
Hi Reporter, In your device, if the device flag 0x80000 is pull up, The audio patch would force to switch on headset? You can try to pull up the flag on AudioManager's constructor. On flame device, even that flag is pull up, the audio patch is keep on speaker. I'm curious this log sequence. >when play music,the fm is started,and then even though the headphone is pulled out,the device still >assume the headphone is connected ^^^^^^^ Why can FM be started without headphone? V/AudioPolicyManagerBase( 103): setDeviceConnectionState() device: 80000, state 1, address V/AudioPolicyManagerBase( 103): setDeviceConnectionState() connecting device 80000 V/AudioPolicyManagerBase( 103): setDeviceConnectionState() checkOutputsForDevice() returned 1 outputs
Flags: needinfo?(jingmei.zhang)
(In reply to Randy Lin [:rlin] from comment #18) > ^^^^^^^ Why can FM be started without headphone? Hi Randy, I think this should be the issue. when the issue occur,I could always find the logs to connect the FM. The most strange is that when the issue occur,the device will do'Set 'HeadPhone Function'.0 to 0'first.and then choose to connect the fm.we can see the HeadPhone is on by command(tinymix) at this time.
Flags: needinfo?(jingmei.zhang)
Hi Randy, I have tested the patch in 1082677,but it does not work here.
It looks like fmradio is unexpected turning-on through your test step at your device. You can try to avoid to set AUDIO_DEVICE_OUT_FM on in this function if headset not exist. ===>AudioManager::SetFmRadioAudioEnabled(bool aFmRadioAudioEnabled) Also fmradioservice should handle this error, too.
Hi Jingmei, 1. I use dolphin v2.1 but can't reproduce by comment 1 STR 2. Comment 6 has a STR however I also can't reproduce in dolphin v2.1..... (btw, could you help try comment 6 STR too?) Does sprd modify gecko or gaia code? Thanks Sincerely, Wayne
Flags: needinfo?(jingmei.zhang)
Hi Wayne, I can reproduce follow comment6 step. it can be reproduced easily. I will check if this is caused by our patch.(we have not modified anything lately). it might be better to reproduce in a quick operate.
Flags: needinfo?(jingmei.zhang)
(In reply to Randy Lin [:rlin] from comment #21) > It looks like fmradio is unexpected turning-on through your test step at > your device. > You can try to avoid to set AUDIO_DEVICE_OUT_FM on in this function if > headset not exist. > ===>AudioManager::SetFmRadioAudioEnabled(bool aFmRadioAudioEnabled) > Also fmradioservice should handle this error, too. Hi Randy, I find 'aFmRadioAudioEnabled' is set to true in audio channel switch process.then fm is connected and headphone is set to status 'on'. in AudioManager::SetFmRadioAudioEnabled: >AudioSystem::setDeviceConnectionState(AUDIO_DEVICE_OUT_FM, > aFmRadioAudioEnabled ? AUDIO_POLICY_DEVICE_STATE_AVAILABLE : > AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE, ""); could I choose to set the AUDIO_POLICY_DEVICE_STATE_AVAILABLE when both aFmRadioAudioEnabled is true and the HeadPhone is on?
Flags: needinfo?(rlin)
ya, That what I said in comment 21. BTW, I think this isn't a normal case, FMRadioServices should find why cause this incorrect function call(SetFmRadioAudioEnabled) on your test step.
Flags: needinfo?(rlin)
see from my log,FM is enabled by the notification 'CanPlayChanged' in gecko audio. >when unplug headphone after step4 in comment10 : I/* JINGMEI * ==>( 1009): HTMLMediaElement::CanPlayChanged pid 1009 ,tid 1009 I/* JINGMEI * ==>( 1009): HTMLMediaElement::UpdateChannelMuteState pid 1009 ,tid 1009 I/* JINGMEI * ==>( 1009): HTMLMediaElement::SuspendOrResumeElement pid,1009,tid:1009 I/AudioManager( 845): AudioManager::SetFmRadioAudioEnabled pid:845,tid:845 I/AudioManager( 845): AudioManager::aState 1, //means the headphone is plug out I/AudioManager( 845): AudioManager::aFmRadioAudioEnabled 0, //disable fm V/AudioPolicyManagerBase( 102): setDeviceConnectionState() device: 80000, state 0, address V/AudioPolicyManagerBase( 102): setDeviceConnectionState() disconnecting device 80000 I/audio_hw_primary( 102): Set 'HeadPhone Function'.0 to 0 V/AudioPolicyManagerBase( 102): setDeviceConnectionState() device: 8, state 0, address V/AudioPolicyManagerBase( 102): setDeviceConnectionState() disconnecting device 8 >then audio channel recieve the 'CanPlayChanged' angin: I/* JINGMEI * ==>( 1009): HTMLMediaElement::CanPlayChanged pid 1009 ,tid 1009 I/* JINGMEI * ==>( 1009): HTMLMediaElement::UpdateChannelMuteState pid 1009 ,tid 1009 I/* JINGMEI * ==>( 1009): HTMLMediaElement::SuspendOrResumeElement pid,1009,tid:1009 I/AudioManager( 845): AudioManager::SetFmRadioAudioEnabled pid:845,tid:845 I/AudioManager( 845): AudioManager::aState 1, //though the headphone is plug out I/AudioManager( 845): AudioManager::SWITCH_STATE_OFF 1, I/AudioManager( 845): AudioManager::aFmRadioAudioEnabled 1,//but the fm enable flag is true V/AudioPolicyManagerBase( 102): setDeviceConnectionState() device: 80000, state 1, address V/AudioPolicyManagerBase( 102): setDeviceConnectionState() connecting device 80000 //then fm is connected V/AudioPolicyManagerBase( 102): setDeviceConnectionState() checkOutputsForDevice() returned 1 outputs I/audio_hw_primary( 102): Set 'HeadPhone Function'.0 to 1 //headphone is connected
Hi Randy & Wayne, 1.we can use the workaround by the methods mentioned in comment21. can you help to check if there will be some risks? 2.the workaround methods is not the final resolution. As I am a newer for gecko audio,can you help to check why the 'CanPlayChanged' is called for a second time?
Flags: needinfo?(waychen)
Flags: needinfo?(rlin)
Hi jingmei, Because of bug 1082677, we can reproduce this symptom (can not hear music) but not exactly same problem. However, after patching bug 1082677, we can't reproduce this issue either in dolphin v2.1 or v1.4. I think the point is why 0x80000 (AUDIO_DEVICE_OUT_FM) will be set in STR, but I still can't reproduce it... Sincerely, Wayne
Flags: needinfo?(waychen)
Hi Wayne, >Because of bug 1082677, we can reproduce this symptom (can not hear music) but not exactly same >problem. However, after patching bug 1082677, we can't reproduce this issue either in dolphin v2.1 or >v1.4. I will test angin the moment I get the patch merged version >I think the point is why 0x80000 (AUDIO_DEVICE_OUT_FM) will be set in STR AUDIO_DEVICE_OUT_FM) is be set because it calls: >AudioSystem::setDeviceConnectionState(AUDIO_DEVICE_OUT_FM, > aFmRadioAudioEnabled ? AUDIO_POLICY_DEVICE_STATE_AVAILABLE : > AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE, ""); in AudioManager::SetFmRadioAudioEnabled.AudioManager::SetFmRadioAudioEnabled is called because HTMLMediaElement::CanPlayChanged is called by the notify AudioChannelChangedNotification. for the details, you can refer to comment26. I am trying to get the one who send the 'AudioChannelChangedNotification' when the headphone is plugged out.The process is a little hard..... for the reproduce,I think Bobby can help.Bobby and you should use the same device. So after the explanation,can you help to check the risks of the workaround method I mentioned in comment 27? Either the final resolution or a workaround patch is needed... Thank you so much for your response!
Flags: needinfo?(waychen)
I can't reproduce the symptom that you found the AUDIO_DEVICE_OUT_FM has been pull up, too. BTW, could you add log in FMRadio::CamPlayChanged function? Pause FM should run through this function, not media element.
Flags: needinfo?(rlin)
Bobby's bug has been fixed on Bug 1082677.
(In reply to Randy Lin [:rlin] from comment #31) > Bobby's bug has been fixed on Bug 1082677. Hi Bobby, Do you mean Bobby's issue in comment10? If so,it is a little strange,for I just reproduce the issue follow Bobby's steps in comment10. The issue also exist in 1.4.it might be more easily to reproduce in 1.4.
Did you test on our reference phone?
(In reply to Randy Lin [:rlin] from comment #33) > Did you test on our reference phone? flame 1.4 seems to be work well.we have no 2.1reference phone.But in our 1.4 monkey version(without our patch merged),the issue still exist.I will try to catch the rootcause in my locale first. Thank you so much for your help!
Hi Randy, I find a way to reproduce the issue in a very high probability,STR: 1 set a log in gaia/apps/fm/js/fm.js >function enableFMRadio(frequency) { > console.log('enableFMRadio'); > ... >} 2open fm and play fm 3recieve a call and answer the call,then hand up the call 4pull out the headphone the moment you see log 'enableFMRadio' in function enableFMRadio(frequency) is output 5enter music and play music,then we can not hear music. can you help to check the issue by the above steps?
Flags: needinfo?(rlin)
I just have a check on flame and also plug-out headset while enableFMRadio occurs, the device works well on music via speaker. (Output device also keeps on 0x3) Hi Bobby, I think this shouldn't be 2.1+ if flame can't reproduce after this bug 1082677 phase in 2.1, how do you think?
Flags: needinfo?(rlin) → needinfo?(bchien)
Hi Randy, I am so sorry it could not be reproduced in your side. Following the steps in comment35,this is a nearly 10/10 issue in my locale. Maybe this is a issue only for SPRD.but I really need your help to find the cause of the issue. I have checked the issue for a few days with no result.but: 1.FMRadio::SetCanPlay is called when the issue occur. 2.FMRadio::SetCanPlay is called maybe because AudioChannelService::Notify()is called . so could you help to provide a patch which includes log in the doubtful positions of the codes? I will reproduce the issue with the logs in. Thank you so much!
Flags: needinfo?(rlin)
Attached patch workAround.patchSplinter Review
Hi Randy & Wayne, I have made a workaround patch in the attachment,can you help to check?
please help for review.
Flags: needinfo?(bchien)
This one could fix your device's problem. but the root cause hasn't be founded. On this case, could you check fmradio's status? Is it turning on or not?
Flags: needinfo?(rlin)
(In reply to Randy Lin [:rlin] from comment #40) > This one could fix your device's problem. but the root cause hasn't be > founded. > On this case, could you check fmradio's status? Is it turning on or not? Hi Randy, Sorry for reply so late.The browser is broken yesterday. FM is turning on when the issue occur.the result of tinymix is: 87 BOOL 1 Speaker Function Off 88 BOOL 1 Speaker2 Function Off 89 BOOL 1 Earpiece Function Off >90 BOOL 1 HeadPhone Function On 91 BOOL 1 Line Function Off 92 BOOL 1 Mic Function Off 93 BOOL 1 Aux Mic Function Off 94 BOOL 1 HP Mic Function Off 95 BOOL 1 DMic Function Off 96 BOOL 1 DMic1 Function Off >97 BOOL 1 Digital FM Function On 98 BOOL 1 Speaker Mute Off 99 BOOL 1 Speaker2 Mute Off 100 BOOL 1 Earpiece Mute Off 101 BOOL 1 HeadPhone Mute Off
Does this bug happens on flame?
(In reply to Ken Chang[:ken] from comment #42) > Does this bug happens on flame? Yes, it happens previously. I am waiting patch from bug 1082677 and comment 38. If it cannot be reproducible. I am considering to close this case.
QA tested that on bug 108267. Flame 2.1 build: Gaia-Rev 81160ad79e5b4c21967418dd63f1a1d08d77924e Gecko-Rev https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/3572aa3e6766 Build-ID 20141117001201 Version 34.0
It cannot be reproduced on 2.1. There is no reason to mark 2.1+.
blocking-b2g: 2.1+ → -
Flags: needinfo?(waychen)
Assignee: globelinmoz → nobody
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: