summaryrefslogtreecommitdiffstats
path: root/sound/core/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-04-28 15:13:41 +0200
committerJaroslav Kysela <perex@suse.cz>2006-06-22 21:33:14 +0200
commit9c323fcbc51493f79f9700cb20830d0857c72d99 (patch)
tree17e17046c0642f918b9516de8d9517914cabd0ad /sound/core/pcm.c
parent0df63e44c3e315ec0fe427ae62558231864108bd (diff)
downloadop-kernel-dev-9c323fcbc51493f79f9700cb20830d0857c72d99.zip
op-kernel-dev-9c323fcbc51493f79f9700cb20830d0857c72d99.tar.gz
[ALSA] Fix mmap_count with O_APPEND opened streams
Move mmap_count to snd_pcm_substream instead of runtime struct so that multiplly opened substreams via O_APPEND can be handled correctly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm.c')
-rw-r--r--sound/core/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 8136be2..bc00f9b 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -662,6 +662,7 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count)
INIT_LIST_HEAD(&substream->self_group.substreams);
list_add_tail(&substream->link_list, &substream->self_group.substreams);
spin_lock_init(&substream->timer_lock);
+ atomic_set(&substream->mmap_count, 0);
prev = substream;
}
return 0;
@@ -884,7 +885,6 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream,
memset((void*)runtime->control, 0, size);
init_waitqueue_head(&runtime->sleep);
- atomic_set(&runtime->mmap_count, 0);
init_timer(&runtime->tick_timer);
runtime->tick_timer.function = snd_pcm_tick_timer_func;
runtime->tick_timer.data = (unsigned long) substream;
OpenPOWER on IntegriCloud