Removed snd_pcm_hwptr().

Added snd_pcm_hwdiff() and snd_pcm_forward().
Returned the behaviour for snd_pcm_mmap_begin().
This commit is contained in:
Jaroslav Kysela 2003-02-22 17:19:02 +00:00
parent fbd99fdec0
commit 2dab1dfbc3
17 changed files with 327 additions and 246 deletions

View file

@ -451,19 +451,6 @@ static int snd_pcm_shm_hwsync(snd_pcm_t *pcm)
return snd_pcm_shm_action(pcm);
}
static int snd_pcm_shm_hwptr(snd_pcm_t *pcm, snd_pcm_uframes_t *uframes)
{
snd_pcm_shm_t *shm = pcm->private_data;
volatile snd_pcm_shm_ctrl_t *ctrl = shm->ctrl;
int err;
ctrl->cmd = SND_PCM_IOCTL_HWPTR;
return snd_pcm_shm_action(pcm);
if (err < 0)
return err;
*uframes = ctrl->u.hwptr.frames;
return err;
}
static int snd_pcm_shm_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
{
snd_pcm_shm_t *shm = pcm->private_data;
@ -558,6 +545,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_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
{
snd_pcm_shm_t *shm = pcm->private_data;
volatile snd_pcm_shm_ctrl_t *ctrl = shm->ctrl;
ctrl->cmd = SND_PCM_IOCTL_FORWARD;
ctrl->u.forward.frames = frames;
return snd_pcm_shm_action(pcm);
}
static int snd_pcm_shm_resume(snd_pcm_t *pcm)
{
snd_pcm_shm_t *shm = pcm->private_data;
@ -632,7 +628,6 @@ static snd_pcm_fast_ops_t snd_pcm_shm_fast_ops = {
status: snd_pcm_shm_status,
state: snd_pcm_shm_state,
hwsync: snd_pcm_shm_hwsync,
hwptr: snd_pcm_shm_hwptr,
delay: snd_pcm_shm_delay,
prepare: snd_pcm_shm_prepare,
reset: snd_pcm_shm_reset,
@ -641,6 +636,7 @@ static snd_pcm_fast_ops_t snd_pcm_shm_fast_ops = {
drain: snd_pcm_shm_drain,
pause: snd_pcm_shm_pause,
rewind: snd_pcm_shm_rewind,
forward: snd_pcm_shm_forward,
resume: snd_pcm_shm_resume,
writei: snd_pcm_mmap_writei,
writen: snd_pcm_mmap_writen,