Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
dummy.c File Reference
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/jiffies.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/wait.h>
#include <linux/hrtimer.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/tlv.h>
#include <sound/pcm.h>
#include <sound/rawmidi.h>
#include <sound/info.h>
#include <sound/initval.h>

Go to the source code of this file.

Data Structures

struct  dummy_timer_ops
 
struct  dummy_model
 
struct  snd_dummy
 
struct  dummy_systimer_pcm
 

Macros

#define MAX_PCM_DEVICES   4
 
#define MAX_PCM_SUBSTREAMS   128
 
#define MAX_MIDI_DEVICES   2
 
#define MAX_BUFFER_SIZE   (64*1024)
 
#define MIN_PERIOD_SIZE   64
 
#define MAX_PERIOD_SIZE   MAX_BUFFER_SIZE
 
#define USE_FORMATS   (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE)
 
#define USE_RATE   SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000
 
#define USE_RATE_MIN   5500
 
#define USE_RATE_MAX   48000
 
#define USE_CHANNELS_MIN   1
 
#define USE_CHANNELS_MAX   2
 
#define USE_PERIODS_MIN   1
 
#define USE_PERIODS_MAX   1024
 
#define MIXER_ADDR_MASTER   0
 
#define MIXER_ADDR_LINE   1
 
#define MIXER_ADDR_MIC   2
 
#define MIXER_ADDR_SYNTH   3
 
#define MIXER_ADDR_CD   4
 
#define MIXER_ADDR_LAST   4
 
#define DUMMY_VOLUME(xname, xindex, addr)
 
#define DUMMY_CAPSRC(xname, xindex, addr)
 
#define snd_dummy_capsrc_info   snd_ctl_boolean_stereo_info
 
#define dummy_proc_init(x)
 
#define SND_DUMMY_PM_OPS   NULL
 
#define SND_DUMMY_DRIVER   "snd_dummy"
 

Functions

 MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>")
 
 MODULE_DESCRIPTION ("Dummy soundcard (/dev/null)")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{ALSA,Dummy soundcard}}")
 
 module_param_array (index, int, NULL, 0444)
 
 MODULE_PARM_DESC (index,"Index value for dummy soundcard.")
 
 module_param_array (id, charp, NULL, 0444)
 
 MODULE_PARM_DESC (id,"ID string for dummy soundcard.")
 
 module_param_array (enable, bool, NULL, 0444)
 
 MODULE_PARM_DESC (enable,"Enable this dummy soundcard.")
 
 module_param_array (model, charp, NULL, 0444)
 
 MODULE_PARM_DESC (model,"Soundcard model.")
 
 module_param_array (pcm_devs, int, NULL, 0444)
 
 MODULE_PARM_DESC (pcm_devs,"PCM devices # (0-4) for dummy driver.")
 
 module_param_array (pcm_substreams, int, NULL, 0444)
 
 MODULE_PARM_DESC (pcm_substreams,"PCM substreams # (1-128) for dummy driver.")
 
 module_param (fake_buffer, bool, 0444)
 
 MODULE_PARM_DESC (fake_buffer,"Fake buffer allocations.")
 

Variables

struct dummy_model model_emu10k1
 
struct dummy_model model_rme9652
 
struct dummy_model model_ice1712
 
struct dummy_model model_uda1341
 
struct dummy_model model_ac97
 
struct dummy_model model_ca0106
 
struct dummy_modeldummy_models []
 

Macro Definition Documentation

#define DUMMY_CAPSRC (   xname,
  xindex,
  addr 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
.get = snd_dummy_capsrc_get, .put = snd_dummy_capsrc_put, \
.private_value = addr }

Definition at line 782 of file dummy.c.

#define dummy_proc_init (   x)

Definition at line 977 of file dummy.c.

#define DUMMY_VOLUME (   xname,
  xindex,
  addr 
)
Value:
.name = xname, .index = xindex, \
.info = snd_dummy_volume_info, \
.get = snd_dummy_volume_get, .put = snd_dummy_volume_put, \
.private_value = addr, \
.tlv = { .p = db_scale_dummy } }

Definition at line 722 of file dummy.c.

#define MAX_BUFFER_SIZE   (64*1024)

Definition at line 49 of file dummy.c.

#define MAX_MIDI_DEVICES   2

Definition at line 46 of file dummy.c.

#define MAX_PCM_DEVICES   4

Definition at line 44 of file dummy.c.

#define MAX_PCM_SUBSTREAMS   128

Definition at line 45 of file dummy.c.

#define MAX_PERIOD_SIZE   MAX_BUFFER_SIZE

Definition at line 51 of file dummy.c.

#define MIN_PERIOD_SIZE   64

Definition at line 50 of file dummy.c.

#define MIXER_ADDR_CD   4

Definition at line 100 of file dummy.c.

