summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-16 22:31:27 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-16 22:31:27 +0000
commitbe81150bb4bf4bd24cda4481353840bc4885c1c8 (patch)
tree04490af5fbc68c39a0414f02e5d286a9bbf6ed0a /sys/src
parente4a839031a3c16737a420634195eb5cd1a94f86b (diff)
remove audio.h, put stuff in port^(dat fns).h
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/9/pc/audioac97.c6
-rw-r--r--sys/src/9/pc/audioac97mix.c1
-rw-r--r--sys/src/9/pc/audiosb16.c1
-rw-r--r--sys/src/9/port/audio.h22
-rw-r--r--sys/src/9/port/devaudio.c1
-rw-r--r--sys/src/9/port/portdat.h18
-rw-r--r--sys/src/9/port/portfns.h1
7 files changed, 24 insertions, 26 deletions
diff --git a/sys/src/9/pc/audioac97.c b/sys/src/9/pc/audioac97.c
index 0dc38f6cb..c62f349d7 100644
--- a/sys/src/9/pc/audioac97.c
+++ b/sys/src/9/pc/audioac97.c
@@ -5,7 +5,6 @@
#include "fns.h"
#include "io.h"
#include "../port/error.h"
-#include "../port/audio.h"
typedef struct Hwdesc Hwdesc;
typedef struct Ctlr Ctlr;
@@ -141,6 +140,11 @@ enum {
#define csr16w(c, r, w) (outs((c)->port+(r), (ushort)(w)))
#define csr32w(c, r, w) (outl((c)->port+(r), (ulong)(w)))
+/* audioac97mix */
+extern int ac97hardrate(Audio *, int);
+extern void ac97mixreset(Audio *, void (*wr)(Audio*,int,ushort),
+ ushort (*rr)(Audio*,int));
+
static void
ac97waitcodec(Audio *adev)
{
diff --git a/sys/src/9/pc/audioac97mix.c b/sys/src/9/pc/audioac97mix.c
index 09fbe6ebf..f86e4ba1c 100644
--- a/sys/src/9/pc/audioac97mix.c
+++ b/sys/src/9/pc/audioac97mix.c
@@ -5,7 +5,6 @@
#include "fns.h"
#include "io.h"
#include "../port/error.h"
-#include "../port/audio.h"
typedef ushort (*ac97rdfn)(Audio *, int);
typedef void (*ac97wrfn)(Audio *, int, ushort);
diff --git a/sys/src/9/pc/audiosb16.c b/sys/src/9/pc/audiosb16.c
index 1d042fe86..eed65aa42 100644
--- a/sys/src/9/pc/audiosb16.c
+++ b/sys/src/9/pc/audiosb16.c
@@ -8,7 +8,6 @@
#include "fns.h"
#include "io.h"
#include "../port/error.h"
-#include "../port/audio.h"
typedef struct AQueue AQueue;
typedef struct Buf Buf;
diff --git a/sys/src/9/port/audio.h b/sys/src/9/port/audio.h
deleted file mode 100644
index 42ab9712c..000000000
--- a/sys/src/9/port/audio.h
+++ /dev/null
@@ -1,22 +0,0 @@
-
-typedef struct Audio Audio;
-struct Audio {
- Audio *next;
- char *name;
- void *ctlr;
- void *mixer;
- void (*attach)(Audio *);
- long (*read)(Audio *, void *, long, vlong);
- long (*write)(Audio *, void *, long, vlong);
- long (*volread)(Audio *, void *, long, vlong);
- long (*volwrite)(Audio *, void *, long, vlong);
- void (*close)(Audio *);
- long (*ctl)(Audio *, void *, long, vlong);
- long (*status)(Audio *, void *, long, vlong);
- long (*buffered)(Audio *);
- int ctlrno;
-};
-
-void addaudiocard(char *name, int (*probefn)(Audio *));
-void ac97mixreset(Audio *, void (*wr)(Audio*,int,ushort), ushort (*rr)(Audio*,int));
-int ac97hardrate(Audio *adev, int rate);
diff --git a/sys/src/9/port/devaudio.c b/sys/src/9/port/devaudio.c
index e34b8f916..89d756f56 100644
--- a/sys/src/9/port/devaudio.c
+++ b/sys/src/9/port/devaudio.c
@@ -5,7 +5,6 @@
#include "fns.h"
#include "io.h"
#include "../port/error.h"
-#include "../port/audio.h"
typedef struct Audioprobe Audioprobe;
struct Audioprobe {
diff --git a/sys/src/9/port/portdat.h b/sys/src/9/port/portdat.h
index 6d8a59c0b..ec1361f5f 100644
--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -1,4 +1,5 @@
typedef struct Alarms Alarms;
+typedef struct Audio Audio;
typedef struct Block Block;
typedef struct Chan Chan;
typedef struct Cmdbuf Cmdbuf;
@@ -918,6 +919,23 @@ struct Uart
extern Uart* consuart;
+struct Audio {
+ Audio *next;
+ char *name;
+ void *ctlr;
+ void *mixer;
+ void (*attach)(Audio *);
+ long (*read)(Audio *, void *, long, vlong);
+ long (*write)(Audio *, void *, long, vlong);
+ long (*volread)(Audio *, void *, long, vlong);
+ long (*volwrite)(Audio *, void *, long, vlong);
+ void (*close)(Audio *);
+ long (*ctl)(Audio *, void *, long, vlong);
+ long (*status)(Audio *, void *, long, vlong);
+ long (*buffered)(Audio *);
+ int ctlrno;
+};
+
/*
* performance timers, all units in perfticks
*/
diff --git a/sys/src/9/port/portfns.h b/sys/src/9/port/portfns.h
index ca56a6cf0..e9deb83bb 100644
--- a/sys/src/9/port/portfns.h
+++ b/sys/src/9/port/portfns.h
@@ -4,6 +4,7 @@ Timer* addclock0link(void (*)(void), int);
int addphysseg(Physseg*);
void addbootfile(char*, uchar*, ulong);
void addwatchdog(Watchdog*);
+void addaudiocard(char *, int (*)(Audio *));
Block* adjustblock(Block*, int);
void alarmkproc(void*);
Block* allocb(int);