Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
init.c File Reference
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/file.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/ctype.h>
#include <linux/pm.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/info.h>

Go to the source code of this file.

Data Structures

struct  snd_monitor_file
 

Macros

#define init_info_for_card(card)
 

Functions

 EXPORT_SYMBOL (snd_cards)
 
 module_param_array (slots, charp, NULL, 0444)
 
 MODULE_PARM_DESC (slots,"Module names assigned to the slots.")
 
int snd_card_create (int idx, const char *xid, struct module *module, int extra_size, struct snd_card **card_ret)
 
 EXPORT_SYMBOL (snd_card_create)
 
int snd_card_locked (int card)
 
int snd_card_disconnect (struct snd_card *card)
 
 EXPORT_SYMBOL (snd_card_disconnect)
 
void snd_card_unref (struct snd_card *card)
 
 EXPORT_SYMBOL (snd_card_unref)
 
int snd_card_free_when_closed (struct snd_card *card)
 
 EXPORT_SYMBOL (snd_card_free_when_closed)
 
int snd_card_free (struct snd_card *card)
 
 EXPORT_SYMBOL (snd_card_free)
 
void snd_card_set_id (struct snd_card *card, const char *nid)
 
 EXPORT_SYMBOL (snd_card_set_id)
 
int snd_card_register (struct snd_card *card)
 
 EXPORT_SYMBOL (snd_card_register)
 
int snd_component_add (struct snd_card *card, const char *component)
 
 EXPORT_SYMBOL (snd_component_add)
 
int snd_card_file_add (struct snd_card *card, struct file *file)
 
 EXPORT_SYMBOL (snd_card_file_add)
 
int snd_card_file_remove (struct snd_card *card, struct file *file)
 
 EXPORT_SYMBOL (snd_card_file_remove)
 

Variables

struct snd_cardsnd_cards [SNDRV_CARDS]
 

Macro Definition Documentation

#define init_info_for_card (   card)

Definition at line 130 of file init.c.

Function Documentation

EXPORT_SYMBOL ( snd_cards  )
EXPORT_SYMBOL ( snd_card_create  )
EXPORT_SYMBOL ( snd_card_disconnect  )
EXPORT_SYMBOL ( snd_card_unref  )
EXPORT_SYMBOL ( snd_card_free_when_closed  )
EXPORT_SYMBOL ( snd_card_free  )
EXPORT_SYMBOL ( snd_card_set_id  )
EXPORT_SYMBOL ( snd_card_register  )
EXPORT_SYMBOL ( snd_component_add  )
EXPORT_SYMBOL ( snd_card_file_add  )
EXPORT_SYMBOL ( snd_card_file_remove  )
module_param_array ( slots  ,
charp  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( slots  ,
"Module names assigned to the slots."   
)
int snd_card_create ( int  idx,
const char xid,
struct module module,
int  extra_size,
struct snd_card **  card_ret 
)

snd_card_create - create and initialize a soundcard structure : card index (address) [0 ... (SNDRV_CARDS-1)] : card identification (ASCII string) : top level module for locking : allocate this extra size after the main soundcard structure : the pointer to store the created card instance

Creates and initializes a soundcard structure.

The function allocates snd_card instance via kzalloc with the given space for the driver to use freely. The allocated struct is stored in the given card_ret pointer.

Returns zero if successful or a negative error code.

Definition at line 149 of file init.c.

int snd_card_disconnect ( struct snd_card card)

snd_card_disconnect - disconnect all APIs from the file-operations (user space) : soundcard structure

Disconnects all APIs from the file-operations (user space).

Returns zero, otherwise a negative error code.

Note: The current implementation replaces all active file->f_op with special dummy file operations (they do nothing except release).

Definition at line 345 of file init.c.

int snd_card_file_add ( struct snd_card card,
struct file file 
)

Definition at line 888 of file init.c.

int snd_card_file_remove ( struct snd_card card,
struct file file 
)

Definition at line 925 of file init.c.

int snd_card_free ( struct snd_card card)

Definition at line 486 of file init.c.

int snd_card_free_when_closed ( struct snd_card card)

Definition at line 467 of file init.c.

int snd_card_locked ( int  card)

Definition at line 247 of file init.c.

int snd_card_register ( struct snd_card card)

snd_card_register - register the soundcard : soundcard structure

This function registers all the devices assigned to the soundcard. Until calling this, the ALSA control interface is blocked from the external accesses. Thus, you should call this function at the end of the initialization of the card.

Returns zero otherwise a negative error code if the registration failed.

Definition at line 682 of file init.c.

void snd_card_set_id ( struct snd_card card,
const char nid 
)

snd_card_set_id - set card identification name : soundcard structure : new identification string

This function sets the card identification and checks for name collisions.

Definition at line 608 of file init.c.

void snd_card_unref ( struct snd_card card)

snd_card_unref - release the reference counter : the card instance

Decrements the reference counter. When it reaches to zero, wake up the sleeper and call the destructor if needed.

Definition at line 457 of file init.c.

int snd_component_add ( struct snd_card card,
const char component 
)

snd_component_add - add a component string : soundcard structure : the component id string

This function adds the component id string to the supported list. The component can be referred from the alsa-lib.

Returns zero otherwise a negative error code.

Definition at line 855 of file init.c.

Variable Documentation

Definition at line 50 of file init.c.