Closed Bug 895822 Opened 11 years ago Closed 11 years ago

[AudioManager] The instance of AudioManager doesn't be created for monitoring the headset status.

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mchen, Assigned: mchen)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 876334 removed codes related to AudioManager from shell.js/settings.js to AudioChannelManager.cpp and AudioManager.cpp. Originally the instance of AudioManager was created by shell.js during b2g boot up. 

Now it is created by AudioChannelService::Observer() corresponding to the volume control. Before any volume control is fired, the AudioManager is not created so there is no one register to monitor headphone status from GonkSwitch.cpp. Then routing for headphone is processed even GonkSwitch is working well.

This bug will try to find a way to initialize AudioManager during b2g boot up flow.
Blocks: 876334
Hi Dave,

May I know your suggestion about putting initialization of AudioManager instance on the position as below?
http://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/SystemWorkerManager.cpp#346

The AudioManager should be created during boot process because it is used to monitor the headset plugin/pull out by the notification from GonkSwitch.cpp. And now it is just created by AudioChannelService when user pressed volume key then adjusting volume via AudioManager.

So I think it should be created early like what automounter did there. Thanks.
Flags: needinfo?(dhylands)
It seems like a reasonable place to put initialization for any of the code in dom/system/gonk. Just keep in mind that it's running on the main thread.
Flags: needinfo?(dhylands)
Thanks for kindly reply and AudioManager is running on the main thread indeed.
Hi Dave,

This patch is used to create a service of AudioManager during boot up process so it can monitor the headset pluggin change and initialize the configuration of audio backend - AudioFlinger. Thanks.
Attachment #787409 - Flags: review?(dhylands)
Attachment #787409 - Flags: review?(dhylands) → review+
Carry the reviewer's name and add keyword - checkin-needed.
Attachment #787409 - Attachment is obsolete: true
Attachment #789432 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d62a5b269536
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: