Bug 246214 - www/chromium microphone does not work with Microsoft Teams
Summary: www/chromium microphone does not work with Microsoft Teams
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-chromium (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 06:52 UTC by Graham Perrin
Modified: 2021-05-16 12:34 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (chromium)


Attachments
Screenshot of Teams (144.64 KB, image/png)
2020-05-05 06:58 UTC, Graham Perrin
no flags Details
Comparative screenshot of Talky (72.85 KB, image/png)
2020-05-05 06:59 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2020-05-05 06:52:32 UTC
With the 'Meet now' feature of Teams: 

* the webcam can be switched on
* no microphone is found. 

### Environment

root@momh167-gjp4-8570p:~ # sysctl hw.snd.default_unit=2
hw.snd.default_unit: 1 -> 2
root@momh167-gjp4-8570p:~ # date ; uname -v
Tue May  5 07:47:55 BST 2020
FreeBSD 13.0-CURRENT #54 r360237: Fri Apr 24 09:10:37 BST 2020     root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG 
root@momh167-gjp4-8570p:~ # pkg query '%o %v %R' chromium
www/chromium 81.0.4044.129 FreeBSD
root@momh167-gjp4-8570p:~ # 

HP EliteBook 8570p
<https://web.archive.org/web/20150906211950/http://www8.hp.com:80/h20195/v2/GetPDF.aspx/c04163744.pdf>
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2020-05-05 06:58:12 UTC
Created attachment 214146 [details]
Screenshot of Teams
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2020-05-05 06:59:32 UTC
Created attachment 214147 [details]
Comparative screenshot of Talky

For comparison, a Talky room: 

<https://talky.io/freebsd-www-chromium-246214>
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2020-05-08 10:15:02 UTC
Compare with this info, from Maciej Suszko, whose Chromium on 12.1-STABLE on a Thinkpad T460 _does_ work with a microphone: 

* <https://lists.freebsd.org/pipermail/freebsd-questions/2020-May/289223.html>
* <https://lists.freebsd.org/pipermail/freebsd-questions/2020-May/289224.html>

----

Here: 

$ date ; uname -v
Fri  8 May 2020 11:12:33 BST
FreeBSD 13.0-CURRENT #55 r360732: Thu May  7 09:31:34 BST 2020     root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG 
$ cat /dev/sndstat
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play)
pcm1: <IDT 92HD81B1X (Analog 2.0+HP/2.0)> (play/rec)
pcm2: <IDT 92HD81B1X (Analog)> (play/rec) default
pcm3: <USB audio> (play/rec)
No devices installed from userspace.
$ sysctl hw.snd.default_unit
hw.snd.default_unit: 2
$ pkg info chromium | head -23
chromium-81.0.4044.138
Name           : chromium
Version        : 81.0.4044.138
Installed on   : Fri May  8 02:32:33 2020 BST
Origin         : www/chromium
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : java www
Licenses       : LGPL21, BSD3CLAUSE, MPL11
Maintainer     : chromium@FreeBSD.org
WWW            : https://www.chromium.org/Home
Comment        : Google web browser based on WebKit
Options        :
        ALSA           : on
        CODECS         : on
        CUPS           : on
        DEBUG          : off
        DRIVER         : on
        KERBEROS       : on
        PULSEAUDIO     : off
        SNDIO          : off
        TEST           : off
Shared Libs required:
$ 

Microphone working with <https://www.onlinemictest.com/> but not with Teams.
Comment 4 Emanuel Haupt freebsd_committer freebsd_triage 2020-06-02 09:29:47 UTC
The microphone is working for me, however audio is very choppy. I the terminal I see countless lines such as:

