Closed Bug 870683 Opened 11 years ago Closed 11 years ago

Call new Bluetooth APIs when user trying to switch audio output

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, b2g18 fixed, b2g18-v1.0.1 fixed)

RESOLVED FIXED
1.0.1 Cert2 (21may)
blocking-b2g tef+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.1 --- fixed

People

(Reporter: echou, Assigned: arthurcc)

References

Details

(Whiteboard: [status: needs landing][target:05/17] QARegressExclude)

Attachments

(1 file)

To pass Bluetooth certification, we create a set of API to operate audio link of Bluetooth (SCO) on bug 830213. The newly added APIs are:

DOMRequest ConnectSco();
DOMRequest DisconnectSco();
DOMRequest IsScoConnected();

We need Dailer support to call these APIs when users try to switch audio output among earpiece, speaker and Bluetooth headset.
blocking-b2g: --- → tef?
Nominate as tef+ since we can't pass BT certification without using Dialer UI to control SCO.
Flags: needinfo?(dcoloma)
Depends on: 830213
Assignee: nobody → arthur.chen
blocking-b2g: tef? → tef+
Flags: needinfo?(dcoloma)
Add audio owner for support audio part just in case.
Target Milestone: --- → 1.0.1 Cert2 (28may)
Whiteboard: [status: patch needed]
Whiteboard: [status: patch needed] → [status: patch needed][target:05/17]
Etienne, this change was made for BT certification. Based on the current API design, bluetooth adapter is needed in dialer app although I have some concerns on this. So I would like your opinion here. Thanks!
Attachment #749215 - Flags: feedback?(etienne)
Whiteboard: [status: patch needed][target:05/17] → [status: needs review][target:05/17]
Comment on attachment 749215 [details]
Link to https://github.com/mozilla-b2g/gaia/pull/9756

Can't test the feature but code looks good!
Attachment #749215 - Flags: feedback?(etienne) → feedback+
If SCO disconnected (for example, BT headset turns off) during the call, do we really need to turn on speaker?
User can be scared that the audio path to speaker.

Test steps:
a. Bluetooth headset connected
b. Make a call
c. During the call, turn off BT headset
d. based on line 576 in oncall.js, speaker will be turned on
ConnectSco/DisconnectSco shall be lower case instead capitalized in oncall.js
Shawn, I am not quite sure about the case you pointed out. If you have concern on it, let's remove the code here and create a follow up issue. 

As for this patch, I still need to add some logics checking the existence of bluetooth connection and the type of it. So that we will not call connectSco/disconnectSco all the time.
Attachment #749215 - Flags: review?(etienne)
Etienne, I've refined the patch to avoid BT dependency. Shawn has already tested this patch. Could you help review it? Thanks!
I've tested the following scenarios:
Scenario A:
1. Connected BT headset, during call session, turn off BT headset
2. Check audio path correctly switch back to earpiece

Scenario B:
1. Connected BT headset, during call session, switch to speaker, turn off BT headset
2. Check audio path correctly switch back to speaker
3. Switch to earpieces again and check audio path routed to earpieces

Scenario C:
1. Turn off Bt headset, make a phone call, during the call session, turn on BT headset
2. Check audio path correctly switch back to BT headset
3. Switch to speaker again check path to speaker
Attachment #749215 - Flags: review?(ehung)
Comment on attachment 749215 [details]
Link to https://github.com/mozilla-b2g/gaia/pull/9756

r=me for the dialer part once the settings name is more specific.
Attachment #749215 - Flags: review?(etienne) → review+
Comment on attachment 749215 [details]
Link to https://github.com/mozilla-b2g/gaia/pull/9756

r=me with comment addressed. Thanks. :D
Attachment #749215 - Flags: review?(ehung) → review+
Etienne, Evelyn, thanks for reviewing.

v1.0.1: https://github.com/mozilla-b2g/gaia/commit/92f7613c403f59f300fd38fccaf8dcdee640ede4

The tests were done using v1.0.1 only. The patch will be landed on master and v1-train after Shawn finishes the tests on both branches.
Whiteboard: [status: needs review][target:05/17] → [status: needs landing][target:05/17]
Whiteboard: [status: needs landing][target:05/17] → [status: needs landing][target:05/17] QARegressExclude
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: