Bug 245251 - www/chromium: Doesn't allow to choose a microphone
Summary: www/chromium: Doesn't allow to choose a microphone
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)
Depends on:
Reported: 2020-04-01 19:29 UTC by Yuri Victorovich
Modified: 2020-12-24 13:03 UTC (History)
6 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2020-04-01 19:29:55 UTC
I have several microphones:

> $ /usr/local/bin/openal-info
> Available playback devices:
>     OSS Default
>     pcm0:play:dsp0
>     pcm1:play:dsp1
>     pcm2:play:dsp2
>     pcm3:play:dsp3
>     pcm4:play:dsp4
>     pcm5:play:dsp5
> Available capture devices:
>     OSS Default
>     pcm2:record:dsp2
>     pcm3:record:dsp3
>     pcm6:record:dsp6

But chrome://settings/content/microphone simply offers a choice of "Open Sound System", and doesn't allow to choose a microphone.

This is a severe usability issue.
Comment 1 Yuri Victorovich freebsd_committer 2020-04-01 20:15:31 UTC
Firefox's behavior is much better. It offers the user to grant access to audio/video devices per-website when such access is required, with different audio/video devices being able to be chosen for individual websites.
Comment 2 Matthias Wolf 2020-04-02 08:59:42 UTC
Chromium uses ALSA by default, so you *should* see all audio devices configured in asound.conf.
Comment 3 Yuri Victorovich freebsd_committer 2020-04-02 09:36:55 UTC
(In reply to Matthias Wolf from comment #2)

My etc/asound.conf.sample and etc/asound.conf are identical.

> Chromium uses ALSA by default <...>

Does it support any other ways to access audio?
Comment 4 Matthias Wolf 2020-04-02 10:00:32 UTC
The default asound.conf only uses the default OSS device as far as I know. The other options would be sndio and pulseaudio as options in the port (disabled by default).

Unfortunately, we don't have a native OSS backend (yet).
Comment 5 Andrey Khlebutin 2020-11-07 19:22:23 UTC
(In reply to Yuri Victorovich from comment #0)
Look here, maybe the way is OK for you

Maybe the way should be documented in a more predictable/proper for chromium users place
Comment 7 Yuri Victorovich freebsd_committer 2020-12-24 09:57:36 UTC
sndio option is now the default audio backend in chrome.

The new and upcoming version of sndio recognizes AUDIOPLAYDEVICE and AUDIORECDEVICE environment variables.

Calling chrome like this:

allows to choose both speaker and microphone OSS devices: /dev/audio2 and /dev/audio6.

Again, this is assuming that the SNDIO=ON (default) and audio/sndio is patched with the latest patches from https://github.com/ratchov/sndio

This solves the problem of selectability of audio devices, not in the runtime, but at least through environment variables.