summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pci/maestro.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/pci/maestro.c')
-rw-r--r--sys/dev/sound/pci/maestro.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c
index e35e547..2042eaf 100644
--- a/sys/dev/sound/pci/maestro.c
+++ b/sys/dev/sound/pci/maestro.c
@@ -81,8 +81,8 @@
*/
struct agg_chinfo {
struct agg_info *parent;
- pcm_channel *channel;
- snd_dbuf *buffer;
+ struct pcm_channel *channel;
+ struct snd_dbuf *buffer;
bus_addr_t offset;
u_int32_t blocksize;
u_int32_t speed;
@@ -109,6 +109,7 @@ struct agg_info {
bus_addr_t baseaddr;
struct ac97_info *codec;
+ void *lock;
u_int playchns, active;
struct agg_chinfo pch[AGG_MAXPLAYCH];
@@ -637,7 +638,7 @@ set_timer(struct agg_info *ess)
*/
static void *
-aggch_init(kobj_t obj, void *devinfo, snd_dbuf *b, pcm_channel *c, int dir)
+aggch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
{
struct agg_info *ess = devinfo;
struct agg_chinfo *ch;
@@ -661,8 +662,7 @@ aggch_init(kobj_t obj, void *devinfo, snd_dbuf *b, pcm_channel *c, int dir)
if (physaddr < ess->baseaddr || ch->offset > WPWA_MAXADDR) {
device_printf(ess->dev,
"offset %#x exceeds limit. ", ch->offset);
- dma_free(ess, b->buf);
- b->buf = NULL;
+ dma_free(ess, sndbuf_getbuf(b));
return NULL;
}
@@ -786,7 +786,7 @@ aggch_getplayptr(kobj_t obj, void *data)
return cp;
}
-static pcmchan_caps *
+static struct pcmchan_caps *
aggch_getcaps(kobj_t obj, void *data)
{
static u_int32_t playfmt[] = {
@@ -798,7 +798,7 @@ aggch_getcaps(kobj_t obj, void *data)
AFMT_STEREO | AFMT_S16_LE,
0
};
- static pcmchan_caps playcaps = {2000, 96000, playfmt, 0};
+ static struct pcmchan_caps playcaps = {2000, 96000, playfmt, 0};
static u_int32_t recfmt[] = {
AFMT_S8,
@@ -807,7 +807,7 @@ aggch_getcaps(kobj_t obj, void *data)
AFMT_STEREO | AFMT_S16_LE,
0
};
- static pcmchan_caps reccaps = {4000, 48000, recfmt, 0};
+ static struct pcmchan_caps reccaps = {4000, 48000, recfmt, 0};
return (((struct agg_chinfo*)data)->dir == PCMDIR_PLAY)?
&playcaps : &reccaps;
@@ -1020,8 +1020,7 @@ agg_attach(device_t dev)
irq = bus_alloc_resource(dev, SYS_RES_IRQ, &irqid,
0, BUS_SPACE_UNRESTRICTED, 1, RF_ACTIVE | RF_SHAREABLE);
- if (irq == NULL
- || bus_setup_intr(dev, irq, INTR_TYPE_TTY, agg_intr, ess, &ih)) {
+ if (irq == NULL || snd_setup_intr(dev, irq, 0, agg_intr, ess, &ih)) {
device_printf(dev, "unable to map interrupt\n");
goto bad;
}
@@ -1183,7 +1182,7 @@ static device_method_t agg_methods[] = {
static driver_t agg_driver = {
"pcm",
agg_methods,
- sizeof(snddev_info),
+ sizeof(struct snddev_info),
};
static devclass_t pcm_devclass;
OpenPOWER on IntegriCloud