FreeBSD kernel sound device code
clone.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SND_CLONE_DEADLINE_DEFAULT   750
 
#define SND_CLONE_MAXUNIT   0xffffff
 
#define SND_CLONE_ENABLE   0x00000001
 
#define SND_CLONE_GC_ENABLE   0x00000002
 
#define SND_CLONE_GC_UNREF   0x00000004
 
#define SND_CLONE_GC_LASTREF   0x00000008
 
#define SND_CLONE_GC_EXPIRED   0x00000010
 
#define SND_CLONE_GC_REVOKE   0x00000020
 
#define SND_CLONE_WAITOK   0x80000000
 
#define SND_CLONE_GC_MASK
 
#define SND_CLONE_MASK
 
#define SND_CLONE_NEW   0x00000001
 
#define SND_CLONE_INVOKE   0x00000002
 
#define SND_CLONE_BUSY   0x00000004
 
#define SND_CLONE_ALLOC
 
#define SND_CLONE_DEVMASK   SND_CLONE_ALLOC
 
#define snd_clone_enabled(x)
 
#define snd_clone_disabled(x)   (!snd_clone_enabled(x))
 

Functions

struct snd_clonesnd_clone_create (int, int, int, uint32_t)
 
int snd_clone_busy (struct snd_clone *)
 
int snd_clone_enable (struct snd_clone *)
 
int snd_clone_disable (struct snd_clone *)
 
int snd_clone_getsize (struct snd_clone *)
 
int snd_clone_getmaxunit (struct snd_clone *)
 
int snd_clone_setmaxunit (struct snd_clone *, int)
 
int snd_clone_getdeadline (struct snd_clone *)
 
int snd_clone_setdeadline (struct snd_clone *, int)
 
uint32_t snd_clone_getflags (struct snd_clone *)
 
uint32_t snd_clone_setflags (struct snd_clone *, uint32_t)
 
uint32_t snd_clone_getdevflags (struct cdev *)
 
uint32_t snd_clone_setdevflags (struct cdev *, uint32_t)
 
int snd_clone_gc (struct snd_clone *)
 
void snd_clone_destroy (struct snd_clone *)
 
int snd_clone_acquire (struct cdev *)
 
int snd_clone_release (struct cdev *)
 
int snd_clone_ref (struct cdev *)
 
int snd_clone_unref (struct cdev *)
 
void snd_clone_register (struct snd_clone_entry *, struct cdev *)
 
struct snd_clone_entrysnd_clone_alloc (struct snd_clone *, struct cdev **, int *, int)
 

Macro Definition Documentation

◆ SND_CLONE_ALLOC

#define SND_CLONE_ALLOC
Value:
SND_CLONE_BUSY)
#define SND_CLONE_INVOKE
Definition: clone.h:91
#define SND_CLONE_NEW
Definition: clone.h:90

Definition at line 97 of file clone.h.

◆ SND_CLONE_BUSY

#define SND_CLONE_BUSY   0x00000004

Definition at line 92 of file clone.h.

◆ SND_CLONE_DEADLINE_DEFAULT

#define SND_CLONE_DEADLINE_DEFAULT   750

Definition at line 41 of file clone.h.

◆ SND_CLONE_DEVMASK

#define SND_CLONE_DEVMASK   SND_CLONE_ALLOC

Definition at line 100 of file clone.h.

◆ snd_clone_disabled

#define snd_clone_disabled (   x)    (!snd_clone_enabled(x))

Definition at line 127 of file clone.h.

◆ SND_CLONE_ENABLE

#define SND_CLONE_ENABLE   0x00000001

Definition at line 64 of file clone.h.

◆ snd_clone_enabled

