Closed Bug 867078 Opened 12 years ago Closed 12 years ago

[B2G][Audio] Audio path/volume control can't work when media server crashed.

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 868932

People

(Reporter: rlin, Unassigned)

References

Details

When mediaserver is crashed, there are some audio path/volume control related issues can be found. For ex: 1. Volume control doesn't work. 2. Phone call during the headphone/Bluetooth sco path turning on, the audio path would redirect to receiver when media server was killed, can be recover. 3. FM radio=> no sound, turn off on can recover. mchen found it may related to android binder. We may need a audio services to keep the routing info and try to recover the original setting.
Issue 1: XXXClient::binderDied() doesn't be called when mediaserver is died. There are global binders for audio flinger & policy manager on each process & created when first command is fired. During the creating of global binders, a related client instance will be used to listen (::binderDied()) for whether this binder connection is died then we can do corresponding actions including re-creating the binder connection. Issue 2: After media sever is restarted, b2g doesn't restore the states into media server. We should restore --> Set media server to restart mode a. Device connection state. (ex: headset, BT SCO/A2DP) b. Forced usage. c. Stream volume. (ex: normal, content ...etc.) d. Phone state --> Leave media server from restart mode. ----------------------------------------------------------------- Currently AudioManager.cpp just used as a relay role and there is no any status recorded, so I agree Randy's suggestion to create a centralized "Audio Service" in Chrome process as an Gecko component (platform independent) and re-factory AudioManager for gonk layer (platform dependent). Then we may need a IPC mechanism from child to Chrome process for audio control commands (ex: speaker on, BT sco on and listen to status change event.).
on m_c trunk, the audio path switch is ok after mediaserver crashed. The volume control problem caused by gonk's audioManager isn't re-init the volume index correctly. So this function call would fail by this the volume index check. status_t AudioPolicyManagerBase::setStreamVolumeIndex(AudioSystem::stream_type stream, int index) if ((index < mStreams[stream].mIndexMin) || (index > mStreams[stream].mIndexMax)) { return BAD_VALUE; } On 1.01, it also needs binder's fix on Bug 803471
The same root-cause, set duplicate of 868932
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.