Chromium Code Reviews
DescriptionMove Alsa device opening into the audio thread, and add in support for multi-channel audio.
Moving the device opening into the audio thread will prevent browser hangs for badly behaving alsa implementations (like pulseaudio) that can hang snd_pcm_open if pulseaudiod is wedged, even if SND_PCM_NONBLOCK is requested.
For multi-channel audio, device enumeration has been added to try and find a multi-channel device with a stable channel mapping. According to http://0pointer.de/blog/projects/guide-to-sound-apis.html, default should only be used with mono and stereo stream because the channel ordering is not defined by Alsa. To get a well-defined channel ordering, one must use one of the surround40, surround51, etc., device names. However, these device names do not always allow multiple opens, so a fallback scheme is implemented to use default if necessary.
BUG=20945, 17703
TEST=listened with built-in soundcard and USB soundcard with various other audio programs running.
Patch Set 1 #Patch Set 2 : Fixes up packet scheduling for multi-channel. #
Total comments: 29
Patch Set 3 : Unittests, plus command-line driven switches. #
Total comments: 3
Patch Set 4 : Fix down-mixing and channel swizzling. #
Total comments: 18
Patch Set 5 : Address andrew's comments. #
Total comments: 1
Patch Set 6 : Fix up the unittests since we not only downmix for a very small set of channels. #
Messages
Total messages: 13 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||