[B2G][Helix][Audio][tianhuajian]The audio output changed to handset when the phone in headset call state and take video

RESOLVED INVALID

Status

Firefox OS
AudioChannel
P2
critical
RESOLVED INVALID
4 years ago
4 years ago

People

(Reporter: lecky, Assigned: scheng)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; aff-kingsoft-ciba; .NET4.0C; .NET4.0E)

Steps to reproduce:

 A is FFOS phone , B is another phone
1. Insert the headset to the phone A
2. B call A
3. A connect the call
4. A take video by camera recorder



Actual results:

4. The audio output changed to handset mode, so A can not hear B from headset, and can hear B from handset


Expected results:

4. A can hear B from headset

【Test Count*】:5
【Found Count*】:5
【Gaia commit ID*】: V1.1HD
【Gecko commit ID*】:  1.1.0 HD
【Log*】:
【Network environment】:
【Resume operation】:
(Reporter)

Updated

4 years ago
Severity: normal → critical
blocking-b2g: --- → hd?
Component: General → AudioChannel
OS: All → Gonk (Firefox OS)
Priority: -- → P2
Hardware: All → ARM
(Reporter)

Comment 1

4 years ago
I find in audio HAL, the sound device has changed to handset mode,so I think it is a audiochannel issue
11-30 15:55:26.339: WARN/AudioHardwareMSM76XXA(171): rpc_snd_set_device(0, 0, 0)
(Reporter)

Comment 2

4 years ago
And please also check whether is is FFOS design or is a issue
(Reporter)

Updated

4 years ago
Flags: needinfo?(wchang)
(Reporter)

Updated

4 years ago
Flags: needinfo?(wchang) → needinfo?(mchen)
(Reporter)

Comment 3

4 years ago
Hi Wayne,
Please help check whether is FFOS design or is a issue
(Assignee)

Updated

4 years ago
QA Contact: scheng
(Assignee)

Updated

4 years ago
QA Contact: scheng
(Assignee)

Updated

4 years ago
Assignee: nobody → scheng
(Assignee)

Comment 4

4 years ago
It seems that audio routing policy issue, i add the checking condition about wired-headset and weather in call or not. It works.

uint32_t AudioPolicyManager::getDeviceForInputSource(int inputSource)
         if (hasBackMicrophone()) {
             device = AudioSystem::DEVICE_IN_BACK_MIC;
         } else {
+            if ((mAvailableInputDevices & AudioSystem::DEVICE_IN_WIRED_HEADSET) && 
+                (mPhoneState == AudioSystem::MODE_IN_CALL)) {
+                       device = AudioSystem::DEVICE_IN_WIRED_HEADSET;
+            } else {
                 device = AudioSystem::DEVICE_IN_BUILTIN_MIC;
+            }
         }
         break;
(Reporter)

Comment 5

4 years ago
(In reply to Star Cheng [:scheng] from comment #4)
> It seems that audio routing policy issue, i add the checking condition about
> wired-headset and weather in call or not. It works.

uint32_t
> AudioPolicyManager::getDeviceForInputSource(int inputSource)
         if
> (hasBackMicrophone()) {
             device =
> AudioSystem::DEVICE_IN_BACK_MIC;
         } else {
+            if
> ((mAvailableInputDevices & AudioSystem::DEVICE_IN_WIRED_HEADSET) && 
+      
> (mPhoneState == AudioSystem::MODE_IN_CALL)) {
+                       device
> = AudioSystem::DEVICE_IN_WIRED_HEADSET;
+            } else {
              
> device = AudioSystem::DEVICE_IN_BUILTIN_MIC;
+            }
         }
     
> break;

Hi Star,
Thank you for your help , I have modified the code as you told, the issue seems dispear.
I will close this bug.
(Reporter)

Updated

4 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID

Updated

4 years ago
Flags: needinfo?(mchen)
Mass-modify - removal of no longer relevant blocking flags.

Updated

4 years ago
blocking-b2g: hd? → ---
You need to log in before you can comment on or make changes to this bug.