remove audio.h, put stuff in port^(dat fns).h
This commit is contained in:
parent
e4a839031a
commit
be81150bb4
7 changed files with 24 additions and 26 deletions
|
@ -5,7 +5,6 @@
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "../port/error.h"
|
#include "../port/error.h"
|
||||||
#include "../port/audio.h"
|
|
||||||
|
|
||||||
typedef struct Hwdesc Hwdesc;
|
typedef struct Hwdesc Hwdesc;
|
||||||
typedef struct Ctlr Ctlr;
|
typedef struct Ctlr Ctlr;
|
||||||
|
@ -141,6 +140,11 @@ enum {
|
||||||
#define csr16w(c, r, w) (outs((c)->port+(r), (ushort)(w)))
|
#define csr16w(c, r, w) (outs((c)->port+(r), (ushort)(w)))
|
||||||
#define csr32w(c, r, w) (outl((c)->port+(r), (ulong)(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
|
static void
|
||||||
ac97waitcodec(Audio *adev)
|
ac97waitcodec(Audio *adev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "../port/error.h"
|
#include "../port/error.h"
|
||||||
#include "../port/audio.h"
|
|
||||||
|
|
||||||
typedef ushort (*ac97rdfn)(Audio *, int);
|
typedef ushort (*ac97rdfn)(Audio *, int);
|
||||||
typedef void (*ac97wrfn)(Audio *, int, ushort);
|
typedef void (*ac97wrfn)(Audio *, int, ushort);
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "../port/error.h"
|
#include "../port/error.h"
|
||||||
#include "../port/audio.h"
|
|
||||||
|
|
||||||
typedef struct AQueue AQueue;
|
typedef struct AQueue AQueue;
|
||||||
typedef struct Buf Buf;
|
typedef struct Buf Buf;
|
||||||
|
|
|
@ -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);
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "../port/error.h"
|
#include "../port/error.h"
|
||||||
#include "../port/audio.h"
|
|
||||||
|
|
||||||
typedef struct Audioprobe Audioprobe;
|
typedef struct Audioprobe Audioprobe;
|
||||||
struct Audioprobe {
|
struct Audioprobe {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
typedef struct Alarms Alarms;
|
typedef struct Alarms Alarms;
|
||||||
|
typedef struct Audio Audio;
|
||||||
typedef struct Block Block;
|
typedef struct Block Block;
|
||||||
typedef struct Chan Chan;
|
typedef struct Chan Chan;
|
||||||
typedef struct Cmdbuf Cmdbuf;
|
typedef struct Cmdbuf Cmdbuf;
|
||||||
|
@ -918,6 +919,23 @@ struct Uart
|
||||||
|
|
||||||
extern Uart* consuart;
|
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
|
* performance timers, all units in perfticks
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,6 +4,7 @@ Timer* addclock0link(void (*)(void), int);
|
||||||
int addphysseg(Physseg*);
|
int addphysseg(Physseg*);
|
||||||
void addbootfile(char*, uchar*, ulong);
|
void addbootfile(char*, uchar*, ulong);
|
||||||
void addwatchdog(Watchdog*);
|
void addwatchdog(Watchdog*);
|
||||||
|
void addaudiocard(char *, int (*)(Audio *));
|
||||||
Block* adjustblock(Block*, int);
|
Block* adjustblock(Block*, int);
|
||||||
void alarmkproc(void*);
|
void alarmkproc(void*);
|
||||||
Block* allocb(int);
|
Block* allocb(int);
|
||||||
|
|
Loading…
Reference in a new issue