summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2014-03-07 10:15:40 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2014-03-07 10:15:40 +0000
commit933710a4a7f17af112116d2481bd34784a5454d6 (patch)
tree8fd3a8083168dcf3b3aef8d0db312ecd8d293f18 /usr.bin
parenta01334b9cc49188623655be0adbf83bf87dedb70 (diff)
remove unused mmc start/stop/relocate call-backs as they don't
make sense for clients and are handled through midi anyway
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sndiod/dev.c48
-rw-r--r--usr.bin/sndiod/dev.h5
-rw-r--r--usr.bin/sndiod/sock.c47
3 files changed, 3 insertions, 97 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c
index dbd9541f4ea..bea3d4cd7fb 100644
--- a/usr.bin/sndiod/dev.c
+++ b/usr.bin/sndiod/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.12 2014/03/05 20:31:22 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.13 2014/03/07 10:15:38 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -23,7 +23,6 @@
#include "dsp.h"
#include "siofile.h"
#include "midi.h"
-#include "opt.h"
#include "sysex.h"
#include "utils.h"
@@ -32,9 +31,6 @@ void zomb_onvol(void *, unsigned int);
void zomb_fill(void *);
void zomb_flush(void *);
void zomb_eof(void *);
-void zomb_mmcstart(void *);
-void zomb_mmcstop(void *);
-void zomb_mmcloc(void *, unsigned int);
void zomb_exit(void *);
void dev_log(struct dev *);
@@ -110,9 +106,6 @@ struct slotops zomb_slotops = {
zomb_fill,
zomb_flush,
zomb_eof,
- zomb_mmcstart,
- zomb_mmcstop,
- zomb_mmcloc,
zomb_exit
};
@@ -199,21 +192,6 @@ zomb_eof(void *arg)
}
void
-zomb_mmcstart(void *arg)
-{
-}
-
-void
-zomb_mmcstop(void *arg)
-{
-}
-
-void
-zomb_mmcloc(void *arg, unsigned int pos)
-{
-}
-
-void
zomb_exit(void *arg)
{
#ifdef DEBUG
@@ -1414,9 +1392,6 @@ dev_mmcstart(struct dev *d)
void
dev_mmcstop(struct dev *d)
{
- int i;
- struct slot *s;
-
switch (d->tstate) {
case MMC_START:
d->tstate = MMC_STOP;
@@ -1434,19 +1409,6 @@ dev_mmcstop(struct dev *d)
#endif
return;
}
- for (i = 0, s = d->slot; i < DEV_NSLOT; i++, s++) {
- if (!s->ops)
- continue;
- if (s->tstate == MMC_RUN) {
-#ifdef DEBUG
- if (log_level >= 3) {
- slot_log(s);
- log_puts(": requested to stop\n");
- }
-#endif
- s->ops->mmcstop(s->arg);
- }
- }
}
/*
@@ -1455,9 +1417,6 @@ dev_mmcstop(struct dev *d)
void
dev_mmcloc(struct dev *d, unsigned int origin)
{
- int i;
- struct slot *s;
-
if (log_level >= 2) {
dev_log(d);
log_puts(": relocated to ");
@@ -1467,11 +1426,6 @@ dev_mmcloc(struct dev *d, unsigned int origin)
if (d->tstate == MMC_RUN)
dev_mmcstop(d);
d->mtc.origin = origin;
- for (i = 0, s = d->slot; i < DEV_NSLOT; i++, s++) {
- if (!s->ops)
- continue;
- s->ops->mmcloc(s->arg, d->mtc.origin);
- }
if (d->tstate == MMC_RUN)
dev_mmcstart(d);
}
diff --git a/usr.bin/sndiod/dev.h b/usr.bin/sndiod/dev.h
index a04d1caed7b..25bf24ae786 100644
--- a/usr.bin/sndiod/dev.h
+++ b/usr.bin/sndiod/dev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.h,v 1.5 2014/03/05 20:31:22 ratchov Exp $ */
+/* $OpenBSD: dev.h,v 1.6 2014/03/07 10:15:39 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -32,9 +32,6 @@ struct slotops
void (*fill)(void *); /* request to fill a play block */
void (*flush)(void *); /* request to flush a rec block */
void (*eof)(void *); /* notify that play drained */
- void (*mmcstart)(void *); /* request to start */
- void (*mmcstop)(void *); /* request to stop */
- void (*mmcloc)(void *, unsigned int); /* relocate to new position */
void (*exit)(void *); /* delete client */
};
diff --git a/usr.bin/sndiod/sock.c b/usr.bin/sndiod/sock.c
index 685f20daddd..196eb32d575 100644
--- a/usr.bin/sndiod/sock.c
+++ b/usr.bin/sndiod/sock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sock.c,v 1.10 2014/03/05 20:04:21 ratchov Exp $ */
+/* $OpenBSD: sock.c,v 1.11 2014/03/07 10:15:39 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -43,9 +43,6 @@ void sock_midi_imsg(void *, unsigned char *, int);
void sock_midi_omsg(void *, unsigned char *, int);
void sock_midi_fill(void *, int);
struct sock *sock_new(int);
-void sock_slot_mmcstart(void *);
-void sock_slot_mmcstop(void *);
-void sock_slot_mmcloc(void *, unsigned int);
void sock_exit(void *);
int sock_fdwrite(struct sock *, void *, int);
int sock_fdread(struct sock *, void *, int);
@@ -81,9 +78,6 @@ struct slotops sock_slotops = {
sock_slot_fill,
sock_slot_flush,
sock_slot_eof,
- sock_slot_mmcstart,
- sock_slot_mmcstop,
- sock_slot_mmcloc,
sock_exit
};
@@ -303,45 +297,6 @@ sock_new(int fd)
}
void
-sock_slot_mmcstart(void *arg)
-{
-#ifdef DEBUG
- struct sock *f = (struct sock *)arg;
-
- if (log_level >= 3) {
- sock_log(f);
- log_puts(": ignored mmc start signal\n");
- }
-#endif
-}
-
-void
-sock_slot_mmcstop(void *arg)
-{
-#ifdef DEBUG
- struct sock *f = (struct sock *)arg;
-
- if (log_level >= 3) {
- sock_log(f);
- log_puts(": ignored mmc stop signal\n");
- }
-#endif
-}
-
-void
-sock_slot_mmcloc(void *arg, unsigned int mmcpos)
-{
-#ifdef DEBUG
- struct sock *f = (struct sock *)arg;
-
- if (log_level >= 3) {
- sock_log(f);
- log_puts(": ignored mmc relocate signal\n");
- }
-#endif
-}
-
-void
sock_exit(void *arg)
{
struct sock *f = (struct sock *)arg;