Closed Bug 808907 Opened 12 years ago Closed 12 years ago

Enable android Binder ipc thread

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 803471

People

(Reporter: sotaro, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

Steps to reproduce:

Current FirefoxOS could not detect AudioFlinger' died event/restart. If it happens, b2g/b2g-container processes that cached IAudioFlinger interface could not play/control audio anymore.

Current FirefoxOS uses AudioFlinger in mediaserver process. For ipc to communicate with AudioFlinger, android Binder ipc is used. But FirefoxOS do not enable Binder ipc thread. Without the Binder ipc thread, b2g/b2g-container process could send ipc message to AudioFlinger. But could not receive ipc message from AudioFlinger.

In normal situation, there is no problem from this restriction. But by this restriction, b2g/b2g-container could not detect AudioFlinger died event. AudioFlinger died event is delivered by using Binder ipc thread.

I tried following
- power on FirefoxOS phone
- unlock lockscreen
- unlock sound is played
- kill mediaserver process by using "adb shell ps" and "adb shell kill" command
- return to lock screen
- unlock sound is played even after mediaserver killed 

Same thing could be done by using music app.



Actual results:

unlock sound is not played after mediaserver killed 


Expected results:

unlock sound is played even after mediaserver killed
OS: Windows 7 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
mediaserver is automatically restarted by init after get killed
IAudioFlinger interface is stored as static member
http://androidxref.com/4.0.4/xref/frameworks/base/include/media/AudioSystem.h#230
http://androidxref.com/4.0.4/xref/frameworks/base/media/libmedia/AudioSystem.cpp#34

The interface is cleared when died event is detected
AudioSystem::AudioFlingerClient::binderDied(const wp<IBinder>& who)
http://androidxref.com/4.0.4/xref/frameworks/base/media/libmedia/AudioSystem.cpp#375
after applying the patch, I confirmed that unlock lockscreen sound is played even after mediaserver get killed.
Blocks: 798202, 798773, 803471
Attachment #678626 - Attachment is patch: true
If b2g/b2g-container process do not receive AudioFlinger died event, the process continue to use invalid IAudioFlinger interface.

Therefore it is necessary to clear invalid interface. Next time, AudioSystem class try to get new IAudioFlinger interface.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
No longer blocks: 803471
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: