Deleted Added
full compact
27c27
< * $FreeBSD: head/sys/dev/sound/pcm/sound.h 169319 2007-05-06 16:46:23Z ariff $
---
> * $FreeBSD: head/sys/dev/sound/pcm/sound.h 170161 2007-05-31 18:43:33Z ariff $
97a98,99
> #include <dev/sound/clone.h>
> #include <dev/sound/unit.h>
111,119c113,115
< * for our bit twiddling and nobody ever need 2048 unique soundcards,
< * 32 unique device types and 256 unique cloneable devices for the
< * next 100 years... or until the NextPCM.
< *
< * MAXMINOR 0xffff00ff
< * | |
< * | +--- PCMMAXCHAN
< * |
< * +-------- ((PCMMAXUNIT << 5) | PCMMAXDEV) << 16
---
> * for our bit twiddling and nobody ever need 512 unique soundcards,
> * 32 unique device types and 1024 unique cloneable devices for the
> * next 100 years...
122,130c118,120
< #define PCMMAXCHAN 0xff
< #define PCMMAXDEV 0x1f
< #define PCMMAXUNIT 0x7ff
< #define PCMMINOR(x) minor(x)
< #define PCMCHAN(x) (PCMMINOR(x) & PCMMAXCHAN)
< #define PCMUNIT(x) ((PCMMINOR(x) >> 21) & PCMMAXUNIT)
< #define PCMDEV(x) ((PCMMINOR(x) >> 16) & PCMMAXDEV)
< #define PCMMKMINOR(u, d, c) ((((u) & PCMMAXUNIT) << 21) | \
< (((d) & PCMMAXDEV) << 16) | ((c) & PCMMAXCHAN))
---
> #define PCMMAXUNIT (snd_max_u())
> #define PCMMAXDEV (snd_max_d())
> #define PCMMAXCHAN (snd_max_c())
131a122,133
> #define PCMMAXCLONE PCMMAXCHAN
>
> #define PCMUNIT(x) (snd_unit2u(dev2unit(x)))
> #define PCMDEV(x) (snd_unit2d(dev2unit(x)))
> #define PCMCHAN(x) (snd_unit2c(dev2unit(x)))
>
> /*
> * By design, limit possible channels for each direction.
> */
> #define SND_MAXHWCHAN 256
> #define SND_MAXVCHANS SND_MAXHWCHAN
>
136a139,140
> #define SD_F_DYING 0x00000020
> #define SD_F_SUICIDE 0x00000040
436,438d439
< /* XXX Flawed definition. I'll fix it someday. */
< #define SND_MAXVCHANS PCMMAXCHAN
<
460d460
< #define SND_DEV_DSPHW 11 /* specific channel request */
461a462,466
> #define SND_DEV_DSPHW_PLAY 11 /* specific playback channel */
> #define SND_DEV_DSPHW_VPLAY 12 /* specific virtual playback channel */
> #define SND_DEV_DSPHW_REC 13 /* specific record channel */
> #define SND_DEV_DSPHW_VREC 14 /* specific virtual record channel */
>
488c493
< int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, pid_t pid, int chnum);
---
> int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction, pid_t pid, int devunit);
493c498
< struct pcm_channel *pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, void *devinfo);
---
> struct pcm_channel *pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t cls, int dir, int num, void *devinfo);
520,521c525,526
< int sndstat_acquire(void);
< int sndstat_release(void);
---
> int sndstat_acquire(struct thread *td);
> int sndstat_release(struct thread *td);
554,563d558
< struct snddev_channel {
< SLIST_ENTRY(snddev_channel) link;
< struct pcm_channel *channel;
< int chan_num;
< struct cdev *dsp_devt;
< struct cdev *dspW_devt;
< struct cdev *audio_devt;
< struct cdev *dspHW_devt;
< };
<
565c560,568
< SLIST_HEAD(, snddev_channel) channels;
---
> struct {
> struct {
> SLIST_HEAD(, pcm_channel) head;
> struct {
> SLIST_HEAD(, pcm_channel) head;
> } busy;
> } pcm;
> } channels;
> struct snd_clone *clones;
567c570
< unsigned devcount, playcount, reccount, vchancount;
---
> unsigned devcount, playcount, reccount, pvchancount, rvchancount ;
576c579,582
<
---
> uint32_t pvchanrate, pvchanformat;
> uint32_t rvchanrate, rvchanformat;
> struct sysctl_ctx_list play_sysctl_ctx, rec_sysctl_ctx;
> struct sysctl_oid *play_sysctl_tree, *rec_sysctl_tree;