#define snd_clone_enabled (   x)
Value:
((x) != NULL && \
uint32_t snd_clone_getflags(struct snd_clone *)
Definition: clone.c:235
#define SND_CLONE_ENABLE
Definition: clone.h:64

Definition at line 125 of file clone.h.

◆ SND_CLONE_GC_ENABLE

#define SND_CLONE_GC_ENABLE   0x00000002

Definition at line 65 of file clone.h.

◆ SND_CLONE_GC_EXPIRED

#define SND_CLONE_GC_EXPIRED   0x00000010

Definition at line 68 of file clone.h.

◆ SND_CLONE_GC_LASTREF

#define SND_CLONE_GC_LASTREF   0x00000008

Definition at line 67 of file clone.h.

◆ SND_CLONE_GC_MASK

#define SND_CLONE_GC_MASK
Value:
SND_CLONE_GC_UNREF | \
SND_CLONE_GC_LASTREF | \
SND_CLONE_GC_EXPIRED | \
SND_CLONE_GC_REVOKE)
#define SND_CLONE_GC_ENABLE
Definition: clone.h:65

Definition at line 72 of file clone.h.

◆ SND_CLONE_GC_REVOKE

#define SND_CLONE_GC_REVOKE   0x00000020

Definition at line 69 of file clone.h.

◆ SND_CLONE_GC_UNREF

#define SND_CLONE_GC_UNREF   0x00000004

Definition at line 66 of file clone.h.

◆ SND_CLONE_INVOKE

#define SND_CLONE_INVOKE   0x00000002

Definition at line 91 of file clone.h.

◆ SND_CLONE_MASK

#define SND_CLONE_MASK
Value:
SND_CLONE_WAITOK)
#define SND_CLONE_GC_MASK
Definition: clone.h:72

Definition at line 78 of file clone.h.

◆ SND_CLONE_MAXUNIT

#define SND_CLONE_MAXUNIT   0xffffff

Definition at line 46 of file clone.h.

◆ SND_CLONE_NEW

#define SND_CLONE_NEW   0x00000001

Definition at line 90 of file clone.h.

◆ SND_CLONE_WAITOK

#define SND_CLONE_WAITOK   0x80000000

Definition at line 70 of file clone.h.

Function Documentation

◆ snd_clone_acquire()

int snd_clone_acquire ( struct cdev *  dev)

Definition at line 385 of file clone.c.

References dev, SND_CLONE_ASSERT, and SND_CLONE_BUSY.

Referenced by dsp_open().

Here is the caller graph for this function:

◆ snd_clone_alloc()

struct snd_clone_entry * snd_clone_alloc ( struct snd_clone c,
struct cdev **  dev,
int *  unit,
int  tmask 
)

Definition at line 519 of file clone.c.

References c, dev, pcm_channel::flags, SND_CLONE_ALLOC, SND_CLONE_ASSERT, SND_CLONE_BUSY, SND_CLONE_ENABLE, SND_CLONE_INVOKE, and SND_CLONE_WAITOK.

Referenced by dsp_clone().

Here is the caller graph for this function:

◆ snd_clone_busy()

int snd_clone_busy ( struct snd_clone c)

Definition at line 134 of file clone.c.

References c, SND_CLONE_ASSERT, and SND_CLONE_BUSY.

Referenced by pcm_unregister().

Here is the caller graph for this function:

◆ snd_clone_create()

struct snd_clone * snd_clone_create ( int  typemask,
int  maxunit,
int  deadline,
uint32_t  flags 
)

Definition at line 106 of file clone.c.

References c, pcm_channel::flags, pcm_channel::refcount, SND_CLONE_ASSERT, SND_CLONE_MASK, and SND_CLONE_MAXUNIT.

Referenced by pcm_register().

Here is the caller graph for this function:

◆ snd_clone_destroy()

void snd_clone_destroy ( struct snd_clone c)

Definition at line 360 of file clone.c.

References c, free, and SND_CLONE_ASSERT.

Referenced by pcm_unregister().

Here is the caller graph for this function:

◆ snd_clone_disable()

int snd_clone_disable ( struct snd_clone c)

Definition at line 170 of file clone.c.

References c, pcm_channel::flags, SND_CLONE_ASSERT, and SND_CLONE_ENABLE.

Referenced by pcm_unregister().

Here is the caller graph for this function:

◆ snd_clone_enable()

int snd_clone_enable ( struct snd_clone c)

Definition at line 157 of file clone.c.

References c, pcm_channel::flags, SND_CLONE_ASSERT, and SND_CLONE_ENABLE.

