summaryrefslogtreecommitdiff
path: root/src/pcm/pcm_shm.c
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo@alsa-project.org>2001-04-13 15:40:53 +0000
committerAbramo Bagnara <abramo@alsa-project.org>2001-04-13 15:40:53 +0000
commit6a3b962d065fa9bb83209ed77afa414ec4280332 (patch)
tree0760e3e7e5fca034162571c6d5ac506b3fae6b99 /src/pcm/pcm_shm.c
parentc4f95f48c3ff9fdc7d899a1f73941300aadfb4eb (diff)
downloadalsa-lib-6a3b962d065fa9bb83209ed77afa414ec4280332.tar.gz
Better PCM mmap API. Fixed pcm_multi
Diffstat (limited to 'src/pcm/pcm_shm.c')
-rw-r--r--src/pcm/pcm_shm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c
index ed2e0847..4b87ed22 100644
--- a/src/pcm/pcm_shm.c
+++ b/src/pcm/pcm_shm.c
@@ -435,12 +435,15 @@ static snd_pcm_sframes_t snd_pcm_shm_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t fr
return snd_pcm_shm_action(pcm);
}
-static snd_pcm_sframes_t snd_pcm_shm_mmap_forward(snd_pcm_t *pcm, snd_pcm_uframes_t size)
+static snd_pcm_sframes_t snd_pcm_shm_mmap_commit(snd_pcm_t *pcm,
+ snd_pcm_uframes_t offset ATTRIBUTE_UNUSED,
+ snd_pcm_uframes_t size)
{
snd_pcm_shm_t *shm = pcm->private_data;
volatile snd_pcm_shm_ctrl_t *ctrl = shm->ctrl;
- ctrl->cmd = SND_PCM_IOCTL_MMAP_FORWARD;
- ctrl->u.mmap_forward.frames = size;
+ ctrl->cmd = SND_PCM_IOCTL_MMAP_COMMIT;
+ ctrl->u.mmap_commit.offset = offset;
+ ctrl->u.mmap_commit.frames = size;
return snd_pcm_shm_action(pcm);
}
@@ -510,7 +513,7 @@ snd_pcm_fast_ops_t snd_pcm_shm_fast_ops = {
readi: snd_pcm_mmap_readi,
readn: snd_pcm_mmap_readn,
avail_update: snd_pcm_shm_avail_update,
- mmap_forward: snd_pcm_shm_mmap_forward,
+ mmap_commit: snd_pcm_shm_mmap_commit,
};
static int make_local_socket(const char *filename)