case SND_PCM_IOCTL_DRAIN:
ctrl->result = snd_pcm_drain(pcm);
break;
- case SND_PCM_IOCTL_STOP:
- ctrl->result = snd_pcm_stop(pcm);
+ case SND_PCM_IOCTL_DROP:
+ ctrl->result = snd_pcm_drop(pcm);
break;
case SND_PCM_IOCTL_PAUSE:
ctrl->result = snd_pcm_pause(pcm, ctrl->u.pause);
int snd_pcm_status(snd_pcm_t *handle, snd_pcm_status_t *status);
int snd_pcm_prepare(snd_pcm_t *handle);
int snd_pcm_start(snd_pcm_t *handle);
-int snd_pcm_stop(snd_pcm_t *handle);
+int snd_pcm_drop(snd_pcm_t *handle);
int snd_pcm_drain(snd_pcm_t *handle);
int snd_pcm_pause(snd_pcm_t *handle, int enable);
int snd_pcm_state(snd_pcm_t *handle);
return pcm->fast_ops->start(pcm->fast_op_arg);
}
-int snd_pcm_stop(snd_pcm_t *pcm)
+int snd_pcm_drop(snd_pcm_t *pcm)
{
assert(pcm);
- return pcm->fast_ops->stop(pcm->fast_op_arg);
+ return pcm->fast_ops->drop(pcm->fast_op_arg);
}
int snd_pcm_drain(snd_pcm_t *pcm)
static assoc_t readys[] = { READY(FRAGMENT), READY(ASAP), END };
static assoc_t xfers[] = { XFER(INTERLEAVED), XFER(NONINTERLEAVED), END };
static assoc_t mmaps[] = { MMAP(INTERLEAVED), MMAP(NONINTERLEAVED), END };
-static assoc_t xrun_acts[] = { XRUN_ACT(STOP), XRUN_ACT(DROP), END };
+static assoc_t xrun_acts[] = { XRUN_ACT(DRAIN), XRUN_ACT(DROP), END };
static assoc_t onoff[] = { {0, "OFF", NULL}, {1, "ON", NULL}, {-1, "ON", NULL}, END };
int snd_pcm_dump_setup(snd_pcm_t *pcm, FILE *fp)
#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/un.h>
-#include <sys/uio.h>
#include <sys/mman.h>
#include <netinet/in.h>
#include <netdb.h>
return result;
}
-static int snd_pcm_client_shm_nonblock(snd_pcm_t *pcm, int nonblock)
+static int snd_pcm_client_shm_nonblock(snd_pcm_t *pcm ATTRIBUTE_UNUSED, int nonblock ATTRIBUTE_UNUSED)
{
- /* FIXME */
return 0;
}
return ctrl->result;
}
-static int snd_pcm_client_shm_stop(snd_pcm_t *pcm)
+static int snd_pcm_client_shm_drop(snd_pcm_t *pcm)
{
snd_pcm_client_t *client = pcm->private;
snd_pcm_client_shm_t *ctrl = client->u.shm.ctrl;
int err;
- ctrl->cmd = SND_PCM_IOCTL_STOP;
+ ctrl->cmd = SND_PCM_IOCTL_DROP;
err = snd_pcm_client_shm_action(pcm);
if (err < 0)
return err;
delay: snd_pcm_client_shm_delay,
prepare: snd_pcm_client_shm_prepare,
start: snd_pcm_client_shm_start,
- stop: snd_pcm_client_shm_stop,
+ drop: snd_pcm_client_shm_drop,
drain: snd_pcm_client_shm_drain,
pause: snd_pcm_client_shm_pause,
rewind: snd_pcm_client_shm_rewind,
return snd_pcm_start(file->slave);
}
-static int snd_pcm_file_stop(snd_pcm_t *pcm)
+static int snd_pcm_file_drop(snd_pcm_t *pcm)
{
snd_pcm_file_t *file = pcm->private;
- return snd_pcm_stop(file->slave);
+ return snd_pcm_drop(file->slave);
}
static int snd_pcm_file_drain(snd_pcm_t *pcm)
delay: snd_pcm_file_delay,
prepare: snd_pcm_file_prepare,
start: snd_pcm_file_start,
- stop: snd_pcm_file_stop,
+ drop: snd_pcm_file_drop,
drain: snd_pcm_file_drain,
pause: snd_pcm_file_pause,
rewind: snd_pcm_file_rewind,
return 0;
}
-static int snd_pcm_hw_stop(snd_pcm_t *pcm)
+static int snd_pcm_hw_drop(snd_pcm_t *pcm)
{
snd_pcm_hw_t *hw = pcm->private;
int fd = hw->fd;
- if (ioctl(fd, SND_PCM_IOCTL_STOP) < 0)
+ if (ioctl(fd, SND_PCM_IOCTL_DROP) < 0)
return -errno;
return 0;
}
delay: snd_pcm_hw_delay,
prepare: snd_pcm_hw_prepare,
start: snd_pcm_hw_start,
- stop: snd_pcm_hw_stop,
+ drop: snd_pcm_hw_drop,
drain: snd_pcm_hw_drain,
pause: snd_pcm_hw_pause,
rewind: snd_pcm_hw_rewind,
int (*status)(snd_pcm_t *pcm, snd_pcm_status_t *status);
int (*prepare)(snd_pcm_t *pcm);
int (*start)(snd_pcm_t *pcm);
- int (*stop)(snd_pcm_t *pcm);
+ int (*drop)(snd_pcm_t *pcm);
int (*drain)(snd_pcm_t *pcm);
int (*pause)(snd_pcm_t *pcm, int enable);
int (*state)(snd_pcm_t *pcm);
#include <string.h>
#include <errno.h>
#include <sys/poll.h>
-#include <sys/uio.h>
#include "pcm_local.h"
size_t snd_pcm_mmap_avail(snd_pcm_t *pcm)
return snd_pcm_start(plugin->slave);
}
-int snd_pcm_plugin_stop(snd_pcm_t *pcm)
+int snd_pcm_plugin_drop(snd_pcm_t *pcm)
{
snd_pcm_plugin_t *plugin = pcm->private;
- return snd_pcm_stop(plugin->slave);
+ return snd_pcm_drop(plugin->slave);
}
int snd_pcm_plugin_drain(snd_pcm_t *pcm)
delay: snd_pcm_plugin_delay,
prepare: snd_pcm_plugin_prepare,
start: snd_pcm_plugin_start,
- stop: snd_pcm_plugin_stop,
+ drop: snd_pcm_plugin_drop,
drain: snd_pcm_plugin_drain,
pause: snd_pcm_plugin_pause,
rewind: snd_pcm_plugin_rewind,
int snd_pcm_plugin_delay(snd_pcm_t *pcm, ssize_t *delayp);
int snd_pcm_plugin_prepare(snd_pcm_t *pcm);
int snd_pcm_plugin_start(snd_pcm_t *pcm);
-int snd_pcm_plugin_stop(snd_pcm_t *pcm);
+int snd_pcm_plugin_drop(snd_pcm_t *pcm);
int snd_pcm_plugin_drain(snd_pcm_t *pcm);
int snd_pcm_plugin_pause(snd_pcm_t *pcm, int enable);
ssize_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, size_t frames);