Bug 234596 - Microphone device filtering heuristic is too harsh
Summary: Microphone device filtering heuristic is too harsh
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-22 01:53 PST by youenn fablet
Modified: 2022-01-06 13:03 PST (History)
10 users (show)

See Also:


Attachments
Patch (2.15 KB, patch)
2021-12-22 01:57 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (10.21 KB, patch)
2022-01-06 09:08 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (10.22 KB, patch)
2022-01-06 11:25 PST, youenn fablet
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (10.21 KB, patch)
2022-01-06 12:11 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2021-12-22 01:53:15 PST
Microphone device filtering heuristic is too harsh
Comment 1 youenn fablet 2021-12-22 01:54:19 PST
On WebKit ToT, my Shure MV88+ is no longer seen as a valid microphone.
Generated error log is "Ignoring output device that have input only for echo cancellation".
Comment 2 Radar WebKit Bug Importer 2021-12-22 01:54:38 PST
<rdar://problem/86803287>
Comment 3 youenn fablet 2021-12-22 01:57:13 PST
Created attachment 447789 [details]
Patch
Comment 4 youenn fablet 2021-12-22 01:58:09 PST
Removing the audio tap filtering makes it work, but it might have the side effect of exposing devices that will not be able to properly record.
@Eric, any idea?
Comment 5 youenn fablet 2022-01-06 09:08:39 PST
Created attachment 448506 [details]
Patch
Comment 6 Eric Carlson 2022-01-06 09:12:57 PST
Comment on attachment 448506 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=448506&action=review

> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:114
> +static bool isValidCaptureDevice(const CoreAudioCaptureDevice& device, bool enableTapEnabledFiltering)

Nit: "enable...Enabled..." is slightly confusing, maybe something like "filterTapEnabledDevices" instead?

> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:130
> +            RELEASE_LOG(WebRTC, "Ignoring output device that have input only for echo cancellation");

Not new, but: s/have/has/

> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:271
> +static inline Vector<CoreAudioCaptureDevice> computeAudioDeviceList(bool enableTapEnabledFiltering)

Same comment as above.

> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:351
> +    auto audioDevices = computeAudioDeviceList(m_enableTapEnabledFiltering);

Ditto

> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:49
> +    void setEnableTapEnabledFiltering(bool doFiltering) { m_enableTapEnabledFiltering = doFiltering; }

Ditto
Comment 7 youenn fablet 2022-01-06 11:25:54 PST
Created attachment 448513 [details]
Patch for landing
Comment 8 youenn fablet 2022-01-06 12:11:02 PST
Created attachment 448523 [details]
Patch for landing
Comment 9 EWS 2022-01-06 13:03:03 PST
Committed r287715 (245799@main): <https://commits.webkit.org/245799@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 448523 [details].