New issue
Advanced search Search tips

Issue 779690 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Sound capture does not work with ALSA + dmix

Reported by mikhi...@gmail.com, Oct 30 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

Example URL:
https://www.onlinemictest.com/

Steps to reproduce the problem:
0. Use ALSA without PulseAudio
1. Configure default PCM to use dmix
2. Go to onlinemictest.com
3. Allow access to microphone
4. See no line in test area

What is the expected behavior?
Test line appears and shows mic activity.

What went wrong?
Mic capture works with such .asoundrc:

    pcm.!default {
           type plug
           slave.pcm "hw:CARD=PCH,DEV=0"
    }

    ctl.!default {
            type hw
            card "PCH"
    }

But it is not suitable because output device is getting locked. After enablind dmix via the following .asoundrc:

    pcm.!default {
           type plug
           slave.pcm "dmix:CARD=PCH,DEV=0"
    }

    ctl.!default {
            type hw
            card "PCH"
    }

mic does not work in Chromium anymore (although it works in audacity, for example). As a workaround, such .asoundrc can be used:

    pcm.!default {
            type asym
            playback.pcm {
                    type plug
                    slave.pcm "dmix:CARD=PCH,DEV=0"
            }
            capture.pcm {
                    type plug
                    slave.pcm "hw:CARD=PCH,DEV=0"
            }
    }

    ctl.!default {
            type hw
            card "PCH"
    }

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? N/A

Chrome version: 62.0.3202.62  Channel: stable
OS Version: Ubuntu 16.04
Flash Version: 

Contents of chrome://gpu: 
Graphics Feature Status
Canvas: Hardware accelerated
CheckerImaging: Disabled
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
Rasterization: Software only. Hardware acceleration disabled
Video Decode: Software only, hardware acceleration unavailable
Video Encode: Software only, hardware acceleration unavailable
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
adjust_src_dst_region_for_blitframebuffer
clear_uniforms_before_first_program_use
count_all_in_varyings_packing
decode_encode_srgb_for_generatemipmap
disable_framebuffer_cmaa
disable_post_sub_buffers_for_onscreen_surfaces
msaa_is_slow
scalarize_vec_and_mat_constructor_args
Problems Detected
Accelerated video decode is unavailable on Linux: 137247
Disabled Features: accelerated_video_decode
Accelerated video encode is unavailable on Linux
Disabled Features: accelerated_video_encode
Clear uniforms before first program use on all platforms: 124764, 349137
Applied Workarounds: clear_uniforms_before_first_program_use
Mesa drivers in Linux handle varyings without static use incorrectly: 333885
Applied Workarounds: count_all_in_varyings_packing
Disable partial swaps on Mesa drivers (detected with GL_RENDERER): 339493
Applied Workarounds: disable_post_sub_buffers_for_onscreen_surfaces
Always rewrite vec/mat constructors to be consistent: 398694
Applied Workarounds: scalarize_vec_and_mat_constructor_args
On Intel GPUs MSAA performance is not acceptable for GPU rasterization: 527565
Applied Workarounds: msaa_is_slow
Timer queries crash on Intel GPUs on Linux: 540543, 576991
Applied Workarounds: disable(GL_ARB_timer_query), disable(GL_EXT_timer_query)
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
Disable partial swaps on Mesa drivers (detected with GL_VERSION): 339493
Applied Workarounds: disable_post_sub_buffers_for_onscreen_surfaces
Decode and encode before generateMipmap for srgb format textures on os except macosx: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
adjust src/dst region if blitting pixels outside read framebuffer on Linux Intel: 664740
Applied Workarounds: adjust_src_dst_region_for_blitframebuffer
Disable KHR_blend_equation_advanced until cc shaders are updated: 661715
Applied Workarounds: disable(GL_KHR_blend_equation_advanced), disable(GL_KHR_blend_equation_advanced_coherent)
Accelerated rasterization has been disabled, either via blacklist, about:flags or the command line.
Disabled Features: rasterization
Native GpuMemoryBuffers have been disabled, either via about:flags or command line.
Disabled Features: native_gpu_memory_buffers
Checker-imaging has been disabled via finch trial or the command line.
Disabled Features: checker_imaging

There are several discussions of similar problems in the Internet:

https://classicforum.manjaro.org/index.php?topic=18283.0
https://superuser.com/questions/1257830/using-a-alsa-pcm-as-an-input-device-for-chromium
 
Labels: TE-NeedsTriageFromMTV
Adding the label 'TE-NeedsTriageFromMTV' as the issue requires ALSA to triage.
Components: -Internals>Media Blink>WebRTC>Audio

Comment 3 by ossu@chromium.org, Dec 7 2017

Cc: ossu@chromium.org
Do you have the option to specifically select your microphone, rather than just using the Default input? (i.e. in chrome://settings/content/microphone or on a site that allows selecting that manually, like Hangouts).

If so, does input still not work with a specific microphone selected?  

Comment 4 by mikhi...@gmail.com, Dec 9 2017

If directly select my microphone (any of "HDA Intel PCH, ALC290 Analog-Default Audio Deviace", "HDA Intel PCH, ALC290-Direct hardware device without any conversions" or "HDA Intel PCH, ALC290-Hardware device with all software conversions"), it starts working. So only the "Default" setting is broken.
Cc: -ossu@chromium.org grunell@chromium.org
Labels: -Pri-2 -TE-NeedsTriageFromMTV Pri-3
Owner: ossu@chromium.org
Status: Assigned (was: Unconfirmed)
[Triage] Oskar: can you see if reproducible?

Comment 6 by ossu@chromium.org, Dec 18 2017

Sure, I can have a look. From what I know of ALSA, I'm not 100% certain this is really a bug on our part. Since dmix is an output-only plugin, using as a default device would, IIUC, make an output-only default device. It's likely other software works around this by mapping a dmix device selected for input to the appropriate hw device.

I'll at least investigate it a bit on my computer, to see if we're doing something wrong or just not doing something extra.

Sign in to add a comment