summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/aucat/dev.h')
-rw-r--r--usr.bin/aucat/dev.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/usr.bin/aucat/dev.h b/usr.bin/aucat/dev.h
index a572401d9db..79909acc759 100644
--- a/usr.bin/aucat/dev.h
+++ b/usr.bin/aucat/dev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.h,v 1.31 2011/11/15 08:05:22 ratchov Exp $ */
+/* $OpenBSD: dev.h,v 1.32 2011/11/20 22:54:51 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -60,6 +60,32 @@ struct dev {
unsigned mode;
char *path;
} *ctl_list;
+
+ /* volume control and MMC/MTC */
+#define CTL_NSLOT 8
+#define CTL_NAMEMAX 8
+ unsigned serial;
+ struct ctl_slot {
+ struct ctl_ops {
+ void (*vol)(void *, unsigned);
+ void (*start)(void *);
+ void (*stop)(void *);
+ void (*loc)(void *, unsigned);
+ void (*quit)(void *);
+ } *ops;
+ void *arg;
+ unsigned unit;
+ char name[CTL_NAMEMAX];
+ unsigned serial;
+ unsigned vol;
+ unsigned tstate;
+ } slot[CTL_NSLOT];
+#define CTL_OFF 0 /* ignore MMC messages */
+#define CTL_STOP 1 /* stopped, can't start */
+#define CTL_START 2 /* attempting to start */
+#define CTL_RUN 3 /* started */
+ unsigned tstate; /* one of above */
+ unsigned origin; /* MTC start time */
};
extern struct dev *dev_list;
@@ -84,4 +110,16 @@ void dev_attach(struct dev *, char *, unsigned,
unsigned, int);
void dev_setvol(struct dev *, struct abuf *, int);
+void dev_slotdbg(struct dev *, int);
+int dev_slotnew(struct dev *, char *, struct ctl_ops *, void *, int);
+void dev_slotdel(struct dev *, int);
+void dev_slotvol(struct dev *, int, unsigned);
+
+int dev_slotstart(struct dev *, int);
+void dev_slotstop(struct dev *, int);
+void dev_mmcstart(struct dev *);
+void dev_mmcstop(struct dev *);
+void dev_loc(struct dev *, unsigned);
+int dev_idle(struct dev *);
+
#endif /* !define(DEV_H) */