#include "fns.h"
#include "io.h"
#include "../port/error.h"
-#include "../port/audio.h"
typedef struct Hwdesc Hwdesc;
typedef struct Ctlr Ctlr;
#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)
{
#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);
#include "fns.h"
#include "io.h"
#include "../port/error.h"
-#include "../port/audio.h"
typedef struct AQueue AQueue;
typedef struct Buf Buf;
+++ /dev/null
-
-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);
#include "fns.h"
#include "io.h"
#include "../port/error.h"
-#include "../port/audio.h"
typedef struct Audioprobe Audioprobe;
struct Audioprobe {
typedef struct Alarms Alarms;
+typedef struct Audio Audio;
typedef struct Block Block;
typedef struct Chan Chan;
typedef struct Cmdbuf Cmdbuf;
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
*/
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);