summaryrefslogtreecommitdiff
path: root/src/pcm/pcm_dsnoop.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-05-28 10:37:26 +0200
committerTakashi Iwai <tiwai@suse.de>2016-05-28 10:37:26 +0200
commit2fa36eb03c000560128f7abce701536546b4a618 (patch)
tree6ad32dff7ff2ce07e8c477f6cc1b9bff60d671cd /src/pcm/pcm_dsnoop.c
parentd942498bfbd315c4c4559ccd573685e09aa03383 (diff)
downloadalsa-lib-2fa36eb03c000560128f7abce701536546b4a618.tar.gz
pcm: Fix secondary retry in dsnoop and dshare
The commit [fdba9e1bad8f: pcm: Fallback open as the first instance for dmix & co] introduced a mechanism to retry the open of slave PCM for the secondary streams, but this also introduced a regression in dsnoop and dshare plugins: since the retry goto-tag was placed at a wrong position, it retries to re-fetch the shm unnecessarily and eventually leads to the fatal error. The bug can be easily reproduced by starting arecord and killing it via SIGKILL, then starting arecord again. The second arecord fails. The fix is obviously to move the wrong retry goto-tags to the right positions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'src/pcm/pcm_dsnoop.c')
-rw-r--r--src/pcm/pcm_dsnoop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
index 8ff0ba57..2d45171d 100644
--- a/src/pcm/pcm_dsnoop.c
+++ b/src/pcm/pcm_dsnoop.c
@@ -583,7 +583,6 @@ int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
break;
}
- retry:
first_instance = ret = snd_pcm_direct_shm_create_or_connect(dsnoop);
if (ret < 0) {
SNDERR("unable to create IPC shm instance");
@@ -598,6 +597,7 @@ int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
dsnoop->max_periods = opts->max_periods;
dsnoop->sync_ptr = snd_pcm_dsnoop_sync_ptr;
+ retry:
if (first_instance) {
/* recursion is already checked in
snd_pcm_direct_get_slave_ipc_offset() */