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

Go to the source code of this file.

Macros

#define FORMAT(v)   [SNDRV_PCM_FORMAT_##v] = #v
 
#define snd_pcm_proc_init()
 
#define snd_pcm_proc_done()
 

Functions

 MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>, Abramo Bagnara <[email protected]>")
 
 MODULE_DESCRIPTION ("Midlevel PCM code for ALSA.")
 
 MODULE_LICENSE ("GPL")
 
const charsnd_pcm_format_name (snd_pcm_format_t format)
 
 EXPORT_SYMBOL_GPL (snd_pcm_format_name)
 
int snd_pcm_new_stream (struct snd_pcm *pcm, int stream, int substream_count)
 
 EXPORT_SYMBOL (snd_pcm_new_stream)
 
int snd_pcm_new (struct snd_card *card, const char *id, int device, int playback_count, int capture_count, struct snd_pcm **rpcm)
 
 EXPORT_SYMBOL (snd_pcm_new)
 
int snd_pcm_new_internal (struct snd_card *card, const char *id, int device, int playback_count, int capture_count, struct snd_pcm **rpcm)
 
 EXPORT_SYMBOL (snd_pcm_new_internal)
 
int snd_pcm_attach_substream (struct snd_pcm *pcm, int stream, struct file *file, struct snd_pcm_substream **rsubstream)
 
void snd_pcm_detach_substream (struct snd_pcm_substream *substream)
 
int snd_pcm_notify (struct snd_pcm_notify *notify, int nfree)
 
 EXPORT_SYMBOL (snd_pcm_notify)
 

Macro Definition Documentation

#define FORMAT (   v)    [SNDRV_PCM_FORMAT_##v] = #v

Definition at line 167 of file pcm.c.

#define snd_pcm_proc_done ( )

Definition at line 1200 of file pcm.c.

#define snd_pcm_proc_init ( )

Definition at line 1199 of file pcm.c.

Function Documentation

EXPORT_SYMBOL ( snd_pcm_new_stream  )
EXPORT_SYMBOL ( snd_pcm_new  )
EXPORT_SYMBOL ( snd_pcm_new_internal  )
EXPORT_SYMBOL ( snd_pcm_notify  )
EXPORT_SYMBOL_GPL ( snd_pcm_format_name  )
MODULE_AUTHOR ( "Jaroslav Kysela <[email protected] ,
Abramo Bagnara< abramo @alsa-project.org >"   
)
MODULE_DESCRIPTION ( "Midlevel PCM code for ALSA."  )
MODULE_LICENSE ( "GPL"  )
int snd_pcm_attach_substream ( struct snd_pcm pcm,
int  stream,
struct file file,
struct snd_pcm_substream **  rsubstream 
)

Definition at line 849 of file pcm.c.

void snd_pcm_detach_substream ( struct snd_pcm_substream substream)

Definition at line 969 of file pcm.c.

const char* snd_pcm_format_name ( snd_pcm_format_t  format)

Definition at line 214 of file pcm.c.

int snd_pcm_new ( struct snd_card card,
const char id,
int  device,
int  playback_count,
int  capture_count,
struct snd_pcm **  rpcm 
)

snd_pcm_new - create a new PCM instance : the card instance : the id string : the device index (zero based) : the number of substreams for playback : the number of substreams for capture : the pointer to store the new pcm instance

Creates a new PCM instance.

The pcm operators have to be set afterwards to the new instance via snd_pcm_set_ops().

Returns zero if successful, or a negative error code on failure.

Definition at line 764 of file pcm.c.

int snd_pcm_new_internal ( struct snd_card card,
const char id,
int  device,
int  playback_count,
int  capture_count,
struct snd_pcm **  rpcm 
)

snd_pcm_new_internal - create a new internal PCM instance : the card instance : the id string : the device index (zero based - shared with normal PCMs) : the number of substreams for playback : the number of substreams for capture : the pointer to store the new pcm instance

Creates a new internal PCM instance with no userspace device or procfs entries. This is used by ASoC Back End PCMs in order to create a PCM that will only be used internally by kernel drivers. i.e. it cannot be opened by userspace. It provides existing ASoC components drivers with a substream and access to any private data.

The pcm operators have to be set afterwards to the new instance via snd_pcm_set_ops().

Returns zero if successful, or a negative error code on failure.

Definition at line 792 of file pcm.c.

int snd_pcm_new_stream ( struct snd_pcm pcm,
int  stream,
int  substream_count 
)

snd_pcm_new_stream - create a new PCM stream : the pcm instance : the stream direction, SNDRV_PCM_STREAM_XXX : the number of substreams

Creates a new stream for the pcm. The corresponding stream on the pcm must have been empty before calling this, i.e. zero must be given to the argument of snd_pcm_new().

Returns zero if successful, or a negative error code on failure.

Definition at line 642 of file pcm.c.

int snd_pcm_notify ( struct snd_pcm_notify notify,
int  nfree 
)

Definition at line 1127 of file pcm.c.