Closed
Bug 880557
Opened 12 years ago
Closed 7 years ago
[Bluetooth]Error occurs when Adjust the HBS700 headset volume
Categories
(Firefox OS Graveyard :: Bluetooth, defect, P1)
Tracking
(blocking-b2g:-)
People
(Reporter: leo.bugzilla.gecko, Assigned: mchen)
Details
step>
1. bluetooth on
2. HBS700 headset pair
3. volume key click
(listen to music or when no action)
log>
Error occurs in javascript files.
06-07 09:59:36.660 V 145 BluetoothHfpManager ReceiveSocketData:731 [LGBT_gecko] received Socket message = AT+VGS=13
06-07 09:59:36.690 V 145 BluetoothHfpManager SendLine:1151 [LGBT_gecko] sending message = OK
06-07 09:59:36.740 E 145 GeckoConsole Content JS LOG at app://system.gaiamobile.org/shared/js/event_helper.js:4 in handle_mozChromeEvent: event_helper :handle_mozChromeEvent: bluetooth-volumeset
06-07 09:59:36.800 I 145 AudioManager SetStreamVolumeIndex aStream=6, aIndex=13
06-07 09:59:36.800 V 150 AudioPolicyManagerBase setStreamVolumeIndex() stream 6, index 13
06-07 09:59:36.800 V 150 AudioPolicyManager checkAndSetVolume() cannot set stream 6 volume with force use = 0 for comm
06-07 09:59:36.810 E 145 GeckoConsole [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAudioManager.setStreamVolumeIndex]" {file: "chrome://browser/content/settings.js" line: 96}]
06-07 09:59:36.810 E 145 GeckoConsole [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAudioManager.setStreamVolumeIndex]" {file: "chrome://browser/content/settings.js" line: 96}]
It seems AudioManager can only handle volume change during "In Call" state, if Bluetooth gets AT+VGS=13, Bluetooth notify AudioManager to set volume but eventually AudioService cannot perform operation for set volume. Randy, can you help to comment on AudioManager behavior? :)
Flags: needinfo?(rlin)
Comment 2•12 years ago
|
||
Audio manager block this behavior
// do not change in call volume if bluetooth is connected and vice versa
if ((stream == AudioSystem::VOICE_CALL && mForceUse[AudioSystem::FOR_COMMUNICATION] == AudioSystem::FORCE_BT_SCO) ||
(stream == AudioSystem::BLUETOOTH_SCO && mForceUse[AudioSystem::FOR_COMMUNICATION] != AudioSystem::FORCE_BT_SCO)) {
LOGE("checkAndSetVolume() cannot set stream %d volume with force use = %d for comm",
stream, mForceUse[AudioSystem::FOR_COMMUNICATION]);
return INVALID_OPERATION;
}
Gonk AudioManager got fail result and cause js error.
We need to find out when does bt_sco volume set during the voice call on android phone.
Flags: needinfo?(rlin)
Hey Marco,
It seems you're checking volume related problems, would you take this bug? Here Bluetooth is correctly notify AudioManager but I think we need to handle the error inside the audio module (I almost think invalid operation error code return from AudioPolicyManager is platform dependent). Randy and I checked Nexus4 and Unagi, both of them behave differently.
Flags: needinfo?(mchen)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mchen
Flags: needinfo?(mchen)
Assignee | ||
Comment 4•12 years ago
|
||
Hi Vasanth,
Could you help to give some suggestion on this case due to it is related to Audio HAL?
Issue:
BT_SCO volume can't be adjusted during non-voice call state.
Our investigation:
Please refer to comment 2, it shows that AudioPolicyManager will return error directly when we tried to set BT_SCO volume but mForceUse is not FOR_COMMUNICATION.
Question:
1. Is this a common behavior of preventing to set BT_SCO on non-voice call state?
2. What is the expected result on Android version?
Thanks.
Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(vincenc)
Assignee | ||
Updated•12 years ago
|
Flags: needinfo?(vincenc) → needinfo?(mvines)
Reporter | ||
Updated•12 years ago
|
blocking-b2g: --- → leo+
Priority: -- → P1
Target Milestone: --- → 1.1 QE4 (15jul)
Assignee | ||
Comment 5•12 years ago
|
||
Hi Leo,
Could you fire a SR to your chip vendor for clarifying the our investigation here?
Because the part from audio HAL is came from CAF.
Thanks.
Flags: needinfo?(mvines) → needinfo?(leo.bugzilla.gecko)
Reporter | ||
Comment 6•12 years ago
|
||
Dear Mozilla Team,
I think that this should block in gecko side.
Because it seems to be only send vgs when sco is connected.
"+VGS" command is sent as below,
if (IsConnected()) {
SendCommand("+VGS: ", mCurrentVgs);
}
So if it is received AT+VGS when sco is not connected, bluetooth-volume-change should not be run as above.
Please check this point.
Thanks.
(In reply to Marco Chen [:mchen] from comment #5)
> Hi Leo,
>
> Could you fire a SR to your chip vendor for clarifying the our investigation
> here?
> Because the part from audio HAL is came from CAF.
>
> Thanks.
Flags: needinfo?(leo.bugzilla.gecko)
Assignee | ||
Comment 7•12 years ago
|
||
Hi Leo,
Thanks for your reply.
Hi Shawn,
Could you help to check the comment 6 from Leo? Thanks.
Flags: needinfo?(shuang)
Hi leo,
I think maybe i misunderstood bug your description? From the log you mentioned, it looks like phone received AT+VGS=13 and javascript error message has been reported, which is volume change from headset. But what you mentioned is different from the original bug description. What comment 6 depicts that volume key was been clicked from phone instead of headset.
And yes, Comment 6 is right.
Flags: needinfo?(shuang)
Reporter | ||
Comment 9•12 years ago
|
||
Hi Shawn,
Sorry for hassle.
As your comment, +VGS is sent by phone.
The reason I mentioned it is reference for AT+VGS.
+VGS is not generated JS error because IsConnected() method.
It checks the sco connection and decide to try a SendCommand("+VGS: ", mCurrentVgs);
I think that AT+VGS seem to be solved in the same way, so I asked for you to review.
Could you check this?
Hi leo,
Well, I double checked the code, IsConnected() actually checked RFCOMM socket connection instead of SCO connection. Do you agree?
Reporter | ||
Comment 11•12 years ago
|
||
Hi Shawn,
You are right. IsConnected() checked socket connection and IsScoConnected() checked the sco connection. I missed it. :)
Thanks.
Hi leo,
Just try to summarize here that I want to clarify with you again. Bug Description mentioned "3. volume key click
(listen to music or when no action)", I think here we shall discuss "Bluetooth HFP BT_SCO volume", not media stream volume. The Bug Description might need to be corrected.
So the problem we need to fix/figure out are:
Audio HAL AudioPolicyManager returns error directly when we tried to set BT_SCO volume but mForceUse is not FOR_COMMUNICATION. This is why we can see javascript error.
Reporter | ||
Comment 13•12 years ago
|
||
Hi Shawn,
Yes, we shall discuss only BT_SCO volume.
As your comment, AudioPolicyManager returns error directly when set BT_SCO and not FOR_COMMUNICATION.
So I was thinking about how to fix it as below.
1. Does not notify AT+VGS when non-call state.
2. Makes other log return instead of INVALID_OPERATION.
3. Fix in AudioPolicyManager
I just thought that no.1 is easy for fix.
If you think it should be fix in Audio part, I'll ask to our Audio engineer.
Please check this.
Thanks.
Reporter | ||
Comment 14•12 years ago
|
||
I change leo? and I'll determine whether to apply in the future.
blocking-b2g: leo+ → leo?
Comment 15•12 years ago
|
||
If this isn't important enough to block any more, it's not likely to make it in to v1.1 at this stage.
blocking-b2g: leo? → -
Comment 16•7 years ago
|
||
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.
Description
•