[40702:377929728:0602/095857.851710:ERROR:h264_bitstream_parser.cc(206)] Streams with pred_weight_table unsupported.
[40702:377929728:0602/095857.851715:ERROR:h264_bitstream_parser.cc(206)] Streams with pred_weight_table unsupported.
[40702:377929728:0602/095857.851720:ERROR:h264_bitstream_parser.cc(206)] Streams with pred_weight_table unsupported.
[40702:369631232:0602/095857.954359:ERROR:h264_bitstream_parser.cc(206)] Streams with pred_weight_table unsupported.
[40702:369631232:0602/095857.954378:ERROR:h264_bitstream_parser.cc(206)] Streams with pred_weight_table unsupported.
[40702:369631232:0602/095857.954384:ERROR:h264_bitstream_parser.cc(206)] Streams with pred_weight_table unsupported.
[40702:369631232:0602/095857.954390:ERROR:h264_bitstream_parser.cc(206)] Streams with pred_weight_table unsupported.
Comment 5 Marek Zarychta 2021-05-07 19:33:58 UTC
I had similar problems with enabling at once different input/output audio devices and asked on freebsd-current@. I was advised to install audio/virtual_oss and since then I can choose different input/output audio devices that solved the issue for me.
Comment 6 Emanuel Haupt freebsd_committer freebsd_triage 2021-05-07 21:17:58 UTC
That is excellent advice. Adding audio/virtual_oss solved the issue. Maybe it would make sense to add it as a dependency.
Comment 7 Marek Zarychta 2021-05-08 07:36:51 UTC
(In reply to Emanuel Haupt from comment #6)
Indeed it was excellent advice given by hps@. Unfortunately using www/chromium with Microsoft Teams is still problematic due to PR 255687.
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-05-16 10:31:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=74647995deae7050b6f9a3bf3b3a3ef8ff25ad63

commit 74647995deae7050b6f9a3bf3b3a3ef8ff25ad63
Author:     Rene Ladan <rene@FreeBSD.org>
AuthorDate: 2021-05-15 18:56:06 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2021-05-16 10:29:58 +0000

    www/chromium: attempt to make it work with Microsoft Teams

    - add dependency virtual_oss so the microphone works [1]
    - skip assertion in h264_decoder, we will force it to initialize
      later [2]

    PR:     246214 [1]
    PR:     255484 [2]
    MFH:    2021Q2

 www/chromium/Makefile                              |  4 +++-
 ...ideo__coding_codecs_h264_h264__decoder__impl.cc | 22 ++++++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-05-16 11:31:46 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c82dfb1970514b7f33883c7651b4cfc676e8c7fc

commit c82dfb1970514b7f33883c7651b4cfc676e8c7fc
Author:     Rene Ladan <rene@FreeBSD.org>
AuthorDate: 2021-05-15 18:56:06 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2021-05-16 11:31:05 +0000

    www/chromium: attempt to make it work with Microsoft Teams

    - add dependency virtual_oss so the microphone works [1]
    - skip assertion in h264_decoder, we will force it to initialize
      later [2]

    PR:     246214 [1]
    PR:     255484 [2]
    MFH:    2021Q2
    (cherry picked from commit 74647995deae7050b6f9a3bf3b3a3ef8ff25ad63)

 www/chromium/Makefile                              |  4 +++-
 ...ideo__coding_codecs_h264_h264__decoder__impl.cc | 22 ++++++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)
Comment 10 Rene Ladan freebsd_committer freebsd_triage 2021-05-16 11:32:16 UTC
I added the dependency.
Comment 11 Oleh Hushchenkov 2021-05-16 11:45:05 UTC
(In reply to Rene Ladan from comment #10)
> I added the dependency.

Please make it optional. I use chromium with ALSA backend, microphone works after recent alsa-lib update to 1.2.2. ALSA supports mapping many inputs/outputs with asound.conf, so virtual_oss in not need in that case.

Thank you.
Comment 12 Oleh Hushchenkov 2021-05-16 12:34:36 UTC
(In reply to Oleh Hushchenkov from comment #11)

Also virtual_oss is not runtime dependency for chromium. You need to configure it before use, so it is not help you if it will be installed with chromium. And it useless with ALSA and, I think, with PulseAudio.

I used SNDIO backend before alsa-lib was updated and without running sndiod daemon microphone stopped working after 10..30 minutes. Now think about it, chromium interact with sndiod daemon, sndiod daemon interacts with virtual_oss daemon and finally virtual_oss daemon interacts with OSS device. Does it look right?

Maybe virtual_oss dependency should be enabled by default only with SNDIO backend and be optional?