#define MIXER_ADDR_LAST   4

Definition at line 101 of file dummy.c.

#define MIXER_ADDR_LINE   1

Definition at line 97 of file dummy.c.

#define MIXER_ADDR_MASTER   0

Definition at line 96 of file dummy.c.

#define MIXER_ADDR_MIC   2

Definition at line 98 of file dummy.c.

#define MIXER_ADDR_SYNTH   3

Definition at line 99 of file dummy.c.

#define snd_dummy_capsrc_info   snd_ctl_boolean_stereo_info

Definition at line 788 of file dummy.c.

#define SND_DUMMY_DRIVER   "snd_dummy"

Definition at line 1092 of file dummy.c.

#define SND_DUMMY_PM_OPS   NULL

Definition at line 1089 of file dummy.c.

#define USE_CHANNELS_MAX   2

Definition at line 57 of file dummy.c.

#define USE_CHANNELS_MIN   1

Definition at line 56 of file dummy.c.

#define USE_FORMATS   (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE)

Definition at line 52 of file dummy.c.

#define USE_PERIODS_MAX   1024

Definition at line 59 of file dummy.c.

#define USE_PERIODS_MIN   1

Definition at line 58 of file dummy.c.

Definition at line 53 of file dummy.c.

#define USE_RATE_MAX   48000

Definition at line 55 of file dummy.c.

#define USE_RATE_MIN   5500

Definition at line 54 of file dummy.c.

Function Documentation

MODULE_AUTHOR ( "Jaroslav Kysela <[email protected]>"  )
MODULE_DESCRIPTION ( "Dummy soundcard (/dev/null)"  )
MODULE_LICENSE ( "GPL"  )
module_param ( fake_buffer  ,
bool  ,
0444   
)
module_param_array ( index  ,
int  ,
NULL  ,
0444   
)
module_param_array ( id  ,
charp  ,
NULL  ,
0444   
)
module_param_array ( enable  ,
bool  ,
NULL  ,
0444   
)
module_param_array ( model  ,
charp  ,
NULL  ,
0444   
)
module_param_array ( pcm_devs  ,
int  ,
NULL  ,
0444   
)
module_param_array ( pcm_substreams  ,
int  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( index  ,
"Index value for dummy soundcard."   
)
MODULE_PARM_DESC ( id  ,
"ID string for dummy soundcard."   
)
MODULE_PARM_DESC ( enable  ,
"Enable this dummy soundcard."   
)
MODULE_PARM_DESC ( model  ,
"Soundcard model."   
)
MODULE_PARM_DESC ( pcm_devs  ,
"PCM devices # (0-4) for dummy driver."   
)
MODULE_PARM_DESC ( pcm_substreams  ,
"PCM substreams # (1-128) for dummy driver."   
)
MODULE_PARM_DESC ( fake_buffer  ,
"Fake buffer allocations."   
)
MODULE_SUPPORTED_DEVICE ( "{{ALSA,Dummy soundcard}}"  )

Variable Documentation

struct dummy_model* dummy_models[]
Initial value:

Definition at line 216 of file dummy.c.

struct dummy_model model_ac97
Initial value:
= {
.name = "ac97",
.channels_min = 2,
.channels_max = 2,
.rate_min = 48000,
.rate_max = 48000,
}

Definition at line 192 of file dummy.c.

struct dummy_model model_ca0106
Initial value:
= {
.name = "ca0106",
.buffer_bytes_max = ((65536-64)*8),
.period_bytes_max = (65536-64),
.periods_min = 2,
.periods_max = 8,
.channels_min = 2,
.channels_max = 2,
.rate_min = 48000,
.rate_max = 192000,
}

Definition at line 202 of file dummy.c.

struct dummy_model model_emu10k1
Initial value:
= {
.name = "emu10k1",
.playback_constraints = emu10k1_playback_constraints,
.buffer_bytes_max = 128 * 1024,
}

Definition at line 156 of file dummy.c.

struct dummy_model model_ice1712
Initial value:
= {
.name = "ice1712",
.buffer_bytes_max = 256 * 1024,
.channels_min = 10,
.channels_max = 10,
.periods_min = 1,
.periods_max = 1024,
}

Definition at line 172 of file dummy.c.

struct dummy_model model_rme9652
Initial value:
= {
.name = "rme9652",
.buffer_bytes_max = 26 * 64 * 1024,
.channels_min = 26,
.channels_max = 26,
.periods_min = 2,
.periods_max = 2,
}

Definition at line 162 of file dummy.c.

struct dummy_model model_uda1341
Initial value:
= {
.name = "uda1341",
.buffer_bytes_max = 16380,
.channels_min = 2,
.channels_max = 2,
.periods_min = 2,
.periods_max = 255,
}

Definition at line 182 of file dummy.c.