aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 0d1112815be3..c75c0d1a85e2 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -810,7 +810,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_pa
810int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, 810int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime,
811 unsigned int cond, 811 unsigned int cond,
812 snd_pcm_hw_param_t var, 812 snd_pcm_hw_param_t var,
813 struct snd_pcm_hw_constraint_list *l); 813 const struct snd_pcm_hw_constraint_list *l);
814int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 814int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
815 unsigned int cond, 815 unsigned int cond,
816 snd_pcm_hw_param_t var, 816 snd_pcm_hw_param_t var,
@@ -893,6 +893,7 @@ extern const struct snd_pcm_hw_constraint_list snd_pcm_known_rates;
893 893
894int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime); 894int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime);
895unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate); 895unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate);
896unsigned int snd_pcm_rate_bit_to_rate(unsigned int rate_bit);
896 897
897static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream, 898static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream,
898 struct snd_dma_buffer *bufp) 899 struct snd_dma_buffer *bufp)
@@ -1073,4 +1074,15 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
1073 1074
1074const char *snd_pcm_format_name(snd_pcm_format_t format); 1075const char *snd_pcm_format_name(snd_pcm_format_t format);
1075 1076
1077/**
1078 * Get a string naming the direction of a stream
1079 */
1080static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
1081{
1082 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
1083 return "Playback";
1084 else
1085 return "Capture";
1086}
1087
1076#endif /* __SOUND_PCM_H */ 1088#endif /* __SOUND_PCM_H */