Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.1 71 lines 2.6 kB view raw
1/* 2 * pcm_local.h - a local header file for snd-pcm module. 3 * 4 * Copyright (c) Takashi Sakamoto <o-takashi@sakamocchi.jp> 5 * 6 * Licensed under the terms of the GNU General Public License, version 2. 7 */ 8 9#ifndef __SOUND_CORE_PCM_LOCAL_H 10#define __SOUND_CORE_PCM_LOCAL_H 11 12extern const struct snd_pcm_hw_constraint_list snd_pcm_known_rates; 13 14void snd_interval_mul(const struct snd_interval *a, 15 const struct snd_interval *b, struct snd_interval *c); 16void snd_interval_div(const struct snd_interval *a, 17 const struct snd_interval *b, struct snd_interval *c); 18void snd_interval_muldivk(const struct snd_interval *a, 19 const struct snd_interval *b, 20 unsigned int k, struct snd_interval *c); 21void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, 22 const struct snd_interval *b, struct snd_interval *c); 23 24int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream); 25int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream); 26 27int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, 28 snd_pcm_hw_param_t var, u_int32_t mask); 29 30int pcm_lib_apply_appl_ptr(struct snd_pcm_substream *substream, 31 snd_pcm_uframes_t appl_ptr); 32int snd_pcm_update_state(struct snd_pcm_substream *substream, 33 struct snd_pcm_runtime *runtime); 34int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); 35 36void snd_pcm_playback_silence(struct snd_pcm_substream *substream, 37 snd_pcm_uframes_t new_hw_ptr); 38 39static inline snd_pcm_uframes_t 40snd_pcm_avail(struct snd_pcm_substream *substream) 41{ 42 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 43 return snd_pcm_playback_avail(substream->runtime); 44 else 45 return snd_pcm_capture_avail(substream->runtime); 46} 47 48static inline snd_pcm_uframes_t 49snd_pcm_hw_avail(struct snd_pcm_substream *substream) 50{ 51 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 52 return snd_pcm_playback_hw_avail(substream->runtime); 53 else 54 return snd_pcm_capture_hw_avail(substream->runtime); 55} 56 57#ifdef CONFIG_SND_PCM_TIMER 58void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream); 59void snd_pcm_timer_init(struct snd_pcm_substream *substream); 60void snd_pcm_timer_done(struct snd_pcm_substream *substream); 61#else 62static inline void 63snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) {} 64static inline void snd_pcm_timer_init(struct snd_pcm_substream *substream) {} 65static inline void snd_pcm_timer_done(struct snd_pcm_substream *substream) {} 66#endif 67 68void __snd_pcm_xrun(struct snd_pcm_substream *substream); 69void snd_pcm_group_init(struct snd_pcm_group *group); 70 71#endif /* __SOUND_CORE_PCM_LOCAL_H */