Bug 245248 - www/firefox: firefox shows wrong audio capture device list: a capture-only device isn't shown, playback-only devices are shown as capture devices
Summary: www/firefox: firefox shows wrong audio capture device list: a capture-only de...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-01 18:55 UTC by Yuri Victorovich
Modified: 2020-04-03 17:24 UTC (History)
1 user (show)

See Also:
jbeich: maintainer-feedback+


Attachments

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 18:55:29 UTC
The "Microphone to share" combobox shows microphones /dev/dsp0 .. /dev/dsp5 while there is also /dev/dsp6.

/dev/dsp6 is a capture-only device (no playback) attached to a webcam.

Only /dev/dsp2, /dev/dsp3, /dev/dsp6 are capture devices:
> $ /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

Does Firefox simply use the playback device list as a capture device list?

qTox, for example, shows the microphone list properly by using openal-soft.
Comment 1 Jan Beich freebsd_committer 2020-04-02 10:05:22 UTC
Do any of the patches in bug 245156 help?

(In reply to Yuri Victorovich from comment #0)
> Does Firefox simply use the playback device list as a capture device list?

Only pulseaudio supports selecting non-default capture device, so Firefox asks pulseaudio to list all sources. In case Rust wrapper for cubeb has a bug try native i.e., media.cubeb.backend=pulse in about:config.

https://searchfox.org/mozilla-central/search?q=pa_context_get_source_info_list
Comment 2 Jan Beich freebsd_committer 2020-04-02 10:24:59 UTC
If neither helps attach "pactl list" output then assign to gnome@. Could be a bug in OSS backend in pulseaudio.
Comment 3 Greg V 2020-04-03 10:03:14 UTC
pulse doesn't have hotplug on FreeBSD yet by the way, so if the webcam was plugged in after pulse was started, restart pulse.
Comment 4 Greg V 2020-04-03 13:08:40 UTC
(In reply to Greg V from comment #3)

Well, now it does, with this:

https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277

(to quickly test without messing with ports: pkg remove -f pulseaudio, do a meson build as described on that page, ninja -Cbuild install, test, ninja -Cbuild uninstall, pkg install pulseaudio to restore the original version)
Comment 5 Greg V 2020-04-03 16:32:15 UTC
ha, yep, it was a hotplug issue. (Bug 245307 should be connected to this one)
Comment 6 Yuri Victorovich freebsd_committer 2020-04-03 16:48:39 UTC
(In reply to Greg V from comment #5)

Thanks, Greg.
Comment 7 Yuri Victorovich freebsd_committer 2020-04-03 17:24:43 UTC
A related bug is that Firefox doesn't re-read device lists when they change: https://bugzilla.mozilla.org/show_bug.cgi?id=1627310