#ifndef __SOUND_PCM_H
#define __SOUND_PCM_H
#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>
#include <linux/refcount.h>
#include <linux/uio.h>
#define snd_pcm_substream_chip(substream) …
#define snd_pcm_chip(pcm) …
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
#include <sound/pcm_oss.h>
#endif
struct snd_pcm_hardware { … };
struct snd_pcm_status64;
struct snd_pcm_substream;
struct snd_pcm_audio_tstamp_config;
struct snd_pcm_audio_tstamp_report;
struct snd_pcm_ops { … };
#if defined(CONFIG_SND_DYNAMIC_MINORS)
#define SNDRV_PCM_DEVICES …
#else
#define SNDRV_PCM_DEVICES …
#endif
#define SNDRV_PCM_IOCTL1_RESET …
#define SNDRV_PCM_IOCTL1_CHANNEL_INFO …
#define SNDRV_PCM_IOCTL1_FIFO_SIZE …
#define SNDRV_PCM_IOCTL1_SYNC_ID …
#define SNDRV_PCM_TRIGGER_STOP …
#define SNDRV_PCM_TRIGGER_START …
#define SNDRV_PCM_TRIGGER_PAUSE_PUSH …
#define SNDRV_PCM_TRIGGER_PAUSE_RELEASE …
#define SNDRV_PCM_TRIGGER_SUSPEND …
#define SNDRV_PCM_TRIGGER_RESUME …
#define SNDRV_PCM_TRIGGER_DRAIN …
#define SNDRV_PCM_POS_XRUN …
#define SNDRV_PCM_RATE_5512 …
#define SNDRV_PCM_RATE_8000 …
#define SNDRV_PCM_RATE_11025 …
#define SNDRV_PCM_RATE_16000 …
#define SNDRV_PCM_RATE_22050 …
#define SNDRV_PCM_RATE_32000 …
#define SNDRV_PCM_RATE_44100 …
#define SNDRV_PCM_RATE_48000 …
#define SNDRV_PCM_RATE_64000 …
#define SNDRV_PCM_RATE_88200 …
#define SNDRV_PCM_RATE_96000 …
#define SNDRV_PCM_RATE_176400 …
#define SNDRV_PCM_RATE_192000 …
#define SNDRV_PCM_RATE_352800 …
#define SNDRV_PCM_RATE_384000 …
#define SNDRV_PCM_RATE_705600 …
#define SNDRV_PCM_RATE_768000 …
#define SNDRV_PCM_RATE_12000 …
#define SNDRV_PCM_RATE_24000 …
#define SNDRV_PCM_RATE_128000 …
#define SNDRV_PCM_RATE_CONTINUOUS …
#define SNDRV_PCM_RATE_KNOT …
#define SNDRV_PCM_RATE_8000_44100 …
#define SNDRV_PCM_RATE_8000_48000 …
#define SNDRV_PCM_RATE_8000_96000 …
#define SNDRV_PCM_RATE_8000_192000 …
#define SNDRV_PCM_RATE_8000_384000 …
#define SNDRV_PCM_RATE_8000_768000 …
#define _SNDRV_PCM_FMTBIT(fmt) …
#define SNDRV_PCM_FMTBIT_S8 …
#define SNDRV_PCM_FMTBIT_U8 …
#define SNDRV_PCM_FMTBIT_S16_LE …
#define SNDRV_PCM_FMTBIT_S16_BE …
#define SNDRV_PCM_FMTBIT_U16_LE …
#define SNDRV_PCM_FMTBIT_U16_BE …
#define SNDRV_PCM_FMTBIT_S24_LE …
#define SNDRV_PCM_FMTBIT_S24_BE …
#define SNDRV_PCM_FMTBIT_U24_LE …
#define SNDRV_PCM_FMTBIT_U24_BE …
#define SNDRV_PCM_FMTBIT_S32_LE …
#define SNDRV_PCM_FMTBIT_S32_BE …
#define SNDRV_PCM_FMTBIT_U32_LE …
#define SNDRV_PCM_FMTBIT_U32_BE …
#define SNDRV_PCM_FMTBIT_FLOAT_LE …
#define SNDRV_PCM_FMTBIT_FLOAT_BE …
#define SNDRV_PCM_FMTBIT_FLOAT64_LE …
#define SNDRV_PCM_FMTBIT_FLOAT64_BE …
#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE …
#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE …
#define SNDRV_PCM_FMTBIT_MU_LAW …
#define SNDRV_PCM_FMTBIT_A_LAW …
#define SNDRV_PCM_FMTBIT_IMA_ADPCM …
#define SNDRV_PCM_FMTBIT_MPEG …
#define SNDRV_PCM_FMTBIT_GSM …
#define SNDRV_PCM_FMTBIT_S20_LE …
#define SNDRV_PCM_FMTBIT_U20_LE …
#define SNDRV_PCM_FMTBIT_S20_BE …
#define SNDRV_PCM_FMTBIT_U20_BE …
#define SNDRV_PCM_FMTBIT_SPECIAL …
#define SNDRV_PCM_FMTBIT_S24_3LE …
#define SNDRV_PCM_FMTBIT_U24_3LE …
#define SNDRV_PCM_FMTBIT_S24_3BE …
#define SNDRV_PCM_FMTBIT_U24_3BE …
#define SNDRV_PCM_FMTBIT_S20_3LE …
#define SNDRV_PCM_FMTBIT_U20_3LE …
#define SNDRV_PCM_FMTBIT_S20_3BE …
#define SNDRV_PCM_FMTBIT_U20_3BE …
#define SNDRV_PCM_FMTBIT_S18_3LE …
#define SNDRV_PCM_FMTBIT_U18_3LE …
#define SNDRV_PCM_FMTBIT_S18_3BE …
#define SNDRV_PCM_FMTBIT_U18_3BE …
#define SNDRV_PCM_FMTBIT_G723_24 …
#define SNDRV_PCM_FMTBIT_G723_24_1B …
#define SNDRV_PCM_FMTBIT_G723_40 …
#define SNDRV_PCM_FMTBIT_G723_40_1B …
#define SNDRV_PCM_FMTBIT_DSD_U8 …
#define SNDRV_PCM_FMTBIT_DSD_U16_LE …
#define SNDRV_PCM_FMTBIT_DSD_U32_LE …
#define SNDRV_PCM_FMTBIT_DSD_U16_BE …
#define SNDRV_PCM_FMTBIT_DSD_U32_BE …
#ifdef SNDRV_LITTLE_ENDIAN
#define SNDRV_PCM_FMTBIT_S16 …
#define SNDRV_PCM_FMTBIT_U16 …
#define SNDRV_PCM_FMTBIT_S24 …
#define SNDRV_PCM_FMTBIT_U24 …
#define SNDRV_PCM_FMTBIT_S32 …
#define SNDRV_PCM_FMTBIT_U32 …
#define SNDRV_PCM_FMTBIT_FLOAT …
#define SNDRV_PCM_FMTBIT_FLOAT64 …
#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME …
#define SNDRV_PCM_FMTBIT_S20 …
#define SNDRV_PCM_FMTBIT_U20 …
#endif
#ifdef SNDRV_BIG_ENDIAN
#define SNDRV_PCM_FMTBIT_S16 …
#define SNDRV_PCM_FMTBIT_U16 …
#define SNDRV_PCM_FMTBIT_S24 …
#define SNDRV_PCM_FMTBIT_U24 …
#define SNDRV_PCM_FMTBIT_S32 …
#define SNDRV_PCM_FMTBIT_U32 …
#define SNDRV_PCM_FMTBIT_FLOAT …
#define SNDRV_PCM_FMTBIT_FLOAT64 …
#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME …
#define SNDRV_PCM_FMTBIT_S20 …
#define SNDRV_PCM_FMTBIT_U20 …
#endif
#define _SNDRV_PCM_SUBFMTBIT(fmt) …
#define SNDRV_PCM_SUBFMTBIT_STD …
#define SNDRV_PCM_SUBFMTBIT_MSBITS_MAX …
#define SNDRV_PCM_SUBFMTBIT_MSBITS_20 …
#define SNDRV_PCM_SUBFMTBIT_MSBITS_24 …
struct snd_pcm_file { … };
struct snd_pcm_hw_rule;
snd_pcm_hw_rule_func_t;
struct snd_pcm_hw_rule { … };
struct snd_pcm_hw_constraints { … };
static inline struct snd_mask *constrs_mask(struct snd_pcm_hw_constraints *constrs,
snd_pcm_hw_param_t var)
{ … }
static inline struct snd_interval *constrs_interval(struct snd_pcm_hw_constraints *constrs,
snd_pcm_hw_param_t var)
{ … }
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_hw_constraint_ranges { … };
struct snd_pcm_audio_tstamp_config { … };
static inline void snd_pcm_unpack_audio_tstamp_config(__u32 data,
struct snd_pcm_audio_tstamp_config *config)
{ … }
struct snd_pcm_audio_tstamp_report { … };
static inline void snd_pcm_pack_audio_tstamp_report(__u32 *data, __u32 *accuracy,
const struct snd_pcm_audio_tstamp_report *report)
{ … }
struct snd_pcm_runtime { … };
struct snd_pcm_group { … };
struct pid;
struct snd_pcm_substream { … };
#define SUBSTREAM_BUSY(substream) …
struct snd_pcm_str { … };
struct snd_pcm { … };
extern const struct file_operations snd_pcm_f_ops[2];
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);
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
struct snd_pcm_notify { … };
int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree);
#endif
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_status64(struct snd_pcm_substream *substream,
struct snd_pcm_status64 *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_stop_xrun(struct snd_pcm_substream *substream);
#ifdef CONFIG_PM
int snd_pcm_suspend_all(struct snd_pcm *pcm);
#else
static inline int snd_pcm_suspend_all(struct snd_pcm *pcm)
{
return 0;
}
#endif
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);
int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area);
#ifdef CONFIG_SND_DEBUG
void snd_pcm_debug_name(struct snd_pcm_substream *substream,
char *name, size_t len);
#else
static inline void
snd_pcm_debug_name(struct snd_pcm_substream *substream, char *buf, size_t size)
{
*buf = 0;
}
#endif
static inline int snd_pcm_stream_linked(struct snd_pcm_substream *substream)
{ … }
void snd_pcm_stream_lock(struct snd_pcm_substream *substream);
void snd_pcm_stream_unlock(struct snd_pcm_substream *substream);
void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream);
void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream);
unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream);
unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *substream);
#define snd_pcm_stream_lock_irqsave(substream, flags) …
void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream,
unsigned long flags);
#define snd_pcm_stream_lock_irqsave_nested(substream, flags) …
DEFINE_LOCK_GUARD_1(pcm_stream_lock, struct snd_pcm_substream,
snd_pcm_stream_lock(_T->lock),
snd_pcm_stream_unlock(_T->lock))
DEFINE_LOCK_GUARD_1(pcm_stream_lock_irq, struct snd_pcm_substream,
snd_pcm_stream_lock_irq(_T->lock),
snd_pcm_stream_unlock_irq(_T->lock))
DEFINE_LOCK_GUARD_1(pcm_stream_lock_irqsave, struct snd_pcm_substream,
snd_pcm_stream_lock_irqsave(_T->lock, _T->flags),
snd_pcm_stream_unlock_irqrestore(_T->lock, _T->flags),
… }
#define snd_pcm_group_for_each_entry(s, substream) …
#define for_each_pcm_streams(stream) …
static inline int snd_pcm_running(struct snd_pcm_substream *substream)
{ … }
static inline void __snd_pcm_set_state(struct snd_pcm_runtime *runtime,
snd_pcm_state_t state)
{ … }
static inline ssize_t bytes_to_samples(struct snd_pcm_runtime *runtime, ssize_t size)
{ … }
static inline snd_pcm_sframes_t bytes_to_frames(struct snd_pcm_runtime *runtime, ssize_t size)
{ … }
static inline ssize_t samples_to_bytes(struct snd_pcm_runtime *runtime, ssize_t size)
{ … }
static inline ssize_t frames_to_bytes(struct snd_pcm_runtime *runtime, snd_pcm_sframes_t size)
{ … }
static inline int frame_aligned(struct snd_pcm_runtime *runtime, ssize_t bytes)
{ … }
static inline size_t snd_pcm_lib_buffer_bytes(struct snd_pcm_substream *substream)
{ … }
static inline size_t snd_pcm_lib_period_bytes(struct snd_pcm_substream *substream)
{ … }
static inline snd_pcm_uframes_t snd_pcm_playback_avail(struct snd_pcm_runtime *runtime)
{ … }
static inline snd_pcm_uframes_t snd_pcm_capture_avail(struct snd_pcm_runtime *runtime)
{ … }
static inline snd_pcm_sframes_t snd_pcm_playback_hw_avail(struct snd_pcm_runtime *runtime)
{ … }
static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(struct snd_pcm_runtime *runtime)
{ … }
static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream)
{ … }
static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream)
{ … }
static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream)
{ … }
static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream)
{ … }
static inline int snd_pcm_capture_empty(struct snd_pcm_substream *substream)
{ … }
static inline void snd_pcm_trigger_done(struct snd_pcm_substream *substream,
struct snd_pcm_substream *master)
{ … }
static inline int hw_is_mask(int var)
{ … }
static inline int hw_is_interval(int var)
{ … }
static inline struct snd_mask *hw_param_mask(struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var)
{ … }
static inline struct snd_interval *hw_param_interval(struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var)
{ … }
static inline const struct snd_mask *hw_param_mask_c(const struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var)
{ … }
static inline const struct snd_interval *hw_param_interval_c(const struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var)
{ … }
static inline unsigned int params_channels(const struct snd_pcm_hw_params *p)
{ … }
static inline unsigned int params_rate(const struct snd_pcm_hw_params *p)
{ … }
static inline unsigned int params_period_size(const struct snd_pcm_hw_params *p)
{ … }
static inline unsigned int params_periods(const struct snd_pcm_hw_params *p)
{ … }
static inline unsigned int params_buffer_size(const struct snd_pcm_hw_params *p)
{ … }
static inline unsigned int params_buffer_bytes(const struct snd_pcm_hw_params *p)
{ … }
int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v);
int snd_interval_list(struct snd_interval *i, unsigned int count,
const unsigned int *list, unsigned int mask);
int snd_interval_ranges(struct snd_interval *i, unsigned int count,
const struct snd_interval *list, unsigned int mask);
int snd_interval_ratnum(struct snd_interval *i,
unsigned int rats_count, const 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_refine(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params);
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_ranges(struct snd_pcm_runtime *runtime,
unsigned int cond,
snd_pcm_hw_param_t var,
const struct snd_pcm_hw_constraint_ranges *r);
int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
unsigned int cond,
snd_pcm_hw_param_t var,
const 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,
const 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, ...);
static inline int snd_pcm_hw_constraint_single(
struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
unsigned int val)
{ … }
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);
#if 0
int snd_pcm_format_cpu_endian(snd_pcm_format_t format);
#endif
#ifdef SNDRV_LITTLE_ENDIAN
#define snd_pcm_format_cpu_endian(format) …
#else
#define snd_pcm_format_cpu_endian …
#endif
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 char *snd_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);
void snd_pcm_set_ops(struct snd_pcm * pcm, int direction,
const struct snd_pcm_ops *ops);
void snd_pcm_set_sync_per_card(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params,
const unsigned char *id, unsigned int len);
static inline void snd_pcm_set_sync(struct snd_pcm_substream *substream)
{ … }
int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg);
void snd_pcm_period_elapsed_under_stream_lock(struct snd_pcm_substream *substream);
void snd_pcm_period_elapsed(struct snd_pcm_substream *substream);
snd_pcm_sframes_t __snd_pcm_lib_xfer(struct snd_pcm_substream *substream,
void *buf, bool interleaved,
snd_pcm_uframes_t frames, bool in_kernel);
static inline snd_pcm_sframes_t
snd_pcm_lib_write(struct snd_pcm_substream *substream,
const void __user *buf, snd_pcm_uframes_t frames)
{ … }
static inline snd_pcm_sframes_t
snd_pcm_lib_read(struct snd_pcm_substream *substream,
void __user *buf, snd_pcm_uframes_t frames)
{ … }
static inline snd_pcm_sframes_t
snd_pcm_lib_writev(struct snd_pcm_substream *substream,
void __user **bufs, snd_pcm_uframes_t frames)
{ … }
static inline snd_pcm_sframes_t
snd_pcm_lib_readv(struct snd_pcm_substream *substream,
void __user **bufs, snd_pcm_uframes_t frames)
{ … }
static inline snd_pcm_sframes_t
snd_pcm_kernel_write(struct snd_pcm_substream *substream,
const void *buf, snd_pcm_uframes_t frames)
{ … }
static inline snd_pcm_sframes_t
snd_pcm_kernel_read(struct snd_pcm_substream *substream,
void *buf, snd_pcm_uframes_t frames)
{ … }
static inline snd_pcm_sframes_t
snd_pcm_kernel_writev(struct snd_pcm_substream *substream,
void **bufs, snd_pcm_uframes_t frames)
{ … }
static inline snd_pcm_sframes_t
snd_pcm_kernel_readv(struct snd_pcm_substream *substream,
void **bufs, snd_pcm_uframes_t frames)
{ … }
int snd_pcm_hw_limit_rates(struct snd_pcm_hardware *hw);
static inline 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);
unsigned int snd_pcm_rate_mask_intersect(unsigned int rates_a,
unsigned int rates_b);
unsigned int snd_pcm_rate_range_to_bits(unsigned int rate_min,
unsigned int rate_max);
static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream,
struct snd_dma_buffer *bufp)
{ … }
static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime,
struct timespec64 *tv)
{ … }
void snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream);
void snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm);
void snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream,
int type, struct device *data,
size_t size, size_t max);
void 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_set_managed_buffer(struct snd_pcm_substream *substream, int type,
struct device *data, size_t size, size_t max);
int snd_pcm_set_managed_buffer_all(struct snd_pcm *pcm, int type,
struct device *data,
size_t size, size_t max);
static inline int __must_check
snd_pcm_set_fixed_buffer(struct snd_pcm_substream *substream, int type,
struct device *data, size_t size)
{ … }
static inline int __must_check
snd_pcm_set_fixed_buffer_all(struct snd_pcm *pcm, int type,
struct device *data, size_t size)
{ … }
#define snd_pcm_get_dma_buf(substream) …
static inline dma_addr_t
snd_pcm_sgbuf_get_addr(struct snd_pcm_substream *substream, unsigned int ofs)
{ … }
static inline unsigned int
snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream,
unsigned int ofs, unsigned int size)
{ … }
static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
{ … }
static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
{ … }
int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
struct vm_area_struct *area);
#if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_ALPHA)
#define SNDRV_PCM_INFO_MMAP_IOMEM …
int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_struct *area);
#else
#define SNDRV_PCM_INFO_MMAP_IOMEM …
#define snd_pcm_lib_mmap_iomem …
#endif
static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
{ … }
#define SNDRV_PCM_DEFAULT_CON_SPDIF …
const char *snd_pcm_format_name(snd_pcm_format_t format);
static inline const char *snd_pcm_direction_name(int direction)
{ … }
static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
{ … }
struct snd_pcm_chmap_elem { … };
struct snd_pcm_chmap { … };
static inline struct snd_pcm_substream *
snd_pcm_chmap_substream(struct snd_pcm_chmap *info, unsigned int idx)
{ … }
extern const struct snd_pcm_chmap_elem snd_pcm_std_chmaps[];
extern const struct snd_pcm_chmap_elem snd_pcm_alt_chmaps[];
#define SND_PCM_CHMAP_MASK_24 …
#define SND_PCM_CHMAP_MASK_246 …
#define SND_PCM_CHMAP_MASK_2468 …
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);
static inline u64 pcm_format_to_bits(snd_pcm_format_t pcm_format)
{ … }
#define pcm_for_each_format(f) …
#define pcm_err(pcm, fmt, args...) …
#define pcm_warn(pcm, fmt, args...) …
#define pcm_dbg(pcm, fmt, args...) …
int copy_to_iter_fromio(struct iov_iter *itert, const void __iomem *src,
size_t count);
int copy_from_iter_toio(void __iomem *dst, struct iov_iter *iter, size_t count);
struct snd_pcm_status64 { … };
#define SNDRV_PCM_IOCTL_STATUS64 …
#define SNDRV_PCM_IOCTL_STATUS_EXT64 …
struct snd_pcm_status32 { … };
#define SNDRV_PCM_IOCTL_STATUS32 …
#define SNDRV_PCM_IOCTL_STATUS_EXT32 …
#endif