Referenced by pcm_setstatus(), and pcm_unregister().

Here is the caller graph for this function:

◆ snd_clone_gc()

int snd_clone_gc ( struct snd_clone c)

Definition at line 308 of file clone.c.

References c, pcm_channel::flags, free, SND_CLONE_ASSERT, SND_CLONE_BUSY, SND_CLONE_EXPIRED, SND_CLONE_GC_ENABLE, SND_CLONE_GC_EXPIRED, SND_CLONE_GC_REVOKE, and SND_CLONE_INVOKE.

Referenced by pcm_clonereset(), and snd_clone_unref().

Here is the caller graph for this function:

◆ snd_clone_getdeadline()

int snd_clone_getdeadline ( struct snd_clone c)

Definition at line 217 of file clone.c.

References c, and SND_CLONE_ASSERT.

◆ snd_clone_getdevflags()

uint32_t snd_clone_getdevflags ( struct cdev *  dev)

Definition at line 255 of file clone.c.

References dev, and SND_CLONE_ASSERT.

◆ snd_clone_getflags()

uint32_t snd_clone_getflags ( struct snd_clone c)

Definition at line 235 of file clone.c.

References c, pcm_channel::flags, and SND_CLONE_ASSERT.

◆ snd_clone_getmaxunit()

int snd_clone_getmaxunit ( struct snd_clone c)

Definition at line 194 of file clone.c.

References c, and SND_CLONE_ASSERT.

Referenced by dsp_clone().

Here is the caller graph for this function:

◆ snd_clone_getsize()

int snd_clone_getsize ( struct snd_clone c)

Definition at line 186 of file clone.c.

References c, and SND_CLONE_ASSERT.

◆ snd_clone_ref()

int snd_clone_ref ( struct cdev *  dev)

Definition at line 450 of file clone.c.

References c, dev, pcm_channel::refcount, and SND_CLONE_ASSERT.

Referenced by dsp_open().

Here is the caller graph for this function:

◆ snd_clone_register()

void snd_clone_register ( struct snd_clone_entry ce,
struct cdev *  dev 
)

Definition at line 498 of file clone.c.

References dev, SND_CLONE_ALLOC, SND_CLONE_ASSERT, and SND_CLONE_INVOKE.

Referenced by dsp_clone().

Here is the caller graph for this function:

◆ snd_clone_release()

int snd_clone_release ( struct cdev *  dev)

Definition at line 412 of file clone.c.

References dev, SND_CLONE_ASSERT, and SND_CLONE_BUSY.

Referenced by dsp_close(), and dsp_open().

Here is the caller graph for this function:

◆ snd_clone_setdeadline()

int snd_clone_setdeadline ( struct snd_clone c,
int  deadline 
)

Definition at line 225 of file clone.c.

References c, and SND_CLONE_ASSERT.

◆ snd_clone_setdevflags()

uint32_t snd_clone_setdevflags ( struct cdev *  dev,
uint32_t  flags 
)

Definition at line 271 of file clone.c.

References dev, SND_CLONE_ASSERT, and SND_CLONE_DEVMASK.

◆ snd_clone_setflags()

uint32_t snd_clone_setflags ( struct snd_clone c,
uint32_t  flags 
)

Definition at line 243 of file clone.c.

References c, pcm_channel::flags, SND_CLONE_ASSERT, and SND_CLONE_MASK.

◆ snd_clone_setmaxunit()

int snd_clone_setmaxunit ( struct snd_clone c,
int  maxunit 
)

Definition at line 202 of file clone.c.

References c, SND_CLONE_ASSERT, and SND_CLONE_MAXUNIT.

Referenced by dsp_clone(), and pcm_clonereset().

Here is the caller graph for this function:

◆ snd_clone_unref()

int snd_clone_unref ( struct cdev *  dev)

Definition at line 469 of file clone.c.

References c, dev, pcm_channel::flags, pcm_channel::refcount, SND_CLONE_ASSERT, snd_clone_gc(), SND_CLONE_GC_LASTREF, and SND_CLONE_GC_UNREF.

Referenced by dsp_close().

Here is the call graph for this function:
Here is the caller graph for this function: