Closed Bug 918133 Opened 6 years ago Closed 4 years ago

Playback of gUM audio on http://mozilla.github.io/webrtc-landing/gum_test.html with headphones generates echo on mobile devices, but not on desktop

Categories

(Core :: WebRTC: Audio/Video, defect)

26 Branch
ARM
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jsmith, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Might be a dupe, but filing anyways just in case.

On FxAndroid & Firefox OS, request gUM audio from http://mozilla.github.io/webrtc-landing/gum_test.html and playing back the stream with headphones on will echo all sounds generated via the microphone. That means that saying a word into the microphone will immediately be heard back in an echo. Interesting enough, this problem doesn't show up on desktop with the same set of headphones, but is present on FxAndroid & Firefox OS.
It *should* be heard as an immediate echo, on both (and does so far as I know).  On what desktop system are you not hearing yourself when using gum_test Audio or Audio+Video?

I'm assuming in both cases it's using the headset mic and speakers.  Also I'm assuming no OS AEC is being done....
(In reply to Randell Jesup [:jesup] from comment #1)
> It *should* be heard as an immediate echo, on both (and does so far as I
> know).  On what desktop system are you not hearing yourself when using
> gum_test Audio or Audio+Video?

Windows 7 64-bit

> 
> I'm assuming in both cases it's using the headset mic and speakers.  Also
> I'm assuming no OS AEC is being done....

FWIW - these are samsung-based earbuds being used. Desktop recognizes the device as "Conexant 20672 SmartAudio" as an external microphone.
FWIW, ABR and I got echo the other day when we were on desktop
and both on headsets
Hmmm.  Please specify what "immediate echo" means - you should speak and hear yourself with a small delay (which is OS and hardware-dependant).  If it's under 50ms, you may not really hear it as "echo", if it's much over that you will perceive it as "echo".  Did it howl (run away in feedback), or were there repeated echos (2nd, 3rd, etc)?If you said "one" how many "ones" did you hear?

Apparently these were analog mic/speakers; not sure how differently they'll be treated, but the GIPS code has AGC stuff to tweak analog microphone boost levels. 

Echo in a call is a totally different thing - it's echo from the far end, which means the mic picked up the speaker.  That's possible with a headset though not the norm, especially if you have the volume up or if AGC kicks in, and if the AEC delay parameter "misses" the primary echo window.
(In reply to Randell Jesup [:jesup] from comment #4)
> Hmmm.  Please specify what "immediate echo" means - you should speak and
> hear yourself with a small delay (which is OS and hardware-dependant).  If
> it's under 50ms, you may not really hear it as "echo", if it's much over
> that you will perceive it as "echo".  Did it howl (run away in feedback), or
> were there repeated echos (2nd, 3rd, etc)?If you said "one" how many "ones"
> did you hear?

Not how to distinguish a howl vs. a repeated echo, but if I said the word "test," I would hear it played back 8 - 9 times getting softer on each time I hear it.
(In reply to Jason Smith [:jsmith] from comment #5)
> (In reply to Randell Jesup [:jesup] from comment #4)
> > Hmmm.  Please specify what "immediate echo" means - you should speak and
> > hear yourself with a small delay (which is OS and hardware-dependant).  If
> > it's under 50ms, you may not really hear it as "echo", if it's much over
> > that you will perceive it as "echo".  Did it howl (run away in feedback), or
> > were there repeated echos (2nd, 3rd, etc)?If you said "one" how many "ones"
> > did you hear?
> 
> Not how to distinguish a howl vs. a repeated echo, but if I said the word
> "test," I would hear it played back 8 - 9 times getting softer on each time
> I hear it.

Meant to say - not sure how to distinguish a howl vs repeated echo
A howl is low-latency feedback (squeal/howl, runaway-feedback).

An echo has enough delay to be clear repeated echoes of sound.

What sort of headset is this?  Were the speakers on your ears?  where's the mic?

What version?  Nightly?  Release?
(In reply to Randell Jesup [:jesup] from comment #7)
> A howl is low-latency feedback (squeal/howl, runaway-feedback).
> 
> An echo has enough delay to be clear repeated echoes of sound.

In that case, it's an echo.

> 
> What sort of headset is this?  Were the speakers on your ears?  where's the
> mic?

It's earbuds that at the point of when the two cords break away, includes a mic that you can speak into. The earbuds were on my ears.

> 
> What version?  Nightly?  Release?

Mozilla Central 1.2 build (Gecko 26) on Firefox OS when I tested it there. Firefox for Android was also tested using Nightly (Gecko 27).
OS: All → Gonk (Firefox OS)
Hardware: All → ARM
Attached image Earbuds Picture
That's very odd.  mwu, anything you can think of that would cause this?  In a gum_test loopback, we're just taking audio from gum and playing via an <audio> or <video> tag.  Headphones *should* have enough physical isolation to make any feedback (echo) of the signal low enough that you'd get no repeating echoes.  

(Also, from jason's comments it appears the delay from capture to playout is long enough it's perceived as distinct repeating echoes - jason, how much time between repeats would you say?  If you say "one", where in the "one" do you hear the first (non-echo) playout?  I assume each subsequent one has similar delay from the previous.)

Also, Jason: what hardware (phones) on each?
Flags: needinfo?(mwu)
(In reply to Randell Jesup [:jesup] from comment #10)
> That's very odd.  mwu, anything you can think of that would cause this?  In
> a gum_test loopback, we're just taking audio from gum and playing via an
> <audio> or <video> tag.  Headphones *should* have enough physical isolation
> to make any feedback (echo) of the signal low enough that you'd get no
> repeating echoes.  
> 
> (Also, from jason's comments it appears the delay from capture to playout is
> long enough it's perceived as distinct repeating echoes - jason, how much
> time between repeats would you say?  If you say "one", where in the "one" do
> you hear the first (non-echo) playout?  I assume each subsequent one has
> similar delay from the previous.)

The timeframe between repeats was a very short delay (i.e. if the word "test" is heard back, there's a very short delay and then I'll immediate hear "test" again in a softer sound).

> 
> Also, Jason: what hardware (phones) on each?

See https://intranet.mozilla.org/Program_Management/Firefox_OS/Devices under Buri/Hamachi for devices specs on the FxOS phone.

For FxAndroid, it's the Samsung Galaxy Nexus running Android 4.2 - http://www.gsmarena.com/samsung_galaxy_nexus_i9250-4219.php.
Ok, so TEST.Test.test would be ~500ms delay in the loop (rough)

Have you tested with any other headsets?  And can you verify the headset mic is the active mic?  Thanks.

I tested my Galaxy S4 with the stock headset/earbuds, no echo.
Blocks: b2g-getusermedia
No longer blocks: 894848
Tested on Nexus 4, no echo with headphones. I'll try other devices later.
jsmith, can you test with other headsets? Preferably, the headset that came with the phone. Some phones can expect differently wired headsets which will cause problems.
Flags: needinfo?(mwu)
Similar configuration on my Nexus 4, I am using ATH-M50's and am not hearing any echo. I also used Apple Earbuds and that resulted in no echo as well.
(In reply to Randell Jesup [:jesup] from comment #12)
> Ok, so TEST.Test.test would be ~500ms delay in the loop (rough)
> 
> Have you tested with any other headsets?  And can you verify the headset mic
> is the active mic?  Thanks.

Yes. I've seen this with the headset that comes with the Alcatel device as well. I also confirmed the headset mic is the active mic.

(In reply to Michael Wu [:mwu] from comment #14)
> jsmith, can you test with other headsets? Preferably, the headset that came
> with the phone. Some phones can expect differently wired headsets which will
> cause problems.

I just tested this with the headset that came with the Alcatel device - I can reproduce the echo there as well. Note the headset tested here is different than the headset seen in the screenshot, but it's a similar type of headset - earbuds with mic included, but made by Alcatel.
Marcia also just tested this on a different Buri device running yesterday's 1.2 build with the headset that comes with the Alactel device. She was able to reproduce the same echo I was hearing.
Also, improper insertion can fail to connect a channel or can cross-connect them (loopback!)

Hmmmmmmmm

I remember people telling us that for the Unagi's, you *had* to use the headsets that come with them because the internal connections on the headsets were different than US phones (same size plug).  Can Marcia test with a Buri headset?

Does the problem track the headset, or the phone?  Are there phones that *always* do this with all headsets, including their original ones?

Where does this earbud set come from?
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.