-
Oskar Sundbom authored
If there are no available inputs, PulseAudio will, for some reason, select the monitor of the current default sink as the default source. Chrome will only add a Default input to the device enumeration if there is at least one valid input found. Currently, we also include unavailable inputs in the device enumeration, which means Chrome will show a Default device, which in that case would likely be a monitor device, rather than a proper input. This CL stops this happening by not enumerating inputs that don't have an available, active port. In case PulseAudio would _still_ pick a monitor device as the default device, this CL also explicitly returns invalid AudioParameters for monitor devices, and explicitly fails to open them as inputs - to be on the safe side. Bug: b/79580580 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I25bd96e98a48bcdf6e993759e97bf713855d4ad0 Reviewed-on: https://chromium-review.googlesource.com/1064373 Commit-Queue: Oskar Sundbom <ossu@chromium.org> Reviewed-by:
Max Morin <maxmorin@chromium.org> Cr-Commit-Position: refs/heads/master@{#562383}
4519c32f