]> git.lizzy.rs Git - plan9front.git/commitdiff
remove audio.h, put stuff in port^(dat fns).h
authorcinap_lenrek <cinap_lenrek@localhost>
Mon, 16 May 2011 22:31:27 +0000 (22:31 +0000)
committercinap_lenrek <cinap_lenrek@localhost>
Mon, 16 May 2011 22:31:27 +0000 (22:31 +0000)
sys/src/9/pc/audioac97.c
sys/src/9/pc/audioac97mix.c
sys/src/9/pc/audiosb16.c
sys/src/9/port/audio.h [deleted file]
sys/src/9/port/devaudio.c
sys/src/9/port/portdat.h
sys/src/9/port/portfns.h

index 0dc38f6cbca0b2b09b7e48b1d781b320f7cb4ca7..c62f349d7bf4b32fe4506328bfb6b449188848c5 100644 (file)
@@ -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)
 {
index 09fbe6ebf765765e1396b0b21eb39a0503e15d2b..f86e4ba1cff0cbd2712b14eb3436ebd08c90ed20 100644 (file)
@@ -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);
index 1d042fe8602618c0bec39e6c4ce01e2da69b4d7b..eed65aa4250e21661f89ab0eb3d2b9c0238b1e39 100644 (file)
@@ -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 (file)
index 42ab971..0000000
+++ /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);
index e34b8f916d80bd31def09b118f1288b224623ad4..89d756f56ccb42960d7fbf460d05c670320d21c4 100644 (file)
@@ -5,7 +5,6 @@
 #include       "fns.h"
 #include       "io.h"
 #include       "../port/error.h"
-#include       "../port/audio.h"
 
 typedef struct Audioprobe Audioprobe;
 struct Audioprobe {
index 6d8a59c0bb612f6a3db1ec3a91796bc4d381e162..ec1361f5fd500fd478ea3dc8a236ae4f29bee7d0 100644 (file)
@@ -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
  */
index ca56a6cf0f503f0612a2271fc78e9f88d7bc3fc2..e9deb83bbdb18057b574980fb939b50caa160728 100644 (file)
@@ -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);