diff options
author | cg <cg@FreeBSD.org> | 2000-09-01 20:09:24 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2000-09-01 20:09:24 +0000 |
commit | a6b7de97e3e709e699c0638c9ff07e8fc3477772 (patch) | |
tree | ba5ec2ebf628be720fad52ae78db04a46cc46680 /sys/dev/sound/isa/ad1816.c | |
parent | e95936f6ddf2411361330abe8f44903c01b42fe5 (diff) | |
download | FreeBSD-src-a6b7de97e3e709e699c0638c9ff07e8fc3477772.zip FreeBSD-src-a6b7de97e3e709e699c0638c9ff07e8fc3477772.tar.gz |
change mixer api slightly
change channel interface - kobj implementation coming soonish
make pcm_makelinks not panic if modular
add pcm_unregister()
these changes support newpcm kld unloading, but this is only implemented
by ds1.c
Diffstat (limited to 'sys/dev/sound/isa/ad1816.c')
-rw-r--r-- | sys/dev/sound/isa/ad1816.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c index ec7a61e..3cebbe3 100644 --- a/sys/dev/sound/isa/ad1816.c +++ b/sys/dev/sound/isa/ad1816.c @@ -67,10 +67,11 @@ static int ad1816mix_init(snd_mixer *m); static int ad1816mix_set(snd_mixer *m, unsigned dev, unsigned left, unsigned right); static int ad1816mix_setrecsrc(snd_mixer *m, u_int32_t src); static snd_mixer ad1816_mixer = { - "ad1816 mixer", - ad1816mix_init, - ad1816mix_set, - ad1816mix_setrecsrc, + "ad1816 mixer", + ad1816mix_init, + NULL, + ad1816mix_set, + ad1816mix_setrecsrc, }; static devclass_t pcm_devclass; @@ -108,6 +109,14 @@ static pcm_channel ad1816_chantemplate = { ad1816chan_trigger, ad1816chan_getptr, ad1816chan_getcaps, + NULL, /* free */ + NULL, /* nop1 */ + NULL, /* nop2 */ + NULL, /* nop3 */ + NULL, /* nop4 */ + NULL, /* nop5 */ + NULL, /* nop6 */ + NULL, /* nop7 */ }; #define AD1816_MUTE 31 /* value for mute */ @@ -566,7 +575,6 @@ static int ad1816_attach(device_t dev) { struct ad1816_info *ad1816; - snddev_info *d = device_get_softc(dev); void *ih; char status[SND_STATUSLEN]; @@ -581,7 +589,7 @@ ad1816_attach(device_t dev) if (!ad1816_alloc_resources(ad1816, dev)) goto no; ad1816_init(ad1816, dev); - mixer_init(d, &ad1816_mixer, ad1816); + mixer_init(dev, &ad1816_mixer, ad1816); bus_setup_intr(dev, ad1816->irq, INTR_TYPE_TTY, ad1816_intr, ad1816, &ih); if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/2, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_24BIT, |