1/* 2 * Copyright (c) 1999 Cameron Grant <cg@freebsd.org> 3 * Copyright by Hannu Savolainen 1995 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/dev/sound/pcm/sound.h 124740 2004-01-20 03:58:57Z matk $ |
28 */ 29 30/* 31 * first, include kernel header files. 32 */ 33 34#ifndef _OS_H_ 35#define _OS_H_ --- 57 unchanged lines hidden (view full) --- 93struct pcm_feeder; 94struct snd_dbuf; 95struct snd_mixer; 96 97#include <dev/sound/pcm/buffer.h> 98#include <dev/sound/pcm/channel.h> 99#include <dev/sound/pcm/feeder.h> 100#include <dev/sound/pcm/mixer.h> |
101 102#define PCM_SOFTC_SIZE 512 103 104#define SND_STATUSLEN 64 105 106#define PCM_MODVER 1 107 108#define PCM_MINVER 1 --- 107 unchanged lines hidden (view full) --- 216struct pcm_channel *pcm_getfakechan(struct snddev_info *d); 217struct pcm_channel *pcm_chnalloc(struct snddev_info *d, int direction, pid_t pid, int chnum); 218int pcm_chnrelease(struct pcm_channel *c); 219int pcm_chnref(struct pcm_channel *c, int ref); 220int pcm_inprog(struct snddev_info *d, int delta); 221 222struct pcm_channel *pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, void *devinfo); 223int pcm_chn_destroy(struct pcm_channel *ch); |
224int pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch); 225int pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch); |
226 227int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo); 228unsigned int pcm_getbuffersize(device_t dev, unsigned int min, unsigned int deflt, unsigned int max); 229int pcm_register(device_t dev, void *devinfo, int numplay, int numrec); 230int pcm_unregister(device_t dev); 231int pcm_setstatus(device_t dev, char *str); 232u_int32_t pcm_getflags(device_t dev); 233void pcm_setflags(device_t dev, u_int32_t val); 234void *pcm_getdevinfo(device_t dev); 235 |
236 237int snd_setup_intr(device_t dev, struct resource *res, int flags, 238 driver_intr_t hand, void *param, void **cookiep); 239 240void *snd_mtxcreate(const char *desc, const char *type); 241void snd_mtxfree(void *m); 242void snd_mtxassert(void *m); 243#define snd_mtxlock(m) mtx_lock(m) --- 33 unchanged lines hidden (view full) --- 277 * this is rather kludgey- we need to duplicate these struct def'ns from sound.c 278 * so that the macro versions of pcm_{,un}lock can dereference them. 279 * we also have to do this now makedev() has gone away. 280 */ 281 282struct snddev_channel { 283 SLIST_ENTRY(snddev_channel) link; 284 struct pcm_channel *channel; |
285 int chan_num; 286 dev_t dsp_devt; 287 dev_t dspW_devt; 288 dev_t audio_devt; 289 dev_t dspr_devt; |
290}; 291 |
292struct snddev_info { 293 SLIST_HEAD(, snddev_channel) channels; |
294 struct pcm_channel *fakechan; 295 unsigned devcount, playcount, reccount, vchancount; 296 unsigned flags; 297 int inprog; 298 unsigned int bufsz; 299 void *devinfo; 300 device_t dev; 301 char status[SND_STATUSLEN]; --- 18 unchanged lines hidden --- |