From: Abramo Bagnara Date: Mon, 2 Oct 2000 06:59:59 +0000 (+0000) Subject: Renamed stop -> drop in API X-Git-Tag: v1.0.3~1118 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=057f56de0651b8ff3394e206049e8e6a1c621d5c;p=alsa-lib.git Renamed stop -> drop in API --- diff --git a/aserver/aserver.c b/aserver/aserver.c index 083a8f1f..eef9a675 100644 --- a/aserver/aserver.c +++ b/aserver/aserver.c @@ -386,8 +386,8 @@ int pcm_shm_cmd(client_t *client) 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); diff --git a/include/pcm.h b/include/pcm.h index 4b5bb8d4..54d38265 100644 --- a/include/pcm.h +++ b/include/pcm.h @@ -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_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); diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 60385330..e9f88e41 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -185,10 +185,10 @@ int snd_pcm_start(snd_pcm_t *pcm) 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) @@ -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 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) diff --git a/src/pcm/pcm_client.c b/src/pcm/pcm_client.c index feccd4e2..9a928d5f 100644 --- a/src/pcm/pcm_client.c +++ b/src/pcm/pcm_client.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -171,9 +170,8 @@ static int snd_pcm_client_shm_close(snd_pcm_t *pcm) 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; } @@ -350,12 +348,12 @@ static int snd_pcm_client_shm_start(snd_pcm_t *pcm) 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; @@ -566,7 +564,7 @@ struct snd_pcm_fast_ops snd_pcm_client_fast_ops = { 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, diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c index 4e0698b9..cf2b1f58 100644 --- a/src/pcm/pcm_file.c +++ b/src/pcm/pcm_file.c @@ -104,10 +104,10 @@ static int snd_pcm_file_start(snd_pcm_t *pcm) 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) @@ -340,7 +340,7 @@ struct snd_pcm_fast_ops snd_pcm_file_fast_ops = { 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, diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index 557f67fd..37e47bc2 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -198,11 +198,11 @@ static int snd_pcm_hw_start(snd_pcm_t *pcm) 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; } @@ -453,7 +453,7 @@ struct snd_pcm_fast_ops snd_pcm_hw_fast_ops = { 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, diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h index ad356f95..3ca52f82 100644 --- a/src/pcm/pcm_local.h +++ b/src/pcm/pcm_local.h @@ -49,7 +49,7 @@ struct snd_pcm_fast_ops { 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); diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c index 0bc97fa0..e0515a97 100644 --- a/src/pcm/pcm_mmap.c +++ b/src/pcm/pcm_mmap.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "pcm_local.h" size_t snd_pcm_mmap_avail(snd_pcm_t *pcm) diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c index 07eb0e79..facc3fec 100644 --- a/src/pcm/pcm_plugin.c +++ b/src/pcm/pcm_plugin.c @@ -136,10 +136,10 @@ int snd_pcm_plugin_start(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) @@ -396,7 +396,7 @@ struct snd_pcm_fast_ops snd_pcm_plugin_fast_ops = { 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, diff --git a/src/pcm/pcm_plugin.h b/src/pcm/pcm_plugin.h index 67f4c63c..fe216d1b 100644 --- a/src/pcm/pcm_plugin.h +++ b/src/pcm/pcm_plugin.h @@ -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_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);