alsa-lib/src
Takashi Iwai fdba9e1bad pcm: Fallback open as the first instance for dmix & co
dmix and other PCM plugins tries to open a secondary stream with
O_APPEND flag when the shmem was already attached by another.
However, when another streams have been already closed after the
shmem check, this open may return the error EBADFD, since the kernel
accepts O_APPEND only for the secondary streams.

This patch adds a workaround for such a case.  It just retries opening
the stream as the first instance (i.e. without O_APPEND flag).
This is basically safe behavior (the kernel takes care of races), even
we may do this even unconditionally.  But it's bad from the
performance POV, so we do it only when really needed.

Reported-by: Lars Lindqvist <lars.lindqvist@yandex.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-14 17:39:19 +02:00
..
alisp autotools: update style 2014-02-26 08:16:22 +01:00
conf config files - do not include ucm/topology configuration when not requested 2016-01-12 14:56:18 +01:00
control control: keep consistent usage of assertion 2016-02-22 15:00:43 +01:00
hwdep Allow hint for ctl, hwdep, timer and seq 2015-04-30 14:52:35 +02:00
mixer mixer: Fix unused parameter warnings 2014-11-21 15:22:01 +01:00
pcm pcm: Fallback open as the first instance for dmix & co 2016-04-14 17:39:19 +02:00
rawmidi Allow hint for ctl, hwdep, timer and seq 2015-04-30 14:52:35 +02:00
seq seq: Provide sequencer sound card number / PID via alsa-lib 2016-03-08 10:57:18 +01:00
timer Only use F_SETSIG fcntl where it exists. 2016-03-03 16:19:00 +01:00
topology topology: Build data objects with tuples 2016-04-07 16:57:22 +02:00
ucm ucm: add cset-tlv 2016-04-13 15:40:17 +02:00
async.c Make some static tables and strings constants. 2008-11-21 13:04:41 +01:00
conf.c Use alphasort where versionsort is not available. 2016-03-03 16:19:06 +01:00
confmisc.c Replace unsafe characters with _ in card name 2015-06-29 20:33:26 +02:00
dlmisc.c dlmisc: Remove unused label 2014-11-16 09:43:39 +01:00
error.c all places: doxygen cleanups 2013-04-08 16:42:24 +02:00
input.c Make all the remaining ops structure constants. 2008-11-21 20:48:33 +01:00
Makefile.am topology: autotools: Add build support for topology core 2015-07-30 17:10:14 +02:00
names.c Remove docs for snd_names_list and snd_names_list_free 2012-01-19 12:35:20 +01:00
output.c fix doc errors 2009-08-04 09:17:20 +02:00
shmarea.c support building w/out System V shared memory 2015-11-05 14:37:11 +01:00
socket.c Remove unused hostname resolution in shm plugins and aserver 2015-01-28 16:23:06 +01:00
userfile.c snd_user_file: fix memory leak 2014-11-03 17:26:00 +01:00
Versions.in Fix wrong exported functions 2008-02-04 14:15:44 +01:00