summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-12-21 10:03:26 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-12-21 10:03:26 +0000
commitc6e729cad2010e9c2f2bced0fc69d60dbf8ff2f4 (patch)
treea43586c35cebd57a8de06d2d2dd5239916552f71
parentf4fa80d696e6e0e36d6beb56e606b6f7a89ec6de (diff)
fix more spelling errors and typos,
from Thomas Pfaff <tpfaff(at)@tp76.info>, thanks
-rw-r--r--lib/libsndio/aucat.c8
-rw-r--r--lib/libsndio/sndio.c4
-rw-r--r--lib/libsndio/sndio_priv.h8
-rw-r--r--lib/libsndio/sun.c26
4 files changed, 24 insertions, 22 deletions
diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c
index d371a5b3ec2..e8fe108217a 100644
--- a/lib/libsndio/aucat.c
+++ b/lib/libsndio/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.7 2008/12/17 10:00:50 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.8 2008/12/21 10:03:25 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -35,7 +35,7 @@ struct aucat_hdl {
size_t wtodo, rtodo; /* bytes to complete the packet */
#define STATE_IDLE 0 /* nothing to do */
#define STATE_MSG 1 /* message being transferred */
-#define STATE_DATA 2 /* data being transfered */
+#define STATE_DATA 2 /* data being transferred */
unsigned rstate, wstate; /* one of above */
unsigned rbpf, wbpf; /* read and write bytes-per-frame */
int maxwrite; /* latency constraint */
@@ -187,7 +187,7 @@ aucat_runmsg(struct aucat_hdl *hdl)
case AMSG_DATA:
if (hdl->rmsg.u.data.size == 0 ||
hdl->rmsg.u.data.size % hdl->rbpf) {
- DPRINTF(&hdl->sa, "aucat_read: bad data message\n");
+ DPRINTF(&hdl->sa, "aucat_runmsg: bad data message\n");
hdl->sa.eof = 1;
return 0;
}
@@ -206,7 +206,7 @@ aucat_runmsg(struct aucat_hdl *hdl)
hdl->rtodo = 0xdeadbeef;
break;
default:
- DPRINTF(&hdl->sa, "aucat_read: unknown mesg\n");
+ DPRINTF(&hdl->sa, "aucat_runmsg: unknown message\n");
hdl->sa.eof = 1;
return 0;
}
diff --git a/lib/libsndio/sndio.c b/lib/libsndio/sndio.c
index 39539278918..a3b9c1eca67 100644
--- a/lib/libsndio/sndio.c
+++ b/lib/libsndio/sndio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sndio.c,v 1.10 2008/12/17 10:00:50 ratchov Exp $ */
+/* $OpenBSD: sndio.c,v 1.11 2008/12/21 10:03:25 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -242,7 +242,7 @@ sio_stop(struct sio_hdl *hdl)
return 0;
#ifdef DEBUG
DPRINTF(hdl,
- "libsio: polls: %llu, written = %llu, read: %llu\n",
+ "libsndio: polls: %llu, written = %llu, read: %llu\n",
hdl->pollcnt, hdl->wcnt, hdl->rcnt);
#endif
hdl->started = 0;
diff --git a/lib/libsndio/sndio_priv.h b/lib/libsndio/sndio_priv.h
index c9bbef87843..69da1a10715 100644
--- a/lib/libsndio/sndio_priv.h
+++ b/lib/libsndio/sndio_priv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sndio_priv.h,v 1.3 2008/12/17 10:00:50 ratchov Exp $ */
+/* $OpenBSD: sndio_priv.h,v 1.4 2008/12/21 10:03:25 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -14,8 +14,8 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef LIBSIO_PRIV_H
-#define LIBSIO_PRIV_H
+#ifndef SNDIO_PRIV_H
+#define SNDIO_PRIV_H
#include <sys/param.h>
#include "sndio.h"
@@ -83,4 +83,4 @@ void sio_onvol_cb(struct sio_hdl *, unsigned);
#define DPERROR(hdl,s) do {} while(0)
#endif
-#endif /* !defined(LIBSIO_PRIV_H) */
+#endif /* !defined(SNDIO_PRIV_H) */
diff --git a/lib/libsndio/sun.c b/lib/libsndio/sun.c
index f98026d1218..9607d076d87 100644
--- a/lib/libsndio/sun.c
+++ b/lib/libsndio/sun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sun.c,v 1.9 2008/12/17 10:00:50 ratchov Exp $ */
+/* $OpenBSD: sun.c,v 1.10 2008/12/21 10:03:25 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -156,7 +156,7 @@ sun_enctoinfo(struct sun_hdl *hdl, struct audio_prinfo *ai, struct sio_par *par)
/*
* try to set the device to the given parameters and check that the
- * device can use them; retrun 1 on success, 0 on failure or error
+ * device can use them; return 1 on success, 0 on failure or error
*/
int
sun_tryinfo(struct sun_hdl *hdl, struct sio_enc *enc,
@@ -312,7 +312,7 @@ sun_getcap(struct sio_hdl *sh, struct sio_cap *cap)
*
* rates are not independent from other parameters (eg. on
* uaudio devices), so certain rates may not be allowed with
- * certain encordings. We have to check rates for all encodings
+ * certain encodings. We have to check rates for all encodings
*/
memcpy(&cap->rate, rates, NRATES * sizeof(unsigned));
for (j = 0; j < nenc; j++) {
@@ -360,7 +360,8 @@ sun_initvol(struct sun_hdl *hdl)
snprintf(path, PATH_MAX, "/dev/mixer%d", sb.st_rdev & 0xf);
fd = open(path, O_RDWR);
if (fd < 0) {
- DPRINTF(&hdl->sa, "%s: couldn't open mixer\n", path);
+ DPRINTF(&hdl->sa, "sun_initvol: %s: couldn't open mixer\n",
+ path);
return;
}
@@ -373,7 +374,7 @@ sun_initvol(struct sun_hdl *hdl)
if (ioctl(fd, AUDIO_MIXER_DEVINFO, &cl) < 0)
continue;
/*
- * find prefered input gain and output gain
+ * find preferred input gain and output gain
*/
for (i = 0, p = sun_vols; p->cls != NULL; i++, p++) {
if (strcmp(p->cls, cl.label.name) != 0 ||
@@ -393,7 +394,8 @@ sun_initvol(struct sun_hdl *hdl)
m.type = AUDIO_MIXER_VALUE;
m.un.value.num_channels = 1;
if (ioctl(hdl->mix_fd, AUDIO_MIXER_READ, &m) < 0) {
- DPRINTF(&hdl->sa, "sun_getvol: %d: failed to get volume\n", m.dev);
+ DPRINTF(&hdl->sa,
+ "sun_initvol: %d: failed to get volume\n", m.dev);
hdl->sa.eof = 1;
return;
}
@@ -476,7 +478,8 @@ sio_open_sun(char *path, unsigned mode, int nbio)
if (mode == (SIO_PLAY | SIO_REC)) {
fullduplex = 1;
if (ioctl(fd, AUDIO_SETFD, &fullduplex) < 0) {
- DPRINTF(&hdl->sa, "%s: can't set full-duplex\n", path);
+ DPRINTF(&hdl->sa,
+ "sio_open_sun: %s: can't set full-duplex\n", path);
goto bad_close;
}
}
@@ -579,7 +582,7 @@ sun_stop(struct sio_hdl *sh)
int mode;
if (ioctl(hdl->fd, AUDIO_GETINFO, &aui) < 0) {
- DPERROR(&hdl->sa, "sun_start: setinfo1");
+ DPERROR(&hdl->sa, "sun_stop: getinfo");
hdl->sa.eof = 1;
return 0;
}
@@ -732,7 +735,7 @@ sun_getpar(struct sio_hdl *sh, struct sio_par *par)
struct audio_info aui;
if (ioctl(hdl->fd, AUDIO_GETINFO, &aui) < 0) {
- DPERROR(&hdl->sa, "sun_getpar: setinfo");
+ DPERROR(&hdl->sa, "sun_getpar: getinfo");
hdl->sa.eof = 1;
return 0;
}
@@ -818,7 +821,7 @@ sun_autostart(struct sun_hdl *hdl)
while (poll(&pfd, 1, 0) < 0) {
if (errno == EINTR)
continue;
- DPERROR(&hdl->sa, "sun_fill: poll");
+ DPERROR(&hdl->sa, "sun_autostart: poll");
hdl->sa.eof = 1;
return 0;
}
@@ -830,7 +833,7 @@ sun_autostart(struct sun_hdl *hdl)
if (hdl->sa.mode & SIO_REC)
aui.record.pause = 0;
if (ioctl(hdl->fd, AUDIO_SETINFO, &aui) < 0) {
- DPERROR(&hdl->sa, "sun_start: setinfo");
+ DPERROR(&hdl->sa, "sun_autostart: setinfo");
hdl->sa.eof = 1;
return 0;
}
@@ -959,4 +962,3 @@ sun_revents(struct sio_hdl *sh, struct pollfd *pfd)
revents |= POLLOUT;
return revents;
}
-