mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-16 08:56:42 -05:00
Renamed stop -> drop in API
This commit is contained in:
parent
ebae7ebeb2
commit
057f56de06
10 changed files with 21 additions and 24 deletions
|
|
@ -386,8 +386,8 @@ int pcm_shm_cmd(client_t *client)
|
||||||
case SND_PCM_IOCTL_DRAIN:
|
case SND_PCM_IOCTL_DRAIN:
|
||||||
ctrl->result = snd_pcm_drain(pcm);
|
ctrl->result = snd_pcm_drain(pcm);
|
||||||
break;
|
break;
|
||||||
case SND_PCM_IOCTL_STOP:
|
case SND_PCM_IOCTL_DROP:
|
||||||
ctrl->result = snd_pcm_stop(pcm);
|
ctrl->result = snd_pcm_drop(pcm);
|
||||||
break;
|
break;
|
||||||
case SND_PCM_IOCTL_PAUSE:
|
case SND_PCM_IOCTL_PAUSE:
|
||||||
ctrl->result = snd_pcm_pause(pcm, ctrl->u.pause);
|
ctrl->result = snd_pcm_pause(pcm, ctrl->u.pause);
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ int snd_pcm_channel_setup(snd_pcm_t *handle, snd_pcm_channel_setup_t *setup);
|
||||||
int snd_pcm_status(snd_pcm_t *handle, snd_pcm_status_t *status);
|
int snd_pcm_status(snd_pcm_t *handle, snd_pcm_status_t *status);
|
||||||
int snd_pcm_prepare(snd_pcm_t *handle);
|
int snd_pcm_prepare(snd_pcm_t *handle);
|
||||||
int snd_pcm_start(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_drain(snd_pcm_t *handle);
|
||||||
int snd_pcm_pause(snd_pcm_t *handle, int enable);
|
int snd_pcm_pause(snd_pcm_t *handle, int enable);
|
||||||
int snd_pcm_state(snd_pcm_t *handle);
|
int snd_pcm_state(snd_pcm_t *handle);
|
||||||
|
|
|
||||||
|
|
@ -185,10 +185,10 @@ int snd_pcm_start(snd_pcm_t *pcm)
|
||||||
return pcm->fast_ops->start(pcm->fast_op_arg);
|
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);
|
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)
|
int snd_pcm_drain(snd_pcm_t *pcm)
|
||||||
|
|
@ -411,7 +411,7 @@ static assoc_t starts[] = { START(EXPLICIT), START(DATA), END };
|
||||||
static assoc_t readys[] = { READY(FRAGMENT), READY(ASAP), END };
|
static assoc_t readys[] = { READY(FRAGMENT), READY(ASAP), END };
|
||||||
static assoc_t xfers[] = { XFER(INTERLEAVED), XFER(NONINTERLEAVED), END };
|
static assoc_t xfers[] = { XFER(INTERLEAVED), XFER(NONINTERLEAVED), END };
|
||||||
static assoc_t mmaps[] = { MMAP(INTERLEAVED), MMAP(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 };
|
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)
|
int snd_pcm_dump_setup(snd_pcm_t *pcm, FILE *fp)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <sys/uio.h>
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
@ -171,9 +170,8 @@ static int snd_pcm_client_shm_close(snd_pcm_t *pcm)
|
||||||
return result;
|
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 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -350,12 +348,12 @@ static int snd_pcm_client_shm_start(snd_pcm_t *pcm)
|
||||||
return ctrl->result;
|
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_t *client = pcm->private;
|
||||||
snd_pcm_client_shm_t *ctrl = client->u.shm.ctrl;
|
snd_pcm_client_shm_t *ctrl = client->u.shm.ctrl;
|
||||||
int err;
|
int err;
|
||||||
ctrl->cmd = SND_PCM_IOCTL_STOP;
|
ctrl->cmd = SND_PCM_IOCTL_DROP;
|
||||||
err = snd_pcm_client_shm_action(pcm);
|
err = snd_pcm_client_shm_action(pcm);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
@ -566,7 +564,7 @@ struct snd_pcm_fast_ops snd_pcm_client_fast_ops = {
|
||||||
delay: snd_pcm_client_shm_delay,
|
delay: snd_pcm_client_shm_delay,
|
||||||
prepare: snd_pcm_client_shm_prepare,
|
prepare: snd_pcm_client_shm_prepare,
|
||||||
start: snd_pcm_client_shm_start,
|
start: snd_pcm_client_shm_start,
|
||||||
stop: snd_pcm_client_shm_stop,
|
drop: snd_pcm_client_shm_drop,
|
||||||
drain: snd_pcm_client_shm_drain,
|
drain: snd_pcm_client_shm_drain,
|
||||||
pause: snd_pcm_client_shm_pause,
|
pause: snd_pcm_client_shm_pause,
|
||||||
rewind: snd_pcm_client_shm_rewind,
|
rewind: snd_pcm_client_shm_rewind,
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,10 @@ static int snd_pcm_file_start(snd_pcm_t *pcm)
|
||||||
return snd_pcm_start(file->slave);
|
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;
|
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)
|
static int snd_pcm_file_drain(snd_pcm_t *pcm)
|
||||||
|
|
@ -340,7 +340,7 @@ struct snd_pcm_fast_ops snd_pcm_file_fast_ops = {
|
||||||
delay: snd_pcm_file_delay,
|
delay: snd_pcm_file_delay,
|
||||||
prepare: snd_pcm_file_prepare,
|
prepare: snd_pcm_file_prepare,
|
||||||
start: snd_pcm_file_start,
|
start: snd_pcm_file_start,
|
||||||
stop: snd_pcm_file_stop,
|
drop: snd_pcm_file_drop,
|
||||||
drain: snd_pcm_file_drain,
|
drain: snd_pcm_file_drain,
|
||||||
pause: snd_pcm_file_pause,
|
pause: snd_pcm_file_pause,
|
||||||
rewind: snd_pcm_file_rewind,
|
rewind: snd_pcm_file_rewind,
|
||||||
|
|
|
||||||
|
|
@ -198,11 +198,11 @@ static int snd_pcm_hw_start(snd_pcm_t *pcm)
|
||||||
return 0;
|
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;
|
snd_pcm_hw_t *hw = pcm->private;
|
||||||
int fd = hw->fd;
|
int fd = hw->fd;
|
||||||
if (ioctl(fd, SND_PCM_IOCTL_STOP) < 0)
|
if (ioctl(fd, SND_PCM_IOCTL_DROP) < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -453,7 +453,7 @@ struct snd_pcm_fast_ops snd_pcm_hw_fast_ops = {
|
||||||
delay: snd_pcm_hw_delay,
|
delay: snd_pcm_hw_delay,
|
||||||
prepare: snd_pcm_hw_prepare,
|
prepare: snd_pcm_hw_prepare,
|
||||||
start: snd_pcm_hw_start,
|
start: snd_pcm_hw_start,
|
||||||
stop: snd_pcm_hw_stop,
|
drop: snd_pcm_hw_drop,
|
||||||
drain: snd_pcm_hw_drain,
|
drain: snd_pcm_hw_drain,
|
||||||
pause: snd_pcm_hw_pause,
|
pause: snd_pcm_hw_pause,
|
||||||
rewind: snd_pcm_hw_rewind,
|
rewind: snd_pcm_hw_rewind,
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ struct snd_pcm_fast_ops {
|
||||||
int (*status)(snd_pcm_t *pcm, snd_pcm_status_t *status);
|
int (*status)(snd_pcm_t *pcm, snd_pcm_status_t *status);
|
||||||
int (*prepare)(snd_pcm_t *pcm);
|
int (*prepare)(snd_pcm_t *pcm);
|
||||||
int (*start)(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 (*drain)(snd_pcm_t *pcm);
|
||||||
int (*pause)(snd_pcm_t *pcm, int enable);
|
int (*pause)(snd_pcm_t *pcm, int enable);
|
||||||
int (*state)(snd_pcm_t *pcm);
|
int (*state)(snd_pcm_t *pcm);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
#include <sys/uio.h>
|
|
||||||
#include "pcm_local.h"
|
#include "pcm_local.h"
|
||||||
|
|
||||||
size_t snd_pcm_mmap_avail(snd_pcm_t *pcm)
|
size_t snd_pcm_mmap_avail(snd_pcm_t *pcm)
|
||||||
|
|
|
||||||
|
|
@ -136,10 +136,10 @@ int snd_pcm_plugin_start(snd_pcm_t *pcm)
|
||||||
return snd_pcm_start(plugin->slave);
|
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;
|
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)
|
int snd_pcm_plugin_drain(snd_pcm_t *pcm)
|
||||||
|
|
@ -396,7 +396,7 @@ struct snd_pcm_fast_ops snd_pcm_plugin_fast_ops = {
|
||||||
delay: snd_pcm_plugin_delay,
|
delay: snd_pcm_plugin_delay,
|
||||||
prepare: snd_pcm_plugin_prepare,
|
prepare: snd_pcm_plugin_prepare,
|
||||||
start: snd_pcm_plugin_start,
|
start: snd_pcm_plugin_start,
|
||||||
stop: snd_pcm_plugin_stop,
|
drop: snd_pcm_plugin_drop,
|
||||||
drain: snd_pcm_plugin_drain,
|
drain: snd_pcm_plugin_drain,
|
||||||
pause: snd_pcm_plugin_pause,
|
pause: snd_pcm_plugin_pause,
|
||||||
rewind: snd_pcm_plugin_rewind,
|
rewind: snd_pcm_plugin_rewind,
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ int snd_pcm_plugin_state(snd_pcm_t *pcm);
|
||||||
int snd_pcm_plugin_delay(snd_pcm_t *pcm, ssize_t *delayp);
|
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_prepare(snd_pcm_t *pcm);
|
||||||
int snd_pcm_plugin_start(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_drain(snd_pcm_t *pcm);
|
||||||
int snd_pcm_plugin_pause(snd_pcm_t *pcm, int enable);
|
int snd_pcm_plugin_pause(snd_pcm_t *pcm, int enable);
|
||||||
ssize_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, size_t frames);
|
ssize_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, size_t frames);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue