Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
pcm.h File Reference
#include <sound/asound.h>
#include <sound/memalloc.h>
#include <sound/minors.h>
#include <linux/poll.h>
#include <linux/mm.h>
#include <linux/bitops.h>
#include <linux/pm_qos.h>

Go to the source code of this file.

Data Structures

struct  snd_pcm_hardware
 
struct  snd_pcm_ops
 
struct  snd_pcm_file
 
struct  snd_pcm_hw_rule
 
struct  snd_pcm_hw_constraints
 
struct  snd_ratnum
 
struct  snd_ratden
 
struct  snd_pcm_hw_constraint_ratnums
 
struct  snd_pcm_hw_constraint_ratdens
 
struct  snd_pcm_hw_constraint_list
 
struct  snd_pcm_runtime
 
struct  snd_pcm_group
 
struct  snd_pcm_substream
 
struct  snd_pcm_str
 
struct  snd_pcm
 
struct  snd_pcm_notify
 
struct  snd_pcm_chmap_elem
 
struct  snd_pcm_chmap
 

Macros

#define snd_pcm_substream_chip(substream)   ((substream)->private_data)
 
#define snd_pcm_chip(pcm)   ((pcm)->private_data)
 
#define SNDRV_PCM_DEVICES   8
 
#define SNDRV_PCM_IOCTL1_FALSE   ((void *)0)
 
#define SNDRV_PCM_IOCTL1_TRUE   ((void *)1)
 
#define SNDRV_PCM_IOCTL1_RESET   0
 
#define SNDRV_PCM_IOCTL1_INFO   1
 
#define SNDRV_PCM_IOCTL1_CHANNEL_INFO   2
 
#define SNDRV_PCM_IOCTL1_GSTATE   3
 
#define SNDRV_PCM_IOCTL1_FIFO_SIZE   4
 
#define SNDRV_PCM_TRIGGER_STOP   0
 
#define SNDRV_PCM_TRIGGER_START   1
 
#define SNDRV_PCM_TRIGGER_PAUSE_PUSH   3
 
#define SNDRV_PCM_TRIGGER_PAUSE_RELEASE   4
 
#define SNDRV_PCM_TRIGGER_SUSPEND   5
 
#define SNDRV_PCM_TRIGGER_RESUME   6
 
#define SNDRV_PCM_POS_XRUN   ((snd_pcm_uframes_t)-1)
 
#define SNDRV_PCM_RATE_5512   (1<<0) /* 5512Hz */
 
#define SNDRV_PCM_RATE_8000   (1<<1) /* 8000Hz */
 
#define SNDRV_PCM_RATE_11025   (1<<2) /* 11025Hz */
 
#define SNDRV_PCM_RATE_16000   (1<<3) /* 16000Hz */
 
#define SNDRV_PCM_RATE_22050   (1<<4) /* 22050Hz */
 
#define SNDRV_PCM_RATE_32000   (1<<5) /* 32000Hz */
 
#define SNDRV_PCM_RATE_44100   (1<<6) /* 44100Hz */
 
#define SNDRV_PCM_RATE_48000   (1<<7) /* 48000Hz */
 
#define SNDRV_PCM_RATE_64000   (1<<8) /* 64000Hz */
 
#define SNDRV_PCM_RATE_88200   (1<<9) /* 88200Hz */
 
#define SNDRV_PCM_RATE_96000   (1<<10) /* 96000Hz */
 
#define SNDRV_PCM_RATE_176400   (1<<11) /* 176400Hz */
 
#define SNDRV_PCM_RATE_192000   (1<<12) /* 192000Hz */
 
#define SNDRV_PCM_RATE_CONTINUOUS   (1<<30) /* continuous range */
 
#define SNDRV_PCM_RATE_KNOT   (1<<31) /* supports more non-continuos rates */
 
#define SNDRV_PCM_RATE_8000_44100
 
#define SNDRV_PCM_RATE_8000_48000   (SNDRV_PCM_RATE_8000_44100|SNDRV_PCM_RATE_48000)
 
#define SNDRV_PCM_RATE_8000_96000
 
#define SNDRV_PCM_RATE_8000_192000
 
#define _SNDRV_PCM_FMTBIT(fmt)   (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt)
 
#define SNDRV_PCM_FMTBIT_S8   _SNDRV_PCM_FMTBIT(S8)
 
#define SNDRV_PCM_FMTBIT_U8   _SNDRV_PCM_FMTBIT(U8)
 
#define SNDRV_PCM_FMTBIT_S16_LE   _SNDRV_PCM_FMTBIT(S16_LE)
 
#define SNDRV_PCM_FMTBIT_S16_BE   _SNDRV_PCM_FMTBIT(S16_BE)
 
#define SNDRV_PCM_FMTBIT_U16_LE   _SNDRV_PCM_FMTBIT(U16_LE)
 
#define SNDRV_PCM_FMTBIT_U16_BE   _SNDRV_PCM_FMTBIT(U16_BE)
 
#define SNDRV_PCM_FMTBIT_S24_LE   _SNDRV_PCM_FMTBIT(S24_LE)
 
#define SNDRV_PCM_FMTBIT_S24_BE   _SNDRV_PCM_FMTBIT(S24_BE)
 
#define SNDRV_PCM_FMTBIT_U24_LE   _SNDRV_PCM_FMTBIT(U24_LE)
 
#define SNDRV_PCM_FMTBIT_U24_BE   _SNDRV_PCM_FMTBIT(U24_BE)
 
#define SNDRV_PCM_FMTBIT_S32_LE   _SNDRV_PCM_FMTBIT(S32_LE)
 
#define SNDRV_PCM_FMTBIT_S32_BE   _SNDRV_PCM_FMTBIT(S32_BE)
 
#define SNDRV_PCM_FMTBIT_U32_LE   _SNDRV_PCM_FMTBIT(U32_LE)
 
#define SNDRV_PCM_FMTBIT_U32_BE   _SNDRV_PCM_FMTBIT(U32_BE)
 
#define SNDRV_PCM_FMTBIT_FLOAT_LE   _SNDRV_PCM_FMTBIT(FLOAT_LE)
 
#define SNDRV_PCM_FMTBIT_FLOAT_BE   _SNDRV_PCM_FMTBIT(FLOAT_BE)
 
#define SNDRV_PCM_FMTBIT_FLOAT64_LE   _SNDRV_PCM_FMTBIT(FLOAT64_LE)
 
#define SNDRV_PCM_FMTBIT_FLOAT64_BE   _SNDRV_PCM_FMTBIT(FLOAT64_BE)
 
#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE   _SNDRV_PCM_FMTBIT(IEC958_SUBFRAME_LE)
 
#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE   _SNDRV_PCM_FMTBIT(IEC958_SUBFRAME_BE)
 
#define SNDRV_PCM_FMTBIT_MU_LAW   _SNDRV_PCM_FMTBIT(MU_LAW)
 
#define SNDRV_PCM_FMTBIT_A_LAW   _SNDRV_PCM_FMTBIT(A_LAW)
 
#define SNDRV_PCM_FMTBIT_IMA_ADPCM   _SNDRV_PCM_FMTBIT(IMA_ADPCM)
 
#define SNDRV_PCM_FMTBIT_MPEG   _SNDRV_PCM_FMTBIT(MPEG)
 
#define SNDRV_PCM_FMTBIT_GSM   _SNDRV_PCM_FMTBIT(GSM)
 
#define SNDRV_PCM_FMTBIT_SPECIAL   _SNDRV_PCM_FMTBIT(SPECIAL)
 
#define SNDRV_PCM_FMTBIT_S24_3LE   _SNDRV_PCM_FMTBIT(S24_3LE)
 
#define SNDRV_PCM_FMTBIT_U24_3LE   _SNDRV_PCM_FMTBIT(U24_3LE)
 
#define SNDRV_PCM_FMTBIT_S24_3BE   _SNDRV_PCM_FMTBIT(S24_3BE)
 
#define SNDRV_PCM_FMTBIT_U24_3BE   _SNDRV_PCM_FMTBIT(U24_3BE)
 
#define SNDRV_PCM_FMTBIT_S20_3LE   _SNDRV_PCM_FMTBIT(S20_3LE)
 
#define SNDRV_PCM_FMTBIT_U20_3LE   _SNDRV_PCM_FMTBIT(U20_3LE)
 
#define SNDRV_PCM_FMTBIT_S20_3BE   _SNDRV_PCM_FMTBIT(S20_3BE)
 
#define SNDRV_PCM_FMTBIT_U20_3BE   _SNDRV_PCM_FMTBIT(U20_3BE)
 
#define SNDRV_PCM_FMTBIT_S18_3LE   _SNDRV_PCM_FMTBIT(S18_3LE)
 
#define SNDRV_PCM_FMTBIT_U18_3LE   _SNDRV_PCM_FMTBIT(U18_3LE)
 
#define SNDRV_PCM_FMTBIT_S18_3BE   _SNDRV_PCM_FMTBIT(S18_3BE)
 
#define SNDRV_PCM_FMTBIT_U18_3BE   _SNDRV_PCM_FMTBIT(U18_3BE)
 
#define SNDRV_PCM_FMTBIT_G723_24   _SNDRV_PCM_FMTBIT(G723_24)
 
#define SNDRV_PCM_FMTBIT_G723_24_1B   _SNDRV_PCM_FMTBIT(G723_24_1B)
 
#define SNDRV_PCM_FMTBIT_G723_40   _SNDRV_PCM_FMTBIT(G723_40)
 
#define SNDRV_PCM_FMTBIT_G723_40_1B   _SNDRV_PCM_FMTBIT(G723_40_1B)
 
#define SUBSTREAM_BUSY(substream)   ((substream)->ref_count > 0)
 
#define snd_pcm_stream_lock_irqsave(substream, flags)
 
#define snd_pcm_stream_unlock_irqrestore(substream, flags)
 
#define snd_pcm_group_for_each_entry(s, substream)   list_for_each_entry(s, &substream->group->substreams, link_list)
 
#define params_channels(p)   (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min)
 
#define params_rate(p)   (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_RATE)->min)
 
#define params_period_size(p)   (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min)
 
#define params_periods(p)   (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIODS)->min)
 
#define params_buffer_size(p)   (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min)
 
#define params_buffer_bytes(p)   (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min)
 
#define snd_pcm_format_cpu_endian(format)   snd_pcm_format_big_endian(format)
 
#define snd_pcm_lib_alloc_vmalloc_buffer(subs, size)
 
#define snd_pcm_lib_alloc_vmalloc_32_buffer(subs, size)
 
#define snd_pcm_get_dma_buf(substream)   ((substream)->runtime->dma_buffer_p)
 
#define snd_pcm_sgbuf_ops_page   NULL
 
#define SNDRV_PCM_INFO_MMAP_IOMEM   0
 
#define snd_pcm_lib_mmap_iomem   NULL
 
#define snd_pcm_lib_mmap_vmalloc   NULL
 
#define SNDRV_PCM_DEFAULT_CON_SPDIF
 
#define PCM_RUNTIME_CHECK(sub)   snd_BUG_ON(!(sub) || !(sub)->runtime)
 
#define SND_PCM_CHMAP_MASK_24   ((1U << 2) | (1U << 4))
 
#define SND_PCM_CHMAP_MASK_246   (SND_PCM_CHMAP_MASK_24 | (1U << 6))
 
#define SND_PCM_CHMAP_MASK_2468   (SND_PCM_CHMAP_MASK_246 | (1U << 8))
 

Typedefs

typedef int(* snd_pcm_hw_rule_func_t )(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule)
 

Functions

int snd_pcm_new (struct snd_card *card, const char *id, int device, int playback_count, int capture_count, struct snd_pcm **rpcm)
 
int snd_pcm_new_internal (struct snd_card *card, const char *id, int device, int playback_count, int capture_count, struct snd_pcm **rpcm)
 
int snd_pcm_new_stream (struct snd_pcm *pcm, int stream, int substream_count)
 
int snd_pcm_notify (struct snd_pcm_notify *notify, int nfree)
 
int snd_pcm_info (struct snd_pcm_substream *substream, struct snd_pcm_info *info)
 
int snd_pcm_info_user (struct snd_pcm_substream *substream, struct snd_pcm_info __user *info)
 
int snd_pcm_status (struct snd_pcm_substream *substream, struct snd_pcm_status *status)
 
int snd_pcm_start (struct snd_pcm_substream *substream)
 
int snd_pcm_stop (struct snd_pcm_substream *substream, snd_pcm_state_t status)
 
int snd_pcm_drain_done (struct snd_pcm_substream *substream)
 
int snd_pcm_kernel_ioctl (struct snd_pcm_substream *substream, unsigned int cmd, void *arg)
 
int snd_pcm_open_substream (struct snd_pcm *pcm, int stream, struct file *file, struct snd_pcm_substream **rsubstream)
 
void snd_pcm_release_substream (struct snd_pcm_substream *substream)
 
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)
 
void snd_pcm_vma_notify_data (void *client, void *data)
 
int snd_pcm_mmap_data (struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area)
 
int snd_interval_refine (struct snd_interval *i, const struct snd_interval *v)
 
void snd_interval_mul (const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c)
 
void snd_interval_div (const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c)
 
void snd_interval_muldivk (const struct snd_interval *a, const struct snd_interval *b, unsigned int k, struct snd_interval *c)
 
void snd_interval_mulkdiv (const struct snd_interval *a, unsigned int k, const struct snd_interval *b, struct snd_interval *c)
 
int snd_interval_list (struct snd_interval *i, unsigned int count, const unsigned int *list, unsigned int mask)
 
int snd_interval_ratnum (struct snd_interval *i, unsigned int rats_count, struct snd_ratnum *rats, unsigned int *nump, unsigned int *denp)
 
void _snd_pcm_hw_params_any (struct snd_pcm_hw_params *params)
 
void _snd_pcm_hw_param_setempty (struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var)
 
int snd_pcm_hw_params_choose (struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params)
 
int snd_pcm_hw_refine (struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params)
 
int snd_pcm_hw_constraints_init (struct snd_pcm_substream *substream)
 
int snd_pcm_hw_constraints_complete (struct snd_pcm_substream *substream)
 
int snd_pcm_hw_constraint_mask (struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, u_int32_t mask)
 
int snd_pcm_hw_constraint_mask64 (struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, u_int64_t mask)
 
int snd_pcm_hw_constraint_minmax (struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, unsigned int min, unsigned int max)
 
int snd_pcm_hw_constraint_integer (struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var)
 
int snd_pcm_hw_constraint_list (struct snd_pcm_runtime *runtime, unsigned int cond, snd_pcm_hw_param_t var, const struct snd_pcm_hw_constraint_list *l)
 
int snd_pcm_hw_constraint_ratnums (struct snd_pcm_runtime *runtime, unsigned int cond, snd_pcm_hw_param_t var, struct snd_pcm_hw_constraint_ratnums *r)
 
int snd_pcm_hw_constraint_ratdens (struct snd_pcm_runtime *runtime, unsigned int cond, snd_pcm_hw_param_t var, struct snd_pcm_hw_constraint_ratdens *r)
 
int snd_pcm_hw_constraint_msbits (struct snd_pcm_runtime *runtime, unsigned int cond, unsigned int width, unsigned int msbits)
 
int snd_pcm_hw_constraint_step (struct snd_pcm_runtime *runtime, unsigned int cond, snd_pcm_hw_param_t var, unsigned long step)
 
int snd_pcm_hw_constraint_pow2 (struct snd_pcm_runtime *runtime, unsigned int cond, snd_pcm_hw_param_t var)
 
int snd_pcm_hw_rule_noresample (struct snd_pcm_runtime *runtime, unsigned int base_rate)
 
int snd_pcm_hw_rule_add (struct snd_pcm_runtime *runtime, unsigned int cond, int var, snd_pcm_hw_rule_func_t func, void *private, int dep,...)
 
int snd_pcm_format_signed (snd_pcm_format_t format)
 
int snd_pcm_format_unsigned (snd_pcm_format_t format)
 
int snd_pcm_format_linear (snd_pcm_format_t format)
 
int snd_pcm_format_little_endian (snd_pcm_format_t format)
 
int snd_pcm_format_big_endian (snd_pcm_format_t format)
 
int snd_pcm_format_width (snd_pcm_format_t format)
 
int snd_pcm_format_physical_width (snd_pcm_format_t format)
 
ssize_t snd_pcm_format_size (snd_pcm_format_t format, size_t samples)
 
const unsigned charsnd_pcm_format_silence_64 (snd_pcm_format_t format)
 
int snd_pcm_format_set_silence (snd_pcm_format_t format, void *buf, unsigned int frames)
 
snd_pcm_format_t snd_pcm_build_linear_format (int width, int unsignd, int big_endian)
 
void snd_pcm_set_ops (struct snd_pcm *pcm, int direction, struct snd_pcm_ops *ops)
 
void snd_pcm_set_sync (struct snd_pcm_substream *substream)
 
int snd_pcm_lib_interleave_len (struct snd_pcm_substream *substream)
 
int snd_pcm_lib_ioctl (struct snd_pcm_substream *substream, unsigned int cmd, void *arg)
 
int snd_pcm_update_state (struct snd_pcm_substream *substream, struct snd_pcm_runtime *runtime)
 
int snd_pcm_update_hw_ptr (struct snd_pcm_substream *substream)
 
int snd_pcm_playback_xrun_check (struct snd_pcm_substream *substream)
 
int snd_pcm_capture_xrun_check (struct snd_pcm_substream *substream)
 
int snd_pcm_playback_xrun_asap (struct snd_pcm_substream *substream)
 
int snd_pcm_capture_xrun_asap (struct snd_pcm_substream *substream)
 
void snd_pcm_playback_silence (struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr)
 
void snd_pcm_period_elapsed (struct snd_pcm_substream *substream)
 
snd_pcm_sframes_t snd_pcm_lib_write (struct snd_pcm_substream *substream, const void __user *buf, snd_pcm_uframes_t frames)
 
snd_pcm_sframes_t snd_pcm_lib_read (struct snd_pcm_substream *substream, void __user *buf, snd_pcm_uframes_t frames)
 
snd_pcm_sframes_t snd_pcm_lib_writev (struct snd_pcm_substream *substream, void __user **bufs, snd_pcm_uframes_t frames)
 
snd_pcm_sframes_t snd_pcm_lib_readv (struct snd_pcm_substream *substream, void __user **bufs, snd_pcm_uframes_t frames)
 
int snd_pcm_limit_hw_rates (struct snd_pcm_runtime *runtime)
 
unsigned int snd_pcm_rate_to_rate_bit (unsigned int rate)
 
unsigned int snd_pcm_rate_bit_to_rate (unsigned int rate_bit)
 
void snd_pcm_timer_resolution_change (struct snd_pcm_substream *substream)
 
void snd_pcm_timer_init (struct snd_pcm_substream *substream)
 
void snd_pcm_timer_done (struct snd_pcm_substream *substream)
 
int snd_pcm_lib_preallocate_free (struct snd_pcm_substream *substream)
 
int snd_pcm_lib_preallocate_free_for_all (struct snd_pcm *pcm)
 
int snd_pcm_lib_preallocate_pages (struct snd_pcm_substream *substream, int type, struct device *data, size_t size, size_t max)
 
int snd_pcm_lib_preallocate_pages_for_all (struct snd_pcm *pcm, int type, void *data, size_t size, size_t max)
 
int snd_pcm_lib_malloc_pages (struct snd_pcm_substream *substream, size_t size)
 
int snd_pcm_lib_free_pages (struct snd_pcm_substream *substream)
 
int _snd_pcm_lib_alloc_vmalloc_buffer (struct snd_pcm_substream *substream, size_t size, gfp_t gfp_flags)
 
int snd_pcm_lib_free_vmalloc_buffer (struct snd_pcm_substream *substream)
 
struct pagesnd_pcm_lib_get_vmalloc_page (struct snd_pcm_substream *substream, unsigned long offset)
 
int snd_pcm_lib_default_mmap (struct snd_pcm_substream *substream, struct vm_area_struct *area)
 
const charsnd_pcm_format_name (snd_pcm_format_t format)
 
int snd_pcm_add_chmap_ctls (struct snd_pcm *pcm, int stream, const struct snd_pcm_chmap_elem *chmap, int max_channels, unsigned long private_value, struct snd_pcm_chmap **info_ret)
 

Variables

struct file_operations snd_pcm_f_ops [2]
 
rwlock_t snd_pcm_link_rwlock
 
struct snd_pcm_hw_constraint_list snd_pcm_known_rates
 
struct snd_pcm_chmap_elem snd_pcm_std_chmaps []
 
struct snd_pcm_chmap_elem snd_pcm_alt_chmaps []
 

Macro Definition Documentation

#define _SNDRV_PCM_FMTBIT (   fmt)    (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt)

Definition at line 139 of file pcm.h.

#define params_buffer_bytes (   p)    (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min)

Definition at line 779 of file pcm.h.

#define params_buffer_size (   p)    (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min)

Definition at line 777 of file pcm.h.

#define params_channels (   p)    (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min)

Definition at line 769 of file pcm.h.

#define params_period_size (   p)    (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min)

Definition at line 773 of file pcm.h.

#define params_periods (   p)    (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIODS)->min)

Definition at line 775 of file pcm.h.

#define params_rate (   p)    (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_RATE)->min)

Definition at line 771 of file pcm.h.

#define PCM_RUNTIME_CHECK (   sub)    snd_BUG_ON(!(sub) || !(sub)->runtime)

Definition at line 1063 of file pcm.h.

#define snd_pcm_chip (   pcm)    ((pcm)->private_data)

Definition at line 35 of file pcm.h.

#define SND_PCM_CHMAP_MASK_24   ((1U << 2) | (1U << 4))

Definition at line 1116 of file pcm.h.

#define SND_PCM_CHMAP_MASK_246   (SND_PCM_CHMAP_MASK_24 | (1U << 6))

Definition at line 1117 of file pcm.h.

#define SND_PCM_CHMAP_MASK_2468   (SND_PCM_CHMAP_MASK_246 | (1U << 8))

Definition at line 1118 of file pcm.h.

#define snd_pcm_format_cpu_endian (   format)    snd_pcm_format_big_endian(format)

Definition at line 860 of file pcm.h.

#define snd_pcm_get_dma_buf (   substream)    ((substream)->runtime->dma_buffer_p)

Definition at line 986 of file pcm.h.

#define snd_pcm_group_for_each_entry (   s,
  substream 
)    list_for_each_entry(s, &substream->group->substreams, link_list)

Definition at line 572 of file pcm.h.

#define snd_pcm_lib_alloc_vmalloc_32_buffer (   subs,
  size 
)
Value:

Definition at line 982 of file pcm.h.

#define snd_pcm_lib_alloc_vmalloc_buffer (   subs,
  size 
)
Value:

Definition at line 979 of file pcm.h.

#define snd_pcm_lib_mmap_iomem   NULL

Definition at line 1044 of file pcm.h.

#define snd_pcm_lib_mmap_vmalloc   NULL

Definition at line 1047 of file pcm.h.

#define snd_pcm_sgbuf_ops_page   NULL

Definition at line 1001 of file pcm.h.

#define snd_pcm_stream_lock_irqsave (   substream,
  flags 
)
Value:
do { \
read_lock_irqsave(&snd_pcm_link_rwlock, (flags)); \
spin_lock(&substream->self_group.lock); \
} while (0)

Definition at line 560 of file pcm.h.

#define snd_pcm_stream_unlock_irqrestore (   substream,
  flags 
)
Value:
do { \
spin_unlock(&substream->self_group.lock); \
read_unlock_irqrestore(&snd_pcm_link_rwlock, (flags)); \
} while (0)

Definition at line 566 of file pcm.h.

#define snd_pcm_substream_chip (   substream)    ((substream)->private_data)

Definition at line 34 of file pcm.h.

#define SNDRV_PCM_DEFAULT_CON_SPDIF
#define SNDRV_PCM_DEVICES   8

Definition at line 92 of file pcm.h.

#define SNDRV_PCM_FMTBIT_A_LAW   _SNDRV_PCM_FMTBIT(A_LAW)

Definition at line 161 of file pcm.h.

#define SNDRV_PCM_FMTBIT_FLOAT64_BE   _SNDRV_PCM_FMTBIT(FLOAT64_BE)

Definition at line 157 of file pcm.h.

#define SNDRV_PCM_FMTBIT_FLOAT64_LE   _SNDRV_PCM_FMTBIT(FLOAT64_LE)

Definition at line 156 of file pcm.h.

#define SNDRV_PCM_FMTBIT_FLOAT_BE   _SNDRV_PCM_FMTBIT(FLOAT_BE)

Definition at line 155 of file pcm.h.

#define SNDRV_PCM_FMTBIT_FLOAT_LE   _SNDRV_PCM_FMTBIT(FLOAT_LE)

Definition at line 154 of file pcm.h.

#define SNDRV_PCM_FMTBIT_G723_24   _SNDRV_PCM_FMTBIT(G723_24)

Definition at line 178 of file pcm.h.

#define SNDRV_PCM_FMTBIT_G723_24_1B   _SNDRV_PCM_FMTBIT(G723_24_1B)

Definition at line 179 of file pcm.h.

#define SNDRV_PCM_FMTBIT_G723_40   _SNDRV_PCM_FMTBIT(G723_40)

Definition at line 180 of file pcm.h.

#define SNDRV_PCM_FMTBIT_G723_40_1B   _SNDRV_PCM_FMTBIT(G723_40_1B)

Definition at line 181 of file pcm.h.

#define SNDRV_PCM_FMTBIT_GSM   _SNDRV_PCM_FMTBIT(GSM)

Definition at line 164 of file pcm.h.

#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE   _SNDRV_PCM_FMTBIT(IEC958_SUBFRAME_BE)

Definition at line 159 of file pcm.h.

#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE   _SNDRV_PCM_FMTBIT(IEC958_SUBFRAME_LE)

Definition at line 158 of file pcm.h.

#define SNDRV_PCM_FMTBIT_IMA_ADPCM   _SNDRV_PCM_FMTBIT(IMA_ADPCM)

Definition at line 162 of file pcm.h.

#define SNDRV_PCM_FMTBIT_MPEG   _SNDRV_PCM_FMTBIT(MPEG)

Definition at line 163 of file pcm.h.

#define SNDRV_PCM_FMTBIT_MU_LAW   _SNDRV_PCM_FMTBIT(MU_LAW)

Definition at line 160 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S16_BE   _SNDRV_PCM_FMTBIT(S16_BE)

Definition at line 143 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S16_LE   _SNDRV_PCM_FMTBIT(S16_LE)

Definition at line 142 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S18_3BE   _SNDRV_PCM_FMTBIT(S18_3BE)

Definition at line 176 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S18_3LE   _SNDRV_PCM_FMTBIT(S18_3LE)

Definition at line 174 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S20_3BE   _SNDRV_PCM_FMTBIT(S20_3BE)

Definition at line 172 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S20_3LE   _SNDRV_PCM_FMTBIT(S20_3LE)

Definition at line 170 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S24_3BE   _SNDRV_PCM_FMTBIT(S24_3BE)

Definition at line 168 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S24_3LE   _SNDRV_PCM_FMTBIT(S24_3LE)

Definition at line 166 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S24_BE   _SNDRV_PCM_FMTBIT(S24_BE)

Definition at line 147 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S24_LE   _SNDRV_PCM_FMTBIT(S24_LE)

Definition at line 146 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S32_BE   _SNDRV_PCM_FMTBIT(S32_BE)

Definition at line 151 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S32_LE   _SNDRV_PCM_FMTBIT(S32_LE)

Definition at line 150 of file pcm.h.

#define SNDRV_PCM_FMTBIT_S8   _SNDRV_PCM_FMTBIT(S8)

Definition at line 140 of file pcm.h.

#define SNDRV_PCM_FMTBIT_SPECIAL   _SNDRV_PCM_FMTBIT(SPECIAL)

Definition at line 165 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U16_BE   _SNDRV_PCM_FMTBIT(U16_BE)

Definition at line 145 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U16_LE   _SNDRV_PCM_FMTBIT(U16_LE)

Definition at line 144 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U18_3BE   _SNDRV_PCM_FMTBIT(U18_3BE)

Definition at line 177 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U18_3LE   _SNDRV_PCM_FMTBIT(U18_3LE)

Definition at line 175 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U20_3BE   _SNDRV_PCM_FMTBIT(U20_3BE)

Definition at line 173 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U20_3LE   _SNDRV_PCM_FMTBIT(U20_3LE)

Definition at line 171 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U24_3BE   _SNDRV_PCM_FMTBIT(U24_3BE)

Definition at line 169 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U24_3LE   _SNDRV_PCM_FMTBIT(U24_3LE)

Definition at line 167 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U24_BE   _SNDRV_PCM_FMTBIT(U24_BE)

Definition at line 149 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U24_LE   _SNDRV_PCM_FMTBIT(U24_LE)

Definition at line 148 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U32_BE   _SNDRV_PCM_FMTBIT(U32_BE)

Definition at line 153 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U32_LE   _SNDRV_PCM_FMTBIT(U32_LE)

Definition at line 152 of file pcm.h.

#define SNDRV_PCM_FMTBIT_U8   _SNDRV_PCM_FMTBIT(U8)

Definition at line 141 of file pcm.h.

#define SNDRV_PCM_INFO_MMAP_IOMEM   0

Definition at line 1043 of file pcm.h.

#define SNDRV_PCM_IOCTL1_CHANNEL_INFO   2

Definition at line 100 of file pcm.h.

#define SNDRV_PCM_IOCTL1_FALSE   ((void *)0)

Definition at line 95 of file pcm.h.

#define SNDRV_PCM_IOCTL1_FIFO_SIZE   4

Definition at line 102 of file pcm.h.

#define SNDRV_PCM_IOCTL1_GSTATE   3

Definition at line 101 of file pcm.h.

#define SNDRV_PCM_IOCTL1_INFO   1

Definition at line 99 of file pcm.h.

#define SNDRV_PCM_IOCTL1_RESET   0

Definition at line 98 of file pcm.h.

#define SNDRV_PCM_IOCTL1_TRUE   ((void *)1)

Definition at line 96 of file pcm.h.

#define SNDRV_PCM_POS_XRUN   ((snd_pcm_uframes_t)-1)

Definition at line 111 of file pcm.h.

#define SNDRV_PCM_RATE_11025   (1<<2) /* 11025Hz */

Definition at line 116 of file pcm.h.

#define SNDRV_PCM_RATE_16000   (1<<3) /* 16000Hz */

Definition at line 117 of file pcm.h.

#define SNDRV_PCM_RATE_176400   (1<<11) /* 176400Hz */

Definition at line 125 of file pcm.h.

#define SNDRV_PCM_RATE_192000   (1<<12) /* 192000Hz */

Definition at line 126 of file pcm.h.

#define SNDRV_PCM_RATE_22050   (1<<4) /* 22050Hz */

Definition at line 118 of file pcm.h.

#define SNDRV_PCM_RATE_32000   (1<<5) /* 32000Hz */

Definition at line 119 of file pcm.h.

#define SNDRV_PCM_RATE_44100   (1<<6) /* 44100Hz */

Definition at line 120 of file pcm.h.

#define SNDRV_PCM_RATE_48000   (1<<7) /* 48000Hz */

Definition at line 121 of file pcm.h.

#define SNDRV_PCM_RATE_5512   (1<<0) /* 5512Hz */

Definition at line 114 of file pcm.h.

#define SNDRV_PCM_RATE_64000   (1<<8) /* 64000Hz */

Definition at line 122 of file pcm.h.

#define SNDRV_PCM_RATE_8000   (1<<1) /* 8000Hz */

Definition at line 115 of file pcm.h.

#define SNDRV_PCM_RATE_8000_192000
Value:

Definition at line 137 of file pcm.h.

#define SNDRV_PCM_RATE_8000_44100
Value:

Definition at line 131 of file pcm.h.

#define SNDRV_PCM_RATE_8000_48000   (SNDRV_PCM_RATE_8000_44100|SNDRV_PCM_RATE_48000)

Definition at line 134 of file pcm.h.

#define SNDRV_PCM_RATE_8000_96000
Value:

Definition at line 135 of file pcm.h.

#define SNDRV_PCM_RATE_88200   (1<<9) /* 88200Hz */

Definition at line 123 of file pcm.h.

#define SNDRV_PCM_RATE_96000   (1<<10) /* 96000Hz */

Definition at line 124 of file pcm.h.

#define SNDRV_PCM_RATE_CONTINUOUS   (1<<30) /* continuous range */

Definition at line 128 of file pcm.h.

#define SNDRV_PCM_RATE_KNOT   (1<<31) /* supports more non-continuos rates */

Definition at line 129 of file pcm.h.

#define SNDRV_PCM_TRIGGER_PAUSE_PUSH   3

Definition at line 106 of file pcm.h.

#define SNDRV_PCM_TRIGGER_PAUSE_RELEASE   4

Definition at line 107 of file pcm.h.

#define SNDRV_PCM_TRIGGER_RESUME   6

Definition at line 109 of file pcm.h.

#define SNDRV_PCM_TRIGGER_START   1

Definition at line 105 of file pcm.h.

#define SNDRV_PCM_TRIGGER_STOP   0

Definition at line 104 of file pcm.h.

#define SNDRV_PCM_TRIGGER_SUSPEND   5

Definition at line 108 of file pcm.h.

#define SUBSTREAM_BUSY (   substream)    ((substream)->ref_count > 0)

Definition at line 418 of file pcm.h.

Typedef Documentation

typedef int(* snd_pcm_hw_rule_func_t)(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule)

Definition at line 212 of file pcm.h.

Function Documentation

void _snd_pcm_hw_param_setempty ( struct snd_pcm_hw_params params,
snd_pcm_hw_param_t  var 
)

Definition at line 1508 of file pcm_lib.c.

void _snd_pcm_hw_params_any ( struct snd_pcm_hw_params params)

Definition at line 1462 of file pcm_lib.c.

int _snd_pcm_lib_alloc_vmalloc_buffer ( struct snd_pcm_substream substream,
size_t  size,
gfp_t  gfp_flags 
)

Definition at line 415 of file pcm_memory.c.

void snd_interval_div ( const struct snd_interval a,
const struct snd_interval b,
struct snd_interval c 
)

snd_interval_div - refine the interval value with division : dividend : divisor : quotient

c = a / b

Returns non-zero if the value is changed, zero if not changed.

Definition at line 725 of file pcm_lib.c.

int snd_interval_list ( struct snd_interval i,
unsigned int  count,
const unsigned int list,
unsigned int  mask 
)

snd_interval_list - refine the interval value from the list : the interval value to refine : the number of elements in the list : the value list : the bit-mask to evaluate

Refines the interval value from the list. When mask is non-zero, only the elements corresponding to bit 1 are evaluated.

Returns non-zero if the value is changed, zero if not changed.

Definition at line 1046 of file pcm_lib.c.

void snd_interval_mul ( const struct snd_interval a,
const struct snd_interval b,
struct snd_interval c 
)

Definition at line 701 of file pcm_lib.c.

void snd_interval_muldivk ( const struct snd_interval a,
const struct snd_interval b,
unsigned int  k,
struct snd_interval c 
)

snd_interval_muldivk - refine the interval value : dividend 1 : dividend 2 : divisor (as integer) : result

c = a * b / k

Returns non-zero if the value is changed, zero if not changed.

Definition at line 760 of file pcm_lib.c.

void snd_interval_mulkdiv ( const struct snd_interval a,
unsigned int  k,
const struct snd_interval b,
struct snd_interval c 
)

snd_interval_mulkdiv - refine the interval value : dividend 1 : dividend 2 (as integer) : divisor : result

c = a * k / b

Returns non-zero if the value is changed, zero if not changed.

Definition at line 791 of file pcm_lib.c.

int snd_interval_ratnum ( struct snd_interval i,
unsigned int  rats_count,
struct snd_ratnum rats,
unsigned int nump,
unsigned int denp 
)

snd_interval_ratnum - refine the interval value : interval to refine : number of ratnum_t : ratnum_t array : pointer to store the resultant numerator : pointer to store the resultant denominator

Returns non-zero if the value is changed, zero if not changed.

Definition at line 829 of file pcm_lib.c.

int snd_interval_refine ( struct snd_interval i,
const struct snd_interval v 
)

snd_interval_refine - refine the interval value of configurator : the interval value to refine : the interval value to refer to

Refines the interval value with the reference value. The interval is changed to the range satisfying both intervals. The interval status (min, max, integer, etc.) are evaluated.

Returns non-zero if the value is changed, zero if not changed.

Definition at line 630 of file pcm_lib.c.

int snd_pcm_add_chmap_ctls ( struct snd_pcm pcm,
int  stream,
const struct snd_pcm_chmap_elem chmap,
int  max_channels,
unsigned long  private_value,
struct snd_pcm_chmap **  info_ret 
)

snd_pcm_add_chmap_ctls - create channel-mapping control elements : the assigned PCM instance : stream direction : channel map elements (for query) : the max number of channels for the stream : the value passed to each kcontrol's private_value field : store struct snd_pcm_chmap instance if non-NULL

Create channel-mapping control elements assigned to the given PCM stream(s). Returns zero if succeed, or a negative error value.

Definition at line 2472 of file pcm_lib.c.

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.

snd_pcm_format_t snd_pcm_build_linear_format ( int  width,
int  unsignd,
int  big_endian 
)
int snd_pcm_capture_xrun_asap ( struct snd_pcm_substream substream)
int snd_pcm_capture_xrun_check ( struct snd_pcm_substream substream)
void snd_pcm_detach_substream ( struct snd_pcm_substream substream)

Definition at line 969 of file pcm.c.

int snd_pcm_drain_done ( struct snd_pcm_substream substream)

snd_pcm_drain_done - stop the DMA only when the given stream is playback : the PCM substream

After stopping, the state is changed to SETUP. Unlike snd_pcm_stop(), this affects only the given stream.

Definition at line 967 of file pcm_native.c.

int snd_pcm_format_big_endian ( snd_pcm_format_t  format)

snd_pcm_format_big_endian - Check the PCM format is big-endian : the format to check

Returns 1 if the given PCM format is big-endian, 0 if little-endian, or a negative error code if endian not specified.

Definition at line 289 of file pcm_misc.c.

int snd_pcm_format_linear ( snd_pcm_format_t  format)

snd_pcm_format_linear - Check the PCM format is linear : the format to check

Returns 1 if the given PCM format is linear, 0 if not.

Definition at line 256 of file pcm_misc.c.

int snd_pcm_format_little_endian ( snd_pcm_format_t  format)

snd_pcm_format_little_endian - Check the PCM format is little-endian : the format to check

Returns 1 if the given PCM format is little-endian, 0 if big-endian, or a negative error code if endian not specified.

Definition at line 270 of file pcm_misc.c.

const char* snd_pcm_format_name ( snd_pcm_format_t  format)

Definition at line 214 of file pcm.c.

int snd_pcm_format_physical_width ( snd_pcm_format_t  format)

snd_pcm_format_physical_width - return the physical bit-width of the format : the format to check

Returns the physical bit-width of the format, or a negative error code if unknown format.

Definition at line 327 of file pcm_misc.c.

int snd_pcm_format_set_silence ( snd_pcm_format_t  format,
void data,
unsigned int  samples 
)

snd_pcm_format_set_silence - set the silence data on the buffer : the PCM format : the buffer pointer : the number of samples to set silence

Sets the silence data on the buffer for the given samples.

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

Definition at line 384 of file pcm_misc.c.

int snd_pcm_format_signed ( snd_pcm_format_t  format)

snd_pcm_format_signed - Check the PCM format is signed linear : the format to check

Returns 1 if the given PCM format is signed linear, 0 if unsigned linear, and a negative error code for non-linear formats.

Definition at line 219 of file pcm_misc.c.

const unsigned char* snd_pcm_format_silence_64 ( snd_pcm_format_t  format)

snd_pcm_format_silence_64 - return the silent data in 8 bytes array : the format to check

Returns the format pattern to fill or NULL if error.

Definition at line 363 of file pcm_misc.c.

ssize_t snd_pcm_format_size ( snd_pcm_format_t  format,
size_t  samples 
)

snd_pcm_format_size - return the byte size of samples on the given format : the format to check : sampling rate

Returns the byte size of the given samples for the format, or a negative error code if unknown format.

Definition at line 347 of file pcm_misc.c.

int snd_pcm_format_unsigned ( snd_pcm_format_t  format)

snd_pcm_format_unsigned - Check the PCM format is unsigned linear : the format to check

Returns 1 if the given PCM format is unsigned linear, 0 if signed linear, and a negative error code for non-linear formats.

Definition at line 238 of file pcm_misc.c.

int snd_pcm_format_width ( snd_pcm_format_t  format)

snd_pcm_format_width - return the bit-width of the format : the format to check

Returns the bit-width of the format, or a negative error code if unknown format.

Definition at line 308 of file pcm_misc.c.

int snd_pcm_hw_constraint_integer ( struct snd_pcm_runtime runtime,
snd_pcm_hw_param_t  var 
)

Definition at line 1203 of file pcm_lib.c.

Definition at line 1251 of file pcm_lib.c.

int snd_pcm_hw_constraint_mask ( struct snd_pcm_runtime runtime,
snd_pcm_hw_param_t  var,
u_int32_t  mask 
)

Definition at line 1163 of file pcm_lib.c.

int snd_pcm_hw_constraint_mask64 ( struct snd_pcm_runtime runtime,
snd_pcm_hw_param_t  var,
u_int64_t  mask 
)

Definition at line 1183 of file pcm_lib.c.

int snd_pcm_hw_constraint_minmax ( struct snd_pcm_runtime runtime,
snd_pcm_hw_param_t  var,
unsigned int  min,
unsigned int  max 
)

Definition at line 1220 of file pcm_lib.c.

int snd_pcm_hw_constraint_msbits ( struct snd_pcm_runtime runtime,
unsigned int  cond,
unsigned int  width,
unsigned int  msbits 
)

snd_pcm_hw_constraint_msbits - add a hw constraint msbits rule : PCM runtime instance : condition bits : sample bits width : msbits width

Definition at line 1349 of file pcm_lib.c.

int snd_pcm_hw_constraint_pow2 ( struct snd_pcm_runtime runtime,
unsigned int  cond,
snd_pcm_hw_param_t  var 
)

Definition at line 1407 of file pcm_lib.c.

Definition at line 1318 of file pcm_lib.c.

Definition at line 1285 of file pcm_lib.c.

int snd_pcm_hw_constraint_step ( struct snd_pcm_runtime runtime,
unsigned int  cond,
snd_pcm_hw_param_t  var,
unsigned long  step 
)

Definition at line 1377 of file pcm_lib.c.

int snd_pcm_hw_constraints_complete ( struct snd_pcm_substream substream)

Definition at line 1935 of file pcm_native.c.

int snd_pcm_hw_constraints_init ( struct snd_pcm_substream substream)

Definition at line 1811 of file pcm_native.c.

int snd_pcm_hw_params_choose ( struct snd_pcm_substream pcm,
struct snd_pcm_hw_params params 
)

snd_pcm_hw_param_choose - choose a configuration defined by : PCM instance : the hw_params instance

Choose one configuration from configuration space defined by . The configuration chosen is that obtained fixing in this order: first access, first format, first subformat, min channels, min rate, min period time, max buffer size, min tick time

Definition at line 1628 of file pcm_lib.c.

int snd_pcm_hw_refine ( struct snd_pcm_substream substream,
struct snd_pcm_hw_params params 
)

Definition at line 164 of file pcm_native.c.

int snd_pcm_hw_rule_add ( struct snd_pcm_runtime runtime,
unsigned int  cond,
int  var,
snd_pcm_hw_rule_func_t  func,
void private,
int  dep,
  ... 
)

Definition at line 1106 of file pcm_lib.c.

int snd_pcm_hw_rule_noresample ( struct snd_pcm_runtime runtime,
unsigned int  base_rate 
)

snd_pcm_hw_rule_noresample - add a rule to allow disabling hw resampling : PCM runtime instance : the rate at which the hardware does not resample

Definition at line 1433 of file pcm_lib.c.

Definition at line 96 of file pcm_native.c.

int snd_pcm_info_user ( struct snd_pcm_substream substream,
struct snd_pcm_info __user info 
)

Definition at line 123 of file pcm_native.c.

int snd_pcm_kernel_ioctl ( struct snd_pcm_substream substream,
unsigned int  cmd,
void arg 
)

Definition at line 2797 of file pcm_native.c.

int snd_pcm_lib_default_mmap ( struct snd_pcm_substream substream,
struct vm_area_struct area 
)

Definition at line 3193 of file pcm_native.c.

int snd_pcm_lib_free_pages ( struct snd_pcm_substream substream)

snd_pcm_lib_free_pages - release the allocated DMA buffer. : the substream to release the DMA buffer

Releases the DMA buffer allocated via snd_pcm_lib_malloc_pages().

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

Definition at line 395 of file pcm_memory.c.

int snd_pcm_lib_free_vmalloc_buffer ( struct snd_pcm_substream substream)

snd_pcm_lib_free_vmalloc_buffer - free vmalloc buffer : the substream with a buffer allocated by snd_pcm_lib_alloc_vmalloc_buffer()

Definition at line 441 of file pcm_memory.c.

struct page* snd_pcm_lib_get_vmalloc_page ( struct snd_pcm_substream substream,
unsigned long  offset 
)
read

snd_pcm_lib_get_vmalloc_page - map vmalloc buffer offset to page struct : the substream with a buffer allocated by snd_pcm_lib_alloc_vmalloc_buffer() : offset in the buffer

This function is to be used as the page callback in the PCM ops.

Definition at line 462 of file pcm_memory.c.

int snd_pcm_lib_interleave_len ( struct snd_pcm_substream substream)
int snd_pcm_lib_ioctl ( struct snd_pcm_substream substream,
unsigned int  cmd,
void arg 
)

snd_pcm_lib_ioctl - a generic PCM ioctl callback : the pcm substream instance : ioctl command

  • : ioctl argument

Processes the generic ioctl commands for PCM. Can be passed as the ioctl callback for PCM ops.

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

Definition at line 1733 of file pcm_lib.c.

int snd_pcm_lib_malloc_pages ( struct snd_pcm_substream substream,
size_t  size 
)

snd_pcm_lib_malloc_pages - allocate the DMA buffer : the substream to allocate the DMA buffer to : the requested buffer size in bytes

Allocates the DMA buffer on the BUS type given earlier to snd_pcm_lib_preallocate_xxx_pages().

Returns 1 if the buffer is changed, 0 if not changed, or a negative code on failure.

Definition at line 343 of file pcm_memory.c.

int snd_pcm_lib_preallocate_free ( struct snd_pcm_substream substream)

snd_pcm_lib_preallocate_free - release the preallocated buffer of the specified substream. : the pcm substream instance

Releases the pre-allocated buffer of the given substream.

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

Definition at line 100 of file pcm_memory.c.

int snd_pcm_lib_preallocate_free_for_all ( struct snd_pcm pcm)

snd_pcm_lib_preallocate_free_for_all - release all pre-allocated buffers on the pcm : the pcm instance

Releases all the pre-allocated buffers on the given pcm.

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

Definition at line 120 of file pcm_memory.c.

int snd_pcm_lib_preallocate_pages ( struct snd_pcm_substream substream,
int  type,
struct device data,
size_t  size,
size_t  max 
)

snd_pcm_lib_preallocate_pages - pre-allocation for the given DMA type : the pcm substream instance : DMA type (SNDRV_DMA_TYPE_*) : DMA type dependent data : the requested pre-allocation size in bytes : the max. allowed pre-allocation size

Do pre-allocation for the given DMA buffer type.

When substream->dma_buf_id is set, the function tries to look for the reserved buffer, and the buffer is not freed but reserved at destruction time. The dma_buf_id must be unique for all systems (in the same DMA buffer type) e.g. using snd_dma_pci_buf_id().

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

Definition at line 270 of file pcm_memory.c.

int snd_pcm_lib_preallocate_pages_for_all ( struct snd_pcm pcm,
int  type,
void data,
size_t  size,
size_t  max 
)

snd_pcm_lib_preallocate_pages_for_all - pre-allocation for continuous memory type (all substreams) : the pcm instance : DMA type (SNDRV_DMA_TYPE_*) : DMA type dependent data : the requested pre-allocation size in bytes : the max. allowed pre-allocation size

Do pre-allocation to all substreams of the given pcm for the specified DMA type.

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

Definition at line 294 of file pcm_memory.c.

snd_pcm_sframes_t snd_pcm_lib_read ( struct snd_pcm_substream substream,
void __user buf,
snd_pcm_uframes_t  frames 
)

Definition at line 2230 of file pcm_lib.c.

snd_pcm_sframes_t snd_pcm_lib_readv ( struct snd_pcm_substream substream,
void __user **  bufs,
snd_pcm_uframes_t  frames 
)

Definition at line 2284 of file pcm_lib.c.

snd_pcm_sframes_t snd_pcm_lib_write ( struct snd_pcm_substream substream,
const void __user buf,
snd_pcm_uframes_t  frames 
)

Definition at line 2018 of file pcm_lib.c.

snd_pcm_sframes_t snd_pcm_lib_writev ( struct snd_pcm_substream substream,
void __user **  bufs,
snd_pcm_uframes_t  frames 
)

Definition at line 2079 of file pcm_lib.c.

int snd_pcm_limit_hw_rates ( struct snd_pcm_runtime runtime)

snd_pcm_limit_hw_rates - determine rate_min/rate_max fields : the runtime instance

Determines the rate_min and rate_max fields from the rates bits of the given runtime->hw.

Returns zero if successful.

Definition at line 454 of file pcm_misc.c.

int snd_pcm_mmap_data ( struct snd_pcm_substream substream,
struct file file,
struct vm_area_struct area 
)

Definition at line 3243 of file pcm_native.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.

int snd_pcm_open_substream ( struct snd_pcm pcm,
int  stream,
struct file file,
struct snd_pcm_substream **  rsubstream 
)

Definition at line 2047 of file pcm_native.c.

void snd_pcm_period_elapsed ( struct snd_pcm_substream substream)

snd_pcm_period_elapsed - update the pcm status for the next period : the pcm substream instance

This function is called from the interrupt handler when the PCM has processed the period size. It will update the current pointer, wake up sleepers, etc.

Even if more than one periods have elapsed since the last call, you have to call this only once.

Definition at line 1762 of file pcm_lib.c.

void snd_pcm_playback_silence ( struct snd_pcm_substream substream,
snd_pcm_uframes_t  new_hw_ptr 
)

Definition at line 44 of file pcm_lib.c.

int snd_pcm_playback_xrun_asap ( struct snd_pcm_substream substream)
int snd_pcm_playback_xrun_check ( struct snd_pcm_substream substream)
unsigned int snd_pcm_rate_bit_to_rate ( unsigned int  rate_bit)

snd_pcm_rate_bit_to_rate - converts SNDRV_PCM_RATE_xxx bit to sample rate : the rate bit to convert

Returns the sample rate that corresponds to the given SNDRV_PCM_RATE_xxx flag or 0 for an unknown rate bit

Definition at line 499 of file pcm_misc.c.

unsigned int snd_pcm_rate_to_rate_bit ( unsigned int  rate)

snd_pcm_rate_to_rate_bit - converts sample rate to SNDRV_PCM_RATE_xxx bit : the sample rate to convert

Returns the SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or SNDRV_PCM_RATE_KNOT for an unknown rate.

Definition at line 481 of file pcm_misc.c.

void snd_pcm_release_substream ( struct snd_pcm_substream substream)

Definition at line 2023 of file pcm_native.c.

void snd_pcm_set_ops ( struct snd_pcm pcm,
int  direction,
struct snd_pcm_ops ops 
)

snd_pcm_set_ops - set the PCM operators : the pcm instance : stream direction, SNDRV_PCM_STREAM_XXX : the operator table

Sets the given PCM operators to the pcm instance.

Definition at line 530 of file pcm_lib.c.

void snd_pcm_set_sync ( struct snd_pcm_substream substream)

snd_pcm_sync - set the PCM sync id : the pcm substream

Sets the PCM sync identifier for the card.

Definition at line 547 of file pcm_lib.c.

int snd_pcm_start ( struct snd_pcm_substream substream)

snd_pcm_start - start all linked streams : the PCM substream instance

Definition at line 900 of file pcm_native.c.

Definition at line 590 of file pcm_native.c.

int snd_pcm_stop ( struct snd_pcm_substream substream,
snd_pcm_state_t  state 
)

snd_pcm_stop - try to stop all running streams in the substream group : the PCM substream instance : PCM state after stopping the stream

The state of each stream is then changed to the given state unconditionally.

Definition at line 953 of file pcm_native.c.

void snd_pcm_timer_done ( struct snd_pcm_substream substream)

Definition at line 135 of file pcm_timer.c.

void snd_pcm_timer_init ( struct snd_pcm_substream substream)

Definition at line 109 of file pcm_timer.c.

void snd_pcm_timer_resolution_change ( struct snd_pcm_substream substream)

Definition at line 32 of file pcm_timer.c.

int snd_pcm_update_hw_ptr ( struct snd_pcm_substream substream)

Definition at line 517 of file pcm_lib.c.

int snd_pcm_update_state ( struct snd_pcm_substream substream,
struct snd_pcm_runtime runtime 
)

Definition at line 279 of file pcm_lib.c.

void snd_pcm_vma_notify_data ( void client,
void data 
)

Variable Documentation

struct snd_pcm_chmap_elem snd_pcm_alt_chmaps[]

Definition at line 2334 of file pcm_lib.c.

struct file_operations snd_pcm_f_ops[2]

Definition at line 3474 of file pcm_native.c.

struct snd_pcm_hw_constraint_list snd_pcm_known_rates

Definition at line 1784 of file pcm_native.c.

rwlock_t snd_pcm_link_rwlock
struct snd_pcm_chmap_elem snd_pcm_std_chmaps[]

Definition at line 2312 of file pcm_lib.c.