summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pci/vibes.c
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2001-03-24 23:10:29 +0000
committercg <cg@FreeBSD.org>2001-03-24 23:10:29 +0000
commit11442775804b9679c2c761846072b171d2507840 (patch)
tree2c8e61a99c9323312c5656a92269f975ac6b0c12 /sys/dev/sound/pci/vibes.c
parentfb291ae7e5515cf63d4544d3eeff0a4c791e3cad (diff)
downloadFreeBSD-src-11442775804b9679c2c761846072b171d2507840.zip
FreeBSD-src-11442775804b9679c2c761846072b171d2507840.tar.gz
mega-commit.
this introduces a new buffering mechanism which results in dramatic simplification of the channel manager. as several structures have changed, we take the opportunity to move their definitions into the source files where they are used, make them private and de-typedef them. the sound drivers are updated to use snd_setup_intr instead of bus_setup_intr, and to comply with the de-typedefed structures. the ac97, mixer and channel layers have been updated with finegrained locking, as have some drivers- not all though. the rest will follow soon.
Diffstat (limited to 'sys/dev/sound/pci/vibes.c')
-rw-r--r--sys/dev/sound/pci/vibes.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c
index 28ce36f..228b281 100644
--- a/sys/dev/sound/pci/vibes.c
+++ b/sys/dev/sound/pci/vibes.c
@@ -56,8 +56,8 @@ struct sc_info;
struct sc_chinfo {
struct sc_info *parent;
- pcm_channel *channel;
- snd_dbuf *buffer;
+ struct pcm_channel *channel;
+ struct snd_dbuf *buffer;
u_int32_t fmt, spd;
int dir;
int dma_active, dma_was_active;
@@ -100,7 +100,7 @@ static u_int32_t sc_fmt[] = {
0
};
-static pcmchan_caps sc_caps = {8000, 48000, sc_fmt, 0};
+static struct pcmchan_caps sc_caps = {8000, 48000, sc_fmt, 0};
/* ------------------------------------------------------------------------- */
/* Register Manipulations */
@@ -178,7 +178,7 @@ sv_dma_get_count(bus_space_tag_t st, bus_space_handle_t sh)
/* Play / Record Common Interface */
static void *
-svchan_init(kobj_t obj, void *devinfo, snd_dbuf *b, pcm_channel *c, int dir)
+svchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
{
struct sc_info *sc = devinfo;
struct sc_chinfo *ch;
@@ -200,7 +200,7 @@ svchan_init(kobj_t obj, void *devinfo, snd_dbuf *b, pcm_channel *c, int dir)
return ch;
}
-static pcmchan_caps *
+static struct pcmchan_caps *
svchan_getcaps(kobj_t obj, void *data)
{
return &sc_caps;
@@ -505,7 +505,7 @@ sv_mix_mute_all(struct sc_info *sc)
}
static int
-sv_mix_init(snd_mixer *m)
+sv_mix_init(struct snd_mixer *m)
{
u_int32_t i, v;
@@ -523,14 +523,14 @@ sv_mix_init(snd_mixer *m)
}
static int
-sv_mix_set(snd_mixer *m, u_int32_t dev, u_int32_t left, u_int32_t right)
+sv_mix_set(struct snd_mixer *m, u_int32_t dev, u_int32_t left, u_int32_t right)
{
struct sc_info *sc = mix_getdevinfo(m);
return sv_gain(sc, dev, left, right);
}
static int
-sv_mix_setrecsrc(snd_mixer *m, u_int32_t mask)
+sv_mix_setrecsrc(struct snd_mixer *m, u_int32_t mask)
{
struct sc_info *sc = mix_getdevinfo(m);
u_int32_t i, v;
@@ -706,7 +706,7 @@ sv_probe(device_t dev)
static int
sv_attach(device_t dev) {
- snddev_info *d;
+ struct snddev_info *d;
struct sc_info *sc;
u_int32_t data;
char status[SND_STATUSLEN];
@@ -920,7 +920,7 @@ static device_method_t sc_methods[] = {
static driver_t sonicvibes_driver = {
"pcm",
sc_methods,
- sizeof(snddev_info)
+ sizeof(struct snddev_info)
};
static devclass_t pcm_devclass;
OpenPOWER on IntegriCloud